/* ================================================================
   TWOBY2 STUDIOS — dark reverse
   One typeface. One accent of italic. Generous space. No spectacle.

   The reverse of the cream original: the paper becomes the ink.
   Ground is biased toward #1a3550 — the blue already in the studio's
   own logo thumbnail — rather than a neutral black.

   Two documents share this sheet: the statement (index.html) and the
   contact (contact.html). 404.html borrows the same shell.
   ================================================================ */

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

:root {
  --bg:       rgb(14,17,23);                    /* dark blue-slate, not black */
  --ink:      #ece7dd;                    /* the warm paper, now the ink */
  --ink-dim:  rgba(236,231,221,0.64);
  --ink-mute: rgba(236,231,221,0.40);
  --hair:     rgba(236,231,221,0.16);

  --serif: "Instrument Serif", "Times New Roman", Times, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont,
          "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(28px, 5vw, 72px);
  --nav-h: 56px;
}

html { background: var(--bg); }
body {
  background: transparent;
  font-family: var(--sans);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--ink); color: var(--bg); }

/* ── photographic ground ─────────────────────────────── */
#bg-photo {
  position: fixed; inset: 0; z-index: -2;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  opacity: 0; transition: opacity 1.6s ease;
  filter: saturate(0.72) contrast(1.04);
}
#bg-photo.on { opacity: 1; }
#bg-photo.kb { animation: kenburns 28s ease-in-out infinite alternate; }
@keyframes kenburns {
  from { transform: scale(1.05) translate(-1%, -1%); }
  to   { transform: scale(1.15) translate( 1%,  1%); }
}
@media (prefers-reduced-motion: reduce) { #bg-photo.kb { animation: none; } }

#bg-veil {
  position: fixed; inset: 0; z-index: -1;
  opacity: 0; transition: opacity 1.6s ease; pointer-events: none;
  background:
    linear-gradient(180deg,
      rgba(14,17,23,0.8790) 0%,
      rgba(14,17,23,0.8099) 34%,
      rgba(14,17,23,0.9136) 100%);
}
#bg-veil.on { opacity: 1; }

/* ── reveal ──────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(14px);
  transition: opacity 1.1s ease, transform 1.1s cubic-bezier(.22,1,.36,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── nav ─────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in oklab, var(--bg) 48%, transparent);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
  border-bottom: 1px solid var(--hair);
}
.nav-inner {
  max-width: 1320px; margin: 0 auto; padding: 0 var(--gutter);
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  font-size: 12px; font-weight: 500; letter-spacing: 0.005em;
}
.nav-link {
  color: var(--ink-mute); text-decoration: none;
  font-size: 12px; letter-spacing: 0.01em;
  transition: color .25s ease;
}
.nav-link:hover { color: var(--ink); }

.logo-mark { width: 14px; height: 14px; display: grid;
  grid-template-columns: 1fr 1fr; gap: 2px; }
.logo-mark > span { background: currentColor; border-radius: 1px; }
.logo-mark > span:nth-child(2),
.logo-mark > span:nth-child(3) { opacity: 0.45; }

/* ================================================================
   STAGE — one frame per document, no scroll
   ================================================================ */
.stage {
  height: 100dvh; padding: var(--nav-h) var(--gutter) 0;
  display: flex; align-items: center;
}
.stage-inner {
  width: 100%; max-width: 720px;
  margin: 0 auto 0 max(0px, calc(50% - 560px));
  padding-bottom: 6vh;
}
html:has(.stage), body:has(.stage) { height: 100%; }
body:has(.stage) { overflow: hidden; }
@media (max-height: 600px) {
  body:has(.stage) { overflow: auto; }
  .stage { height: auto; padding-block: 24vh 18vh; }
}

/* ── the display line ────────────────────────────────── */
.display {
  font-family: var(--serif); font-weight: 400; font-style: normal;
  letter-spacing: -0.005em; line-height: 1.08;
  font-size: clamp(46px, 5.6vmin, 68px);
  color: var(--ink-dim);
  text-wrap: balance; max-width: 15ch;
}
.display em { font-style: italic; color: var(--ink); }

