/* =============================================================
   Reveniel website — shared styles
   ============================================================= */

@import url('tokens.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; transition: color var(--dur-base) var(--ease-standard), opacity var(--dur-base) var(--ease-standard); }
a:hover { color: var(--gold-deep); }
::selection { background: var(--gold); color: var(--ink); }

/* ---------- Layout primitives ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: clamp(20px, 4vw, 56px); }
.container.narrow { max-width: var(--container-narrow); }
.section { padding-block: clamp(72px, 11vw, 144px); }
.section.compact { padding-block: clamp(56px, 8vw, 96px); }
.section.dark { background: var(--onyx); color: var(--fg-inverse); }
.section.dark p { color: rgba(253,251,240,.72); }
.section.warm { background: var(--cream-2); }

.divider { border: 0; height: 1px; background: var(--line); margin: 0; }
.divider.dark { background: var(--line-dark); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
}
.eyebrow.with-rule::before {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--gold);
  vertical-align: middle;
  margin-right: 14px;
  transform: translateY(-2px);
}

.display {
  font-weight: 600;
  font-size: clamp(48px, 7.5vw, 96px);
  line-height: 1.04;
  letter-spacing: var(--tracking-display);
  margin: 0;
  text-wrap: balance;
}
.display em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold);
}
h1.page-title {
  font-weight: 600;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 1.06;
  letter-spacing: var(--tracking-tight);
  margin: 0;
  text-wrap: balance;
}
h2.section-title {
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  margin: 0;
  text-wrap: balance;
}
h3 { font-weight: 600; font-size: 20px; line-height: 1.3; margin: 0; letter-spacing: -0.01em; }
p.lead {
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
  margin: 0;
  text-wrap: pretty;
}
.section.dark p.lead { color: rgba(253,251,240,.88); }
p { margin: 0; color: var(--ink-2); text-wrap: pretty; }

.gold-rule { width: 48px; height: 1px; background: var(--gold); border: 0; margin: var(--s-5) 0; }
.gold-rule.center { margin-inline: auto; }
.section.dark .gold-rule { background: var(--gold); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(253,251,240,.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img.mono { width: 30px; height: 30px; }
.nav-brand img.word { height: 14px; }
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: 13.5px;
  letter-spacing: 0.01em;
  color: var(--ink);
  padding-block: 6px;
  position: relative;
}
.nav-links a.active { color: var(--gold-deep); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--gold);
}
.nav-burger {
  display: none;
  width: 36px; height: 36px;
  background: transparent; border: 0; cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-burger span {
  display: block; width: 22px; height: 1px; background: var(--ink);
  position: relative;
}
.nav-burger span::before, .nav-burger span::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--ink);
}
.nav-burger span::before { top: -7px; }
.nav-burger span::after { top: 7px; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav.open .nav-mobile {
    display: flex; flex-direction: column; gap: 0;
    border-top: 1px solid var(--line);
    padding-block: 16px;
  }
  .nav-mobile { display: none; }
  .nav-mobile a {
    padding: 14px 0; font-size: 16px; color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .nav-mobile a:last-child { border-bottom: 0; }
}
.nav-mobile { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 26px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  transition: all var(--dur-base) var(--ease-standard);
  white-space: nowrap;
}
.btn.sm { padding: 9px 18px; font-size: 12.5px; }
.btn.lg { padding: 16px 32px; font-size: 15px; }
.btn-primary { background: var(--gold); color: var(--ink); box-shadow: 0 1px 2px rgba(39,37,31,.06); }
.btn-primary:hover { background: var(--gold-deep); color: var(--cream); transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--cream); }
.btn-ondark-primary { background: var(--gold); color: var(--ink); }
.btn-ondark-primary:hover { background: var(--gold-soft); transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(210,175,110,.5); }
.btn-ondark-ghost { background: transparent; color: var(--cream); border-color: rgba(253,251,240,.45); }
.btn-ondark-ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn-link {
  background: transparent; border: 0; padding: 6px 0;
  border-bottom: 1px solid var(--gold);
  border-radius: 0; color: var(--ink);
}
.btn-link:hover { color: var(--gold-deep); }
.section.dark .btn-link { color: var(--cream); }
.section.dark .btn-link:hover { color: var(--gold-soft); }

.btn-arrow::after {
  content: "\2192";
  font-family: var(--font-sans);
  transition: transform var(--dur-base) var(--ease-standard);
}
.btn-arrow:hover::after { transform: translateX(4px); }

/* ---------- Footer ---------- */
.footer {
  background: var(--onyx);
  color: var(--fg-inverse);
  padding-block: 88px 32px;
  position: relative;
  overflow: hidden;
}
.footer .mono-watermark {
  position: absolute; right: -120px; bottom: -120px;
  width: 480px; opacity: 0.04; pointer-events: none;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--line-dark);
}
.footer-brand img.word { height: 18px; margin-bottom: 28px; }
.footer-brand p { color: rgba(253,251,240,.6); max-width: 360px; }
.footer-col h4 {
  font-size: 12px; font-weight: 500; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--gold); margin-bottom: 22px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { color: rgba(253,251,240,.72); font-size: 14px; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; font-size: 12px; color: rgba(253,251,240,.45);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity var(--dur-reveal) var(--ease-emph), transform var(--dur-reveal) var(--ease-emph);
}
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 80ms; }
.reveal.delay-2 { transition-delay: 160ms; }
.reveal.delay-3 { transition-delay: 240ms; }
.reveal.delay-4 { transition-delay: 320ms; }
.reveal.delay-5 { transition-delay: 400ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Page header (sub-pages) ---------- */
.page-header {
  background: var(--onyx);
  color: var(--cream);
  padding-block: clamp(96px, 14vw, 168px) clamp(72px, 10vw, 120px);
  position: relative;
  overflow: hidden;
}
.page-header .mono-watermark {
  position: absolute; right: -100px; top: 50%; transform: translateY(-50%);
  width: 460px; opacity: 0.05; pointer-events: none;
}
.page-header .crumb {
  font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 24px;
}
.page-header p.lead { color: rgba(253,251,240,.78); max-width: 640px; margin-top: 28px; }

/* ---------- Card ---------- */
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 36px 32px;
  transition: border-color var(--dur-base) var(--ease-standard), background var(--dur-base) var(--ease-standard);
}
.card:hover { border-color: var(--gold); background: var(--cream-2); }
.section.warm .card { background: var(--cream); }
.section.dark .card {
  background: transparent;
  border-color: var(--line-dark);
}
.section.dark .card:hover { border-color: var(--gold); background: rgba(210,175,110,.04); }

