/* ==========================================================================
   vipmail design tokens
   ========================================================================== */
@font-face{
  font-family:'Inter';
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url('../assets/fonts/inter-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face{
  font-family:'Inter';
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
  src:url('../assets/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

:root{
  --bg:            #07080a;
  --bg-elev:       #0d0f12;
  --border:        #1c1e22;
  --text:          #f4f5f7;
  --text-dim:      #9a9ea6;
  --text-faint:    #5c6066;
  --accent:        #4f8dff;
  --accent-soft:   rgba(79,141,255,.14);
  --radius:        16px;
  --radius-sm:     10px;
  --ease:          cubic-bezier(.16,.8,.24,1);
  --container:     1180px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ background:var(--bg); scroll-behavior:auto; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  font-size:16px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
h1,h2,h3{ margin:0; font-weight:700; letter-spacing:-.02em; }
p{ margin:0; }
svg{ width:26px; height:26px; }

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:.5em;
  font-size:12.5px;
  font-weight:600;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--accent);
  margin:0 0 14px;
}
.eyebrow::before{
  content:'';
  width:6px; height:6px;
  border-radius:50%;
  background:var(--accent);
  display:inline-block;
  flex-shrink:0;
}

/* ==========================================================================
   Scroll progress
   ========================================================================== */
.scroll-progress{
  position:fixed; top:0; left:0; height:2px; width:0%;
  background:var(--accent); z-index:1000;
  transform-origin:left;
}

/* ==========================================================================
   Nav
   ========================================================================== */
.nav{
  position:fixed; top:0; left:0; right:0; z-index:100;
  display:flex; align-items:center; justify-content:space-between;
  padding:22px clamp(20px,4vw,56px);
  backdrop-filter:blur(0px);
  transition:background .4s var(--ease), border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom:1px solid transparent;
}
.nav.is-scrolled{
  background:rgba(7,8,10,.72);
  backdrop-filter:blur(14px);
  border-bottom-color:var(--border);
}
.nav__mark{ font-size:17px; font-weight:700; letter-spacing:-.01em; }
.nav__links{ display:flex; gap:32px; }
.nav__links a{
  font-size:14px; color:var(--text-dim); transition:color .25s var(--ease);
}
.nav__links a:hover{ color:var(--text); }
.nav__login{
  font-size:14px; font-weight:600;
  padding:9px 18px; border-radius:999px;
  border:1px solid var(--border);
  transition:border-color .25s var(--ease), background .25s var(--ease);
}
.nav__login:hover{ border-color:var(--accent); background:var(--accent-soft); }

@media (max-width:720px){
  .nav__links{ display:none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  font-size:14.5px; font-weight:600;
  padding:14px 26px; border-radius:999px;
  cursor:pointer;
  transition:transform .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--primary{
  background:var(--text); color:var(--bg);
}
.btn--primary:hover{ transform:translateY(-2px); box-shadow:0 12px 28px -8px rgba(79,141,255,.35); }
.btn--ghost{
  border:1px solid var(--border); color:var(--text);
}
.btn--ghost:hover{ border-color:var(--accent); background:var(--accent-soft); }
.btn--large{ padding:17px 34px; font-size:15.5px; }

/* ==========================================================================
   Frame-sequence stage (shared by hero + story sections)
   ========================================================================== */
.frame-stage{
  position:absolute; inset:0;
  overflow:hidden;
  background:#000;
}
.frame-stage canvas{
  position:absolute; inset:0;
  width:100%; height:100%;
  display:block;
  opacity:0;
  transition:opacity .5s var(--ease);
}
.frame-stage canvas.is-ready{ opacity:1; }
.frame-stage__poster{
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover;
  opacity:1;
  transition:opacity .6s var(--ease);
}
.frame-stage.is-active .frame-stage__poster{ opacity:0; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero{
  position:relative;
  height:100svh;
  min-height:560px;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center;
  padding:0 24px;
  isolation:isolate;
}
.hero__vignette{
  position:absolute; inset:0; z-index:1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 45%, rgba(7,8,10,0) 0%, rgba(7,8,10,.55) 65%, rgba(7,8,10,.92) 100%),
    linear-gradient(180deg, rgba(7,8,10,.35) 0%, rgba(7,8,10,.15) 30%, rgba(7,8,10,.65) 100%);
  pointer-events:none;
}
.hero__content{ position:relative; z-index:2; max-width:760px; }
.hero h1{
  font-size:clamp(40px,7.4vw,88px);
  line-height:1.03;
  margin-bottom:22px;
}
.hero__sub{
  font-size:clamp(16px,1.7vw,19px);
  color:var(--text-dim);
  max-width:560px;
  margin:0 auto 34px;
  line-height:1.55;
}
.hero__actions{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }

.scroll-cue{
  position:absolute; bottom:34px; left:50%; transform:translateX(-50%);
  z-index:2;
  display:flex; flex-direction:column; align-items:center; gap:10px;
  color:var(--text-faint);
  font-size:11px; letter-spacing:.16em; text-transform:uppercase;
}
.scroll-cue i{
  width:1px; height:34px;
  background:linear-gradient(180deg, var(--text-faint), transparent);
  display:block;
  animation:scrollcue 2.2s ease-in-out infinite;
}
@keyframes scrollcue{
  0%{ opacity:0; transform:translateY(-6px) scaleY(.4); }
  40%{ opacity:1; }
  100%{ opacity:0; transform:translateY(14px) scaleY(1); }
}

/* ==========================================================================
   Story sections (pinned scroll-sequences)
   ========================================================================== */
.story{
  position:relative;
  height:100svh;
  min-height:560px;
  overflow:hidden;
  isolation:isolate;
}
.story__vignette{
  position:absolute; inset:0; z-index:1;
  background:
    linear-gradient(180deg, rgba(7,8,10,.75) 0%, rgba(7,8,10,.25) 22%, rgba(7,8,10,.25) 78%, rgba(7,8,10,.85) 100%);
  pointer-events:none;
}
.story__steps{
  position:relative; z-index:2;
  height:100%;
  max-width:var(--container);
  margin:0 auto;
  padding:0 clamp(20px,6vw,56px);
  display:flex; align-items:center;
}
.story__step{
  position:absolute;
  max-width:620px;
  opacity:0;
  transform:translateY(18px);
  transition:opacity .6s var(--ease), transform .6s var(--ease);
  pointer-events:none;
}
.story__step.is-active{
  opacity:1;
  transform:translateY(0);
}
.story__step h2{
  font-size:clamp(26px,3.6vw,44px);
  line-height:1.15;
}

/* ==========================================================================
   Features
   ========================================================================== */
.features{
  position:relative;
  padding:150px clamp(20px,6vw,56px) 130px;
  max-width:var(--container);
  margin:0 auto;
}
.features__intro{ max-width:600px; margin-bottom:64px; }
.features__intro h2{ font-size:clamp(28px,4vw,46px); line-height:1.12; }
.features__grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:1px;
  background:var(--border);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
}
.feature-card{
  background:var(--bg);
  padding:36px 32px;
  transition:background .3s var(--ease);
}
.feature-card:hover{ background:var(--bg-elev); }
.feature-card svg{ color:var(--accent); margin-bottom:22px; }
.feature-card h3{ font-size:17px; margin-bottom:10px; }
.feature-card p{ font-size:14.5px; color:var(--text-dim); line-height:1.6; }

@media (max-width:900px){
  .features__grid{ grid-template-columns:repeat(2, 1fr); }
}
@media (max-width:600px){
  .features__grid{ grid-template-columns:1fr; }
  .features{ padding:100px 20px 90px; }
}

/* ==========================================================================
   CTA
   ========================================================================== */
.cta{
  position:relative;
  text-align:center;
  padding:170px 24px 150px;
  max-width:760px;
  margin:0 auto;
}
.cta h2{ font-size:clamp(32px,5.4vw,60px); line-height:1.08; margin-bottom:38px; }
.cta__actions{ display:flex; justify-content:center; margin-bottom:26px; }
.cta__email{
  display:inline-block;
  font-size:15px; color:var(--text-dim);
  border-bottom:1px solid var(--border);
  padding-bottom:2px;
  transition:color .25s var(--ease), border-color .25s var(--ease);
}
.cta__email:hover{ color:var(--accent); border-color:var(--accent); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer{
  display:flex; align-items:center; justify-content:space-between;
  flex-wrap:wrap;
  gap:18px 32px;
  padding:32px clamp(20px,6vw,56px) 44px;
  border-top:1px solid var(--border);
  max-width:var(--container);
  margin:0 auto;
}
.footer__brand{ font-size:15px; font-weight:700; letter-spacing:-.01em; }
.footer__legal{ display:flex; gap:28px; }
.footer__link{
  display:inline-flex; align-items:center; gap:8px;
  background:none; border:none; padding:0; margin:0;
  font-family:inherit; font-size:13.5px; color:var(--text-dim);
  cursor:pointer;
  transition:color .25s var(--ease);
}
.footer__link svg{ width:15px; height:15px; }
.footer__link:hover{ color:var(--text); }
.footer__copyright{
  font-size:13px; color:var(--text-faint);
  transition:color .25s var(--ease);
}
.footer__copyright:hover{ color:var(--accent); }

/* ==========================================================================
   Legal modals (Imprint / Privacy)
   ========================================================================== */
.modal{
  display:none;
  position:fixed; inset:0; z-index:2000;
  align-items:center; justify-content:center;
  padding:24px;
  background:rgba(5,6,8,.78);
  backdrop-filter:blur(10px);
}
.modal.is-open{ display:flex; }
.modal__panel{
  position:relative;
  width:100%; max-width:640px;
  max-height:min(720px, 84vh);
  overflow-y:auto;
  background:var(--bg-elev);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:44px clamp(24px,4vw,48px) 48px;
  box-shadow:0 40px 80px -20px rgba(0,0,0,.6);
}
.modal__close{
  position:absolute; top:20px; right:20px;
  display:flex; align-items:center; justify-content:center;
  width:36px; height:36px;
  background:none; border:1px solid var(--border); border-radius:999px;
  color:var(--text-dim); cursor:pointer;
  transition:color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.modal__close svg{ width:16px; height:16px; }
.modal__close:hover{ color:var(--text); border-color:var(--accent); background:var(--accent-soft); }
.modal__panel h3{ font-size:clamp(22px,3vw,28px); margin:2px 0 20px; }
.modal__updated{ font-size:13px; color:var(--text-faint); margin-bottom:28px; }
.modal__body h4{
  font-size:12.5px; font-weight:600; letter-spacing:.1em; text-transform:uppercase;
  color:var(--accent); margin:26px 0 8px;
}
.modal__body h4:first-child{ margin-top:0; }
.modal__body p{
  font-size:14.5px; line-height:1.7; color:var(--text-dim);
}
.modal__body a{ color:var(--text); border-bottom:1px solid var(--border); }
.modal__body a:hover{ color:var(--accent); border-color:var(--accent); }

/* ==========================================================================
   Reduced motion / mobile fallback
   ========================================================================== */
@media (prefers-reduced-motion: reduce){
  .scroll-cue i{ animation:none; }
  .story__step{ transition:none; }
  .frame-stage canvas, .frame-stage__poster{ transition:none; }
}

/* Mobile: sequences aren't pinned (see main.js): lay the story sections
   out as a normal flowing image banner + stacked text, not an overlay. */
@media (max-width:760px), (prefers-reduced-motion: reduce){
  .story{
    height:auto;
    min-height:0;
    overflow:visible;
  }
  .story .frame-stage{
    position:relative;
    height:62vh;
    min-height:340px;
  }
  .story__steps{
    position:relative;
    height:auto;
    display:flex;
    flex-direction:column;
    gap:52px;
    padding:56px 24px 84px;
  }
  .story__step{
    position:relative !important;
    max-width:100%;
  }
}
