/* ============================================================================
   CineLyst — shared site styles
   Design tokens mirror the app: cine_app/lib/core/theme/app_colors.dart
   Type mirrors the app too: Poppins for headings/brand, Mulish for body.
   ========================================================================== */

:root{
  /* Backgrounds — straight from AppColors */
  --bg:        #06030E;
  --bg2:       #0B0718;
  --surface:   #261B36;   /* card level, 1.26:1 against bg */
  --surface2:  #302244;   /* raised card, 1.40:1 */

  /* Purple scale */
  --p1:        #5A0FC8;
  --p2:        #9D2FF0;
  --p3:        #C860FF;
  --glow:      #8020D8;

  /* Text — all clear WCAG AA against --bg */
  --tx:        #FFFFFF;
  --tx2:       rgba(255,255,255,.78);  /* long-form body copy */
  --tx3:       rgba(255,255,255,.60);
  --tx4:       rgba(255,255,255,.48);  /* footer / captions */

  /* Lines */
  --border:    rgba(200,96,255,.32);   /* p3 @ 32% — AppColors.borderSubtle */
  --hairline:  rgba(255,255,255,.09);

  --star:      #FFD166;

  --radius:    16px;
  --maxw:      780px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:96px}

body{
  margin:0;
  background:var(--bg);
  color:var(--tx);
  font-family:'Mulish',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  font-size:16px;
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Ambient purple glow behind everything — the app's `glow` token, softened */
body::before{
  content:'';
  position:fixed;
  inset:0;
  pointer-events:none;
  z-index:0;
  background:
    radial-gradient(760px 460px at 50% -8%,  rgba(128,32,216,.30), transparent 62%),
    radial-gradient(600px 400px at 92% 8%,   rgba(200,96,255,.10), transparent 60%);
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(6,3,14,.82);
  backdrop-filter:saturate(160%) blur(14px);
  -webkit-backdrop-filter:saturate(160%) blur(14px);
  border-bottom:1px solid var(--hairline);
}

.topbar-inner{
  max-width:1080px;
  margin:0 auto;
  padding:12px 20px;
  display:flex;
  align-items:center;
  gap:20px;
}

.brand{
  display:flex;
  align-items:center;
  gap:11px;
  text-decoration:none;
  border-bottom:none;
  flex-shrink:0;
}

.brand img{
  width:34px;
  height:34px;
  border-radius:22%;          /* clips the icon tile's flat outer field */
  display:block;
  box-shadow:0 3px 14px rgba(128,32,216,.42);
}

.brand-name{
  font-family:'Poppins',sans-serif;
  font-weight:700;
  font-size:19px;
  letter-spacing:-.3px;
  color:var(--tx);
  line-height:1;
}
.brand-name span{color:var(--p3)}

.nav{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:4px;
}

.nav a{
  font-family:'Poppins',sans-serif;
  font-size:13.5px;
  font-weight:500;
  color:var(--tx3);
  text-decoration:none;
  border-bottom:none;
  padding:8px 13px;
  border-radius:10px;
  white-space:nowrap;
  transition:color .15s ease, background .15s ease;
}
.nav a:hover{color:var(--tx);background:rgba(255,255,255,.06)}

/* Current page */
.nav a[aria-current="page"]{
  color:var(--p3);
  background:rgba(200,96,255,.12);
}

/* Mobile: brand on top, nav scrolls horizontally underneath. No JS needed. */
@media(max-width:700px){
  .topbar-inner{flex-direction:column;align-items:stretch;gap:10px;padding:12px 16px 8px}
  .nav{
    margin-left:0;
    overflow-x:auto;
    scrollbar-width:none;
    -ms-overflow-style:none;
    padding-bottom:2px;
  }
  .nav::-webkit-scrollbar{display:none}
  .nav a{padding:7px 11px;font-size:13px}
}

/* ── Page shell ──────────────────────────────────────────────────────────── */

.wrap{
  position:relative;
  z-index:1;
  max-width:var(--maxw);
  margin:0 auto;
  padding:46px 20px 80px;
}

.page-head{margin-bottom:34px}

/* Emblem above the title on the legal pages */
.page-logo{
  width:66px;
  height:66px;
  border-radius:22%;
  display:block;
  margin:0 0 20px;
  box-shadow:0 12px 34px rgba(128,32,216,.45);
}

.eyebrow{
  font-family:'Poppins',sans-serif;
  font-size:11px;
  font-weight:600;
  letter-spacing:2.6px;
  text-transform:uppercase;
  color:var(--p3);
  margin-bottom:12px;
}

h1{
  font-family:'Poppins',sans-serif;
  font-size:38px;
  font-weight:700;
  letter-spacing:-1px;
  line-height:1.15;
  margin:0 0 10px;
  color:var(--tx);
}

h2{
  font-family:'Poppins',sans-serif;
  font-size:19px;
  font-weight:600;
  letter-spacing:-.3px;
  color:var(--tx);
  margin:38px 0 10px;
  scroll-margin-top:96px;
}

/* Small purple tick before each section heading */
h2::before{
  content:'';
  display:inline-block;
  width:3px;
  height:15px;
  margin-right:11px;
  vertical-align:-2px;
  border-radius:2px;
  background:linear-gradient(180deg,var(--p3),var(--p1));
}

h3{
  font-family:'Poppins',sans-serif;
  font-size:15.5px;
  font-weight:600;
  color:var(--tx);
  margin:22px 0 6px;
}

p,li{color:var(--tx2);font-size:16px}
p{margin:0 0 14px}

ul,ol{padding-left:22px;margin:0 0 16px}
li{margin-bottom:8px}
li::marker{color:var(--p3)}

strong{color:var(--tx);font-weight:600}

a{color:var(--p3);text-decoration:none;border-bottom:1px solid rgba(200,96,255,.35)}
a:hover{border-bottom-color:var(--p3)}

.updated{
  font-size:13.5px;
  color:var(--tx4);
  margin-top:2px;
}

.intro{
  font-size:17px;
  color:var(--tx);
  line-height:1.7;
  margin-top:20px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */

.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:24px 26px;
  margin:26px 0;
}
.card h2{margin-top:0}
.card > *:last-child{margin-bottom:0}

.card-raised{background:var(--surface2)}

/* ── Table of contents ───────────────────────────────────────────────────── */

.toc{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px 24px;
  margin:30px 0 8px;
}
.toc-title{
  font-family:'Poppins',sans-serif;
  font-size:11px;
  font-weight:600;
  letter-spacing:2.2px;
  text-transform:uppercase;
  color:var(--p3);
  margin-bottom:12px;
}
.toc ul{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:2px 24px;
}
.toc li{margin:0}
.toc a{
  display:block;
  padding:5px 0;
  font-size:14.5px;
  color:var(--tx3);
  border-bottom:none;
}
.toc a:hover{color:var(--p3)}
@media(max-width:600px){.toc ul{grid-template-columns:1fr}}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn{
  display:inline-block;
  font-family:'Poppins',sans-serif;
  font-size:14.5px;
  font-weight:600;
  padding:13px 26px;
  border-radius:13px;
  text-decoration:none;
  border:none;
  border-bottom:none;
  transition:transform .15s ease, box-shadow .15s ease;
}
.btn:hover{transform:translateY(-1px)}

.btn-primary{
  background:linear-gradient(135deg,var(--p1),var(--p2) 60%,var(--p3));
  color:#fff;
  box-shadow:0 8px 24px rgba(128,32,216,.42);
}
.btn-primary:hover{box-shadow:0 12px 30px rgba(128,32,216,.55)}

.btn-ghost{
  background:var(--surface2);
  color:var(--tx);
  border:1px solid var(--border);
}
.btn-ghost:hover{border-color:var(--p3)}

/* ── Home hero ───────────────────────────────────────────────────────────── */

.hero{text-align:center;padding:26px 0 12px}

.hero-logo{
  width:96px;
  height:96px;
  border-radius:22%;
  display:block;
  margin:0 auto 28px;
  box-shadow:0 18px 48px rgba(128,32,216,.5);
}

/* Breathing room between the wordmark and the subtext below it */
.hero h1{font-size:52px;letter-spacing:-1.8px;margin-bottom:24px}
.hero h1 span{color:var(--p3)}

/* The subtext must never wrap. `nowrap` guarantees one line; the fluid size
   keeps it inside the viewport instead of overflowing — at the 15px floor the
   string measures ~200px, which still fits a 280px-wide screen. */
.hero-tag{
  font-family:'Poppins',sans-serif;
  font-size:clamp(15px,4.4vw,19px);
  font-weight:500;
  color:var(--p3);
  white-space:nowrap;
  margin:0 0 24px;
}

.hero-lede{
  font-size:17px;
  color:var(--tx2);
  max-width:560px;
  margin:0 auto;
  line-height:1.7;
}

.hero-cta{
  margin-top:30px;
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
}

/* ── Feature grid ────────────────────────────────────────────────────────── */

.features{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:14px;
  margin:20px 0 8px;
  padding:0;
  list-style:none;
}

.feature{
  display:flex;
  align-items:flex-start;
  gap:15px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:16px;
  padding:20px;
  margin:0;
  font-size:15px;
  color:var(--tx2);
  line-height:1.6;
  transition:border-color .18s ease, transform .18s ease;
}
.feature:hover{border-color:var(--p3);transform:translateY(-2px)}

/* Purple tile, light glyph — the app's tile treatment */
.feature-icon{
  flex-shrink:0;
  width:44px;
  height:44px;
  border-radius:13px;
  display:grid;
  place-items:center;
  background:linear-gradient(150deg,var(--p1),var(--glow) 55%,var(--p2));
  box-shadow:0 5px 16px rgba(90,15,200,.4), inset 0 1px 0 rgba(255,255,255,.16);
}
.feature-icon svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:#F1E4FF;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.feature b{
  display:block;
  font-family:'Poppins',sans-serif;
  font-size:15.5px;
  font-weight:600;
  color:var(--tx);
  margin-bottom:3px;
  letter-spacing:-.2px;
}

