/* =====================================================
   SIZEWISE — styles.css
   ===================================================== */

/* ── FONTS ──────────────────────────────────────────── */
@font-face {
  font-family: 'NeueHaasGrotesk';
  src: url('../fonts/neuehaasgrotdisp-45light-trial.otf') format('opentype');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NeueHaasGrotesk';
  src: url('../fonts/neuehaasgrotdisp-55roman-trial.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NeueHaasGrotesk';
  src: url('../fonts/neuehaasgrotdisp-65medium-trial.otf') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NeueHaasGrotesk';
  src: url('../fonts/neuehaasgrotdisp-75bold-trial.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NeueHaasGroteskText';
  src: url('../fonts/neuehaasgrottext-55roman-trial.otf') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NeueHaasGroteskText';
  src: url('../fonts/neuehaasgrottext-65medium-trial.otf') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'NeueHaasGroteskText';
  src: url('../fonts/neuehaasgrottext-75bold-trial.otf') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── DESIGN TOKENS ──────────────────────────────────── */
:root {
  /* Colours */
  --clr-page-bg:        #EAE5F0;   /* hero + navbar background */
  --clr-how-bg:         #DDD5E8;   /* "how it works" section   */
  --clr-form-bg:        #EDEDF0;   /* early-user section       */
  --clr-footer-bg:      #282828;   /* footer                   */

  --clr-btn:            #7B45A5;   /* primary purple button    */
  --clr-badge:          #E01F5C;   /* privacy badge (solid)    */

  --clr-card-1:         #ECDCDF;   /* Access & Shop  – pinkish */
  --clr-card-2:         #CFC5E1;   /* Scan your body – purple  */
  --clr-card-3:         #E3DCF0;   /* Get your fit   – lavender*/

  --clr-text-dark:      #1C1B1F;
  --clr-text-body:      #49454F;
  --clr-text-muted:     #79747E;
  --clr-email-label:    #C91D7C;

  --clr-input-border:   #CAC4D0;
  --clr-input-bg:       #FFFFFF;
  --clr-input-placeholder: #ABA5B5;

  --clr-scan-box:       #BABABA;   /* hero image placeholder   */
  --clr-outline-btn:    #7B45A5;

  /* Scan/hover accent */
  --clr-scan-line:      #E01F5C;
  --clr-scan-glow:      rgba(224,31,92,0.5);

  /* Typography */
  --font-display: 'NeueHaasGrotesk',     'Helvetica Neue', Arial, sans-serif;
  --font-body:    'NeueHaasGroteskText', 'Helvetica Neue', Arial, sans-serif;

  /* Border radius */
  --radius-badge:  99px;
  --radius-btn:    6px;
  --radius-card:   8px;
  --radius-input:  4px;
  --radius-image:  6px;

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── RESET ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--clr-text-dark);
  background: var(--clr-page-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ── SHARED CONTAINER ───────────────────────────────── */
/* Used by how-it-works and early-user.
   Hero + navbar have their own inner wrappers for full-width bg. */
.container {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
  padding-inline: 2.5rem;
}

/* ─────────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  border-radius: var(--radius-btn);
  padding: 0.625rem 1.25rem;
  white-space: nowrap;
  letter-spacing: 0.01em;
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.15s;
  text-decoration: none;
}
.btn:focus-visible {
  outline: 3px solid var(--clr-btn);
  outline-offset: 3px;
}

/* Filled purple */
.btn-primary {
  background: var(--clr-btn);
  color: #fff;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(123,69,165,0.35);
}
.btn-primary:active { transform: translateY(0); }

/* Ghost purple */
.btn-outline {
  background: transparent;
  color: var(--clr-outline-btn);
  border: 1.5px solid var(--clr-outline-btn);
}
.btn-outline:hover {
  background: rgba(123,69,165,0.06);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────────────────
   NAVBAR
───────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--clr-page-bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  border-color: rgba(0,0,0,0.08);
  box-shadow: 0 1px 10px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 960px;
  margin-inline: auto;
  padding: 0.9rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo: header-logo.png contains both the Sw icon AND "SizeWise" text */
.nav-logo img {
  height: 56px;
  width: auto;
  display: block;
}
.nav-logo:hover img { opacity: 0.85; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-link {
  font-size: 0.9375rem;
  color: var(--clr-text-body);
  transition: color 0.18s;
}
.nav-link:hover { color: var(--clr-badge); }

/* Hamburger (mobile) */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text-dark);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 2.5rem 1.5rem;
  background: var(--clr-page-bg);
  border-top: 1px solid rgba(0,0,0,0.08);
}
.mobile-menu.open { display: flex; }

/* ─────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────── */
.hero {
  background: var(--clr-page-bg);
  /* Subtle radial glow towards top-centre matching the design */
  background-image: radial-gradient(
    ellipse 80% 55% at 50% -5%,
    rgba(180,155,210,0.35) 0%,
    transparent 70%
  );
  padding: 80px 0 100px;
  position: relative;
}

.hero-inner {
  max-width: 960px;
  margin-inline: auto;
  padding-inline: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 4rem;
  align-items: center;
}

/* Privacy badge — SOLID hot-pink pill */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--clr-badge);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-badge);
  margin-bottom: 1.25rem;
}
.privacy-badge img {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  /* invert SVG to white since badge is pink */
  filter: brightness(0) invert(1);
}

/* Hero heading */
.hero-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 3.25rem;       /* ~52px – matches the design */
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--clr-text-dark);
  margin-bottom: 1rem;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--clr-text-body);
  max-width: 360px;
  margin-bottom: 1.5rem;
}

