/* ===== MAISON ERGO — DESIGN SYSTEM ===== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
  /* Palette */
  --ink:        #0F1714;   /* deep forest ink */
  --paper:      #F5F2EB;   /* warm linen */
  --sage:       #5C7A6B;   /* sage green */
  --moss:       #3A5945;   /* deep moss */
  --ember:      #C8581A;   /* ember CTA */
  --gold:       #D4A135;   /* stat gold */
  --mist:       #E8EDE9;   /* light section bg */
  --white:      #FFFFFF;

  /* Type */
  --display:    'Playfair Display', Georgia, serif;
  --body:       'DM Sans', system-ui, sans-serif;
  --mono:       'Space Mono', monospace;

  /* Spacing */
  --gap-xs: 0.5rem;
  --gap-s:  1rem;
  --gap-m:  2rem;
  --gap-l:  4rem;
  --gap-xl: 7rem;

  /* Radius */
  --r-s: 6px;
  --r-m: 14px;
  --r-l: 28px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ===== NAV ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 3rem;
  background: rgba(15,23,20,0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(92,122,107,0.2);
}
.nav-logo {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--paper);
  letter-spacing: 0.02em;
}
.nav-logo span { color: var(--gold); }
.nav-links { display: flex; gap: 2.2rem; }
.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,242,235,0.75);
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }
.nav-cta {
  background: var(--ember);
  color: var(--white) !important;
  padding: 0.55rem 1.4rem;
  border-radius: var(--r-s);
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  transition: background 0.2s !important;
}
.nav-cta:hover { background: #a8451200 !important; }
.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: var(--paper); border-radius: 2px; transition: all 0.3s; }

/* ===== HERO BANNERS ===== */
.hero {
  min-height: 90vh;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
  padding: 9rem 3rem 5rem;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
.hero-content { position: relative; z-index: 2; max-width: 750px; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.hero-eyebrow::before {
  content: '';
  display: inline-block; width: 32px; height: 1px;
  background: var(--gold);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 1.07;
  font-weight: 900;
  margin-bottom: 1.6rem;
}
.hero p {
  font-size: 1.15rem;
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 2.4rem;
  opacity: 0.9;
}
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn-primary {
  background: var(--ember);
  color: var(--white);
  padding: 0.85rem 2rem;
  border-radius: var(--r-s);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border: none; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(200,88,26,0.35); }
.btn-ghost {
  background: transparent;
  color: var(--paper);
  padding: 0.85rem 2rem;
  border-radius: var(--r-s);
  font-weight: 500;
  font-size: 0.95rem;
  border: 1px solid rgba(245,242,235,0.35);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-ghost:hover { border-color: var(--gold); background: rgba(212,161,53,0.08); }

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== SECTIONS ===== */
.section { padding: var(--gap-l) 3rem; }
.section-mist { background: var(--mist); }
.section-ink  { background: var(--ink); color: var(--paper); }
.section-moss { background: var(--moss); color: var(--paper); }

.section-label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.7rem;
}
.section-label-light { color: var(--gold); }

.section-title {
  font-family: var(--display);
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 640px;
  margin-bottom: 1.2rem;
}
.section-subtitle {
  font-size: 1.05rem;
  opacity: 0.75;
  max-width: 560px;
  margin-bottom: var(--gap-m);
}

/* ===== GRID ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; }

/* ===== STAT CARDS ===== */
.stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem;
  margin: var(--gap-m) 0;
}
.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(212,161,53,0.2);
  border-radius: var(--r-m);
  padding: 1.8rem 1.5rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--ember));
}
.stat-num {
  font-family: var(--mono);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.4rem;
}
.stat-label {
  font-size: 0.82rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--r-m);
  overflow: hidden;
  border: 1px solid rgba(92,122,107,0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(15,23,20,0.12); }
.card-img { width: 100%; height: 220px; object-fit: cover; }
.card-body { padding: 1.5rem; }
.card-tag {
  display: inline-block;
  background: var(--mist);
  color: var(--sage);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.8rem;
  border-radius: 99px;
  margin-bottom: 0.8rem;
}
.card-title {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.7rem;
}
.card-excerpt { font-size: 0.9rem; opacity: 0.7; line-height: 1.65; margin-bottom: 1rem; }
.card-meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--sage);
  display: flex; gap: 1rem;
}
.card-link {
  display: inline-flex; align-items: center; gap: 0.4rem;
  color: var(--ember);
  font-weight: 600;
  font-size: 0.88rem;
  margin-top: 1rem;
  transition: gap 0.2s;
}
.card-link:hover { gap: 0.7rem; }

/* ===== ARTICLE BANNER (page 2 mini-banner) ===== */
.article-banner {
  width: 100%;
  height: 480px;
  position: relative; overflow: hidden;
  margin-top: 72px; /* nav offset */
}
.article-banner svg { width: 100%; height: 100%; }

/* ===== ARTICLE CONTENT ===== */
.article-wrap { max-width: 760px; margin: 0 auto; padding: var(--gap-l) 2rem; }
.article-meta-row {
  display: flex; align-items: center; gap: 1.5rem;
  font-family: var(--mono); font-size: 0.78rem;
  color: var(--sage); margin-bottom: 2rem;
  flex-wrap: wrap;
}
.article-tag {
  background: var(--ember);
  color: var(--white);
  padding: 0.3rem 0.9rem;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.article-wrap h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 2rem 0 1rem;
}
.article-wrap h3 {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 1.8rem 0 0.8rem;
  color: var(--moss);
}
.article-wrap p { margin-bottom: 1.4rem; font-size: 1.05rem; line-height: 1.8; }
.article-wrap ul { margin: 0.8rem 0 1.4rem 1.4rem; }
.article-wrap ul li { margin-bottom: 0.6rem; font-size: 1.02rem; }