/* ── Attribution block (mirrors the app's About Us footer) ───────────────── */

.attrib{
  margin-top:34px;
  padding-top:24px;
  border-top:1px solid var(--hairline);
}
.attrib-title{
  font-family:'Poppins',sans-serif;
  font-size:14px;
  font-weight:600;
  color:var(--p3);
  margin-bottom:8px;
}
.attrib p{font-size:13.5px;color:var(--tx3);margin-bottom:12px}
.attrib img{height:16px;width:auto;display:block;margin:16px 0 8px}

@media(max-width:600px){
  .hero h1{font-size:38px;letter-spacing:-1.2px}
  /* .hero-tag size is fluid (clamp) — no override here, or it would re-enable wrapping */
  .hero-lede{font-size:16px}
  .hero-logo{width:80px;height:80px}
  .features{grid-template-columns:1fr}
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.site-footer{
  position:relative;
  z-index:1;
  border-top:1px solid var(--hairline);
  background:rgba(11,7,24,.6);
  margin-top:40px;
}

.footer-inner{
  max-width:var(--maxw);
  margin:0 auto;
  padding:40px 20px 44px;
}

.footer-top{
  display:flex;
  flex-wrap:wrap;
  gap:32px;
  justify-content:space-between;
  align-items:flex-start;
}

.footer-brand{display:flex;align-items:center;gap:11px;margin-bottom:10px}
.footer-brand img{width:30px;height:30px;border-radius:22%;display:block}
.footer-brand .brand-name{font-size:17px}
.footer-tag{font-size:14px;color:var(--tx4);margin:0;white-space:nowrap}

.footer-links{display:flex;flex-direction:column;gap:9px}
.footer-links a{
  font-size:14px;
  color:var(--tx3);
  border-bottom:none;
  font-family:'Poppins',sans-serif;
  font-weight:500;
}
.footer-links a:hover{color:var(--p3)}

.footer-bottom{
  margin-top:32px;
  padding-top:22px;
  border-top:1px solid var(--hairline);
  font-size:13px;
  color:var(--tx4);
  line-height:1.65;
}
.footer-bottom p{font-size:13px;color:var(--tx4);margin:0 0 8px}
.footer-bottom a{color:var(--tx3);border-bottom:none}
.footer-bottom a:hover{color:var(--p3)}

/* ── Responsive type ─────────────────────────────────────────────────────── */

@media(max-width:560px){
  body{font-size:15.5px}
  h1{font-size:29px;letter-spacing:-.7px}
  h2{font-size:17.5px;margin-top:32px}
  .wrap{padding:32px 18px 60px}
  .card,.toc{padding:20px 18px}
  .intro{font-size:16px}
  p,li{font-size:15.5px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *{transition:none !important}
  .btn:hover{transform:none}
}