/* ─────────────────────────────────────────────────────
   HERO VISUAL  (gray box + hover scan animation)
───────────────────────────────────────────────────── */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;    /* matches the design rectangle proportions */
  cursor: crosshair;
}

/* The plain gray box – matches the design placeholder exactly */
.scan-container {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-image);
  background: var(--clr-scan-box);
  overflow: hidden;
  transition: box-shadow 0.35s var(--ease);
}
.scan-container:hover {
  box-shadow: 0 10px 36px rgba(123,69,165,0.22);
}

/* scan-placeholder fills the full container */
.scan-placeholder {
  position: absolute;
  inset: 0;
}

/* Person silhouette – centred, subtle opacity at rest */
.scan-person {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 46%;
  height: auto;
  opacity: 0.28;
  filter: drop-shadow(0 0 8px rgba(0,0,0,0.2));
  z-index: 2;
  transition: opacity 0.4s, filter 0.4s;
  pointer-events: none;
}
.scan-container:hover .scan-person {
  opacity: 0.55;
  filter: drop-shadow(0 0 16px rgba(224,31,92,0.45));
}

/* Grid overlay – only on hover */
.scan-grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s;
  background-image:
    linear-gradient(rgba(123,69,165,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(123,69,165,0.15) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}
.scan-container:hover .scan-grid { opacity: 1; }

/* Sweeping scan line – only on hover */
.scan-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--clr-scan-line) 25%,
    #FF6FAA 50%,
    var(--clr-scan-line) 75%,
    transparent 100%
  );
  box-shadow: 0 0 14px 4px var(--clr-scan-glow);
  z-index: 3;
  top: 0;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.scan-container:hover .scan-line {
  opacity: 1;
  animation: scanSweep 2s linear infinite;
}
@keyframes scanSweep {
  0%   { top: 0%; }
  100% { top: 100%; }
}

/* Corner brackets */
.scan-corners {
  position: absolute;
  inset: 14px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s 0.1s;
}
.scan-container:hover .scan-corners { opacity: 1; }

.corner {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--clr-scan-line);
  border-style: solid;
}
.corner.tl { top: 0; left: 0;  border-width: 2px 0 0 2px; }
.corner.tr { top: 0; right: 0; border-width: 2px 2px 0 0; }
.corner.bl { bottom: 0; left: 0;  border-width: 0 0 2px 2px; }
.corner.br { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* HUD progress bar */
.scan-hud {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0,0,0,0.38);
  backdrop-filter: blur(6px);
  border-radius: 99px;
  padding: 0.28rem 0.85rem;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s 0.15s;
  white-space: nowrap;
  pointer-events: none;
}
.scan-container:hover .scan-hud { opacity: 1; }

.hud-text {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.88);
}
.hud-progress {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  color: #FF6FAA;
  min-width: 3ch;
}

/* Floating data-point callouts */
.scan-data-points {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s 0.2s;
}
.scan-container:hover .scan-data-points { opacity: 1; }

.data-point {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 5px;
}
.data-point::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--clr-scan-line);
  box-shadow: 0 0 0 3px rgba(224,31,92,0.28);
  flex-shrink: 0;
}
.dp-label {
  font-family: var(--font-display);
  font-size: 0.62rem;
  font-weight: 500;
  color: #fff;
  background: rgba(0,0,0,0.42);
  backdrop-filter: blur(4px);
  border-radius: 3px;
  padding: 2px 5px;
  letter-spacing: 0.04em;
  animation: dpFloat 3s ease-in-out infinite;
}
.dp1 { top: 22%; left: 18%; }
.dp2 { top: 42%; right: 16%; }
.dp3 { top: 63%; right: 20%; }
.dp1 .dp-label { animation-delay: 0s; }
.dp2 .dp-label { animation-delay: 0.7s; }
.dp3 .dp-label { animation-delay: 1.4s; }
@keyframes dpFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-4px); }
}

/* Cursor spotlight */
.cursor-spotlight {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  border-radius: var(--radius-image);
  background: radial-gradient(
    circle 90px at var(--cx, 50%) var(--cy, 50%),
    rgba(255,255,255,0.18) 0%,
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
}
.hero-visual:hover .cursor-spotlight { opacity: 1; }

/* ─────────────────────────────────────────────────────
   HOW IT WORKS
───────────────────────────────────────────────────── */
.how-it-works {
  background: var(--clr-how-bg);
  padding: 80px 0;
}

.section-heading {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--clr-text-dark);
  text-align: center;
  margin-bottom: 2.5rem;
}

