/* ================== GLOBAL DESIGN SYSTEM (fluid + responsive) ================== */
:root{
  /* Brand + colors */
  --accent:#D4AF37;
  --bg:#ffffff; --text:#111; --muted:#6B7280; --line:#E5E7EB;

  /* Fluid type scale using vmin so it preserves composition across aspect ratios */
  --heroTitle: clamp(36px, 8vmin, 80px);
  --heroSub:   clamp(14px, 2vmin, 22px);
  --h2:        clamp(20px, 3vmin, 32px);
  --body:      clamp(14px, 1.4vmin + 8px, 18px);

  /* Layout */
  --wrap: min(1280px, 92vw, 160vmin);
  --padX: 24px;
  --navH: 56px;

  /* Devices / mocks */
  --phoneW:  clamp(240px, 24vmin, 360px);
  --laptopMax: min(1320px, 100vmin);

  /* Sections */
  --sectionPadTop: calc(var(--navH) + 24px);
  --sectionPadBot: 64px;

  /* Consumers */
  --consTitleSize: clamp(32px, 6vmin, 56px);
  --phoneCardW:  clamp(300px, 28vmin, 360px);
  --phoneImgH:   clamp(320px, 52vmin, 560px);
  --consGap:     clamp(20px, 4vmin, 60px);
  --consPadY:    18px;

  /* Brand section */
  --calloutW: clamp(260px, 22vmin, 320px);
  --brandStageGap: clamp(16px, 4vmin, 40px);
}
/* =============================================================================== */

