/* ===========================================================================
   AvertGate — showcase scroll layer styles. Pairs with showcase.js.
   DESIGN.md §2: showcase pages only (landing, pricing, contact), never the app.
   Load AFTER theme.css (tokens) and brand.css.
   =========================================================================== */

/* scroll progress bar */
.scroll-bar { position: fixed; inset: 0 0 auto 0; height: 2px; background: var(--fg); transform: scaleX(0); transform-origin: 0 50%; z-index: 300; pointer-events: none; }

/* [data-words]: unlit words are grey, lit words ink. Without JS nothing is split. */
[data-words] .w { color: var(--line-strong); transition: color var(--dur-slow) var(--ease-out); }
[data-words] .w.on { color: var(--fg); }

/* [data-zoom] photos need a clipping frame */
.zoom-frame { overflow: hidden; }
.zoom-frame > [data-zoom] { transform-origin: 50% 50%; }

/* Photo backdrop behind a page header: B/W photo, parallaxed, fading to white.
   Reason (DESIGN.md §2): gives secondary pages the same depth as the landing
   hero without a second colour. */
.sc-photo {
  position: absolute; inset: 0 0 auto 0; height: min(78vh, 720px); z-index: -1; overflow: hidden; pointer-events: none;
  /* fade by mask, not by a white overlay, so it melts into whatever ground the page uses */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%);
}
.sc-photo img { position: absolute; left: 0; top: -10%; width: 100%; height: 125%; object-fit: cover; object-position: 50% 30%; opacity: .32; }
.sc-host { position: relative; isolation: isolate; }

/* user switch (html.motion-off); the OS setting is not consulted */
html.motion-off [data-words] .w { color: var(--fg); transition: none; }
html.motion-off [data-parallax], html.motion-off [data-zoom] { transform: none !important; }


/* ===========================================================================
   Shared showcase chrome — nav, type, sections, FAQ, photo CTA, footer.
   Used by landing, pricing and contact (all load theme.css first).
   =========================================================================== */
:root { --max: 1180px; --section: clamp(96px, 11vw, 168px); --frame-r: 12px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { overflow-x: clip; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* type */
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font: 600 .75rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-2); }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--fg); }
.h-xl { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1; font-size: clamp(2.5rem, 5.6vw, 4.75rem); margin: 0; text-wrap: balance; }
.h-lg { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.04; font-size: clamp(2.25rem, 4.8vw, 4rem); margin: 0; text-wrap: balance; }
.h-md { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; font-size: 1.25rem; margin: 0; }
.lead { color: var(--fg-2); font-size: clamp(1rem, 1.4vw, 1.25rem); line-height: 1.6; max-width: 58ch; margin: 0; }
.mono { font-family: var(--font-mono); }

/* sections */
.sec { padding: var(--section) 0; position: relative; }
.sec.tint { background: var(--surface); border-block: 1px solid var(--line); }
/* theme.css zebra-stripes every 2nd <section>; showcase pages set their own rhythm (.tint) */
main > section:not(.tint):not(.cta) { background: transparent; }
/* theme.css gives every <section> 7rem padding and a top rule (app layout); showcase sections set their own */
main > section { padding: 0; border-top: 0; }
.sec-head { display: grid; gap: 1.25rem; margin-bottom: clamp(40px, 6vw, 72px); max-width: 860px; }
.sec-head.center { text-align: center; justify-items: center; margin-inline: auto; }
.sec-head.center .lead { margin-inline: auto; }
.tag { font: 500 .75rem/1 var(--font-mono); padding: .3rem .55rem; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg); color: var(--fg-2); white-space: nowrap; }

