:root {
  --bg: #08090b;
  --bg-raise: #101317;
  --text: #f4f7f6;
  --muted: #a7b0b2;
  --line: rgba(244, 247, 246, 0.14);
  --ice: #c0eaed;
  --ice-deep: #071416;
  --ink: #101312;
  --paper: #f3f4f1;
  --paper-ink: #1a1e1d;
  --paper-muted: #5c6563;
  --max: 1120px;
  --header: 76px;
  --sans: "Instrument Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg) url("images/background-grid.png") repeat;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

::selection { background: var(--ice); color: var(--ice-deep); }

:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 16px;
  top: -40px;
  z-index: 80;
  background: var(--ice);
  color: var(--ice-deep);
  padding: 8px 12px;
  text-decoration: none;
}

.skip:focus { top: 12px; }

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid transparent;
}

.site-header.is-stuck {
  background: rgba(8, 9, 11, 0.92);
  border-bottom-color: var(--line);
}

.header-bar {
  min-height: var(--header);
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.04em;
  font-size: 1.05rem;
}

.brand img { width: 86px; height: 22px; object-fit: contain; object-position: left center; }

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.desktop-nav a,
.header-mail {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
}

.desktop-nav a:hover,
.header-mail:hover { color: var(--text); }

.header-mail { color: var(--ice); }

.nav-toggle {
  display: none;
  margin-left: auto;
  min-width: 76px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 6px 0 18px;
}

.mobile-panel.is-open { display: grid; }

.mobile-panel a {
  text-decoration: none;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.hero { position: relative; isolation: isolate; overflow: hidden; }

.hero-glow {
  position: absolute;
  left: 50%;
  top: 8%;
  width: min(980px, 120%);
  height: min(760px, 90vw);
  transform: translateX(-50%);
  background: url("images/background-home.jpg") center/cover no-repeat;
  opacity: 0.85;
  pointer-events: none;
  z-index: -1;
  -webkit-mask-image: radial-gradient(circle, #000 12%, transparent 68%);
  mask-image: radial-gradient(circle, #000 12%, transparent 68%);
}

.hero-inner {
  min-height: calc(100svh - var(--header));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3.5rem 0 2.25rem;
  position: relative;
}

.hero-logo {
  width: min(440px, 78%);
  margin-bottom: 2.4rem;
}

.eyebrow,
.section-label,
.kicker,
.work-aside,
.hero-meta,
.site-footer,
.nav-toggle,
.btn {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--ice);
  font-size: 0.72rem;
}

.hero h1,
.section h2,
.contact h2,
.legal-banner h1,
.legal-doc h1 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.92;
}

.hero h1 {
  margin: 0;
  max-width: 11em;
  font-size: clamp(3.1rem, 7.2vw, 6.4rem);
}

.hero h1 em {
  display: block;
  font-style: italic;
  color: var(--ice);
}

.lede {
  max-width: 38rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--ice);
  background: var(--ice);
  color: var(--ice-deep);
  font-size: 0.72rem;
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--ice);
}

.btn:hover {
  background: #f7fbfb;
  border-color: #f7fbfb;
  color: var(--ice-deep);
}

.hero-meta {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin: 3.25rem 0 0;
  padding: 1.2rem 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
}

.hero-meta strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  text-transform: none;
}

.section { padding: clamp(4.5rem, 9vw, 7.5rem) 0; }

#work,
#studio,
#contact { scroll-margin-top: 16px; }

.section-label {
  margin: 0 0 0.8rem;
  color: var(--ice);
  font-size: 0.72rem;
}

.section h2,
.contact h2 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  max-width: 10em;
}

.work-list { margin-top: 2.4rem; }

.work-item {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr) 11rem;
  gap: 1.5rem 2rem;
  align-items: start;
  padding: 2.1rem 0 2.3rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header) + 16px);
}

.work-item:last-child { border-bottom: 1px solid var(--line); }

.work-index {
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5vw, 4.2rem);
  line-height: 0.8;
  color: rgba(192, 234, 237, 0.28);
  -webkit-text-stroke: 1px rgba(192, 234, 237, 0.95);
  transition: color 0.2s ease;
}

.work-item:hover .work-index,
.work-item:focus-within .work-index {
  color: var(--ice);
  -webkit-text-stroke: 0;
}

.kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
}

