/* Tarn Capital — single page.
   Direction B from docs/moodboards.md. Three colours + one accent, no shadows,
   4px is the radius ceiling (2px used), 160/120/80px vertical bands. */

:root {
  --ivory: #f7f5f0;
  --ink: #1a1a1a;
  --muted: #8a8578;
  --bronze: #b08d57;

  --hairline-top: rgba(138, 133, 120, 0.2);
  --hairline-divider: rgba(138, 133, 120, 0.15);

  --measure-text: 840px;
  --measure-wide: 1200px;
  --radius: 2px;

  --band-section: 160px;
  --band-section-tall: 240px;
  --band-section-mid: 200px;
  --band-tight: 96px;
  --footer-space: 192px;
  --gap-block: 48px;
  --gap-inline: 24px;
  --page-top: 200px;
  --display-size: 96px;
  --display-size-case: 56px;
  --lede-size: 28px;

  --ease-rise: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-rise: 1000ms;
  --rise-distance: 12px;

  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-text: 'Inter', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--ivory);
  /* set on html as well so the palette audit sees exactly 3 colours + accent */
  color: var(--ink);
}

body {
  margin: 0;
  background-color: var(--ivory);
  /* Paper grain at 2.5% — replaces a second ivory tint, which the palette cap forbids. */
  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.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: var(--measure-wide);
  margin: 0 auto;
  padding: 0 40px;
}

/* ── top rule + wordmark row ─────────────────────────────────────────────── */

.topline {
  border-top: 0.5px solid var(--hairline-top);
}

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--gap-inline);
  padding: 28px 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.wordmark__mark {
  width: 24px;
  height: 24px;
  display: block;
}

.wordmark__text {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
}

/* Compound selectors: the base .hero / .hero__headline rules appear later in the
   file, so equal-specificity modifiers would lose to source order. */
.hero.hero--case {
  padding-top: 120px;
}

.hero .hero__headline--case {
  font-size: var(--display-size-case);
  line-height: 1.12;
}

.masthead .email,
.email {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 0.5px solid var(--hairline-divider);
  padding-bottom: 2px;
}

/* ── anchor navigation ───────────────────────────────────────────────────── */

.anchors {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 32px;
  padding: 14px 0;
  background: var(--ivory);
  border-bottom: 0.5px solid var(--hairline-divider);
}

.anchors a {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  /* only opacity animates; the active-section colour change is instant, which
     keeps the page inside the "scroll fade + hover opacity" motion budget */
  transition: opacity 200ms ease;
}

.anchors a:hover {
  opacity: 0.6;
}

.anchors a[aria-current='true'] {
  color: var(--bronze);
}

.anchors:empty {
  display: none;
}

/* ── image band ─────────────────────────────────────────────────────────── */

.band {
  margin: var(--band-tight) 0 0;
  padding: 0;
}

.band__image {
  display: block;
  width: 100%;
  height: auto;
  border-top: 0.5px solid var(--hairline-divider);
  border-bottom: 0.5px solid var(--hairline-divider);
}

.band__caption {
  max-width: var(--measure-text);
  margin: 16px auto 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.band__caption:empty {
  display: none;
}

/* ── sections ────────────────────────────────────────────────────────────── */

.section {
  padding-top: var(--band-section);
}

/* Rhythm is deliberately uneven (160 / 240 / 160) — the brief forbids uniform
   spacing, and every band stays at or above the 160px floor. */
.section--tall {
  padding-top: var(--band-section-tall);
}

.section--mid {
  padding-top: var(--band-section-mid);
}

.section--tight {
  padding-top: var(--band-tight);
}

.section__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--gap-inline);
}

/* ── hero ────────────────────────────────────────────────────────────────── */

.hero {
  padding-top: var(--page-top);
}

.hero__headline {
  font-family: var(--font-display);
  font-size: var(--display-size);
  line-height: 1.08;
  font-weight: 400;
  letter-spacing: normal;
  margin: 0;
  max-width: var(--measure-text);
}

.rule {
  display: block;
  width: 32px;
  height: 0;
  border-top: 1px solid var(--bronze);
  margin: var(--gap-inline) 0 0;
  transition: width 400ms ease;
}

.hero:hover .rule,
.contact:hover .rule {
  width: 48px;
}

.hero__positioning {
  font-family: var(--font-display);
  font-size: var(--lede-size);
  line-height: 1.42;
  margin: var(--gap-block) 0 0;
  max-width: var(--measure-text);
}

/* ── body copy ───────────────────────────────────────────────────────────── */

.prose {
  max-width: var(--measure-text);
}

.prose p {
  margin: 0 0 var(--gap-inline);
}

.prose p:last-child {
  margin-bottom: 0;
}

/* ── approach rows ───────────────────────────────────────────────────────── */

.rows {
  max-width: var(--measure-text);
}

.row {
  border-top: 0.5px solid var(--hairline-divider);
  padding: 24px 0;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: var(--gap-inline);
}

.row__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.row:last-child {
  border-bottom: 0.5px solid var(--hairline-divider);
}

