/* ====================================================================
   Metanoia — design system
   Warm editorial · professional · minimal
   ==================================================================== */

:root {
  /* Palette */
  --bg:           #F5F0E8;   /* warm cream */
  --bg-2:         #EFE8DC;   /* cream sand */
  --paper:        #FBF8F2;   /* lifted surface */
  --ink:          #221912;   /* deep warm charcoal */
  --ink-2:        #4A3E34;   /* secondary text */
  --ink-3:        #8A7C6E;   /* muted */
  --rule:         #D9CFBE;   /* dividers */
  --rule-soft:    #E6DECF;
  --accent:       #B8552F;   /* terracotta */
  --accent-deep:  #8C3F22;
  --accent-soft:  #E8D6C8;
  --sage:         #6B7F5F;   /* secondary accent */

  /* Type */
  --serif: "Newsreader", "Source Serif 4", Georgia, serif;
  --sans:  "Manrope", "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  /* Scale */
  --pad:   clamp(20px, 4vw, 56px);
  --max:   1240px;
  --max-narrow: 880px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

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

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

::selection { background: var(--accent); color: var(--bg); }

/* ---------- Type ---------- */

.eyebrow {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow .dot {
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(44px, 6.4vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
}

.italic { font-style: italic; }
.serif  { font-family: var(--serif); font-weight: 400; }

p { margin: 0 0 1em; color: var(--ink-2); text-wrap: pretty; }
.lead  { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.5; color: var(--ink); }

ul.clean { list-style: none; padding: 0; margin: 0; }

/* ---------- Layout ---------- */

.wrap   { width: 100%; max-width: var(--max);        margin: 0 auto; padding: 0 var(--pad); }
.wrap-n { width: 100%; max-width: var(--max-narrow); margin: 0 auto; padding: 0 var(--pad); }

section { padding: clamp(72px, 9vw, 140px) 0; }

.rule { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* ---------- Nav ---------- */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 240, 232, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}

.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 18px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex; align-items: center; gap: 14px;
  color: var(--ink);
  text-decoration: none;
}
.brand img {
  width: 48px; height: auto;
  display: block;
  flex-shrink: 0;
}
@media (max-width: 1100px) {
  .brand .brand-sub { display: none; }
}
.brand .brand-word {
  display: flex; flex-direction: column; gap: 2px;
  line-height: 1;
}
.brand .brand-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand .brand-sub {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
@media (max-width: 600px) {
  .brand img { width: 44px; }
  .brand .brand-name { font-size: 18px; }
  .brand .brand-sub { font-size: 9px; }
}

/* Decorative dots motif (matches logo: yellow / red / blue) */
:root {
  --dot-y: #F2C522;
  --dot-r: #C8333A;
  --dot-b: #1B3FA8;
}
.dots-mark {
  display: inline-flex; align-items: center; gap: 6px;
}
.dots-mark .d {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.dots-mark .d-y { background: var(--dot-y); width: 6px; height: 6px; }
.dots-mark .d-r { background: var(--dot-r); width: 8px; height: 8px; }
.dots-mark .d-b { background: var(--dot-b); width: 12px; height: 12px; }

.menu { display: flex; gap: 4px; align-items: center; }
.menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.menu a:hover { color: var(--ink); background: var(--bg-2); }
.menu a.active { color: var(--ink); background: var(--bg-2); }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  transition: background .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-cta:hover { background: var(--accent); }

/* Hamburger toggle (mobile only) */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: border-color .2s, background .2s;
}
.nav-toggle:hover { border-color: var(--ink); }
.nav-toggle .bar {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 1.6px;
  background: var(--ink);
  transform: translateX(-50%);
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}
.nav-toggle .bar:nth-child(1) { top: 15px; }
.nav-toggle .bar:nth-child(2) { top: 21px; }
.nav-toggle .bar:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  top: 21px;
  transform: translateX(-50%) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  top: 21px;
  transform: translateX(-50%) rotate(-45deg);
}

/* Mobile dropdown panel */
.menu-mobile {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgba(245, 240, 232, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
  padding: 8px var(--pad) 28px;
  box-shadow: 0 16px 32px -16px rgba(34, 25, 18, 0.18);
}
.menu-mobile.is-open { display: block; animation: menuDrop .25s ease; }
@keyframes menuDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: none; }
}
.menu-mobile a {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.01em;
  padding: 16px 0;
  color: var(--ink);
  border-bottom: 1px solid var(--rule-soft);
}
.menu-mobile a:last-of-type { border-bottom: 0; }
.menu-mobile a.active {
  color: var(--accent);
  font-style: italic;
}
.menu-mobile .nav-cta-mobile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 22px;
  background: var(--ink);
  color: var(--bg);
  border-radius: 999px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 0;
  transition: background .2s;
}
.menu-mobile .nav-cta-mobile:hover { background: var(--accent); }
.menu-mobile .nav-cta-mobile.active { color: var(--bg); font-style: normal; }