.pull-quote {
  border-left: 4px solid var(--gold);
  background: var(--mist);
  padding: 1.5rem 2rem;
  border-radius: 0 var(--r-m) var(--r-m) 0;
  margin: 2rem 0;
  font-family: var(--display);
  font-size: 1.25rem;
  font-style: italic;
  color: var(--moss);
  line-height: 1.5;
}

/* ===== AI PHOTO FRAME ===== */
.ai-photo {
  width: 100%;
  border-radius: var(--r-m);
  overflow: hidden;
  margin: 2rem 0;
  position: relative;
}
.ai-photo-badge {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(15,23,20,0.75);
  color: var(--gold);
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.3rem 0.7rem;
  border-radius: 99px;
  letter-spacing: 0.1em;
}

/* ===== EMAIL SECTION ===== */
.email-feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem;
  align-items: center;
}
.email-badges { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(92,122,107,0.15);
  border: 1px solid rgba(92,122,107,0.3);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.45rem 1rem;
  border-radius: 99px;
}
.badge-icon { font-size: 1rem; }
.inbox-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(212,161,53,0.2);
  border-radius: var(--r-l);
  padding: 2rem;
}
.inbox-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.inbox-dot { width: 10px; height: 10px; border-radius: 50%; }
.inbox-dot.red { background: #FF5F57; }
.inbox-dot.yellow { background: #FFBD2E; }
.inbox-dot.green { background: #28C840; }
.inbox-label { font-family: var(--mono); font-size: 0.8rem; opacity: 0.5; margin-left: auto; }
.email-row {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: var(--r-s);
  padding-left: 0.5rem;
}
.email-row:hover { background: rgba(255,255,255,0.04); }
.email-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem;
  flex-shrink: 0;
}
.email-info { flex: 1; }
.email-sender { font-weight: 600; font-size: 0.88rem; }
.email-subject { font-size: 0.82rem; opacity: 0.65; }
.email-time { font-family: var(--mono); font-size: 0.72rem; opacity: 0.45; }
.inbox-rate {
  margin-top: 1.2rem;
  background: linear-gradient(90deg, var(--sage), var(--gold));
  height: 4px; border-radius: 99px; position: relative;
}
.inbox-rate::after {
  content: '97.3% Inbox Rate';
  position: absolute; right: 0; top: 8px;
  font-family: var(--mono); font-size: 0.7rem; color: var(--gold);
}

/* ===== NEWSLETTER FORM ===== */
.nl-form {
  display: flex; gap: 0.8rem;
  max-width: 500px; margin-top: 1.5rem;
}
.nl-input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(212,161,53,0.3);
  border-radius: var(--r-s);
  padding: 0.85rem 1.2rem;
  color: var(--paper);
  font-family: var(--body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}
.nl-input::placeholder { opacity: 0.4; }
.nl-input:focus { border-color: var(--gold); }

/* ===== TIMELINE ===== */
.timeline { display: flex; flex-direction: column; gap: 0; max-width: 600px; }
.tl-item { display: flex; gap: 1.5rem; position: relative; }
.tl-item:not(:last-child)::before {
  content: '';
  position: absolute; left: 16px; top: 32px; bottom: -8px; width: 2px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}
.tl-dot {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.7rem; font-weight: 700;
  color: var(--gold); flex-shrink: 0;
}
.tl-body { padding: 0 0 2.2rem; }
.tl-title { font-weight: 600; margin-bottom: 0.3rem; }
.tl-text { font-size: 0.9rem; opacity: 0.7; }

/* ===== ABOUT PAGE ===== */
.team-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.team-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--r-m);
  background: var(--white);
  border: 1px solid rgba(92,122,107,0.12);
}
.team-avatar {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
}
.team-name { font-family: var(--display); font-size: 1.1rem; font-weight: 700; }
.team-role { font-size: 0.82rem; color: var(--sage); margin-top: 0.3rem; }

/* ===== FOOTER ===== */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: 4rem 3rem 2rem;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-brand { font-family: var(--display); font-size: 1.5rem; color: var(--paper); margin-bottom: 0.8rem; }
.footer-brand span { color: var(--gold); }
.footer-desc { font-size: 0.9rem; opacity: 0.55; line-height: 1.7; }
.footer-col h4 { font-weight: 600; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1.1rem; color: var(--gold); }
.footer-col a { display: block; font-size: 0.88rem; opacity: 0.55; margin-bottom: 0.6rem; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 0.72rem; opacity: 0.4;
  flex-wrap: wrap; gap: 0.5rem;
}
.footer-legal { display: flex; gap: 1.5rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .email-feature { grid-template-columns: 1fr; gap: 2rem; }
  .team-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .section { padding: var(--gap-m) 1.5rem; }
  .hero { padding: 8rem 1.5rem 4rem; }
  .grid-3, .grid-2, .grid-auto { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .team-grid { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity:1; transform:none; transition:none; }
}