.hero-foot {
  margin-top: clamp(20px, 2.5vh, 32px);
  display: flex; align-items: center; gap: 14px;
}
.hero-foot-line { width: 24px; height: 1px; background: var(--ink-mute); flex: 0 0 24px; }
.hero-foot-text {
  font-style: italic; font-family: var(--serif); font-size: 14px;
  color: var(--ink-dim); letter-spacing: 0;
}

/* ── the one link off the statement page ─────────────── */
.to-contact {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: clamp(48px, 9vh, 96px);
  font-family: var(--serif); font-style: italic; font-size: 15px;
  color: var(--ink-dim); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 3px;
  transition: color .25s ease, border-color .25s ease, gap .25s ease;
}
.to-contact:hover { color: var(--ink); border-bottom-color: var(--ink); gap: 18px; }

/* ================================================================
   CONTACT — one ask, one email, no fanfare
   ================================================================ */
.closer-lede {
  font-family: var(--serif);
  font-size: clamp(22px, 2.6vmin, 30px);
  line-height: 1.5; letter-spacing: -0.005em;
  color: var(--ink-dim);
  margin-bottom: clamp(28px, 4vh, 44px);
  text-wrap: balance; max-width: 32ch;
}
.closer-lede em { font-style: italic; color: var(--ink); }

.closer-form {
  position: relative; display: flex; align-items: stretch;
  border-bottom: 1px solid var(--ink);
  margin-bottom: clamp(28px, 4.5vh, 44px);
  max-width: 440px;
  transition: border-color .3s ease;
}
.closer-form input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 12px 0; color: var(--ink);
  font-family: inherit; font-size: 14px; letter-spacing: -0.005em;
}
.closer-form input::placeholder { color: var(--ink-mute); }
.closer-form button {
  background: transparent; border: none; padding: 0 0 0 16px;
  color: var(--ink-dim); cursor: pointer; font-size: 14px;
  display: flex; align-items: center;
  transition: transform .25s ease, color .25s ease;
}
.closer-form button:hover { color: var(--ink); transform: translateX(4px); }

.closer-thanks {
  position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: flex-start; padding: 12px 0;
  font-family: var(--serif); font-style: italic; font-size: 14px;
  color: var(--ink-dim); background: var(--bg);
  opacity: 0; pointer-events: none; transition: opacity .35s ease;
}
.closer-form.sent .closer-thanks { opacity: 1; }
.closer-form.sent input,
.closer-form.sent button { opacity: 0; transition: opacity .25s ease; }

.closer-email {
  display: inline-block; font-family: var(--serif); font-style: italic;
  font-size: 14px; color: var(--ink-dim); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: color .25s ease, border-color .25s ease;
}
.closer-email:hover { color: var(--ink); border-bottom-color: var(--ink); }

.back {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: clamp(44px, 8vh, 84px);
  font-family: var(--serif); font-style: italic; font-size: 14px;
  color: var(--ink-mute); text-decoration: none;
  transition: color .25s ease, gap .25s ease;
}
.back:hover { color: var(--ink-dim); gap: 18px; }

/* ================================================================
   PAGE FOOT — one line, pinned
   ================================================================ */
.page-foot {
  position: fixed; left: var(--gutter); bottom: clamp(18px, 3vh, 30px);
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--ink-mute); z-index: 20;
}
.page-foot .logo-mark { width: 11px; height: 11px; gap: 1.5px; }

/* ================================================================
   404 — borrows the shell; only the centring is local
   ================================================================ */
.nf {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: var(--nav-h) var(--gutter) 0;
  position: relative; z-index: 2;
}
.nf-inner { max-width: 46rem; }
.nf-title {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(44px, 9vmin, 110px);
  line-height: 1.02; color: var(--ink);
  margin: 0 0 1.25rem;
}
.nf-text {
  font-size: clamp(15px, 1.9vmin, 19px);
  line-height: 1.6; color: var(--ink-dim);
  margin: 0 0 2rem;
}
.nf-back {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(15px, 1.9vmin, 19px);
  color: var(--ink-dim); text-decoration: none;
  border-bottom: 1px solid var(--hair); padding-bottom: 2px;
  transition: color .25s ease, border-color .25s ease;
}
.nf-back:hover { color: var(--ink); border-bottom-color: var(--ink); }
