/* ============================================================
   INVOICE RESCUE — style.css
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Inter:wght@400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --ink:        #1C2128;
  --slate:      #2D3748;
  --cloud:      #F7F8FA;
  --white:      #FFFFFF;
  --gold:       #D4A853;
  --gold-light: #F0C97A;
  --muted:      #6B7280;
  --border:     #E2E8F0;

  --max-w: 1200px;
  --max-w-md: 900px;
  --max-w-sm: 700px;
  --max-w-hero: 800px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  --transition: 0.25s ease;
}

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

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

body {
  font-family: 'Inter', sans-serif;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* --- Typography Scale --- */
.text-hero {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  line-height: 1.1;
}

.text-h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  line-height: 1.2;
}

.text-h3 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1.4;
}

.text-body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.75;
}

.text-small {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.875rem;
}

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--md  { max-width: var(--max-w-md); }
.container--sm  { max-width: var(--max-w-sm); }
.container--hero { max-width: var(--max-w-hero); }

.section { padding: 5rem 1.5rem; }
.section--lg { padding: 6rem 1.5rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition), transform var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--gold);
  color: var(--ink);
  padding: 16px 36px;
  font-size: 1rem;
}

.btn--primary:hover { background: var(--gold-light); }

.btn--pill {
  border-radius: var(--radius-pill);
  padding: 10px 24px;
  font-size: 0.9375rem;
}

.btn--nav {
  background: var(--gold);
  color: var(--ink);
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-size: 0.9rem;
  font-weight: 700;
}

.btn--nav:hover { background: var(--gold-light); }

.link-secondary {
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.link-secondary:hover { color: var(--gold); }


/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  transition: box-shadow 0.3s ease;
}

.nav.scrolled {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1rem 1.5rem;
}

.nav__logo {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--gold);
  letter-spacing: -0.01em;
}

.nav__right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav__hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.is-open span:nth-child(2) { opacity: 0; }
.nav__hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav menu */
.nav__mobile-menu {
  display: none;
  background: var(--slate);
  padding: 1rem 1.5rem 1.5rem;
}

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

.nav__mobile-menu .btn--nav {
  display: block;
  text-align: center;
  width: 100%;
}


/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--ink);
  overflow: hidden;
  padding: 6rem 1.5rem;
}

.hero__ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: clamp(12rem, 30vw, 22rem);
  color: rgba(212, 168, 83, 0.08);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--max-w-hero);
  margin: 0 auto;
  text-align: center;
}

.hero__eyebrow {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero__headline {
  color: var(--white);
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.hero__sub {
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
  }
}

.hero__trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem 2rem;
}

.hero__trust-item {
  font-size: 0.8125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.hero__trust-item::before {
  content: '✓ ';
  color: var(--gold);
  font-weight: 700;
}


/* ============================================================
   PROBLEM SECTION
   ============================================================ */
.problem {
  background: var(--cloud);
}

.problem__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: start;
}

@media (min-width: 768px) {
  .problem__grid {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
  }
}

.problem__copy h2 {
  color: var(--ink);
  margin-bottom: 1.5rem;
  white-space: pre-line;
}

.problem__copy p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.problem__copy p:last-child { margin-bottom: 0; }

.pain-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pain-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.pain-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--gold);
}

.pain-card__heading {
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.25rem;
}

.pain-card__body {
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.6;
}


/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how {
  background: var(--ink);
  text-align: center;
}

.how h2 {
  color: var(--white);
  margin-bottom: 3rem;
}

.how__steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .how__steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: left;
}

.step-card__label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.step-card__heading {
  color: var(--white);
  margin-bottom: 0.75rem;
}

.step-card__body {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}


/* ============================================================
   WHY INVOICE RESCUE
   ============================================================ */
.why {
  background: var(--cloud);
}

.why h2 {
  color: var(--ink);
  margin-bottom: 2.5rem;
  text-align: center;
}

.comparison-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-md);
}

.comparison-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.comparison-table th,
.comparison-table td {
  padding: 0.875rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.comparison-table thead th {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--muted);
  background: var(--cloud);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table thead th:nth-child(2) {
  color: var(--ink);
  background: rgba(212, 168, 83, 0.1);
  border-top: 2px solid var(--gold);
}

.comparison-table tbody td:nth-child(2) {
  background: rgba(212, 168, 83, 0.04);
  font-weight: 600;
  color: var(--ink);
}

.comparison-table tbody tr:last-child td { border-bottom: none; }

.tick { color: var(--gold); font-weight: 700; }
.cross { color: var(--muted); }

.comparison-table tbody td:first-child {
  font-weight: 500;
  color: var(--slate);
}


/* ============================================================
   WHO IT'S FOR
   ============================================================ */
.who {
  background: var(--white);
}

.who h2 {
  text-align: center;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

.who__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .who__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.who-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.who-tile:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 12px rgba(212, 168, 83, 0.12);
}

.who-tile__icon {
  width: 36px;
  height: 36px;
  color: var(--gold);
}

.who-tile__label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
}


/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  position: relative;
  background: var(--ink);
  overflow: hidden;
  text-align: center;
}

.cta-section__ghost {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Playfair Display', serif;
  font-size: clamp(10rem, 25vw, 18rem);
  color: rgba(212, 168, 83, 0.05);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.cta-section__content {
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: 1.25rem;
}

.cta-section__body {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.75;
}

.cta-section__email {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.cta-section__email a {
  color: var(--gold);
  font-family: 'Courier New', monospace;
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.cta-section__email a:hover { color: var(--gold-light); }


/* ============================================================
   FAQ
   ============================================================ */
.faq {
  background: var(--cloud);
}

.faq h2 {
  text-align: center;
  color: var(--ink);
  margin-bottom: 2.5rem;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition);
}

.faq-item__question:hover { color: var(--gold); }

.faq-item__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--gold);
  transition: transform 0.3s ease;
}

.faq-item.is-open .faq-item__icon {
  transform: rotate(45deg);
}

.faq-item__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
}

.faq-item__answer-inner {
  padding-bottom: 1.25rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.75;
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--ink);
  padding: 3rem 1.5rem 2rem;
}

.footer__divider {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto 2.5rem;
  height: 1px;
  background: var(--gold);
  opacity: 0.4;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
  }
}

.footer__logo {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.footer__tagline {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 300px;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.footer__email {
  font-size: 0.875rem;
  color: var(--gold);
  font-family: 'Courier New', monospace;
}

.footer__right {
  text-align: left;
}

@media (min-width: 768px) {
  .footer__right { text-align: right; }
}

.footer__copy {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

.footer__legal {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.7;
  line-height: 1.6;
}


/* ============================================================
   SCROLL ANIMATIONS
   ============================================================ */
.anim-fade {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.anim-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================================
   RESPONSIVE — NAV MOBILE
   ============================================================ */
@media (max-width: 639px) {
  .nav__hamburger { display: flex; }
  .nav__right .btn--nav { display: none; }

  .section { padding: 3.5rem 1.25rem; }
  .section--lg { padding: 4rem 1.25rem; }
}

@media (min-width: 640px) {
  .nav__hamburger { display: none; }
  .nav__mobile-menu { display: none !important; }
}
