:root {
  --ground: #e7e1d2;
  --surface: #f4efe3;
  --surface-2: #efe7d5;
  --ink: #231b12;
  --ink-soft: #5c5040;
  --accent: #8a611c;
  --accent-strong: #ad7f2e;
  --accent-2: #3f4f3d;
  --line: rgba(35, 27, 18, 0.16);
  --on-accent: #fbf6ec;
  --shadow: 0 18px 40px -22px rgba(35, 27, 18, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #1b1712;
    --surface: #241f18;
    --surface-2: #2b241a;
    --ink: #efe8d8;
    --ink-soft: #b9ad96;
    --accent: #e0b45a;
    --accent-strong: #c99436;
    --accent-2: #8bb086;
    --line: rgba(239, 232, 216, 0.16);
    --on-accent: #241705;
    --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
  }
}
:root[data-theme="dark"] {
  --ground: #1b1712;
  --surface: #241f18;
  --surface-2: #2b241a;
  --ink: #efe8d8;
  --ink-soft: #b9ad96;
  --accent: #e0b45a;
  --accent-strong: #c99436;
  --accent-2: #8bb086;
  --line: rgba(239, 232, 216, 0.16);
  --on-accent: #241705;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.6);
}
:root[data-theme="light"] {
  --ground: #e7e1d2;
  --surface: #f4efe3;
  --surface-2: #efe7d5;
  --ink: #231b12;
  --ink-soft: #5c5040;
  --accent: #8a611c;
  --accent-strong: #ad7f2e;
  --accent-2: #3f4f3d;
  --line: rgba(35, 27, 18, 0.16);
  --on-accent: #fbf6ec;
  --shadow: 0 18px 40px -22px rgba(35, 27, 18, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Seravek, "Gill Sans Nova", "Segoe UI", Corbel, Calibri, "DejaVu Sans", sans-serif;
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "URW Palladio L", Georgia, serif;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
  color: var(--ink);
}
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.container {
  width: min(1120px, 100% - 3rem);
  margin-inline: auto;
}
.eyebrow {
  font-family: "Input Mono", "Roboto Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.lede {
  color: var(--ink-soft);
  max-width: 46ch;
  font-size: 1.08rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: 3px;
  font-family: "Input Mono", "Roboto Mono", "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--surface);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--ink); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--ink); color: var(--ink); }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, padding 0.3s ease;
  padding: 1.4rem 0;
}
.nav.is-scrolled { border-color: var(--line); padding: 0.85rem 0; }
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 1.9rem; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  text-decoration: none;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--accent); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 3px;
  width: 42px;
  height: 38px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle span, .nav-toggle::before, .nav-toggle::after {
  content: "";
  display: block;
  width: 18px;
  height: 1px;
  background: currentColor;
  margin: 0 auto;
}
.nav-toggle span { margin: 5px auto; }

