/* ============================================================
   [ working name ] — zoom-site
   Studio black, quiet prose. Bold statements are the only nav.
   ============================================================ */

:root {
  --ink: #0B0B09;          /* background */
  --paper: #EDEAE2;        /* text */
  --paper-dim: rgba(237, 234, 226, 0.55);
  --paper-faint: rgba(237, 234, 226, 0.32);
  --living: #A9C29B;       /* the only accent */

  --ease-zoom: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 850ms;            /* one zoom speed, in and out */
}

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

html, body {
  background: var(--ink);
  color: var(--paper);
  height: 100%;
  overflow: hidden;
  font-family: 'Newsreader', serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(169, 194, 155, 0.3); }

/* ---------- layers / the camera ---------- */

.layer {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  will-change: transform, opacity, filter;
  transition:
    transform var(--dur) var(--ease-zoom),
    opacity calc(var(--dur) * 0.8) ease,
    filter var(--dur) var(--ease-zoom);
}
.layer.no-anim { transition: none !important; }

/* home at rest */
#home { transform: scale(1); opacity: 1; z-index: 2; }
/* home flown past */
#home.passed {
  transform: scale(5.5);
  opacity: 0;
  filter: blur(6px);
  pointer-events: none;
}

/* detail at rest: sitting deeper than the viewport, hidden */
#detail {
  transform: scale(0.22);
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
  z-index: 1;
}
/* detail arrived */
#detail.arrived {
  transform: scale(1);
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
  z-index: 3;
}

/* reduced motion: no camera, just crossfades */
@media (prefers-reduced-motion: reduce) {
  .layer { transition: opacity 300ms ease; }
  #home, #home.passed { transform: none; filter: none; }
  #detail, #detail.arrived { transform: none; filter: none; }
}

/* ---------- home composition ---------- */

.frame {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6vh 24px 5vh;
}

.wordmark {
  font-family: 'Spline Sans Mono', monospace;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--paper-dim);
  user-select: none;
}

.prose {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 620px;
  gap: 2.6em;
  padding: 7vh 0;
}

.prose p {
  font-size: clamp(17px, 2.05vw, 21px);
  line-height: 1.75;
  font-weight: 300;
  color: var(--paper);
  text-wrap: pretty;
}

/* the clickable statements */
.portal {
  cursor: pointer;
  color: var(--paper);
  background: none;
  border: none;
  font: inherit;
  padding: 0;
  position: relative;
  white-space: normal;
  /* persistent faint accent-green hairline on all devices, so the
     statement reads as clickable even without a hover to reveal it */
  background-image: linear-gradient(rgba(169, 194, 155, 0.38), rgba(169, 194, 155, 0.38));
  background-repeat: no-repeat;
  background-position: 0 calc(100% - 0.02em);
  background-size: 100% 1px;
  transition: color 320ms ease, text-shadow 320ms ease;
}
.portal:hover,
.portal:focus-visible {
  color: var(--living);
  /* hairline goes to full opacity on top of the resting underline */
  background-image: linear-gradient(var(--living), var(--living));
  text-shadow: 0 0 22px rgba(169, 194, 155, 0.35);
}
.portal:focus-visible {
  outline: 2px solid var(--living);
  outline-offset: 4px;
  border-radius: 2px;
}

/* the mailto CTA, inline in the prose: accent, never a zoom portal */
.cta {
  color: var(--living);
  text-decoration: none;
  border-bottom: 1px solid rgba(169, 194, 155, 0.4);
  transition: border-color 240ms ease, text-shadow 240ms ease;
}
.cta:hover {
  border-bottom-color: var(--living);
  text-shadow: 0 0 22px rgba(169, 194, 155, 0.35);
}
.cta:focus-visible {
  outline: 2px solid var(--living);
  outline-offset: 4px;
  border-radius: 2px;
}

/* touch devices: the resting hairline (now in the base rule) carries the
   signal; the full green treatment moves to the tap itself. Suppress the
   default tap-highlight rectangle. */
@media (hover: none) {
  .portal {
    -webkit-tap-highlight-color: transparent;
  }
  .portal:active {
    color: var(--living);
    text-shadow: 0 0 22px rgba(169, 194, 155, 0.35);
  }
}

