:root {
  --bg: #f5f1e8;
  --surface: #fffaf1;
  --surface-2: #ede6d8;
  --text: #141414;
  --muted: #66645f;
  --line: rgba(20, 20, 20, 0.12);
  --accent: #9b6a2f;
  --accent-dark: #6f471d;
  --navy: #101824;
  --shadow: 0 24px 70px rgba(23, 20, 14, 0.10);
  --radius: 24px;
  --max: 1080px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

[data-theme="dark"] {
  --bg: #0f1216;
  --surface: #161a20;
  --surface-2: #1d232b;
  --text: #f6efe3;
  --muted: #a7a092;
  --line: rgba(246, 239, 227, 0.12);
  --accent: #c99755;
  --accent-dark: #f1bd73;
  --navy: #f6efe3;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(155, 106, 47, 0.14), transparent 32rem),
    linear-gradient(180deg, var(--bg), var(--bg));
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 68%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(16px);
}

.brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  border-bottom: 2px solid currentColor;
  line-height: 1.05;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 14px;
}

.desktop-nav a,
.mobile-nav a,
.contact-links a,
.site-footer a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.contact-links a:hover,
.site-footer a:hover {
  color: var(--accent-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle,
.mobile-toggle {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 14px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.mobile-toggle {
  display: none;
  width: 44px;
  height: 38px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-toggle span {
  width: 18px;
  height: 2px;
  background: var(--text);
  display: block;
}

.mobile-nav {
  display: none;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 86px 0;
}

.hero {
  min-height: calc(100vh - 90px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(34px, 6vw, 86px);
  padding-top: 72px;
}

.eyebrow,
.card-label,
.work-meta,
.note-card span {
  margin: 0 0 14px;
  color: var(--accent-dark);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 24px;
  font-size: clamp(58px, 10vw, 128px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  color: var(--text);
}
h2 {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.055em;
  margin-bottom: 20px;
}
h3 {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  margin-bottom: 12px;
}

.hero-text {
  max-width: 610px;
  font-size: clamp(19px, 2.5vw, 27px);
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 32px;
}

.hero-buttons,
.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 750;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.10);
}

.button.primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.button.secondary,
.contact-links a {
  background: var(--surface);
  color: var(--text);
}

.brief-card,
.contact-form,
.note-card,
.work-item,
.intro-strip {
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: var(--shadow);
}

.brief-card {
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 38px);
  position: relative;
  overflow: hidden;
}

.brief-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(155,106,47,.13), transparent 55%);
  pointer-events: none;
}

.brief-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 18px;
  position: relative;
}

.brief-card li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  color: var(--text);
  font-size: 17px;
  font-weight: 650;
}

.brief-card li span {
  font-family: var(--serif);
  color: var(--accent-dark);
  font-weight: 700;
}

.intro-strip {
  margin-top: -42px;
  padding: 18px 22px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.intro-strip span {
  color: var(--accent-dark);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .16em;
}

.intro-strip a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}

.two-column,
.contact-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(32px, 6vw, 86px);
  align-items: start;
}

.section-body p,
.contact-copy p {
  color: var(--muted);
  font-size: 18px;
  max-width: 680px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.mini-stats div {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.mini-stats strong {
  display: block;
  font-size: 17px;
}

.mini-stats span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.section-top {
  max-width: 760px;
  margin-bottom: 30px;
}

.work-list {
  display: grid;
  gap: 14px;
}

.work-item {
  border-radius: 22px;
  padding: 24px;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 24px;
  transition: transform .2s ease, border-color .2s ease;
}

.work-item:hover,
.note-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.work-item p:last-child,
.note-card p {
  color: var(--muted);
  margin-bottom: 0;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.note-card {
  border-radius: 22px;
  padding: 24px;
}

.contact-section {
  align-items: center;
}

.contact-links {
  margin-top: 24px;
}

.contact-links a {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
}

.contact-form {
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 34px);
  display: grid;
  gap: 16px;
}

label span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bg) 60%, var(--surface));
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 40px auto 0;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 14px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 40;
  font-weight: 750;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 850px) {
  .desktop-nav { display: none; }
  .mobile-toggle { display: flex; }
  .mobile-nav.open { display: grid; gap: 12px; }
  .hero,
  .two-column,
  .contact-section,
  .work-item {
    grid-template-columns: 1fr;
  }
  .hero { min-height: auto; padding-top: 50px; }
  .intro-strip { margin-top: 0; border-radius: 24px; }
  .notes-grid,
  .mini-stats { grid-template-columns: 1fr; }
  .site-footer { flex-direction: column; }
}

@media (max-width: 520px) {
  .site-header,
  .section,
  .mobile-nav,
  .site-footer { width: min(100% - 28px, var(--max)); }
  h1 { font-size: clamp(50px, 17vw, 82px); }
  h2 { font-size: 34px; }
  .hero-buttons { align-items: stretch; }
  .button { width: 100%; }
}