.work-copy h3 {
  margin: 0.35rem 0 0.7rem;
  font-family: var(--serif);
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.work-copy p { margin: 0; max-width: 38rem; color: var(--muted); }

.work-aside {
  margin: 0;
  color: var(--ice);
  font-size: 0.68rem;
  line-height: 1.7;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.4rem;
  margin: 1rem 0 0;
}

.text-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px solid rgba(192, 234, 237, 0.45);
}

.work-links .text-link { margin-top: 0; }

.text-link:hover { border-bottom-color: var(--ice); }

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: clamp(2rem, 6vw, 5.5rem);
  align-items: start;
}

.studio-grid .lede { margin-top: 1.25rem; }

.facts { margin: 0.4rem 0 0; }

.facts div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
}

.facts div:last-child { border-bottom: 1px solid var(--line); }

.facts dt {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.facts dd { margin: 0; }

.facts a {
  color: var(--ice);
  text-decoration: none;
  border-bottom: 1px solid rgba(192, 234, 237, 0.45);
  overflow-wrap: anywhere;
}

.contact {
  background: var(--bg-raise);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mail-link {
  display: inline-block;
  margin-top: 1.25rem;
  max-width: 100%;
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4.8vw, 3.6rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  text-decoration: none;
  border-bottom: 1px solid var(--ice);
  overflow-wrap: anywhere;
}

.mail-link:hover { color: var(--ice); }

.contact .lede { margin-top: 1rem; }

.site-footer { padding: 1.35rem 0 1.8rem; }

.site-footer .wrap,
.site-footer.plain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
  justify-content: space-between;
  align-items: center;
}

.site-footer,
.site-footer a {
  color: var(--muted);
  font-size: 0.68rem;
  text-decoration: none;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.4rem; }

.site-footer a:hover { color: var(--text); }

body.legal { color-scheme: dark; }

.legal-banner,
.legal-doc,
body.legal .container {
  width: min(760px, calc(100% - 32px));
  margin-inline: auto;
  background: var(--paper);
  color: var(--paper-ink);
  color-scheme: light;
}

.legal-banner {
  margin-top: 2.5rem;
  padding: clamp(1.6rem, 4vw, 3.4rem) clamp(1.4rem, 4vw, 3.4rem) 0;
  text-align: left;
}

.legal-banner h1,
.legal-doc h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  color: var(--paper-ink);
}

.legal-banner p,
.legal-doc .last-updated {
  margin: 0.7rem 0 0;
  color: var(--paper-muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.legal .container,
.legal-doc {
  margin-top: 0;
  margin-bottom: 3rem;
  padding: 1.1rem clamp(1.4rem, 4vw, 3.4rem) clamp(1.6rem, 4vw, 3.4rem);
  line-height: 1.7;
  box-shadow: none;
  border-radius: 0;
}

.legal-doc { margin-top: 2.5rem; padding-top: clamp(1.6rem, 4vw, 3.4rem); }

body.legal .container h2,
.legal-doc h2 {
  margin: 2rem 0 0.55rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(26, 30, 29, 0.12);
  border-left: 0;
  color: var(--paper-ink);
  font-family: var(--sans);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

body.legal .container p,
.legal-doc p { margin: 0 0 0.9rem; }

body.legal .container ul,
.legal-doc ul { margin: 0.3rem 0 1rem 1.15rem; padding: 0; }

body.legal .container li,
.legal-doc li { margin: 0 0 0.4rem; }

body.legal .container a,
.legal-doc a {
  color: #0c5f66;
  overflow-wrap: anywhere;
}

body.legal .last-updated { text-align: left; margin-top: 2rem; }

.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.8s ease forwards;
}

.js .reveal-2 { animation-delay: 0.08s; }
.js .reveal-3 { animation-delay: 0.16s; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-mail { display: none; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  .work-item,
  .studio-grid { grid-template-columns: 1fr; gap: 0.8rem; }

  .work-aside { margin-top: 0.4rem; }

  .hero-meta { grid-template-columns: 1fr; gap: 14px; }
}

@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 32px)); }

  .hero h1 { font-size: clamp(2.2rem, 9.8vw, 3.3rem); }

  .hero-inner { padding-top: 2.2rem; }

  .hero-actions .btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js .reveal,
  .work-index { animation: none; opacity: 1; transform: none; transition: none; }
}

@media print {
  .site-header, .site-footer, .skip, .hero-glow { display: none; }
  body { background: #fff; }
  .legal-banner, body.legal .container, .legal-doc { width: auto; }
}