/* 3 equal cards */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.25rem;
}

/* ── Step cards – each has its own bg ── */
.step-card {
  border-radius: var(--radius-card);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.1);
}

/* Individual card colours */
.step-card[data-step="1"] { background: var(--clr-card-1); }
.step-card[data-step="2"] { background: var(--clr-card-2); }
.step-card[data-step="3"] { background: var(--clr-card-3); }

/* Icon */
.step-icon-wrap {
  margin-bottom: 0.5rem;
  height: 24px;
  display: flex;
  align-items: center;
}
.step-icon-wrap img {
  width: 22px;
  height: 22px;
  opacity: 0.7;
}

/* Title row: title left, big number right */
.step-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.25rem;
  margin-bottom: 0.625rem;
}
.step-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-text-dark);
  line-height: 1.25;
}
/* Large faded number – right side */
.step-number {
  font-family: var(--font-display);
  font-size: 5rem;           /* matches the very large number in the design */
  font-weight: 700;
  line-height: 0.8;
  color: rgba(28,27,31,0.14);
  flex-shrink: 0;
  letter-spacing: -0.03em;
  margin-top: -0.2rem;       /* pull up to align with card top */
}
.step-body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--clr-text-body);
}

/* CTA row below cards */
.steps-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ─────────────────────────────────────────────────────
   BE AN EARLY USER  (form section)
───────────────────────────────────────────────────── */
.early-user {
  background: var(--clr-form-bg);
  padding: 80px 0;
}

.early-inner {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 5rem;
  align-items: start;
}

/* Left info column */
.early-heading {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--clr-text-dark);
  margin-bottom: 0.75rem;
}
.early-sub {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--clr-text-body);
  margin-bottom: 2rem;
}

.early-email-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.early-email-label {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--clr-email-label);
  text-transform: uppercase;
}
.early-email {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--clr-text-dark);
  transition: color 0.18s;
}
.early-email:hover { color: var(--clr-email-label); }

/* ── Form ── */
.early-form {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--clr-text-body);
}

.form-input,
.form-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--clr-text-dark);
  background: var(--clr-input-bg);
  border: 1px solid var(--clr-input-border);
  border-radius: var(--radius-input);
  padding: 0.5625rem 0.75rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.form-input::placeholder { color: var(--clr-input-placeholder); }
.form-input:focus,
.form-select:focus {
  border-color: var(--clr-btn);
  box-shadow: 0 0 0 3px rgba(123,69,165,0.12);
}
.form-input.is-error,
.form-select.is-error {
  border-color: #B3261E;
  box-shadow: 0 0 0 3px rgba(179,38,30,0.1);
}

.form-error {
  font-size: 0.75rem;
  color: #B3261E;
  min-height: 1em;
}

/* Custom select chevron */
.select-wrap { position: relative; }
.select-wrap::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid var(--clr-text-muted);
}
.form-select { cursor: pointer; padding-right: 2rem; }

/* Submit button */
.form-submit {
  align-self: flex-start;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  padding: 0.625rem 1.25rem;
}

/* Success state */
.form-success {
  background: rgba(70,188,100,0.1);
  border: 1px solid rgba(70,188,100,0.35);
  color: #1A6E35;
  border-radius: var(--radius-input);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

/* ─────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────── */
.footer {
  background: var(--clr-footer-bg);
  color: #fff;
}

.footer-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem 2.5rem;
  gap: 1rem;
}

.footer-logo {
  height: 52px;
  width: auto;
  display: block;
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1.15;
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1rem 2rem;
  text-align: center;
}
.footer-bottom p {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.45);
}

/* ─────────────────────────────────────────────────────
   SCROLL REVEAL
───────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ─────────────────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ─────────────────────────────────────────────────────
   RESPONSIVE — tablet
───────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 0 2rem;
  }
  .hero { padding: 60px 0 80px; }
  .hero-heading { font-size: 2.5rem; }
  .hero-sub { max-width: 100%; }

  .hero-visual {
    max-width: 520px;
    margin-inline: auto;
    aspect-ratio: 16 / 10;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 460px;
    margin-inline: auto;
  }

  .early-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .form-row { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────────
   RESPONSIVE — mobile
───────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .nav-inner { padding: 0.75rem 1.25rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }

  .container { padding-inline: 1.25rem; }

  .hero { padding: 2.5rem 0 3.5rem; }
  .hero-inner { padding: 0 1.25rem; gap: 2rem; }
  .hero-heading { font-size: 2rem; }

  .how-it-works,
  .early-user { padding: 3.5rem 0; }

  .section-heading,
  .early-heading { font-size: 1.75rem; }

  .steps-cta { flex-direction: column; align-items: center; }
  .form-submit { width: 100%; justify-content: center; }

  .footer-tagline { font-size: 2rem; }
}
