:root {
  --bone: #EFE9DD;
  --chalk: #F7F3E9;
  --ink: #1B2A3A;
  --ink-soft: #3E4A57;
  --ink-muted: #6B7A88;
  --copper: #A85432;
  --copper-deep: #8A4426;
  --copper-light: #D4896A;
  --sage: #6B7A5A;
  --hairline: rgba(27, 42, 58, 0.12);
  --hairline-strong: rgba(27, 42, 58, 0.22);
  --shadow-sm: 0 2px 8px rgba(27,42,58,0.07);
  --shadow-md: 0 8px 32px rgba(27,42,58,0.10);
  --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bone);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────── */
.display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.mono {
  font-family: 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--copper);
}

.tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--copper);
}
.tag::before { content: "[ "; opacity: 0.5; }
.tag::after  { content: " ]"; opacity: 0.5; }

a { color: var(--ink); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--copper); }

/* ─── Layout ─────────────────────────────────── */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ─── Nav ────────────────────────────────────── */
nav.top {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 22px 0;
  background: rgba(239,233,221,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow var(--transition);
}
nav.top.scrolled {
  box-shadow: var(--shadow-sm);
}
nav.top .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
nav.top .brand {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
nav.top .brand::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--copper);
  border-radius: 50%;
}
nav.top ul {
  list-style: none;
  display: flex;
  gap: 32px;
  align-items: center;
}
nav.top ul a {
  font-size: 0.9rem;
  color: var(--ink-soft);
  transition: color var(--transition);
  position: relative;
}
nav.top ul a.active { color: var(--ink); }
nav.top ul a:not(.cta)::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--copper);
  transition: width var(--transition);
}
nav.top ul a:not(.cta):hover::after,
nav.top ul a.active::after { width: 100%; }
nav.top .cta {
  background: var(--ink);
  color: var(--bone);
  padding: 10px 22px;
  border-radius: 2px;
  font-size: 0.88rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}
nav.top .cta:hover {
  background: var(--copper);
  color: var(--bone);
  transform: translateY(-1px);
}

/* ─── Buttons ────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 28px;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
  letter-spacing: 0.01em;
}
.btn-primary {
  background: var(--copper);
  color: var(--chalk);
}
.btn-primary:hover {
  background: var(--copper-deep);
  color: var(--chalk);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(168,84,50,0.3);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--bone);
  transform: translateY(-2px);
}

/* ─── Hero ───────────────────────────────────── */
.hero {
  padding: 110px 0 90px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -80px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168,84,50,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero .tag { display: inline-block; margin-bottom: 24px; }
.hero h1 {
  font-size: clamp(2.8rem, 6.5vw, 5rem);
  max-width: 16ch;
  margin-bottom: 28px;
}
.hero h1 em {
  font-style: italic;
  color: var(--copper);
  font-weight: 300;
}
.hero p.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 54ch;
  margin-bottom: 44px;
  line-height: 1.7;
}
.hero .actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.hero-meta {
  margin-top: 72px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-meta-item .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: var(--copper);
  text-transform: uppercase;
}
.hero-meta-item .value {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ─── Sections ───────────────────────────────── */
section { padding: 96px 0; }
section.alt {
  background: var(--chalk);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  margin-bottom: 64px;
  align-items: end;
}
.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: 'Fraunces', serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ─── Platform strip ─────────────────────────── */
.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 36px 56px;
  padding: 56px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  align-items: center;
}
.platforms span {
  font-family: 'Fraunces', serif;
  font-size: 1.35rem;
  color: var(--ink-soft);
  font-style: italic;
  transition: color var(--transition);
}
.platforms span:not(.tag):hover { color: var(--copper); cursor: default; }

/* ─── Services grid ──────────────────────────── */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--hairline-strong);
  border: 1px solid var(--hairline-strong);
}
.service {
  background: var(--bone);
  padding: 44px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: background var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.service::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 0;
  background: var(--copper);
  transition: height 0.3s ease;
}
.service:hover { background: var(--chalk); }
.service:hover::before { height: 100%; }
.service h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.service p {
  color: var(--ink-soft);
  font-size: 0.97rem;
  line-height: 1.65;
}
.service strong { color: var(--ink); }
.service .price {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  color: var(--copper);
  letter-spacing: 0.04em;
}

