/* ═══ COLOR FLOW MAP (from design-spec.theme_context_map) ═══
 * index.html:         [dark-top]
 *   nav        → transparent-on-dark (scrolled: solid #0F1623)  | logo-light.svg | links: #F0F4F8
 *   hero       → DARK  (#0F1623)   | text: #F0F4F8
 *   social-proof-bar → DARK-ALT (#1A2335) | text: #94A3B8
 *   problem    → LIGHT (#F8F9FB)   | text: #0F1623
 *   how-it-works → LIGHT (#F8F9FB)  | text: #0F1623
 *   features   → DARK  (#0F1623)   | text: #F0F4F8 | cards: #222E44
 *   asset-showcase → DARK (#0F1623) | text: #F0F4F8
 *   testimonials → CREAM (#FDF8F0) | text: #0F1623 | cards: #FFFFFF
 *   cta-strip  → DARK  (#0F1623)   | text: #F0F4F8
 *   footer     → DARK  (#0F1623)   | text: #94A3B8
 *
 * product.html:       [dark-top]
 *   nav        → transparent-on-dark → solid dark on scroll
 *   hero       → DARK  (#0F1623)
 *   upload-flow → LIGHT (#F8F9FB)
 *   output-grid → LIGHT (#F8F9FB)
 *   brand-controls → DARK-ALT (#1A2335)
 *   integrations → LIGHT (#F8F9FB)
 *   product-cta → DARK (#0F1623)
 *
 * use-cases/*.html:   [light-top]
 *   nav        → solid light (#F8F9FB top, then #0F1623 on scroll for light-top)
 *   note: light-top pages → nav starts solid dark immediately (not transparent)
 *
 * pricing.html:       [light-top]
 *   pricing-card--featured: DARK (#0F1623) on white section bg
 *
 * login/*.html (dark-top): all dark bg, auth panel dark-alt
 * login/reset-password.html (light-top): light bg, auth panel white
 *
 * KEY: dark-top pages → nav transparent+white-links at top; light-top → nav solid #0F1623
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: #0F1623;
  background: #F8F9FB;
  -webkit-font-smoothing: antialiased;
}

/* Dark-top pages: body bg = dark so transparent nav bleeds into dark hero */
body.frw-page--dark-top {
  background: #0F1623;
}

body.frw-page--light-top {
  background: #F8F9FB;
}

/* ─── CSS Custom Properties ─── */
:root {
  --frw-dark:        #0F1623;
  --frw-dark-alt:    #1A2335;
  --frw-card-dark:   #222E44;
  --frw-accent:      #F5A623;
  --frw-accent-aa-light: #C07F00;
  --frw-light:       #F8F9FB;
  --frw-white:       #FFFFFF;
  --frw-cream:       #FDF8F0;

  --frw-fg-dark-1:   #F0F4F8;
  --frw-fg-dark-2:   #94A3B8;
  --frw-fg-light-1:  #0F1623;
  --frw-fg-light-2:  #4B5563;
  --frw-fg-cream-1:  #0F1623;
  --frw-fg-cream-2:  #4B5563;

  --frw-border-dark: rgba(255,255,255,0.10);
  --frw-border-light: #E5E7EB;
  --frw-border-cream: #E8DDD0;

  --frw-radius-card:   12px;
  --frw-radius-btn:    8px;
  --frw-radius-pill:   100px;
  --frw-radius-asset:  16px;
  --frw-radius-input:  8px;

  --frw-shadow-card-dark:  0 4px 24px rgba(0,0,0,0.35);
  --frw-shadow-card-light: 0 2px 16px rgba(0,0,0,0.08);
  --frw-shadow-accent:     0 0 40px rgba(245,166,35,0.20);

  --frw-container: 1200px;
  --frw-section-v: 96px;
  --frw-section-v-tablet: 64px;
  --frw-section-v-mobile: 48px;
}

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Syne', 'Inter', system-ui, sans-serif;
  line-height: 1.1;
  color: inherit;
}

.frw-display-xl  { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; line-height: 1.05; }
.frw-display-lg  { font-size: clamp(2rem, 3.5vw, 3rem);   font-weight: 700; line-height: 1.1;  }
.frw-display-md  { font-size: clamp(1.5rem, 2.5vw, 2rem);  font-weight: 600; line-height: 1.2;  }
.frw-body-lg     { font-size: 1.125rem; line-height: 1.65; font-weight: 400; }
.frw-body-base   { font-size: 1rem;     line-height: 1.65; font-weight: 400; }
.frw-body-sm     { font-size: 0.875rem; line-height: 1.6;  font-weight: 400; }
.frw-label-mono  { font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace; font-size: 0.8125rem; line-height: 1.5; }
.frw-eyebrow     {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 2em;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; }

