:root {
  --paper: #F3F2ED;
  --paper-deep: #EAE9E1;
  --ink: #1C2B24;
  --ink-soft: #45564C;
  --line: #C9CCC0;
  --accent: #2946E0;
  --accent-ink: #1B2FB0;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- shared ---------- */
.wrap { width: min(1120px, 88vw); margin: 0 auto; }

.eyebrow {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.eyebrow::before {
  content: "";
  width: 34px; height: 2px;
  background: var(--accent);
}

h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 22ch;
  margin-top: 1.1rem;
}

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- header ---------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 4vw;
  transition: background .35s ease, box-shadow .35s ease;
}
header.solid {
  background: rgba(243, 242, 237, .92);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--line);
}
.brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.brand span { color: var(--accent); }
nav { display: flex; gap: 2rem; }
nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: .95rem;
  transition: color .2s;
}
nav a:hover { color: var(--accent); }
@media (max-width: 640px) { nav a:not(.nav-cta) { display: none; } }
.nav-cta {
  border: 1.5px solid var(--ink);
  padding: .45rem 1.1rem;
  border-radius: 999px;
  color: var(--ink) !important;
  transition: background .2s, color .2s, border-color .2s;
}
.nav-cta:hover { background: var(--ink); color: var(--paper) !important; }

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}
#weave {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, 88vw);
  margin: 0 auto;
  padding-top: 5rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.6rem, 6.4vw, 4.9rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  max-width: 13ch;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
}
.hero p {
  margin-top: 1.6rem;
  max-width: 46ch;
  color: var(--ink-soft);
  font-size: 1.125rem;
}
.hero-actions { margin-top: 2.4rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: .98rem;
  padding: .85rem 1.7rem;
  border-radius: 999px;
  transition: transform .25s ease, background .25s ease, color .25s ease, box-shadow .25s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(41,70,224,.25); }
.btn-ghost { color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

.hero-meta {
  position: absolute;
  bottom: 2.2rem;
  left: 0; right: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  width: min(1120px, 88vw);
  margin: 0 auto;
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.scroll-hint {
  display: inline-block;
  width: 1px; height: 44px;
  background: linear-gradient(var(--accent), transparent);
  position: relative;
  top: 14px;
  margin-right: .8rem;
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip {
  0% { transform: scaleY(0); transform-origin: top; }
  45% { transform: scaleY(1); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* staggered hero entrance */
.rise { opacity: 0; transform: translateY(26px); animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.rise-2 { animation-delay: .15s; }
.rise-3 { animation-delay: .3s; }
.rise-4 { animation-delay: .45s; }

/* ---------- services ---------- */
section { padding: 7rem 0; }
.services { background: var(--paper); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.5rem 2.5rem;
  margin-top: 3.5rem;
}
.service h3 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: .9rem 0 .5rem;
}
.service p { color: var(--ink-soft); font-size: .98rem; }
.service-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--paper-deep);
  display: grid;
  place-items: center;
  color: var(--accent);
  transition: background .3s, transform .3s;
}
.service:hover .service-icon { background: var(--accent); color: #fff; transform: translateY(-4px); }

/* ---------- work ---------- */
.work { background: var(--ink); color: var(--paper); }
.work .eyebrow { color: #A9B7AE; }
.work h2 { color: var(--paper); }
.work-note { color: #A9B7AE; margin-top: 1rem; max-width: 46ch; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-top: 3.25rem;
}
.work-card {
  position: relative;
  border: 1px solid #3A4A41;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--paper);
  background: #22332B;
  display: block;
  transition: transform .3s ease, border-color .3s ease;
}
.work-card:hover { transform: translateY(-5px); border-color: #5C7266; }
.work-thumb {
  height: 190px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: #8FA096;
  background:
    radial-gradient(circle at 25% 30%, rgba(41,70,224,.18), transparent 55%),
    radial-gradient(circle at 78% 70%, rgba(41,70,224,.12), transparent 50%),
    #22332B;
  border-bottom: 1px solid #3A4A41;
}
.work-body { padding: 1.4rem 1.5rem 1.6rem; }
.work-body h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; }
.work-body p { color: #A9B7AE; font-size: .92rem; margin-top: .35rem; }
.work-tag {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8FA096;
  margin-bottom: .6rem;
}

/* ---------- contact ---------- */
.contact { background: var(--paper-deep); text-align: center; }
.contact .eyebrow { justify-content: center; }
.contact .eyebrow::before { display: none; }
.contact h2 { margin: 1.1rem auto 0; max-width: 24ch; }
.contact p { color: var(--ink-soft); max-width: 44ch; margin: 1.2rem auto 0; }
.contact .hero-actions { justify-content: center; margin-top: 2.4rem; }
.contact-mail {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}
.contact-mail:hover { color: var(--accent); }

/* ---------- footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0;
  font-size: .85rem;
  color: var(--ink-soft);
}
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .service-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .work-grid { grid-template-columns: 1fr; }
  section { padding: 5rem 0; }
  .hero-meta { font-size: .72rem; }
}
