:root {
  --cream: #f6efe2;
  --cream-2: #efe4cf;
  --wood: #3a2a1e;
  --wood-2: #2a1d14;
  --wine: #7c2233;
  --wine-2: #5c1826;
  --gold: #c39a4b;
  --gold-light: #e4c780;
  --ink: #2b2118;
  --ink-soft: #5a4d3f;
  --line: rgba(58, 42, 30, 0.14);
  --radius: 14px;
  --shadow: 0 12px 32px rgba(42, 29, 20, 0.12);
  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

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

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* subtle paper grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: radial-gradient(circle at 1px 1px, #000 1px, transparent 0);
  background-size: 3px 3px;
}

h1, h2, h3 {
  font-family: var(--font-head);
  color: var(--wood-2);
  margin: 0 0 0.4em;
  line-height: 1.15;
}

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

/* ---------- HEADER ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 239, 226, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--wine);
  letter-spacing: -0.01em;
}
.brand em { color: var(--gold); font-style: normal; }
.brand-mark { color: var(--wine); flex-shrink: 0; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a { color: var(--ink-soft); transition: color 0.2s; }
.nav a:hover { color: var(--wine); }
.nav-cta {
  background: var(--wine);
  color: var(--cream) !important;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--wine-2); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--wood);
  border-radius: 2px;
}

/* ---------- HERO ---------- */
.hero {
  padding: 110px 0 90px;
  background:
    radial-gradient(ellipse at 20% -10%, rgba(124, 34, 51, 0.10), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(195, 154, 75, 0.16), transparent 50%),
    var(--cream);
  text-align: center;
}
.hero-inner { max-width: 780px; }

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  margin-bottom: 22px;
}
.accent { color: var(--wine); font-style: italic; }

.hero-lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 34px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 52px;
}

.hero-quote {
  margin: 0 auto;
  max-width: 560px;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--wood-2);
  padding: 26px 30px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hero-quote cite {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.03em;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--wine);
  color: var(--cream);
  box-shadow: 0 8px 20px rgba(124, 34, 51, 0.28);
}
.btn-primary:hover { background: var(--wine-2); }
.btn-ghost {
  background: transparent;
  color: var(--wood-2);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--wine); color: var(--wine); }
.btn-wide { width: 100%; text-align: center; }

/* ---------- SECTIONS ---------- */
.section { padding: 100px 0; }
.section:nth-of-type(even) { background: var(--cream-2); }

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(195, 154, 75, 0.14);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  max-width: 700px;
}

.section-lede {
  color: var(--ink-soft);
  max-width: 620px;
  font-size: 1.05rem;
  margin-bottom: 50px;
}
.section-lede a {
  color: var(--wine);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- POVESTE quotes ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.quote-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  margin: 0;
}
.quote-card p {
  font-family: var(--font-head);
  font-style: italic;
  color: var(--wood-2);
  margin: 0 0 16px;
  font-size: 1rem;
}
.quote-card figcaption {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--wine);
}

/* ---------- STEPS ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  position: relative;
  box-shadow: var(--shadow);
}
.step-num {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--gold-light);
  -webkit-text-stroke: 1px var(--gold);
  margin-bottom: 12px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* ---------- ECOSYSTEM ---------- */
.partner-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.partner-card {
  background: var(--wood-2);
  color: var(--cream);
  border-radius: var(--radius);
  padding: 30px 24px;
  text-align: center;
}
.partner-icon { font-size: 2.1rem; margin-bottom: 14px; }
.partner-card h3 {
  color: var(--gold-light);
  font-size: 1.08rem;
  margin-bottom: 10px;
}
.partner-card p {
  color: rgba(246, 239, 226, 0.78);
  font-size: 0.92rem;
  margin: 0;
}

/* ---------- VALUES ---------- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.value-item {
  border-left: 3px solid var(--gold);
  padding-left: 18px;
}
.value-item h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
  color: var(--wine);
}
.value-item p {
  color: var(--ink-soft);
  font-size: 0.94rem;
  margin: 0;
}

/* ---------- JOIN FORM ---------- */
.join {
  background:
    radial-gradient(ellipse at 80% 0%, rgba(124, 34, 51, 0.14), transparent 55%),
    var(--cream-2);
}
.join-inner { max-width: 640px; text-align: center; }
.join-inner .section-lede { margin-left: auto; margin-right: auto; }

.join-form {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}
.form-row { display: grid; gap: 6px; }
.form-row label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.form-row input,
.form-row select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
}
.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--wine);
}
.form-note {
  margin: 4px 0 0;
  font-size: 0.9rem;
  min-height: 1.2em;
  color: var(--wine);
  font-weight: 600;
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--wood-2);
  color: rgba(246, 239, 226, 0.75);
  padding: 64px 0 32px;
  text-align: center;
}
.footer-brand .brand-text {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
}
.footer-brand .brand-text em { color: var(--gold-light); font-style: normal; }
.footer-brand p { margin: 8px 0 0; font-size: 0.9rem; }

.footer-quote {
  max-width: 560px;
  margin: 32px auto;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold-light);
}

.footer-sign {
  font-family: var(--font-head);
  font-style: italic;
  color: rgba(246, 239, 226, 0.55);
  margin-bottom: 24px;
}

.footer-legal {
  font-size: 0.82rem;
  border-top: 1px solid rgba(246, 239, 226, 0.12);
  padding-top: 24px;
  color: rgba(246, 239, 226, 0.5);
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .quote-grid,
  .steps,
  .partner-grid,
  .values-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-cta { margin-top: 12px; text-align: center; }
  .nav-toggle { display: flex; }

  /* The logged-in header also carries a couple of non-link items
     (#whoami, .notif-bell) inside .nav — give them the same full-width
     row treatment as the links instead of the collapsed inline sizing
     they use in the desktop header. */
  .nav .whoami,
  .nav .notif-bell { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav .notif-bell:empty { display: none; border-bottom: none; padding: 0; }

  .quote-grid,
  .steps,
  .partner-grid,
  .values-grid { grid-template-columns: 1fr; }

  .section { padding: 70px 0; }
  .hero { padding: 80px 0 60px; }
}
