/* World of Rhinoplasty — an anatomical atlas plate, not a clinic brochure.
   Ground: the deep green-black of a draped operating field.
   Light: the photographs themselves, which sit on the page as plates.
   Tints: the three tissues a rhinoplasty is actually about. */

:root {
  --field: #0E1311;
  --field-2: #141B18;
  --field-3: #1A2320;
  --paper: #EDE8DC;
  --text: #DCD8CE;
  --dim: #939C96;
  --rule: rgba(220, 216, 206, 0.16);
  --rule-soft: rgba(220, 216, 206, 0.08);

  --skin: #C4877A;      /* flesh tint, as on a printed plate */
  --cart: #7E9C9E;      /* cartilage */
  --bone: #C6AC7C;      /* bone */
  --accent: #D2907F;

  --display: "Bodoni Moda", Georgia, serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --label: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;

  --pad: clamp(1.25rem, 4vw, 3rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--field);
  color: var(--text);
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  line-height: 1.62;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a { color: inherit; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 20;
  background: var(--paper); color: var(--field);
  padding: 0.7rem 1.1rem; font-family: var(--label); font-size: 0.8rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* ── shared type ─────────────────────────────────────────── */

.eyebrow {
  font-family: var(--label);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex; align-items: baseline; gap: 0.75rem; flex-wrap: wrap;
}
.eyebrow__mark { color: var(--accent); }
.eyebrow__mark::after { content: " ·"; color: var(--dim); }

h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.95rem, 1.2rem + 2.7vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 1.1rem 0 1.9rem;
  max-width: 20ch;
}

h3 {
  font-family: var(--body);
  font-weight: 500;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
  margin-bottom: 0.5rem;
}

p { max-width: 68ch; }

.lede {
  font-size: clamp(1.08rem, 1rem + 0.45vw, 1.32rem);
  font-weight: 300;
  line-height: 1.55;
  color: #E6E2D8;
}

.cols { display: grid; gap: 1.4rem 3rem; }
@media (min-width: 900px) { .cols { grid-template-columns: 1fr 1fr; } }

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

.hero { position: relative; }

.hero__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--field-2);
}

.hero__media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 60% 42%;
}

.hero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(96deg, rgba(14,19,17,0.96) 0%, rgba(14,19,17,0.86) 26%, rgba(14,19,17,0.30) 50%, rgba(14,19,17,0) 66%),
    linear-gradient(to top, rgba(14,19,17,0.9) 0%, rgba(14,19,17,0) 34%);
}

/* On wide screens the type lies over the plate's empty third; on narrow ones
   it drops beneath the plate, where it can be read. */
.hero__type {
  position: absolute;
  left: var(--pad);
  top: 0;
  height: 56.25vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(46%, 34rem);
  min-width: 17rem;
}

.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.35rem, 0.9rem + 5.1vw, 5.6rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0.7rem 0 1.1rem;
  display: grid;
}
.hero__title span { display: block; }

.hero__lede {
  font-weight: 300;
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.16rem);
  line-height: 1.55;
  color: #E4E0D6;
  max-width: 40ch;
}

.hero__cta { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.7rem; }

.btn {
  font-family: var(--label);
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.72rem 1.15rem;
  border: 1px solid var(--accent);
  color: var(--field);
  background: var(--accent);
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn:hover { background: transparent; color: var(--accent); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--text); background: transparent; color: var(--text); }

/* one annotation, placed on the landmark the guide starts from */
.annot__pt {
  position: absolute;
  display: block;
}
.annot__pt--radix { left: 53.4%; top: 26.5%; }
.annot__pt i {
  position: absolute; left: -3px; top: -3px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(210, 144, 127, 0.18);
}
/* the label sits back over the dark ground, so the leader runs left
   from the landmark rather than across the face */
.annot__pt b {
  position: absolute; right: 5.4rem; top: -0.62em;
  font-family: var(--label); font-weight: 400;
  font-size: 0.68rem; letter-spacing: 0.22em;
  color: #F0EAE2;
  white-space: nowrap;
}
.annot__pt b::after {
  content: ""; position: absolute; left: 100%; top: 0.66em;
  width: 4.6rem; height: 1px;
  background: linear-gradient(to right, rgba(240,234,226,0.18), rgba(240,234,226,0.8));
}

.hero__caption {
  font-family: var(--label);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  padding: 0.9rem var(--pad) 0;
  max-width: none;
}
.hero__caption span { color: var(--accent); letter-spacing: 0.16em; margin-right: 0.6rem; }

/* ── page frame + spine ──────────────────────────────────── */

