/* ── OG Duo — shared styles ── */

:root {
  --ink: #14110d;
  --ink-soft: #1c1812;
  --ink-card: #191510;
  --cream: #ece5d8;
  --cream-dim: #a89d8a;
  --brass: #c9a96a;
  --brass-dim: rgba(201, 169, 106, 0.55);
  --line: rgba(236, 229, 216, 0.14);
  --line-soft: rgba(236, 229, 216, 0.08);
}

/* smooth cross-document navigation (progressive enhancement) */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation-duration: 0.25s; }
::view-transition-new(root) { animation-duration: 0.25s; }

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--cream);
  font-family: "IBM Plex Mono", monospace;
  font-weight: 300;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

::selection { background: var(--brass); color: var(--ink); }

/* warm radial glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 20%, rgba(201, 169, 106, 0.10), transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 25%, rgba(236, 229, 216, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 3;
}

main { flex: 1; position: relative; z-index: 1; }

.wrap {
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ── nav ── */
nav.top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 1.6rem 1.5rem;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
nav.top .mark { display: flex; align-items: center; gap: 0.7rem; color: var(--cream); text-decoration: none; white-space: nowrap; }
nav.top .mark svg { width: 34px; height: auto; }
nav.top .links { display: flex; gap: 2rem; }
nav.top .links a {
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.25s ease;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid transparent;
}
nav.top .links a:hover { color: var(--brass); }
nav.top .links a[aria-current="page"] { color: var(--brass); border-bottom-color: var(--brass-dim); }

/* ── page header (inner pages) ── */
.page-head {
  padding: 4.5rem 0 4rem;
  text-align: left;
}
.page-head .kicker { margin-bottom: 1.2rem; }
.page-head h1 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 6vw, 4rem);
  letter-spacing: 0.02em;
  line-height: 1.08;
}
.page-head h1 em { font-style: italic; color: var(--brass); }
.page-head .lede {
  margin-top: 1.6rem;
  max-width: 40rem;
  font-size: 0.92rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
}
.page-head .lede strong { color: var(--cream); font-weight: 400; }

.kicker {
  font-size: 0.7rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--brass);
}

/* ── hero (home) ── */
header.hero {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 4rem;
  position: relative;
  z-index: 1;
}
.emblem {
  width: clamp(130px, 20vw, 190px);
  height: auto;
  margin-bottom: 2.6rem;
  opacity: 0;
  animation: rise 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}
.emblem .ring-a { animation: drift-a 14s ease-in-out infinite; transform-origin: center; }
.emblem .ring-b { animation: drift-b 14s ease-in-out infinite; transform-origin: center; }
@keyframes drift-a { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-6px); } }
@keyframes drift-b { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

header.hero .kicker { margin-bottom: 1.4rem; opacity: 0; animation: rise 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards; }

header.hero h1 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(3rem, 9vw, 5.6rem);
  letter-spacing: 0.02em;
  line-height: 1.05;
  opacity: 0;
  animation: rise 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}
header.hero h1 em { font-style: italic; color: var(--brass); }

.hero-sub {
  margin-top: 1.8rem;
  max-width: 34rem;
  font-size: 0.92rem;
  line-height: 1.9;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
  opacity: 0;
  animation: rise 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.7s forwards;
}
.hero-sub strong { color: var(--cream); font-weight: 400; }

.hero-cta {
  display: flex;
  gap: 1.2rem;
  margin-top: 2.6rem;
  opacity: 0;
  animation: rise 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.9s forwards;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.8rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--brass-dim);
  color: var(--brass);
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn:hover { background: var(--brass); color: var(--ink); border-color: var(--brass); }
.btn.ghost { border-color: var(--line); color: var(--cream-dim); }
.btn.ghost:hover { background: transparent; color: var(--cream); border-color: var(--cream-dim); }

/* ── sections ── */
section { padding: 5rem 0; border-top: 1px solid var(--line-soft); position: relative; z-index: 1; }
section.flush { border-top: none; padding-top: 1rem; }

.sec-head {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  margin-bottom: 3rem;
}
.sec-head .num { font-size: 0.7rem; letter-spacing: 0.3em; color: var(--brass); }
.sec-head h2 {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  letter-spacing: 0.02em;
}
.sec-head .line { flex: 1; height: 1px; background: linear-gradient(to right, var(--line), transparent); align-self: center; }
.sec-head .more {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.sec-head .more:hover { color: var(--brass); }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ── facts strip ── */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
.fact {
  padding: 1.6rem 1.4rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.fact:last-child { border-right: none; }
.fact .v { font-family: "Fraunces", serif; font-weight: 400; font-size: 1.5rem; color: var(--cream); }
.fact .k { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--cream-dim); }

/* ── services grid ── */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line);
}
.service {
  padding: 2.2rem 2rem 2.4rem;
  border-bottom: 1px solid var(--line);
  transition: background 0.35s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}