@media (max-width: 840px) {
  .menu { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  padding: 16px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--ink); }

.btn .arr {
  display: inline-block; width: 14px; height: 14px;
  position: relative;
}
.btn .arr::before, .btn .arr::after {
  content: ""; position: absolute; background: currentColor;
}
.btn .arr::before { top: 6px; left: 0; width: 14px; height: 1.5px; }
.btn .arr::after  { top: 1px; right: 0; width: 8px;  height: 1.5px; transform: rotate(45deg); transform-origin: right top; }

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--rule-soft);
  padding: 64px 0 36px;
  background: var(--bg-2);
}
footer .wrap {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
footer h4 {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 18px;
  font-weight: 600;
}
footer ul.clean li { margin-bottom: 8px; }
footer ul.clean a { color: var(--ink-2); font-size: 14px; }
footer ul.clean a:hover { color: var(--accent); }

.foot-tag {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  margin: 14px 0 0;
  max-width: 28ch;
}

.foot-bottom {
  max-width: var(--max);
  margin: 56px auto 0;
  padding: 24px var(--pad) 0;
  border-top: 1px solid var(--rule-soft);
  display: flex; justify-content: space-between; gap: 24px;
  font-size: 12px;
  color: var(--ink-3);
}

@media (max-width: 780px) {
  footer .wrap { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ---------- Hero composition ---------- */

.hero {
  position: relative;
  padding: clamp(56px, 8vw, 120px) 0 clamp(56px, 8vw, 100px);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero-mark {
  position: absolute;
  right: var(--pad);
  top: 40px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
}

/* Real portrait */
.portrait {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--bg-2);
  border-radius: 4px;
  overflow: hidden;
}
.portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.portrait::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(34,25,18,0.08) 100%);
  pointer-events: none;
  z-index: 2;
}
.portrait .dots-overlay {
  position: absolute;
  bottom: 20px;
  left: 20px;
  z-index: 3;
}

/* ---------- Cards ---------- */

.card {
  background: var(--paper);
  border: 1px solid var(--rule-soft);
  border-radius: 4px;
  padding: clamp(24px, 2.5vw, 36px);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: var(--rule); }

.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink-2);
  border: 1px solid var(--rule-soft);
}
.tag.accent { background: var(--accent-soft); color: var(--accent-deep); border-color: transparent; }

/* ---------- Section header ---------- */

.sec-head {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(24px, 4vw, 80px);
  margin-bottom: clamp(40px, 5vw, 72px);
  align-items: end;
}
.sec-head .eyebrow { padding-top: 6px; }
@media (max-width: 760px) {
  .sec-head { grid-template-columns: 1fr; }
}

/* ---------- Quote ---------- */

.pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 3.6vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
  max-width: 22ch;
}
.pull .accent { color: var(--accent); }
.pull cite {
  display: block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 24px;
}

/* ---------- Utility ---------- */

.muted { color: var(--ink-3); }
.accent-color { color: var(--accent); }
.center { text-align: center; }

.divider-stamp {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.divider-stamp::before, .divider-stamp::after {
  content: ""; width: 40px; height: 1px; background: var(--rule);
}

/* fade-in on scroll */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