/* ---------- Numeric ---------- */
.numeral {
  font-feature-settings: "tnum";
  font-weight: 500;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.big-numeral {
  font-weight: 500;
  font-size: clamp(48px, 6vw, 80px);
  letter-spacing: var(--tracking-display);
  color: var(--gold);
  line-height: 1;
}

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 10px; }
.field label {
  font-size: 12px; font-weight: 500; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--ink-2);
}
.field .hint { font-size: 13px; color: var(--ink-3); font-style: italic; margin-top: -2px; }
.field input, .field textarea, .field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 17px;
  color: var(--ink);
  outline: none;
  transition: border-color var(--dur-base) var(--ease-standard);
  font-family: var(--font-sans);
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus { border-bottom-color: var(--gold); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field.error input, .field.error textarea, .field.error select { border-bottom-color: #B5482E; }
.field .err-msg { font-size: 12px; color: #B5482E; }

/* ---------- Utility ---------- */
.center { text-align: center; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.gap-5 { gap: 24px; } .gap-6 { gap: 32px; } .gap-7 { gap: 48px; } .gap-8 { gap: 64px; }
.mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 24px; }
.mt-6 { margin-top: 32px; } .mt-7 { margin-top: 48px; } .mt-8 { margin-top: 64px; }
.text-fg-2 { color: var(--ink-2); }
.text-gold { color: var(--gold); }
.italic { font-style: italic; }

/* ---------- Placeholder image ---------- */
.ph {
  position: relative;
  background: var(--cream-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.ph::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(135deg, rgba(210,175,110,.08), rgba(39,37,31,.06));
  pointer-events: none;
}
.ph .ph-mono {
  width: 38%; max-width: 140px; opacity: 0.32;
}
.ph.dark { background: var(--ink); border-color: var(--line-dark); }
.ph.dark::after {
  background-image: linear-gradient(135deg, rgba(210,175,110,.14), rgba(6,7,7,.4));
}
.ph .ph-label {
  position: absolute; left: 16px; bottom: 14px;
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); z-index: 1;
}
.ph.dark .ph-label { color: rgba(253,251,240,.5); }