/* buttons (extend theme .btn) */
.btn-xl { padding: 1rem 1.6rem; font-size: 1rem; }
.btn svg { width: 16px; height: 16px; }
.btn-light { background: #fff; color: #000; border: 1px solid #fff; }
.btn-light:hover { background: #E5E5E5; color: #000; }
.btn-line-light { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.55); }
.btn-line-light:hover { background: rgba(255,255,255,.12); color: #fff; }

/* nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background var(--dur-base), border-color var(--dur-base); border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(255,255,255,.82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom-color: var(--line); }
.nav-inner { max-width: var(--max); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav .brand { color: var(--fg); }
.nav-center { display: flex; gap: .25rem; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav-center a { font-size: .875rem; font-weight: 500; color: var(--fg-2); padding: .45rem .9rem; border-radius: 999px; transition: color var(--dur-fast), background var(--dur-fast); }
.nav-center a:hover { color: var(--fg); background: var(--surface-2); }
.nav-center a[aria-current="page"] { color: var(--on-fg); background: var(--fg); }
.nav-right { display: flex; align-items: center; gap: .75rem; }
.nav-right .login { font-size: .875rem; font-weight: 500; color: var(--fg-2); padding: .45rem .5rem; }
.nav-right .login:hover { color: var(--fg); }
.page-top { padding-top: calc(68px + clamp(56px, 8vw, 104px)); }

/* faq */
.faq-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(32px, 5vw, 64px); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 64px; padding: 1.1rem 0; cursor: pointer; font-size: 1.0625rem; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); display: inline-flex; align-items: center; justify-content: center; transition: transform var(--dur-base) var(--ease-out), background var(--dur-fast); }
.faq summary:hover .pm { background: var(--surface-2); }
.faq details[open] .pm { transform: rotate(45deg); }
.faq summary .pm svg { width: 12px; height: 12px; }
.faq details p { margin: 0 0 1.4rem; font-size: 1rem; color: var(--fg-2); max-width: 65ch; line-height: 1.7; animation: sc-rise var(--dur-slow) var(--ease-out); }
@keyframes sc-rise { from { opacity: 0; transform: translateY(-8px); } }

/* photo CTA (inverted) */
.cta { position: relative; overflow: clip; isolation: isolate; color: #fff; text-align: center; padding: clamp(120px, 14vw, 200px) 1.25rem; margin: 0 clamp(.75rem, 2vw, 1.5rem); border-radius: clamp(14px, 2vw, 24px); background: #111; }
.cta-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.cta-bg img { position: absolute; left: 0; top: -15%; width: 100%; height: 130%; object-fit: cover; }
.cta-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.65)); }
.cta h2 { color: #fff; max-width: 16ch; margin: 0 auto; font-size: clamp(2.5rem, 6vw, 5rem); }
.cta p { color: rgba(255,255,255,.82); margin: 1.5rem auto 0; max-width: 52ch; font-size: 1.125rem; line-height: 1.6; }
.cta .row { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 2.25rem; }

/* footer */
footer { padding: clamp(56px, 7vw, 96px) 0 2rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.foot-brand .brand { color: var(--fg); }
.foot-tagline { color: var(--fg-2); font-size: .875rem; max-width: 34ch; margin: 1rem 0 0; }
.foot-col { display: grid; gap: .65rem; align-content: start; }
.foot-col h3 { font: 600 .75rem var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); margin: 0 0 .35rem; }
.foot-col a { font-size: .875rem; color: var(--fg-2); } .foot-col a:hover { color: var(--fg); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--fg-3); }

@media (max-width: 1080px) { .nav-center { display: none; } }
@media (max-width: 960px) {
  .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-right .login { display: none; }
  .nav-right .btn { padding: .55rem .8rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}
/* user switch (html.motion-off); the OS setting is not consulted */
html.motion-off { scroll-behavior: auto; } 

/* status pill with a live dot (the only looping motion, DESIGN.md §6) */
.pill { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .9rem; border: 1px solid var(--line-strong); border-radius: 999px; background: rgba(255,255,255,.85); font-size: .8125rem; font-weight: 500; color: var(--fg-2); backdrop-filter: blur(6px); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--allow); box-shadow: 0 0 0 0 rgba(18,121,74,.5); animation: live 2s infinite; flex: none; }
@keyframes live { 70% { box-shadow: 0 0 0 8px rgba(18,121,74,0); } 100% { box-shadow: 0 0 0 0 rgba(18,121,74,0); } }
/* user switch (html.motion-off); the OS setting is not consulted */
html.motion-off .live-dot { animation: none; } 
