:root {
  --paper: #FBF6F1;
  --paper-raised: #F3E9E2;
  --ink: #1C1714;
  --ink-soft: #5A4F46;
  --rose: #9C2440;
  --rose-soft: #C65B74;
  --line: rgba(28, 23, 20, 0.14);
  --focus: #9C2440;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --measure: 62ch;
  --container: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15110F;
    --paper-raised: #1F1916;
    --ink: #F3EAE3;
    --ink-soft: #BFB2A8;
    --rose: #E07288;
    --rose-soft: #C65B74;
    --line: rgba(243, 234, 227, 0.16);
    --focus: #E07288;
  }
}

:root[data-theme="dark"] {
  --paper: #15110F;
  --paper-raised: #1F1916;
  --ink: #F3EAE3;
  --ink-soft: #BFB2A8;
  --rose: #E07288;
  --rose-soft: #C65B74;
  --line: rgba(243, 234, 227, 0.16);
  --focus: #E07288;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

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

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 16px;
  color: var(--ink);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); max-width: 22ch; }
h3 { font-size: 1.15rem; font-weight: 600; font-family: var(--font-body); }

p { margin: 0 0 16px; color: var(--ink-soft); max-width: var(--measure); }

a { color: var(--rose); text-decoration-color: var(--line); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 14px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.wordmark {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.main-nav { flex: 1; display: flex; justify-content: center; }

.nav-list {
  list-style: none;
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}
.nav-list a:hover { border-color: var(--rose); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn, .btn-ghost, .btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 24px;
  border-radius: 3px;
  transition: background 0.2s ease;
}
.btn:hover { background: var(--rose); }

.btn-small { padding: 10px 18px; font-size: 0.88rem; border-radius: 3px; background: var(--ink); color: var(--paper); }
.btn-small:hover { background: var(--rose); }

.btn-ghost {
  color: var(--ink);
  padding: 14px 4px;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
}
.btn-ghost:hover { color: var(--rose); border-color: var(--rose); }

.header-cta { flex: none; }

/* Hero */

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  padding: 88px 24px 96px;
}

.hero-sub { font-size: 1.1rem; max-width: 46ch; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.hero-graphic { display: flex; justify-content: center; }
.connector-svg { width: 100%; max-width: 320px; height: auto; }

.node-a { fill: var(--ink); }
.node-b { fill: var(--rose); }

.connector-line {
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.6;
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: draw-line 1.4s ease forwards 0.3s;
}

@media (prefers-reduced-motion: reduce) {
  .connector-line { stroke-dashoffset: 0; animation: none; }
}

@keyframes draw-line {
  to { stroke-dashoffset: 0; }
}

.node-label {
  font-family: var(--font-body);
  font-size: 11px;
  fill: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* How it works */

.how { padding: 72px 0 96px; border-top: 1px solid var(--line); }

.step-list {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.step-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--rose);
}

.step h3 { margin-bottom: 8px; }
.step p { margin-bottom: 0; }

/* Selected work */

.work { padding: 0 0 96px; }

.ledger {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.ledger-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: background 0.2s ease;
}
.ledger-row:hover { background: color-mix(in srgb, var(--rose) 5%, transparent); }

.ledger-industry {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.ledger-result { color: var(--ink); max-width: 56ch; margin: 0; }

/* Focus (solar) panel */

.focus {
  background: var(--paper-raised);
  padding: 72px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.focus-inner { max-width: 760px; }

/* Contact */

.contact { padding: 96px 0 112px; text-align: left; }
.contact-inner { max-width: 640px; }

.contact-sub { font-size: 1.05rem; }

.email-link {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--rose);
  margin: 8px 0 20px;
}
.email-link:hover { color: var(--rose); }

.contact-name { color: var(--ink-soft); font-size: 0.95rem; margin: 0; }

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-row p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }
.footer-row a { color: var(--ink-soft); text-decoration: none; }
.footer-row a:hover { color: var(--rose); }

/* Reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Responsive */

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 56px 24px 64px;
    text-align: left;
  }
  .hero-graphic { order: -1; max-width: 220px; margin: 0 auto 8px; }
  .connector-svg { max-width: 200px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }

  .main-nav { position: static; flex: none; margin-left: auto; }

  .nav-list {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 16px 24px 24px;
    gap: 18px;
    display: none;
  }
  .nav-list.is-open { display: flex; }

  .header-cta { display: none; }

  .step, .ledger-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .ledger-industry { order: -1; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 18px; }
  body { font-size: 16px; }
}