.foot {
  display: flex;
  gap: 2.4em;
}
.foot a {
  font-family: 'Spline Sans Mono', monospace;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-faint);
  text-decoration: none;
  transition: color 240ms ease;
}
.foot a:hover { color: var(--paper); }
.foot a:focus-visible {
  outline: 2px solid var(--living);
  outline-offset: 4px;
  color: var(--paper);
}

/* ---------- detail composition ---------- */

.detail-frame {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5vh 24px 14vh;
}

.return {
  align-self: flex-start;
  position: sticky;
  top: 5vh;
  margin-left: max(24px, 6vw);
  font-family: 'Spline Sans Mono', monospace;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--paper-faint);
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  transition: color 240ms ease;
}
.return:hover,
.return:focus-visible { color: var(--living); }
.return:focus-visible {
  outline: 2px solid var(--living);
  outline-offset: 4px;
  border-radius: 2px;
}

.detail-body {
  max-width: 600px;
  margin-top: 9vh;
}

.detail-body .eyebrow {
  font-family: 'Spline Sans Mono', monospace;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--living);
  margin-bottom: 2.2em;
}

.detail-body h1 {
  font-family: 'Fraunces', serif;
  font-optical-sizing: auto;
  font-weight: 300;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: 0.9em;
  text-wrap: balance;
}

.detail-body .deck {
  font-family: 'Newsreader', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.5;
  color: var(--paper-dim);
  margin-bottom: 2em;
  text-wrap: pretty;
}

.detail-body p {
  font-size: clamp(16px, 1.85vw, 19px);
  line-height: 1.8;
  font-weight: 300;
  color: var(--paper);
  margin-bottom: 1.6em;
  text-wrap: pretty;
}

.detail-body p.quiet { color: var(--paper-dim); }
.detail-body strong { font-weight: 400; color: var(--paper); }
.detail-body em { font-style: italic; }

/* figures: large Fraunces numerals, mono-caps labels, left-ruled */
.detail-body .figure {
  border-left: 1px solid rgba(169, 194, 155, 0.4);
  padding: 0.2em 0 0.2em 1.6em;
  margin: 2.6em 0;
}
.detail-body .figure .big {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 36px);
  color: var(--living);
  line-height: 1.2;
  margin-bottom: 0.35em;
}
.detail-body .figure .label {
  font-family: 'Spline Sans Mono', monospace;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper-dim);
  margin: 0;
  line-height: 1.7;
}

/* economics: the single visual. Two hairline proportional bars,
   accent green, no axis, no legend. */
.figure-bars { border-left: none; padding-left: 0; }
.figure-bars .big { margin-bottom: 0.9em; }
.bars {
  display: flex;
  flex-direction: column;
  gap: 1.1em;
  margin: 0.4em 0 1.1em;
}
.bar-row {
  display: flex;
  align-items: center;
  gap: 1em;
}
.bar-track { flex: 1; min-width: 0; }
.bar {
  display: block;
  height: 2px;
  background: var(--living);
  width: var(--w);
  transform-origin: left center;
}
.bar-val {
  font-family: 'Spline Sans Mono', monospace;
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--paper-dim);
  white-space: nowrap;
  flex: 0 0 auto;
}
.bar-row.is-primary .bar { height: 3px; }
.bar-row.is-primary .bar-val { color: var(--living); }

/* ---------- responsive ---------- */

/* tablet */
@media (max-width: 768px) {
  .detail-body { margin-top: 7vh; }
}

/* phone (test target: 375px) */
@media (max-width: 480px) {
  .frame { padding: 5vh 22px 4vh; }
  .prose {
    gap: 2.2em;
    padding: 5vh 0;
    max-width: 100%;
  }
  .prose p { font-size: 17px; line-height: 1.7; }

  .wordmark { font-size: 12px; letter-spacing: 0.36em; }

  .foot { gap: 1.6em; }
  .foot a { font-size: 10px; letter-spacing: 0.16em; }

  .detail-frame { padding: 4vh 22px 12vh; }
  .return { margin-left: 0; top: 3vh; }
  .detail-body { margin-top: 5vh; max-width: 100%; }
  .detail-body h1 { font-size: clamp(27px, 8vw, 34px); }
  .detail-body .eyebrow { margin-bottom: 1.8em; }
  .detail-body p { font-size: 16px; }
  .bar-val { font-size: 11px; letter-spacing: 0.12em; }
}