.service:nth-child(odd) { border-right: 1px solid var(--line); }
.service:nth-last-child(-n+2) { border-bottom: none; }
.service:hover { background: var(--ink-card); }
.service .s-num { font-size: 0.62rem; letter-spacing: 0.4em; color: var(--brass); display: block; margin-bottom: 1.1rem; }
.service h3 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.9rem;
}
.service p { font-size: 0.82rem; line-height: 1.85; letter-spacing: 0.03em; color: var(--cream-dim); }

/* ── service detail (services page) ── */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 3rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.service-detail:last-child { border-bottom: none; }
.service-detail .s-num { font-size: 0.62rem; letter-spacing: 0.4em; color: var(--brass); display: block; margin-bottom: 1rem; }
.service-detail h3 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  letter-spacing: 0.02em;
  margin-bottom: 1.1rem;
}
.service-detail .desc p { font-size: 0.85rem; line-height: 1.9; letter-spacing: 0.03em; color: var(--cream-dim); }
.service-detail ul { list-style: none; align-self: end; }
.service-detail ul li {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
}
.service-detail ul li::before { content: "—"; color: var(--brass); flex-shrink: 0; }
.service-detail ul li:last-child { border-bottom: none; }

/* ── process ── */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); }
.step { padding: 2rem 1.6rem 2.2rem; border-right: 1px solid var(--line); }
.step:last-child { border-right: none; }
.step .p-num { font-family: "Fraunces", serif; font-style: italic; font-size: 1.6rem; color: var(--brass); display: block; margin-bottom: 1rem; }
.step h3 { font-family: "Fraunces", serif; font-weight: 400; font-size: 1.1rem; margin-bottom: 0.7rem; }
.step p { font-size: 0.76rem; line-height: 1.8; letter-spacing: 0.03em; color: var(--cream-dim); }

/* ── stack line ── */
.stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.stack span {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
  border: 1px solid var(--line);
  padding: 0.55rem 1rem;
}

/* ── logo chip ── */
.logo-chip {
  background: var(--cream);
  border-radius: 2px;
  width: 9rem;
  height: 3.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  flex-shrink: 0;
}
.logo-chip img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* ── work list (home teaser) ── */
.work-list { border-top: 1px solid var(--line); }
.project {
  display: grid;
  grid-template-columns: 10rem 1fr auto;
  gap: 2rem;
  align-items: start;
  padding: 2.1rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background 0.3s ease;
}
.project:hover { background: var(--ink-card); }
.project .domain { display: block; margin-top: 0.8rem; font-size: 0.68rem; letter-spacing: 0.18em; color: var(--brass); text-transform: uppercase; }
.project h3 {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.55rem;
}
.project h3 .arrow { color: var(--brass-dim); transition: color 0.3s ease, transform 0.3s ease; display: inline-block; margin-left: 0.4rem; }
.project:hover h3 .arrow { color: var(--brass); transform: translate(3px, -3px); }
.project p { font-size: 0.82rem; line-height: 1.8; letter-spacing: 0.03em; color: var(--cream-dim); max-width: 34rem; }
.project .tag { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--cream-dim); white-space: nowrap; }

/* ── case cards (work page) ── */
.case {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 3rem;
  padding: 3.2rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
.case:last-child { border-bottom: none; }
.case .case-logo { margin-bottom: 1.2rem; }
.case .domain {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: var(--brass);
  text-transform: uppercase;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.9rem;
}
.case .domain:hover { text-decoration: underline; }
.case h3 { font-family: "Fraunces", serif; font-weight: 400; font-size: clamp(1.5rem, 3.4vw, 2.1rem); letter-spacing: 0.02em; margin-bottom: 1rem; }
.case h3 a { color: inherit; text-decoration: none; }
.case h3 a:hover { color: var(--brass); }
.case .desc { font-size: 0.85rem; line-height: 1.9; letter-spacing: 0.03em; color: var(--cream-dim); }
.case .tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.4rem; }
.case .tags span { font-size: 0.6rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--cream-dim); border: 1px solid var(--line); padding: 0.45rem 0.85rem; }
.case .did { align-self: end; }
.case .did h4 { font-size: 0.65rem; letter-spacing: 0.35em; text-transform: uppercase; color: var(--brass); margin-bottom: 1rem; font-weight: 400; }
.case .did ul { list-style: none; }
.case .did li {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--cream-dim);
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line-soft);
  display: flex;
  gap: 0.9rem;
  align-items: baseline;
}
.case .did li::before { content: "—"; color: var(--brass); flex-shrink: 0; }
.case .did li:last-child { border-bottom: none; }

/* ── about ── */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 4rem; }
.about-grid .lede-serif {
  font-family: "Fraunces", serif;
  font-weight: 300;
  font-size: clamp(1.25rem, 2.6vw, 1.65rem);
  line-height: 1.65;
  letter-spacing: 0.01em;
}
.about-grid .lede-serif em { font-style: italic; color: var(--brass); }
.about-grid .side p { font-size: 0.82rem; line-height: 1.9; letter-spacing: 0.03em; color: var(--cream-dim); margin-bottom: 1.4rem; }