.page {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.spine { display: none; }

@media (min-width: 1120px) {
  .page { grid-template-columns: 15rem minmax(0, 1fr); column-gap: 3.5rem; }
  .spine {
    display: block;
    position: sticky; top: 0; align-self: start;
    height: 100vh;
    padding: 5.5rem 0;
  }
  .spine svg { position: absolute; left: 0; top: 5.5rem; height: calc(100vh - 11rem); width: 5rem; }
  .spine__line { fill: none; stroke: var(--rule); stroke-width: 1.25; }
  .spine__dots circle { fill: var(--field); stroke: var(--dim); stroke-width: 1.25; transition: fill 0.4s var(--ease), stroke 0.4s var(--ease); }
  .spine__dots circle.is-on { fill: var(--accent); stroke: var(--accent); }

  .spine__labels { list-style: none; padding: 0; margin: 0 0 0 5.5rem; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 1.35rem; }
  .spine__labels a { text-decoration: none; display: block; }
  .spine__labels em {
    display: block; font-style: normal;
    font-family: var(--label); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--dim); transition: color 0.3s var(--ease);
  }
  .spine__labels span {
    display: block; font-size: 0.85rem; color: #6E7873; transition: color 0.3s var(--ease);
  }
  .spine__labels a:hover em, .spine__labels a.is-on em { color: var(--accent); }
  .spine__labels a:hover span, .spine__labels a.is-on span { color: var(--text); }
}

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

.sec { padding: clamp(4rem, 8vw, 8rem) 0; border-top: 1px solid var(--rule-soft); }
.sec:first-child { border-top: 0; }

.stat {
  margin: 3rem 0 0;
  border-top: 1px solid var(--rule);
  padding-top: 1.4rem;
  display: grid; gap: 0.6rem 2.5rem;
}
@media (min-width: 760px) { .stat { grid-template-columns: auto 1fr; align-items: start; } }
.stat strong {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(3.4rem, 2rem + 5vw, 6rem);
  line-height: 0.82; letter-spacing: -0.03em;
  color: var(--accent);
}
.stat figcaption { font-size: 0.98rem; color: var(--dim); max-width: 46ch; }

/* plates: every photograph is a figure in an atlas */
.plate { margin: 2.8rem 0; border-top: 1px solid var(--rule); padding-top: 0.85rem; }
.plate img, .plate__media { width: 100%; }
.plate figcaption {
  font-family: var(--label); font-size: 0.7rem; line-height: 1.6;
  letter-spacing: 0.03em; color: var(--dim);
  margin-top: 0.7rem; max-width: 58ch;
}
.plate figcaption span { color: var(--accent); letter-spacing: 0.16em; margin-right: 0.55rem; }
.plate--full { margin-top: 3.2rem; }

.legend {
  display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  margin: 2.2rem 0 1rem; max-width: none;
}
.legend em { font-style: normal; font-family: var(--label); font-size: 0.68rem; color: var(--dim); letter-spacing: 0.04em; }

.tag {
  font-family: var(--label); font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dim); display: inline-flex; align-items: center; gap: 0.45rem;
}
.tag::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.tag--skin::before { background: var(--skin); }
.tag--cart::before { background: var(--cart); }
.tag--bone::before { background: var(--bone); }