/* ── portfolio ───────────────────────────────────────────────────────────── */

.case__head {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  align-items: center;
}

/* Icon tile: drawn from Fraunces, hairline border, 2px radius, no shadow.
   Used until a permissioned logo file is supplied. */
.case__monogram {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 0.5px solid var(--hairline-top);
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
  color: var(--ink);
  user-select: none;
}

.case__logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.cases--compact .case {
  padding: 28px 0;
}

.cases--compact .case__status {
  padding-left: 76px;
}

.cases--compact .case__link {
  margin-left: 76px;
}


.case {
  max-width: var(--measure-text);
  border-top: 0.5px solid var(--hairline-divider);
  padding: 32px 0;
}

.case:last-of-type {
  border-bottom: 0.5px solid var(--hairline-divider);
}

.case__title {
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1.3;
  font-weight: 400;
  margin: 0 0 8px;
}

.case__meta {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0;
}

.case__status {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

.case__link {
  display: inline-block;
  margin-top: var(--gap-inline);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 0.5px solid var(--hairline-divider);
  padding-bottom: 2px;
  transition: opacity 200ms ease;
}

.case__link:hover {
  opacity: 0.6;
}

.case__body {
  margin-top: var(--gap-block);
}

.case__body p {
  margin: 0 0 var(--gap-inline);
}

.claim__source {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.claim__source a {
  color: inherit;
  text-decoration: none;
  border-bottom: 0.5px solid var(--hairline-divider);
}

.claim__source a:hover {
  opacity: 0.6;
}

/* ── contact + footer ────────────────────────────────────────────────────── */

.contact {
  padding-bottom: 0;
}

.contact__email {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
}

.contact__entity {
  font-size: 14px;
  color: var(--muted);
  margin: var(--gap-inline) 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 40px;
  margin-bottom: 40px;
  border-bottom: 0.5px solid var(--hairline-divider);
}

.footer__mark {
  width: 28px;
  height: 28px;
  display: block;
}

.footer__name {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 12px 0 6px;
}

.footer__line {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__heading {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 4px;
}

.footer__col a {
  font-size: 14px;
  color: var(--ink);
  text-decoration: none;
  transition: opacity 200ms ease;
}

.footer__col a:hover {
  opacity: 0.6;
}

.footer__email {
  font-family: var(--font-mono);
  font-size: 13px;
}

.footer {
  margin-top: var(--footer-space);
  border-top: 0.5px solid var(--hairline-divider);
  padding: 32px 0 64px;
}

.disclaimer {
  max-width: 720px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

.disclaimer p {
  margin: 0 0 16px;
}

/* Preview-only affordance: marks an unreviewed draft. Removed by the renderer as
   soon as confirmedByCounsel is true, so it is not part of the design. */
.disclaimer[data-draft='true'] {
  border-left: 0.5px solid var(--bronze);
  padding-left: 16px;
}

.colophon {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.notice {
  max-width: 720px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  border: 0.5px dashed var(--hairline-top);
  border-radius: var(--radius);
  padding: 16px 20px;
}

/* ── motion: scroll fade only ────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(var(--rise-distance));
  transition: opacity var(--dur-rise) var(--ease-rise), transform var(--dur-rise) var(--ease-rise);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

:focus-visible {
  outline: 0.5px solid var(--bronze);
  outline-offset: 3px;
}

/* ── responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 1023px) {
  body {
    font-size: 16px;
  }

  :root {
    --band-section: 120px;
    --band-section-tall: 180px;
    --band-section-mid: 150px;
    --band-tight: 72px;
    --footer-space: 144px;
    --display-size: 60px;
    --display-size-case: 44px;
    --lede-size: 22px;
    --page-top: 120px;
  }

  .hero__headline {
    font-size: var(--display-size);
  }

  .hero__positioning {
    font-size: 21px;
  }

  .row {
    grid-template-columns: 160px 1fr;
  }
}

@media (max-width: 767px) {
  :root {
    --band-section: 80px;
    --band-section-tall: 120px;
    --band-section-mid: 100px;
    --band-tight: 48px;
    --footer-space: 96px;
    --display-size: 46px;
    --display-size-case: 36px;
    --lede-size: 19px;
    --page-top: 80px;
  }

  .page {
    padding: 0 24px;
  }

  .hero__headline {
    font-size: var(--display-size);
  }

  .hero__positioning {
    font-size: 18px;
  }

  .masthead {
    flex-direction: column;
    gap: 8px;
  }

  .anchors {
    gap: 20px;
    overflow-x: auto;
  }

  .row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .case__title {
    font-size: 24px;
  }

  .case__head {
    grid-template-columns: 44px 1fr;
    gap: 14px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .case__monogram,
  .case__logo {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .cases--compact .case__status,
  .cases--compact .case__link {
    padding-left: 48px;
    margin-left: 0;
  }
}

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

  .reveal,
  .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rule,
  .anchors a,
  .case__link,
  .claim__source a {
    transition: none;
  }
}