*{box-sizing:border-box}
html{scroll-behavior:smooth; scroll-padding-top: var(--navH);}
html,body{min-height:100%;}
body{
  margin:0; background:var(--bg); color:var(--text);
  font:var(--body)/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text","SF Pro Display",
       "Helvetica Neue","Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}

/* ================================ TOP NAV ==================================== */
.topnav{
  position:sticky; top:0; left:0; right:0; z-index:100;
  backdrop-filter:saturate(180%) blur(8px);
  background:rgba(255,255,255,0.7);
  border-bottom:1px solid rgba(0,0,0,.06);
}
.topnav .wrap{display:flex; align-items:center; justify-content:space-between; padding:10px var(--padX); max-width:var(--wrap); margin:0 auto;}
.logo{font-weight:700}
.nav-links{display:flex; align-items:center; gap:16px}
.nav-links a{color:#222; text-decoration:none;}
.nav-links a:hover{opacity:.7}
.nav-toggle{display:none; border:1px solid var(--line); background:#fff; border-radius:8px; padding:6px 10px; font-size:16px;}

.lang-switch{display:flex; align-items:center; gap:6px; margin-left:8px;}
.lang-switch .lang{ text-decoration:none; color:#111; font-weight:600; padding:6px 8px; border-radius:8px;}
.lang-switch .lang.is-active{ background:#f2f2f2;}

/* Mobile nav */
@media (max-width: 860px){
  .nav-toggle{display:block}
  .nav-links{display:none; position:absolute; right:24px; top:calc(100% + 8px); background:#fff; border:1px solid var(--line); border-radius:12px; padding:12px; box-shadow:0 16px 40px rgba(0,0,0,.08); flex-direction:column; min-width: 200px;}
  .nav-links.open{display:flex}
  .nav-links .lang-switch{ margin-top:6px;}
}

/* ============================ SCROLL / SECTION LAYOUT ======================== */
/* Force one-screen paging */
.snap-container{
  scroll-snap-type: y mandatory;      /* no partial snaps */
}

/* Each section fills the viewport exactly */
.snap-section{
  height: 100dvh;                     /* exact dynamic viewport height */
  display: grid;                      /* easy centering */
  place-items: center;
  position: relative;
  scroll-snap-align: start;
  padding: 0;                         /* move padding to the inner wrap so height stays exact */
  overflow: clip;                     /* prevents previous/next content bleeding */
}

/* Allow How It Works to exceed viewport height on shorter displays */
#how.snap-section{
  height: auto;           /* grow if content is taller */
  min-height: 100dvh;     /* but still at least one screen */
  overflow: visible;      /* prevent clipping of cards */
}

/* Apply the vertical breathing space to the inner wrap instead of the section */
.snap-section > .wrap{
  width: 100%;
  padding: var(--sectionPadTop) var(--padX) var(--sectionPadBot);
  max-width: var(--wrap);
  margin: 0 auto;
}

.wrap{max-width:var(--wrap); margin:0 auto;}

/* ================================ TYPOGRAPHY ================================= */
h1,h2{margin:0 0 8px} h2{font-size:var(--h2)}
.muted{color:var(--muted)}

/* =================================== HERO ==================================== */
.hero{
  overflow: clip;
  border-bottom:1px solid var(--line);
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(212,175,55,0.14), transparent),
    radial-gradient(800px 420px at 90% 0%, rgba(0,0,0,0.05), transparent);
}
.hero-content{
  position: relative;
  z-index: 1;
  text-align:center;
}
.logo-wrap{margin-bottom:10px}
.logo-mark{height: clamp(100px, 16vmin, 160px); width:auto}
.brand-title{font-size:var(--heroTitle); line-height:1.05; letter-spacing:-0.7px; margin:8px 0 12px}
.brand-sub{font-size:var(--heroSub); color:#333; max-width:820px; margin:0 auto 18px}
.ctas{display:flex; gap:14px; justify-content:center; flex-wrap:wrap}
.btn{display:inline-block; padding:12px 18px; border-radius:12px; text-decoration:none; font-weight:600}
.btn.primary{background:var(--accent); color:#111}
.btn.ghost{border:1px solid var(--line); color:#111; background:#fff}

.hero-image-overlay{
  position:absolute;
  inset:0;
  z-index:0;
  pointer-events:none;
  background-image: url('assets/hero-bg.png');
  background-size: cover;
  background-position: 70% 40%;
  background-repeat:no-repeat;
  opacity:0.8;
}

/* ============================ HOW IT WORKS =================================== */
.how{ background:#fafafa; }
.how .section-title{
  text-align:center;
  font-size: var(--consTitleSize);
  font-weight:800;
  letter-spacing:-0.5px;
  margin:0 0 10px;
  color:var(--text);
}
.how .section-kicker{
  text-align:center;
  font-size: clamp(16px, 2.4vmin, 20px);
  color:var(--muted);
  margin:0 0 34px;
}

/* 3-card grid */
.how .how-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:clamp(18px, 4vmin, 42px);
  width:100%;
  align-items:stretch;
}
.how .how-card{
  display:flex; flex-direction:column; align-items:center; text-align:center;
  background:#fff; border:1px solid var(--line); border-radius:22px;
  box-shadow:0 24px 60px rgba(0,0,0,.06); padding:26px 24px 30px;
}
.how .how-card .how-img{
  width:100%; height:clamp(200px, 26vmin, 260px);
  object-fit:cover; border-radius:16px; margin:0;
}
.how .how-card h2{ font-size: clamp(22px, 2.5vmin, 32px); font-weight:800; color:#111; margin:12px 0 10px; }
.how .how-card .desc{ font-size: clamp(15px, 1.8vmin, 18px); color:#111; line-height:1.6; max-width:80%; margin:0 auto; }

@media (max-width:1100px){
  .how .how-grid{ grid-template-columns:1fr; }
}

/* ============================== FOR CONSUMERS ================================ */
#consumers.snap-section{ align-items: center; }
#consumers .wrap{ padding: var(--sectionPadTop) var(--padX) var(--sectionPadBot); }

#consumers .section-title{
  font-size: var(--consTitleSize);
  line-height: 1.1;
  text-align: center;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.3px;
  color: #0b0f1a;
}
#consumers .section-kicker{
  text-align: center;
  margin: 0 0 20px;
  font-size: clamp(14px, 1.6vmin, 17px);
  color: var(--muted);
}

.consumers-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--consGap);
  max-width: min(1320px, 100%);
  margin: 0 auto;
  justify-items: center;
  align-items: start;
  padding: 10px var(--padX);
}
.phone-card{
  width: 100%;
  max-width: var(--phoneCardW);
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:0 24px 60px rgba(0,0,0,.06);
  padding: var(--consPadY) 20px;
  text-align:center;
  display:flex; flex-direction:column; align-items:center;
  min-height: calc(var(--phoneImgH) + 72px);
}
.phone-img{
  width: 100%;
  height: var(--phoneImgH);
  object-fit: contain;
  border-radius: 18px;
  margin-bottom: 14px;
}
.phone-card figcaption{
  font-size: clamp(15px, 1.9vmin, 19px);
  color: #111;
  line-height: 1.6;
  margin: 6px auto 0;
  max-width: 92%;
  min-height: 48px;
}
@media (max-width: 1200px){
  .consumers-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px){
  .consumers-grid{ grid-template-columns: 1fr; }
}

/* ============================== BRAND MANAGERS =============================== */
#brand.snap-section{ align-items:flex-start; }
.brand { background:#fafafa; text-align:center; }
.brand .wrap{ max-width: min(1340px, 96vw); }
.brand .section-head h2{ font-size: clamp(32px, 6vmin, 56px); font-weight:800; margin:0 0 6px; color:var(--text); }
.brand .section-head p{ font-size: clamp(15px, 2.4vmin, 20px); color:var(--muted); margin:0 0 18px; }

.brand-stage{
  display:flex; align-items:center; justify-content:center;
  gap: var(--brandStageGap);
  max-width: 100%;
  margin: 0 auto;
  flex-wrap: wrap;
}
.left-rail{
  display:flex; flex-direction:column; gap:clamp(16px, 4vmin, 56px);
  width:100%; max-width:var(--calloutW);
  text-align:left;
}
.left-rail .callout{
  background:#fff; border:1px solid var(--line); border-radius:16px;
  box-shadow:0 12px 30px rgba(0,0,0,.07);
  padding:16px 18px; font-size:clamp(15px, 1.8vmin, 17px); line-height:1.6; color:#111;
}

.brand .device.laptop{
  flex: 1.7 1 740px;              /* even more space in the flex row */
  width: 100%;
  max-width: var(--laptopMax);    /* allow a wider card on large screens */
  margin: 0;
  background:#fff;
  border:1px solid var(--line);
  border-radius:24px;
  box-shadow:0 30px 80px rgba(0,0,0,.10);
  padding: clamp(16px, 2.6vmin, 26px);   /* slightly more padding for visual balance */
}
.brand .device.laptop img{
  width:100%; height:auto; display:block; border-radius:18px; object-fit:contain;
}

@media (max-width: 980px){
  .brand-stage{ flex-direction:column; gap:24px; max-width: 92vw; }
  .left-rail{ max-width:520px; width:100%; text-align:center; }
  .left-rail .callout{ text-align:center; }
}

/* ================================== FINAL ==================================== */
.final .final-grid{
  display:grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:24px; align-items:start; padding: 0 var(--padX);
}
.final .final-block{
  border:1px solid var(--line); border-radius:16px; background:#fff; padding:22px;
  box-shadow:0 20px 50px rgba(0,0,0,.06)
}
.bullets{list-style:none; padding:0; margin:8px 0 0}
.bullets li{padding:6px 0}
.status{margin-top:10px}
.foot{ text-align:center; color:var(--muted); font-size:13px; margin-top: 24px; }

@media (max-width:900px){
  .how .how-grid{grid-template-columns:1fr}
  .final .final-grid{grid-template-columns:1fr}
}

/* ============================ ACCESSIBILITY / SAFETY ========================= */
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  *{scroll-behavior:auto}
  .snap-container{scroll-snap-type:none}
}

/* Ensure content never hides behind overlays */
.brand .wrap { position: relative; z-index: 1; }

/* Keep everything visible (dev helper) */
.reveal { opacity: 1 !important; transform: none !important; transition: none !important; }

/* ========================== PHONE VERSION OVERRIDES ==========================
   Goal: minimal changes, clear content on phones, desktop unchanged
   Trigger: any viewport <= 640px wide
----------------------------------------------------------------------------- */
@media (max-width: 640px){

  /* 0) Global scale for comfortable reading */
  :root{
    --padX: 18px;
    --navH: 56px;
    --sectionPadTop: calc(var(--navH) + 12px);
    --sectionPadBot: 28px;

    /* smaller, consistent mobile type (overrides desktop vmin scale) */
    --heroTitle: clamp(28px, 7.2vw, 36px);
    --heroSub:   clamp(13px, 3.6vw, 15px);
    --h2:        clamp(18px, 5.6vw, 24px);
    --body:      clamp(14px, 4vw, 15px);

    --consTitleSize: clamp(22px, 7vw, 28px);
    --consGap: 16px;
  }

  /* 1) Phones = normal scroll (no full-screen snap) */
  .snap-container{ scroll-snap-type: none; }
  .snap-section{
    height: auto; min-height: auto;
    padding: var(--sectionPadTop) var(--padX) var(--sectionPadBot);
    overflow: visible; display:block;
  }
  .snap-section > .wrap{ padding:0; max-width:100%; }

  /* 2) Top nav: simple drawer with big tap targets */
  .topnav{ backdrop-filter:none; background:#ffffffee; }
  .nav-toggle{ display:block; padding:10px 12px; font-size:18px; }
  .nav-links{
    display:none; position:fixed; left:0; right:0; top:var(--navH);
    background:#fff; border-top:1px solid var(--line);
    box-shadow:0 18px 36px rgba(0,0,0,.08);
    padding:10px 16px 16px; gap:8px; z-index:90;
  }
  .nav-links a{ display:block; padding:12px 6px; font-weight:600; color:#111; }
  .nav-links.open{ display:flex; flex-direction:column; }

  /* 3) Hero: lighter image, centered message, friendly buttons */
  .hero{ border-bottom:none; }
  .hero-image-overlay{ opacity:.55; background-position:60% 10%; }
  .logo-mark{ height:92px; }
  .brand-title{ margin-top:4px; }
  .brand-sub{ max-width:90%; margin-bottom:12px; }
  .ctas{ gap:10px; }
  .btn{ padding:12px 16px; border-radius:12px; display:inline-block; }
  .btn.primary, .btn.ghost{ min-width:42%; text-align:center; }  /* easier taps */

  /* 4) “How it Works” → single column cards */
  .how .section-title{ margin-bottom:6px; text-align:center; }
  .how .section-kicker{ margin-bottom:14px; text-align:center; }
  .how .how-grid{ grid-template-columns:1fr; gap:14px; }
  .how .how-card{ padding:16px 14px; border-radius:16px; box-shadow:0 10px 26px rgba(0,0,0,.05); }
  .how .how-card .how-img{ height:180px; border-radius:12px; }
  .how .how-card .desc{ max-width:100%; }

  /* 5) “For Consumers” → one phone per row */
  #consumers.snap-section{ align-items:initial; }
  .consumers-grid{ grid-template-columns:1fr; gap:14px; padding:6px var(--padX); }
  .phone-card{ border-radius:18px; padding:14px; min-height:auto; box-shadow:0 12px 28px rgba(0,0,0,.05); }
  .phone-img{ height:clamp(320px, 70vw, 420px); border-radius:14px; }
  .phone-card figcaption{ font-size:15px; min-height:auto; }

  /* 6) “For Brand Managers” → stack rail + device, center headings */
  .brand{ text-align:left; }
  .brand .section-head h2, .brand .section-head p{ text-align:center; }
  .brand-stage{ flex-direction:column; gap:16px; }
  .left-rail{ max-width:100%; }
  .left-rail .callout{ font-size:15px; }
  .brand .device.laptop{
    order: -1;                 /* show dashboard first on mobile (above captions) */
    flex: 0 0 auto;            /* prevent tall blank space from flex-basis */
    padding: 12px;
    border-radius: 18px;
    margin-bottom: 12px;       /* tighter stack spacing */
  }
  .brand .device.laptop img{ border-radius:12px; }

  /* 7) Final blocks → single column */
  .final .final-grid{ grid-template-columns:1fr; gap:14px; padding:0; }
  .final .final-block{ padding:16px; border-radius:14px; box-shadow:0 10px 26px rgba(0,0,0,.05); }
  .foot{ font-size:12px; margin-top:16px; text-align:center; }
}