/* ─── Layout Utilities ─── */
.frw-container {
  max-width: var(--frw-container);
  margin: 0 auto;
  padding: 0 24px;
}

.frw-section {
  padding: var(--frw-section-v) 0;
}

.frw-section--dark    { background: var(--frw-dark);     color: var(--frw-fg-dark-1); }
.frw-section--dark-alt{ background: var(--frw-dark-alt); color: var(--frw-fg-dark-1); }
.frw-section--light   { background: var(--frw-light);    color: var(--frw-fg-light-1);}
.frw-section--white   { background: var(--frw-white);    color: var(--frw-fg-light-1);}
.frw-section--cream   { background: var(--frw-cream);    color: var(--frw-fg-cream-1);}

/* Eyebrow color per container */
.frw-section--dark    .frw-eyebrow,
.frw-section--dark-alt .frw-eyebrow { color: var(--frw-accent); }
.frw-section--light   .frw-eyebrow,
.frw-section--white   .frw-eyebrow  { color: var(--frw-accent-aa-light); }
.frw-section--cream   .frw-eyebrow  { color: var(--frw-accent-aa-light); }

/* Secondary text per container */
.frw-section--dark    .frw-text-secondary,
.frw-section--dark-alt .frw-text-secondary { color: var(--frw-fg-dark-2); }
.frw-section--light   .frw-text-secondary,
.frw-section--white   .frw-text-secondary  { color: var(--frw-fg-light-2);}
.frw-section--cream   .frw-text-secondary  { color: var(--frw-fg-cream-2);}

/* ─── Buttons ─── */
.frw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--frw-radius-btn);
  border: 2px solid transparent;
  transition: all 0.18s ease;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

/* Primary — amber on any bg */
.frw-btn--primary {
  background: var(--frw-accent);
  color: #1A1200;
  border-color: var(--frw-accent);
}
.frw-btn--primary:hover {
  background: #E09415;
  border-color: #E09415;
  transform: translateY(-1px);
  box-shadow: var(--frw-shadow-accent);
}

/* Outline on dark */
.frw-btn--outline-dark {
  background: transparent;
  color: var(--frw-fg-dark-1);
  border-color: rgba(255,255,255,0.35);
}
.frw-btn--outline-dark:hover {
  border-color: rgba(255,255,255,0.75);
  color: #fff;
}

/* Outline on light */
.frw-btn--outline-light {
  background: transparent;
  color: var(--frw-fg-light-1);
  border-color: #D1D5DB;
}
.frw-btn--outline-light:hover {
  border-color: var(--frw-fg-light-1);
}

/* Ghost on dark */
.frw-btn--ghost-dark {
  background: transparent;
  color: var(--frw-fg-dark-1);
  border-color: transparent;
}
.frw-btn--ghost-dark:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* Ghost on light */
.frw-btn--ghost-light {
  background: transparent;
  color: var(--frw-fg-light-1);
  border-color: transparent;
}
.frw-btn--ghost-light:hover {
  background: rgba(0,0,0,0.06);
}

/* Larger hero variant */
.frw-btn--lg {
  padding: 14px 32px;
  font-size: 1rem;
}

/* ─── Navigation ─── */
.frw-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

/* Dark-top pages: transparent at top */
body.frw-page--dark-top .frw-nav {
  background: transparent;
}

/* Light-top pages: always solid dark */
body.frw-page--light-top .frw-nav {
  background: var(--frw-dark);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

/* Scrolled state: both page types get solid dark */
.frw-nav--scrolled {
  background: var(--frw-dark) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

.frw-nav__inner {
  max-width: var(--frw-container);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.frw-nav__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.frw-nav__logo img {
  height: 32px;
  width: auto;
  max-width: 180px;
}

.frw-nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}

.frw-nav__link {
  color: var(--frw-fg-dark-1);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.frw-nav__link:hover {
  color: #fff;
  background: rgba(255,255,255,0.07);
}

.frw-nav__caret {
  font-size: 0.6rem;
  opacity: 0.6;
  transition: transform 0.15s;
}
.frw-nav__dropdown-item.is-open .frw-nav__caret {
  transform: rotate(180deg);
}

/* Dropdown */
.frw-nav__dropdown-item {
  position: relative;
}

.frw-nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--frw-dark-alt);
  border: 1px solid var(--frw-border-dark);
  border-radius: 10px;
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
  z-index: 100;
}

.frw-nav__dropdown-item:hover .frw-nav__dropdown,
.frw-nav__dropdown-item.is-open .frw-nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.frw-nav__dropdown a {
  display: block;
  padding: 10px 14px;
  color: var(--frw-fg-dark-2);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 7px;
  transition: color 0.12s, background 0.12s;
  text-decoration: none;
}

.frw-nav__dropdown a:hover {
  color: var(--frw-fg-dark-1);
  background: rgba(255,255,255,0.07);
}

/* Nav CTAs */
.frw-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.frw-nav__actions .frw-btn {
  padding: 9px 18px;
  font-size: 0.875rem;
}

/* Hamburger */
.frw-nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  margin-left: auto;
  cursor: pointer;
}