@media (max-width: 860px) {
  .nav-links { position: fixed; inset: 62px 0 0 0; height: 0; overflow: hidden; flex-direction: column; align-items: flex-start; gap: 0; background: var(--ground); border-top: 1px solid var(--line); transition: height 0.25s ease; padding: 0 6vw; }
  .nav-links.open { height: calc(100vh - 62px); padding-top: 1.5rem; }
  .nav-links a { display: block; padding: 0.9rem 0; width: 100%; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-toggle { display: block; }
}

/* ---------- zigzag divider (finger-joint motif) ---------- */
.joint-divider {
  height: 18px;
  background-image:
    linear-gradient(135deg, var(--ground) 25%, transparent 25.5%),
    linear-gradient(225deg, var(--ground) 25%, transparent 25.5%);
  background-position: 0 0, 9px 0;
  background-size: 18px 18px;
  background-color: var(--surface);
}
.joint-divider.flip {
  transform: scaleY(-1);
}

/* ---------- hero ---------- */
.hero {
  padding: 4.5rem 0 5rem;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.4vw, 4.4rem);
  margin: 0.6rem 0 1.3rem;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Input Mono", "Roboto Mono", Menlo, monospace;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1.6rem;
}
.hero-badge::before { content: "●"; color: var(--accent-2); font-size: 0.6rem; }
.hero-cta { display: flex; gap: 0.9rem; margin-top: 2.1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2.2rem; margin-top: 3rem; flex-wrap: wrap; }
.hero-stats div { font-family: "Input Mono", "Roboto Mono", Menlo, monospace; }
.hero-stats strong { display: block; font-size: 1.5rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-stats span { font-size: 0.72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.06em; }

.hero-rings { position: relative; }
.hero-rings svg { width: 100%; height: auto; }
.ring-label {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: "Input Mono", "Roboto Mono", Menlo, monospace;
}
.ring-label strong { display: block; font-size: 1.9rem; color: var(--ink); font-family: "Iowan Old Style", Georgia, serif; }
.ring-label span { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.ring-grow { transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .ring-grow circle { stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 2.6s ease-out forwards; }
}
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-rings { max-width: 280px; margin-inline: auto; }
}

/* ---------- section basics ---------- */
section { padding: 5.5rem 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ring-grow circle { animation: none; stroke-dashoffset: 0; }
}

/* ---------- philosophy ---------- */
.philosophy { background: var(--surface); }
.philosophy .container { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3.5rem; }
.philosophy blockquote { margin: 0; font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(1.4rem, 2.6vw, 1.9rem); line-height: 1.35; color: var(--ink); }
.philosophy blockquote::before { content: "„"; color: var(--accent-strong); }
.philosophy blockquote::after { content: "“"; color: var(--accent-strong); }
.philosophy-body p + p { margin-top: 1.1rem; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 2.8rem; padding-top: 2.2rem; border-top: 1px solid var(--line); }
.stat-row strong { display: block; font-family: "Input Mono", "Roboto Mono", Menlo, monospace; font-size: 1.8rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.stat-row span { font-size: 0.78rem; color: var(--ink-soft); }
@media (max-width: 860px) {
  .philosophy .container { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- services (wood swatches) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}
.service-card {
  grid-column: span 3;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2.1rem 1.9rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent-strong); }
.service-card:nth-child(3n+1) { grid-column: span 4; }
.service-card:nth-child(3n+2) { grid-column: span 2; }
.service-card:nth-child(3n) { grid-column: span 3; }
.swatch { width: 34px; height: 34px; border-radius: 3px; margin-bottom: 1.3rem; }
.service-card h3 { font-size: 1.2rem; margin-bottom: 0.7rem; }
.service-card p { color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 980px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service-card, .service-card:nth-child(3n+1), .service-card:nth-child(3n+2), .service-card:nth-child(3n) { grid-column: span 1; }
}
@media (max-width: 620px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ---------- portfolio ---------- */
.portfolio { background: var(--surface); }
.portfolio-scroll {
  display: flex;
  gap: 1.4rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  scroll-snap-type: x mandatory;
  margin: 0 -1px;
}
.plaque {
  scroll-snap-align: start;
  flex: 0 0 min(340px, 82vw);
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.8rem;
}
.plaque-year { font-family: "Input Mono", "Roboto Mono", Menlo, monospace; font-size: 0.78rem; color: var(--accent); }
.plaque h3 { margin: 0.6rem 0 0.3rem; font-size: 1.25rem; }
.plaque .loc { color: var(--ink-soft); font-size: 0.85rem; margin-bottom: 0.9rem; }
.plaque p.desc { color: var(--ink-soft); font-size: 0.94rem; }
.plaque-wood { height: 6px; border-radius: 3px; margin-bottom: 1.1rem; }

/* ---------- process ---------- */
.process-list { list-style: none; margin: 0; padding: 0; }
.process-item {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 1.6rem;
  padding: 2rem 0;
  border-top: 1px solid var(--line);
}
.process-item:last-child { border-bottom: 1px solid var(--line); }
.ring-mark { width: 56px; height: 56px; }
.process-item h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.process-item p { color: var(--ink-soft); max-width: 56ch; }

/* ---------- team ---------- */
.team { background: var(--surface); }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.team-card { padding: 0; }
.team-avatar {
  aspect-ratio: 4 / 5;
  border-radius: 4px;
  margin-bottom: 1.2rem;
  background: linear-gradient(155deg, var(--surface-2), var(--ground));
  border: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}
.team-avatar svg { width: 44px; height: 44px; }
.team-card h3 { font-size: 1.1rem; }
.team-role { font-family: "Input Mono", "Roboto Mono", Menlo, monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); margin: 0.35rem 0 0.7rem; }
.team-card p.bio { color: var(--ink-soft); font-size: 0.93rem; }
@media (max-width: 780px) { .team-grid { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; } }

/* ---------- testimonials ---------- */
.testimonial-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; }
.testimonial {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.9rem;
}
.testimonial:nth-child(2) { transform: translateY(1.4rem); }
.testimonial p.quote { font-family: "Iowan Old Style", Georgia, serif; font-size: 1.08rem; margin-bottom: 1.2rem; }
.testimonial .who { font-size: 0.82rem; color: var(--ink-soft); }
@media (max-width: 860px) {
  .testimonial-stack { grid-template-columns: 1fr; }
  .testimonial:nth-child(2) { transform: none; }
}

/* ---------- contact ---------- */
.contact { background: var(--surface); }
.contact .container { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; }
.contact-info dl { margin: 1.8rem 0 0; }
.contact-info dt { font-family: "Input Mono", "Roboto Mono", Menlo, monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-top: 1.3rem; }
.contact-info dd { margin: 0.3rem 0 0; font-size: 1.02rem; }
.contact-info dd a { text-decoration: none; border-bottom: 1px solid var(--line); }
.contact-info dd a:hover { border-color: var(--accent); color: var(--accent); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
label { font-size: 0.78rem; color: var(--ink-soft); }
input, textarea, select {
  font: inherit;
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.75rem 0.85rem;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent-strong); outline-offset: 1px; border-color: var(--accent-strong); }
textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: 1rem; }
.form-success { display: none; padding: 1.2rem; border: 1px dashed var(--accent-strong); border-radius: 4px; color: var(--ink); font-size: 0.95rem; }
.form-success.show { display: block; }
@media (max-width: 860px) {
  .contact .container { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
footer { background: var(--ink); color: var(--surface); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 3rem; }
footer .brand { color: var(--surface); }
footer .brand span { color: var(--accent); }
footer p.tag { color: color-mix(in srgb, var(--surface) 65%, transparent); max-width: 34ch; margin-top: 0.9rem; font-size: 0.92rem; }
footer h4 { color: var(--surface); font-family: "Input Mono", "Roboto Mono", Menlo, monospace; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1rem; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
footer a { text-decoration: none; color: color-mix(in srgb, var(--surface) 80%, transparent); font-size: 0.92rem; }
footer a:hover { color: var(--accent); }
.footer-bottom { margin-top: 3.2rem; padding-top: 1.6rem; border-top: 1px solid color-mix(in srgb, var(--surface) 18%, transparent); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; font-size: 0.8rem; color: color-mix(in srgb, var(--surface) 55%, transparent); }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; } }