/* ─── Diagnostic CTA block ───────────────────── */
.diagnostic {
  background: var(--ink);
  color: var(--bone);
  padding: 80px 64px;
  border-radius: 2px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.diagnostic::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(168,84,50,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.diagnostic h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 2.6rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 20px;
}
.diagnostic h2 em {
  font-style: italic;
  color: var(--copper-light);
}
.diagnostic p {
  color: rgba(239,233,221,0.72);
  margin-bottom: 32px;
  font-size: 1.05rem;
  line-height: 1.65;
}
.diagnostic .btn-primary {
  background: var(--copper);
  box-shadow: none;
}
.diagnostic .btn-primary:hover {
  background: var(--copper-deep);
  box-shadow: 0 4px 20px rgba(168,84,50,0.4);
}
.diagnostic .checks {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.diagnostic .checks div {
  color: rgba(239,233,221,0.55);
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(239,233,221,0.1);
  transition: color var(--transition);
}
.diagnostic .checks div:last-child { border-bottom: none; padding-bottom: 0; }
.diagnostic .checks div:hover { color: rgba(239,233,221,0.85); }
.diagnostic .checks div::before {
  content: "✓";
  color: var(--copper-light);
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ─── About page ─────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 2.5fr;
  gap: 80px;
  padding: 64px 0;
}
.about-grid .meta-col p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.77rem;
  line-height: 2.2;
  color: var(--ink-muted);
}
.about-grid .meta-col p span {
  color: var(--copper);
  margin-right: 8px;
}
.about-grid .body-col p {
  font-size: 1.08rem;
  margin-bottom: 28px;
  color: var(--ink-soft);
  max-width: 62ch;
  line-height: 1.75;
}
.about-grid .body-col p:first-child {
  font-family: 'Fraunces', serif;
  font-size: 1.55rem;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 36px;
}

/* ─── Contact form ───────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact-grid h2 {
  font-family: 'Fraunces', serif;
  font-size: 2.8rem;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin-bottom: 20px;
}
.contact-grid h2 em {
  font-style: italic;
  color: var(--copper);
}
.contact-grid > div > p {
  color: var(--ink-soft);
  margin-bottom: 36px;
  max-width: 40ch;
  line-height: 1.65;
}
.contact-grid ul {
  list-style: none;
  border-top: 1px solid var(--hairline);
}
.contact-grid ul li {
  padding: 18px 0;
  border-bottom: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.contact-grid ul li .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--copper);
  letter-spacing: 0.07em;
}
.contact-grid ul li .value {
  font-size: 0.93rem;
  color: var(--ink-soft);
}

form { display: flex; flex-direction: column; gap: 24px; }
form .field { display: flex; flex-direction: column; gap: 0; }
form label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--copper);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
}
form input,
form textarea,
form select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--hairline-strong);
  padding: 10px 0 12px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  color: var(--ink);
  outline: none;
  transition: border-color var(--transition);
  -webkit-appearance: none;
}
form input:focus,
form textarea:focus,
form select:focus {
  border-color: var(--copper);
}
form textarea { resize: vertical; min-height: 110px; }
form select { cursor: pointer; }
form select option { background: var(--bone); }

.form-submit {
  margin-top: 8px;
}

/* ─── Footer ─────────────────────────────────── */
footer {
  padding: 56px 0 40px;
  border-top: 1px solid var(--hairline);
}
footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
footer .brand {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
footer .brand::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--copper);
  border-radius: 50%;
}
footer .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
}

/* ─── Scroll reveal ──────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ─── Mobile ─────────────────────────────────── */
@media (max-width: 820px) {
  .wrap { padding: 0 24px; }

  nav.top { padding: 18px 0; }
  nav.top .wrap { flex-wrap: wrap; gap: 16px; }
  nav.top ul { gap: 20px; flex-wrap: wrap; }

  .hero { padding: 72px 0 56px; }
  .hero-meta { gap: 28px; margin-top: 48px; }

  .section-head { grid-template-columns: 1fr; gap: 16px; }
  .section-head h2 { font-size: 2rem; }

  section { padding: 64px 0; }

  .services { grid-template-columns: 1fr; }
  .service { padding: 32px; }

  .diagnostic {
    grid-template-columns: 1fr;
    padding: 48px 32px;
    gap: 36px;
  }
  .diagnostic h2 { font-size: 2rem; }

  .about-grid { grid-template-columns: 1fr; gap: 40px; padding: 40px 0; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid h2 { font-size: 2.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover,
  nav.top .cta:hover {
    transform: none;
  }
}
