/* =====================================================================
   SITE STYLES SYSTEM — design-system layer for the entire platform
   Implements the site-styles skill: token-first discipline, one easing,
   rings-not-borders, gated hovers, press states, reduced-motion, tap
   targets, eyebrow scale, glass chrome, ambient light (Linear techniques
   fused with the llmpromptgen brand — accent/identity unchanged).
   Loaded site-wide via includes/header.php AFTER style.css.
   ===================================================================== */

/* ---- 1. System tokens (one easing, one duration, one focus ring) ---- */
:root{
  --sys-ease:cubic-bezier(.23,1,.32,1);
  --sys-dur:.25s;
  --sys-focus:0 0 0 2px var(--bg,#08090f),0 0 0 4px var(--ink,#c9b3ff);
  --sys-radius:14px;
  --eyebrow-size:11px; --eyebrow-ls:.12em;
  --nav-space:calc(116px + var(--sab,0px));
}

/* ---- 2. Accessibility: double-ring focus (Vercel rule) ---- */
:focus{outline:none}
:focus-visible{outline:none;box-shadow:var(--sys-focus);border-radius:8px}
.btn:focus-visible,a:focus-visible,button:focus-visible{box-shadow:var(--sys-focus)}

/* ---- 3. Reduced-motion global kill switch ---- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

/* ---- 4. Touch discipline: no tap flash, contained overscroll, 44px targets ---- */
a,button,[role="button"],input,textarea,select{-webkit-tap-highlight-color:transparent}
body{overscroll-behavior-y:none}
@media (pointer:coarse){
  .btn,.chip,.pill,a.pill{min-height:44px}
  .iconbtn,.icon-btn{min-width:44px;min-height:44px}
}

/* ---- 5. One easing everywhere; press states; hover=brightness ---- */
.btn,.pill,button,.chip{transition:transform .12s ease-out,filter var(--sys-dur) var(--sys-ease),box-shadow var(--sys-dur) var(--sys-ease),border-color var(--sys-dur) var(--sys-ease)}
.btn:active,.pill:active,button:active{transform:scale(.97)}
@media (hover:hover){
  .btn:hover{filter:brightness(1.1)}
  .btn-primary:hover{box-shadow:0 14px 34px -12px rgba(106,36,180,.75)}
}

/* ---- 6. Gated card hover recipe (one recipe per site) ---- */
@media (hover:hover){
  .feature,.agent-card,.team-card,.usecase,.alternative,.blog-card,.post-card,.library-item{
    transition:transform .3s var(--sys-ease),box-shadow .3s var(--sys-ease),border-color .3s var(--sys-ease)
  }
  .feature:hover,.agent-card:hover,.team-card:hover,.usecase:hover,.alternative:hover{
    transform:translateY(-4px);
    border-color:rgba(201,179,255,.45);
    box-shadow:0 22px 44px -22px rgba(0,0,0,.8)
  }
  .feature:hover .ic,.agent-card:hover .ic{transform:translate(3px,-3px)}
}

/* ---- 7. Numbers are tabular (prices, credits, stats) ---- */
.credits,.usage-bar,.price,.amount,.plan-price,.stat b,.badge-plan,.tag,.tnum{font-variant-numeric:tabular-nums}

/* ---- 8. Eyebrow micro-label scale (one scale platform-wide) ---- */
.eyebrow,.eyebrow-label{
  font-family:var(--sans,'Inter',system-ui,sans-serif);
  font-size:var(--eyebrow-size);
  font-weight:700;letter-spacing:var(--eyebrow-ls);
  text-transform:uppercase;color:var(--brand-ink,#c9b3ff);
  display:inline-block;margin-bottom:10px
}

/* ---- 9. Type resilience: balanced heroes, tracked display ---- */
h1{text-wrap:balance}
h1,h2{letter-spacing:-.02em}

/* ---- 10. Rings, not borders (Linear) — layout-safe hairlines ---- */
.ring-card{
  border:0;border-radius:8px;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 8px 32px rgba(8,9,10,.05)
}
.glow-edge{position:relative;overflow:hidden}
.glow-edge::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse 50% 36% at 0% 0%,rgba(255,255,255,.03),transparent 90%)
}
.ambient{position:relative}
.ambient::after{
  content:"";position:absolute;inset:-20%;pointer-events:none;z-index:0;
  background:radial-gradient(circle,rgba(255,255,255,.04),transparent 50%)
}

/* ---- 11. Glass chrome — one recipe (dark) ---- */
.glass{
  background:rgba(255,255,255,.06);
  -webkit-backdrop-filter:blur(18px) saturate(160%);
  backdrop-filter:blur(18px) saturate(160%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08)
}
.glass-dark{
  background:rgba(8,9,15,.62);
  -webkit-backdrop-filter:blur(20px) saturate(150%);
  backdrop-filter:blur(20px) saturate(150%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.06)
}

/* ---- 12. Linear white primary CTA ---- */
.btn-light{
  background:#e5e5e6;color:#08090a;border-radius:999px;
  box-shadow:inset 0 -1px 1px rgba(0,0,0,.11),0 1px 1px rgba(0,0,0,.07)
}
@media (hover:hover){.btn-light:hover{background:#fff}}

/* ---- 13. Edge-masked rails (marquee/ticker pattern) ---- */
.rail{display:flex;gap:14px;overflow-x:auto;scrollbar-width:none;
  scroll-snap-type:x proximity;scroll-padding-inline:var(--gutter,16px);
  -webkit-overflow-scrolling:touch;
  mask-image:linear-gradient(to right,transparent,#000 4%,#000 96%,transparent)}
.rail::-webkit-scrollbar{display:none}
.rail>*{flex:0 0 auto;scroll-snap-align:start}

/* ---- 14. Grain/noise overlay utility (25% dark-page lift) ---- */
.noise{position:relative}
.noise::after{
  content:"";position:absolute;inset:0;pointer-events:none;opacity:.25;z-index:0;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E")
}

/* ---- 15. App-column framing for mobile-first pages ---- */
.app-col{max-width:440px;margin:0 auto;min-height:100dvh}
@media (min-width:480px){
  .app-col{box-shadow:0 25px 50px -12px rgba(0,0,0,.22)}
  .app-col .fixed-chrome,.app-col .tabbar{max-width:440px;left:50%;transform:translateX(-50%)}
}
:root{--safe-t:env(safe-area-inset-top,0px);--safe-b:env(safe-area-inset-bottom,0px);
  --safe-l:env(safe-area-inset-left,0px);--safe-r:env(safe-area-inset-right,0px)}
