/* ============================================================
   RFFL — Shared Styles
   Variables, reset, typography, nav, footer, utilities
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  /* Brand colors */
  --red:            #f05c63;
  --burgundy:       #49162b;
  --yellow:         #fbdd4e;
  --offwhite:       #f2ede9;
  --white:          #ffffff;

  /* Text */
  --text-primary:       #49162b;
  --text-secondary:     rgba(73, 22, 43, 0.62);
  --text-muted:         rgba(73, 22, 43, 0.4);
  --text-on-dark:       rgba(255, 255, 255, 0.92);
  --text-on-dark-muted: rgba(255, 255, 255, 0.5);

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Mono', monospace;
  /* Syne vertical scale: all font-display headings use scaleY(1.12) to expand character height.
     Apply transform: scaleY(var(--syne-scale-y)) to any new font-display heading elements. */
  --syne-scale-y: 1.12;

  /* Layout */
  --max-w:          1160px;
  --container-px:   24px;
  --section-py:     88px;

  /* Borders */
  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --border:         1px solid rgba(73, 22, 43, 0.1);

  /* Shadows */
  --shadow-sm:  0 1px 4px rgba(73, 22, 43, 0.07);
  --shadow-md:  0 4px 20px rgba(73, 22, 43, 0.1);
  --shadow-lg:  0 16px 48px rgba(73, 22, 43, 0.14);

  /* Motion */
  --ease:       cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 200ms var(--ease);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

/* ── Section label ─────────────────────────────────────────── */
.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.section-label--light { color: var(--text-on-dark-muted); }
.section-label--red   { color: rgba(240, 92, 99, 0.7); }

/* ── Syne vertical character expansion ─────────────────────────
   Syne's letterforms render compressed at display sizes.
   scaleY(1.12) expands character height without changing font-size.
   Add new font-display heading selectors here as pages are built.
   ─────────────────────────────────────────────────────────── */
.hero-headline,
.why-rffl-title,
.how-title,
.products-title,
.product-card-title,
.value-title,
.step-title,
.cta-band-headline,
.page-hero-headline,
.pricing-title,
.pricing-card-plan,
.early-access-title,
.early-step-title,
.features-title,
.feature-tile-title,
.reggie-callout-title,
.reggie-hero-headline,
.reggie-problem-title,
.reggie-solution-title,
.reggie-pricing-title,
.reggie-tier-name,
.problem-tile-title,
.solution-feature-title {
  transform: scaleY(var(--syne-scale-y));
  transform-origin: left top;
  display: block;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.btn-lg { font-size: 14px; padding: 14px 26px; }

.btn-primary {
  background: var(--red);
  color: var(--white);
}
.btn-primary:hover {
  background: #d94f56;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(240, 92, 99, 0.32);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid rgba(73, 22, 43, 0.2);
}
.btn-secondary:hover {
  border-color: var(--burgundy);
  background: rgba(73, 22, 43, 0.04);
}

.btn-ghost-light {
  background: transparent;
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.55);
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(242, 237, 233, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: var(--border);
  transition: background var(--transition), box-shadow var(--transition);
}
.nav--scrolled {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 var(--container-px);
  max-width: var(--max-w);
  margin: 0 auto;
}

.nav-logo img {
  height: 46px;
  width: auto;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.nav-toggle:hover { background: rgba(73, 22, 43, 0.06); }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--white);
  border-bottom: var(--border);
  padding: 12px var(--container-px) 20px;
  box-shadow: var(--shadow-md);
}
.nav-menu.is-open { display: flex; }

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 13px 0;
  border-bottom: var(--border);
  transition: color var(--transition);
}
.nav-link:hover { color: var(--text-primary); }

/* Log In — quieter than nav-cta, visually secondary */
.nav-link--login {
  color: var(--text-muted);
}
.nav-link--login:hover {
  color: var(--text-secondary);
}

.nav-cta {
  display: block;
  margin-top: 14px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  background: var(--red);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-md);
  text-align: center;
  transition: background var(--transition);
}
.nav-cta:hover { background: #d94f56; }

/* Desktop nav */
@media (min-width: 860px) {
  .nav-toggle { display: none; }

  .nav-menu {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .nav-link {
    padding: 7px 12px;
    border-bottom: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
  }
  .nav-link:hover { background: rgba(73, 22, 43, 0.06); color: var(--text-primary); }

  .nav-cta {
    margin-top: 0;
    text-align: left;
    padding: 9px 18px;
  }
}

/* ── CTA band ───────────────────────────────────────────────── */
.cta-band {
  background: var(--red);
  padding: 88px 0;
  text-align: center;
}
.cta-band-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 6vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--white);
  margin-bottom: 12px;
}
.cta-band-sub {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 36px;
}
.cta-band-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--red);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.cta-band-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--burgundy);
  padding: 64px 0 0;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--container-px) 56px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
  height: 42px;
  width: auto;
  margin-bottom: 18px;
  filter: brightness(0) invert(1);
}
.footer-brand p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-on-dark-muted);
  max-width: 270px;
  margin-bottom: 24px;
}

.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.footer-social a:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.footer-col-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-on-dark-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  font-size: 12px;
  color: var(--text-on-dark-muted);
  padding: 5px 0;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--text-on-dark); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px var(--container-px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

@media (min-width: 860px) {
  .footer-inner { grid-template-columns: 1.4fr 2fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