.principles { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); }
.principle { padding: 2.2rem 2rem; border-bottom: 1px solid var(--line); }
.principle:nth-child(odd) { border-right: 1px solid var(--line); }
.principle:nth-last-child(-n+2) { border-bottom: none; }
.principle h3 { font-family: "Fraunces", serif; font-weight: 400; font-size: 1.2rem; margin-bottom: 0.8rem; }
.principle p { font-size: 0.8rem; line-height: 1.85; letter-spacing: 0.03em; color: var(--cream-dim); }

/* ── contact ── */
.contact-card {
  border: 1px solid var(--line);
  padding: 2.6rem 2.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem 4rem;
  align-items: center;
  justify-content: space-between;
  background: var(--ink-card);
}
.contact-card .cta-label { font-size: 0.68rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--brass); margin-bottom: 0.9rem; }
.contact-card a.mail {
  font-family: "Fraunces", serif;
  font-weight: 400;
  font-size: clamp(1.3rem, 3.4vw, 2rem);
  color: var(--cream);
  text-decoration: none;
  border-bottom: 1px solid var(--brass-dim);
  transition: border-color 0.3s ease, color 0.3s ease;
}
.contact-card a.mail:hover { color: var(--brass); border-color: var(--brass); }
.contact-card .addr { font-size: 0.78rem; line-height: 2; letter-spacing: 0.06em; color: var(--cream-dim); text-align: right; }
.contact-card .addr strong { color: var(--cream); font-weight: 400; }

.contact-note { font-size: 0.82rem; line-height: 1.9; letter-spacing: 0.03em; color: var(--cream-dim); max-width: 38rem; margin-top: 2rem; }

/* ── registry ── */
.registry { width: 100%; border-top: 1px solid var(--line); }
.registry dl { display: grid; grid-template-columns: repeat(4, 1fr); }
.registry .row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.4rem 1rem;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.registry .row:last-child { border-right: none; }
.registry dt { font-size: 0.62rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--brass); }
.registry dd { font-size: 0.9rem; letter-spacing: 0.08em; color: var(--cream); }
.registry dd small { display: block; margin-top: 0.2rem; font-size: 0.74rem; color: var(--cream-dim); letter-spacing: 0.06em; }

/* ── footer ── */
footer.site {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-soft);
  margin-top: 2rem;
}
footer.site .cols {
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 3.5rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
}
footer.site h4 { font-size: 0.62rem; letter-spacing: 0.4em; text-transform: uppercase; color: var(--brass); margin-bottom: 1.2rem; font-weight: 400; }
footer.site .brand { display: flex; align-items: center; gap: 0.7rem; font-size: 0.75rem; letter-spacing: 0.28em; text-transform: uppercase; margin-bottom: 1.2rem; }
footer.site .brand svg { width: 30px; height: auto; }
footer.site p { font-size: 0.74rem; line-height: 2; letter-spacing: 0.05em; color: var(--cream-dim); }
footer.site ul { list-style: none; }
footer.site ul li { margin-bottom: 0.7rem; }
footer.site ul a {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  text-decoration: none;
  transition: color 0.25s ease;
}
footer.site ul a:hover { color: var(--brass); }
footer.site .legal {
  border-top: 1px solid var(--line-soft);
  text-align: center;
  padding: 1.8rem 1.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── responsive ── */
@media (max-width: 760px) {
  nav.top { flex-direction: column; gap: 1.2rem; font-size: 0.6rem; padding: 1.4rem 1rem; }
  nav.top .links { gap: 1.1rem; }
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(even) { border-right: none; }
  .fact { border-bottom: 1px solid var(--line); }
  .fact:nth-last-child(-n+2) { border-bottom: none; }
  .services { grid-template-columns: 1fr; }
  .service:nth-child(odd) { border-right: none; }
  .service:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .service:last-child { border-bottom: none; }
  .service-detail { grid-template-columns: 1fr; gap: 1.6rem; padding: 2.4rem 0.3rem; }
  .process { grid-template-columns: 1fr 1fr; }
  .step { border-bottom: 1px solid var(--line); }
  .step:nth-child(even) { border-right: none; }
  .step:nth-last-child(-n+2) { border-bottom: none; }
  .project { grid-template-columns: 1fr; gap: 0.6rem; padding: 1.8rem 0.3rem; }
  .case { grid-template-columns: 1fr; gap: 2rem; padding: 2.4rem 0.3rem; }
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .principles { grid-template-columns: 1fr; }
  .principle:nth-child(odd) { border-right: none; }
  .principle:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
  .principle:last-child { border-bottom: none; }
  .contact-card { flex-direction: column; align-items: flex-start; }
  .contact-card .addr { text-align: left; }
  .registry dl { grid-template-columns: 1fr 1fr; }
  .registry .row:nth-child(even) { border-right: none; }
  footer.site .cols { grid-template-columns: 1fr; gap: 2.4rem; }
  .hero-cta { flex-direction: column; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0s !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