/* hairline cell grid — a plate's key, not a card deck */
.cards {
  list-style: none; padding: 0; margin: 1.2rem 0 0;
  display: grid; gap: 1px; background: var(--rule-soft);
  border: 1px solid var(--rule-soft);
}
@media (min-width: 680px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--field); padding: 1.7rem 1.5rem 1.9rem; }
.card h3 { margin: 0.85rem 0 0.55rem; font-size: 1.06rem; }
.card p { font-size: 0.94rem; color: #C3C7C2; max-width: none; }

.note {
  margin-top: 3rem;
  border-left: 2px solid var(--cart);
  padding: 0.2rem 0 0.2rem 1.4rem;
}
.note h3 { color: var(--text); }
.note p { color: var(--dim); }
.note--warn { border-left-color: var(--accent); }

.qs { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; gap: 1px; background: var(--rule-soft); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.qs li { background: var(--field); display: grid; grid-template-columns: 3.4rem 1fr; gap: 0.6rem; padding: 1.4rem 0; }
.qs span { font-family: var(--label); font-size: 0.74rem; letter-spacing: 0.1em; color: var(--accent); padding-top: 0.28rem; }
.qs p { max-width: 62ch; color: var(--dim); }
.qs strong { color: var(--text); font-weight: 500; }

.steps { list-style: none; padding: 0; margin: 2.4rem 0 0; display: grid; gap: 2.2rem; }
.steps li { display: grid; grid-template-columns: 3.4rem 1fr; gap: 0.4rem 0.6rem; position: relative; }
.steps li::before {
  content: ""; position: absolute; left: 1.15rem; top: 1.9rem; bottom: -2.2rem;
  width: 1px; background: var(--rule-soft);
}
.steps li:last-child::before { display: none; }
.steps__n {
  font-family: var(--label); font-size: 0.74rem; letter-spacing: 0.1em;
  color: var(--accent); padding-top: 0.2rem; grid-row: span 2;
}
.steps h3 { align-self: center; }
.steps p { color: var(--dim); max-width: 60ch; }

/* the recovery chart is printed matter, pasted onto the field */
.chart {
  width: 100%;
  margin: 2.6rem 0 0;
  border-collapse: collapse;
  background: var(--paper);
  color: #14100D;
  font-size: 0.95rem;
}
.chart caption {
  caption-side: top; text-align: left;
  font-family: var(--label); font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--dim); padding-bottom: 0.7rem;
}
.chart th, .chart td { text-align: left; padding: 0.95rem 1.1rem; vertical-align: top; border-bottom: 1px solid rgba(20,16,13,0.14); }
.chart thead th {
  font-family: var(--label); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 400; color: #5C554C; border-bottom-color: rgba(20,16,13,0.3);
}
.chart tbody th { font-family: var(--label); font-weight: 500; font-size: 0.78rem; letter-spacing: 0.04em; white-space: nowrap; width: 1%; }
.chart tbody tr:last-child th, .chart tbody tr:last-child td { border-bottom: 0; }

.faq { margin-top: 2.2rem; border-top: 1px solid var(--rule-soft); }
.faq details { border-bottom: 1px solid var(--rule-soft); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.15rem 2.5rem 1.15rem 0;
  position: relative;
  font-size: 1.02rem;
  transition: color 0.25s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.35rem; top: 1rem;
  font-family: var(--label); color: var(--accent); font-size: 1.1rem;
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq p { padding: 0 2.5rem 1.4rem 0; color: var(--dim); }

.sec--ask .mailto { margin: 2rem 0 1.6rem; max-width: none; }
.sec--ask .mailto a {
  font-family: var(--display);
  font-size: clamp(1.4rem, 0.9rem + 2.4vw, 2.9rem);
  letter-spacing: -0.01em;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.12em;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
  overflow-wrap: anywhere;
}
.sec--ask .mailto a:hover { color: var(--accent); border-color: var(--accent); }
.help { font-size: 0.92rem; color: var(--dim); }

/* ── footer ──────────────────────────────────────────────── */

.foot { border-top: 1px solid var(--rule); background: var(--field-2); margin-top: 2rem; }
.foot__grid {
  max-width: 1360px; margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) var(--pad);
  display: grid; gap: 1.5rem;
}
@media (min-width: 900px) { .foot__grid { grid-template-columns: 1fr 1.6fr; column-gap: 4rem; } .foot__meta { grid-column: 2; } }
.foot__mark { font-family: var(--display); font-size: 1.4rem; letter-spacing: -0.01em; }
.foot__disc { font-size: 0.88rem; color: var(--dim); }
.foot__disc strong { color: var(--text); font-weight: 500; }
.foot__meta { font-family: var(--label); font-size: 0.66rem; line-height: 1.9; letter-spacing: 0.04em; color: #6E7873; }
.foot__meta span { display: block; margin-top: 0.5rem; }

/* ── motion ──────────────────────────────────────────────── */

.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

.hero__type > * { animation: rise 1s var(--ease) both; }
.hero__type > :nth-child(1) { animation-delay: 0.05s; }
.hero__type > :nth-child(2) { animation-delay: 0.14s; }
.hero__type > :nth-child(3) { animation-delay: 0.28s; }
.hero__type > :nth-child(4) { animation-delay: 0.4s; }
.annot__pt { animation: fade 1.2s var(--ease) 0.9s both; }

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

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

/* ── narrow screens ──────────────────────────────────────── */

@media (max-width: 860px) {
  .hero { position: relative; }
  .hero__frame { aspect-ratio: 4 / 5; }
  .hero__media { object-position: 64% 30%; }
  .hero__scrim {
    background: linear-gradient(to top, rgba(14,19,17,0.92) 0%, rgba(14,19,17,0.25) 26%, rgba(14,19,17,0) 55%);
  }
  .hero__type {
    position: static;
    height: auto;
    width: auto;
    padding: clamp(1.6rem, 6vw, 2.6rem) var(--pad) 0;
  }
  .hero__lede { max-width: 40ch; }
  .hero__caption { padding-top: 1.6rem; }
  .annot { display: none; }
}