.frw-nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--frw-fg-dark-1);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Mobile menu */
.frw-nav__mobile {
  display: none;
  background: var(--frw-dark-alt);
  padding: 16px 24px 24px;
  border-top: 1px solid var(--frw-border-dark);
}

.frw-nav__mobile.is-open {
  display: block;
}

.frw-nav__mobile a,
.frw-nav__mobile button {
  display: block;
  width: 100%;
  text-align: left;
  color: var(--frw-fg-dark-1);
  font-size: 1rem;
  font-weight: 500;
  padding: 12px 0;
  border: none;
  background: none;
  border-bottom: 1px solid var(--frw-border-dark);
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.frw-nav__mobile a:last-child,
.frw-nav__mobile button:last-child {
  border-bottom: none;
}

.frw-nav__mobile .frw-btn--primary {
  display: inline-flex;
  width: auto;
  margin-top: 16px;
  border-bottom: none;
}

.frw-nav__mobile-sub {
  padding-left: 16px;
}

.frw-nav__mobile-sub a {
  font-size: 0.9rem;
  color: var(--frw-fg-dark-2);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* ─── Footer ─── */
.frw-footer {
  background: var(--frw-dark);
  color: var(--frw-fg-dark-2);
  padding: 72px 0 0;
}

.frw-footer__inner {
  max-width: var(--frw-container);
  margin: 0 auto;
  padding: 0 24px;
}

.frw-footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--frw-border-dark);
}

.frw-footer__brand p {
  color: var(--frw-fg-dark-2);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: 12px;
  max-width: 260px;
}

.frw-footer__logo img {
  height: 28px;
  width: auto;
}

.frw-footer__col h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--frw-fg-dark-1);
  margin-bottom: 16px;
}

.frw-footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.frw-footer__col a {
  color: var(--frw-fg-dark-2);
  font-size: 0.875rem;
  transition: color 0.15s;
  text-decoration: none;
}

.frw-footer__col a:hover {
  color: var(--frw-fg-dark-1);
}

.frw-footer__bottom {
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.frw-footer__copy {
  font-size: 0.8125rem;
  color: var(--frw-fg-dark-2);
}

.frw-footer__legal-links {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.frw-footer__legal-links a {
  font-size: 0.8125rem;
  color: var(--frw-fg-dark-2);
  text-decoration: none;
  transition: color 0.15s;
}

.frw-footer__legal-links a:hover {
  color: var(--frw-fg-dark-1);
}

/* ─── Fade-in animation ─── */
.frw-fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.38s ease-out, transform 0.38s ease-out;
  animation: frw-reveal-failsafe 0s ease-out 0.6s forwards;
}

.frw-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  animation: none;
}

@keyframes frw-reveal-failsafe {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Cookie Banner ─── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--frw-dark-alt);
  border-top: 1px solid var(--frw-border-dark);
  padding: 16px 24px;
}

.cookie-banner__inner {
  max-width: var(--frw-container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  font-size: 0.875rem;
  color: var(--frw-fg-dark-2);
  min-width: 200px;
}

.cookie-banner__text a {
  color: var(--frw-accent);
  text-decoration: underline;
}

.cookie-banner__actions {
  flex-shrink: 0;
}

.cookie-banner__btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: var(--frw-radius-btn);
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}

.cookie-banner__btn--primary {
  background: var(--frw-accent);
  color: #1A1200;
}

.cookie-banner__btn--primary:hover {
  background: #E09415;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .frw-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --frw-section-v: var(--frw-section-v-tablet);
  }

  .frw-nav__links,
  .frw-nav__actions {
    display: none;
  }

  .frw-nav__hamburger {
    display: flex;
  }

  .frw-footer__top {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .frw-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  :root {
    --frw-section-v: var(--frw-section-v-mobile);
  }

  .frw-container {
    padding: 0 16px;
  }

  .frw-footer__top {
    grid-template-columns: 1fr;
  }

  .cookie-banner__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
