/* Hallmark · pre-emit critique: P5 H5 E4 S4 R5 V4
 * Hallmark · genre: editorial · macrostructure: Marquee Hero · theme: Atelier
 * tone: soft/luxury-quiet · anchor hue: warm (40–75)
 * enrichment: E8 photography, below-fold only (hero stays typographic)
 *   F6 work gallery knobs: ratio=mixed (3/4 pair + native-ratio wides), density=2-up then full-width,
 *   micro-action=none, grading=none (colour work must read true)
 * nav: N6 Newspaper masthead (issue line: above wordmark, wordmark: 2xl, rule: double)
 * hero: H2 Split diptych (ratio=1.6/1, right=photograph, divider=negative space,
 *   underlay=thick rule below) — revised from H1 Marquee, which left the fold
 *   reading empty and withheld the one thing a local visitor needs: the number.
 * CTA in fold: C1 Outlined chip (rectangular, spacious, arrow)
 * hero image: unframed, bleeds to the page edge; crop art-directed by width
 *   (4:5 band → 16:10 band → 1:1 column). The hairline frame was what made it
 *   read as a separate object. No colour grading — hair colour must stay true.
 * section head: S2 Hanging · features: F3 Tabular spec sheet (cols=2, rules=every row, nums=tabular)
 * CTA: C3 Typographic link + C4 Sticky bottom bar (reveal=after fold, anchor=viewport bottom, shadow=hairline)
 * footer: Ft6 Letter close (signoff=roman, postscript=yes, width=60ch)
 * motion: 2 primitives — affordance hover, sticky-bar reveal. No page-load reveal (Atelier is static).
 * contrast: pass (40–41) · nav/footer/hero slop: pass (42–45) · honest: pass (46) · chrome: pass (47)
 * tokens: pass (48) · responsive: pass (49) · icons: pass (30)
 * mobile: pass (34, 49, 50–57) — measured in-browser at 320 / 375 / 414 / 768 px
 */

@import url("tokens.css");

/* ─────────────────────────────────────────────────────────────────────
   Reset & base
   ───────────────────────────────────────────────────────────────────── */

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

html,
body {
  overflow-x: clip; /* never `hidden` — it breaks position: sticky/fixed */
}

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

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-style: normal; /* display is always roman */
  font-weight: 300;   /* the extreme the editorial genre commits to */
  font-optical-sizing: auto;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

:where(a, button, summary):focus-visible {
  outline: var(--rule-thick) solid var(--color-focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
  /* never transitioned — the ring must exist the instant focus lands */
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-md);
  inset-block-start: var(--space-md);
  z-index: var(--z-modal);
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: var(--text-sm);
  text-decoration: none;
  white-space: nowrap;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

/* Shared voice: the small tracked label used for standing details. */
.label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.pending {
  color: var(--color-muted);
  font-style: italic;
  border-block-end: var(--rule-hair) dashed var(--color-neutral);
}

.tnum {
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────────────────────────────────────────────────
   N6 · Newspaper masthead
   ───────────────────────────────────────────────────────────────────── */

.mast {
  display: grid;
  justify-items: center;
  gap: var(--space-2xs);
  padding: var(--space-lg) var(--page-gutter) 0;
  text-align: center;
}

.mast__line {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0;
}

.mast__line a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  border-block-end: var(--rule-hair) solid transparent;
  transition: color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out);
}

.mast__name {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 300;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  min-width: 0;
  margin: 0;
}

.mast__nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-md) var(--space-lg);
  list-style: none;
  margin: var(--space-xs) 0 0;
  padding: 0;
}

.mast__nav a {
  display: inline-block;
  padding-block: var(--space-2xs);
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap; /* affordances are single-line objects */
  border-block-end: var(--rule-hair) solid var(--color-rule);
  transition: color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out);
}

.mast__rule {
  width: 100%;
  height: 4px;
  margin: var(--space-md) 0 0;
  border: 0;
  border-block-start: var(--rule-hair) solid var(--color-rule);
  border-block-end: var(--rule-hair) solid var(--color-rule);
}

/* ─────────────────────────────────────────────────────────────────────
   H1 · Marquee hero — the fold IS the statement
   ───────────────────────────────────────────────────────────────────── */

/* Height comes from content, not from a viewport fraction — the old
   58dvh box left ~370px of dead space above the headline. */
.hero {
  display: grid;
  gap: var(--space-xl);
  align-items: center;
  /* bottom padding is 2.3× the top (gate 44a) */
  padding: var(--space-lg) var(--page-gutter) var(--space-2xl);
}

.hero__body {
  display: grid;
  justify-items: start;
  gap: var(--space-md);
}

.hero__display {
  font-size: var(--text-display);
  line-height: 1.06;
  max-width: 14ch;
  margin: 0;
}

.hero__lede {
  max-width: 34ch;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--color-muted);
}

/* The photograph is architecture, not an object placed on the page:
   no frame, and it runs off the edge so it belongs to the layout.
   A hairline border is what made it read as a separate element. */
.hero__media {
  margin: 0;
  margin-inline: calc(var(--page-gutter) * -1); /* full-bleed band on phones */
}

.hero__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 30%;
}

/* C1 · Outlined chip — the fold's one action */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  min-height: 44px;
  margin-block-start: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border: var(--rule-hair) solid var(--color-ink);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: 1;
  color: var(--color-ink);
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: background-color var(--dur-short) var(--ease-out),
              color var(--dur-short) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}

.chip:active {
  transform: translateY(1px);
}

.chip[aria-disabled="true"],
.chip:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  border-color: var(--color-neutral);
  color: var(--color-muted);
  pointer-events: none;
}

.hero__rule {
  width: 100%;
  margin: 0;
  border: 0;
  border-block-start: var(--rule-thick) solid var(--color-ink);
}

/* ─────────────────────────────────────────────────────────────────────
   Sections · S2 hanging heads (vertical stack, never tag-left)
   ───────────────────────────────────────────────────────────────────── */

.section {
  padding-inline: var(--page-gutter);
}

/* Rhythm is deliberately uneven between sections. */
.section--services {
  padding-block: var(--space-3xl) var(--space-2xl);
}

/* The hairline is what separates two consecutive paper-toned sections. */
.section--work {
  padding-block: var(--space-2xl) var(--space-3xl);
  border-block-start: var(--rule-hair) solid var(--color-rule);
}

.section--studio {
  padding-block: var(--space-2xl) var(--space-3xl);
  background: var(--color-paper-2);
  color: var(--color-ink); /* surface flip always carries its own ink (gate 41) */
}

.section--booking {
  padding-block: var(--space-2xl) var(--space-xl);
}

.head {
  padding-block-end: var(--space-lg);
}

.head h2 {
  font-size: var(--text-display-s);
  line-height: 1.12;
}

.lede {
  max-width: var(--measure);
  color: var(--color-muted);
  font-size: var(--text-md);
  line-height: 1.55;
}

.prose {
  max-width: var(--measure);
  display: grid;
  gap: var(--space-md);
  line-height: 1.65;
}

/* ─────────────────────────────────────────────────────────────────────
   F3 · Tabular spec sheet — the service menu
   ───────────────────────────────────────────────────────────────────── */

.services {
  width: 100%;
  max-width: 46rem; /* the one grid-break: wider than the prose measure */
  margin-block-start: var(--space-xl);
  border-collapse: collapse;
  text-align: start;
}

.services caption {
  caption-side: bottom;
  margin-block-start: var(--space-lg);
  max-width: var(--measure);
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-muted);
  text-align: start;
}

.services th,
.services td {
  padding-block: var(--space-sm);
  border-block-end: var(--rule-hair) solid var(--color-rule);
  vertical-align: baseline;
}

.services thead th {
  border-block-end-color: var(--color-ink);
  padding-block-end: var(--space-xs);
}

.services tbody th {
  font-weight: 400;
  font-size: var(--text-md);
  text-align: start;
  padding-inline-end: var(--space-md);
}

.services__price {
  text-align: end;
  white-space: nowrap;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────────────────────────────────────────────────
   F6 · Work gallery — real photographs, no grading
   The before/afters are colour work; tinting them to match the paper
   would misrepresent the product. They run at native colour.
   ───────────────────────────────────────────────────────────────────── */

.work {
  max-width: 46rem; /* same measure as the service table — one page rhythm */
  margin-block-start: var(--space-xl);
}

.work__group {
  font-size: var(--text-lg);
  line-height: 1.2;
  margin-block: var(--space-2xl) var(--space-md);
}

.work__group:first-child {
  margin-block-start: 0;
}

.work__pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* never bare 1fr on image tracks */
  gap: var(--space-lg);
}

.work__item {
  margin: 0;
}

.work__item--wide + .work__item--wide {
  margin-block-start: var(--space-xl);
}

.work__item img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  border: var(--rule-hair) solid var(--color-rule);
}

.work__item figcaption {
  margin-block-start: var(--space-xs);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-muted);
  max-width: 60ch;
}

@media (min-width: 40rem) {
  .work__pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* A full-bleed 4:5 at tablet width is a 940px wall of photograph.
     Art-direct the crop instead: portrait band → landscape band → square. */
  .hero__media img {
    aspect-ratio: 16 / 10;
  }
}

/* ─────────────────────────────────────────────────────────────────────
   Booking block
   ───────────────────────────────────────────────────────────────────── */

.booking__call {
  display: inline-block;
  margin-block: var(--space-md) var(--space-xl);
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  border-block-end: var(--rule-thick) solid transparent;
  transition: color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out);
}

.details {
  display: grid;
  gap: var(--space-md) var(--space-lg);
  max-width: 40rem;
  margin: 0;
}

.details > div {
  display: grid;
  gap: var(--space-3xs);
  padding-block-end: var(--space-md);
  border-block-end: var(--rule-hair) solid var(--color-rule);
}

.details dt {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.details dd {
  margin: 0;
  font-size: var(--text-md);
}

.details a {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  border-block-end: var(--rule-hair) solid var(--color-rule);
  transition: color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out);
}

/* ─────────────────────────────────────────────────────────────────────
   Ft6 · Letter close
   ───────────────────────────────────────────────────────────────────── */

.foot {
  padding: var(--space-2xl) var(--page-gutter) var(--space-4xl);
  border-block-start: var(--rule-hair) solid var(--color-rule);
  margin-block-start: var(--space-xl);
}

/* The rule spans the page; the letter itself keeps its measure. */
.foot__inner {
  max-width: 60ch;
}

.foot__close {
  font-family: var(--font-display);
  font-style: normal; /* the signoff is roman — italic display is a tell */
  font-weight: 300;
  font-size: var(--text-lg);
  line-height: 1.35;
}

.foot__sign {
  display: block;
  margin-block-start: var(--space-2xs);
  font-weight: 600;
}

.foot__ps {
  margin-block-start: var(--space-lg);
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--color-muted);
}

.foot__ps a {
  color: inherit;
  white-space: nowrap;
  text-decoration-color: var(--color-neutral);
  text-underline-offset: 3px;
}

/* ─────────────────────────────────────────────────────────────────────
   C4 · Sticky bottom bar — reveals after the fold
   ───────────────────────────────────────────────────────────────────── */

.callbar {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) var(--page-gutter);
  padding-block-end: max(var(--space-sm), env(safe-area-inset-bottom));
  background: var(--color-paper);
  border-block-start: var(--rule-hair) solid var(--color-rule);
  transform: translateY(101%);
  transition: transform var(--dur-long) var(--ease-out);
}

.callbar[data-shown="true"] {
  transform: none;
}

.callbar__note {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  white-space: nowrap;
}

/* C3 · Typographic link — a word, a rule, an arrow. No box, no fill. */
.link {
  display: inline-block;
  padding-block: var(--space-2xs);
  font-weight: 500;
  color: var(--color-accent);
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  border-block-end: var(--rule-thick) solid var(--color-accent);
  transition: color var(--dur-short) var(--ease-out),
              border-color var(--dur-short) var(--ease-out),
              transform var(--dur-micro) var(--ease-out);
}

/* ─────────────────────────────────────────────────────────────────────
   Interactive states — every affordance ships press + disabled
   alongside the default / hover / focus-visible above.
   ───────────────────────────────────────────────────────────────────── */

.link:active,
.mast__nav a:active,
.mast__line a:active,
.details a:active,
.booking__call:active,
.foot__ps a:active {
  transform: translateY(1px);
}

/* No control on this page ships disabled today, but the booking CTA will
   need it the day online booking goes live — three channels, not opacity
   alone. */
.link[aria-disabled="true"],
.link:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  color: var(--color-muted);
  border-block-end-color: var(--color-neutral);
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────────
   Hover — capability-gated, one signal per element
   ───────────────────────────────────────────────────────────────────── */

@media (hover: hover) and (pointer: fine) {
  .mast__nav a:hover,
  .details a:hover,
  .mast__line a:hover {
    color: var(--color-accent);
    border-block-end-color: var(--color-accent);
  }

  .booking__call:hover {
    color: var(--color-accent-deep);
    border-block-end-color: var(--color-accent-deep);
  }

  .link:hover {
    color: var(--color-accent-deep);
    border-block-end-color: var(--color-accent-deep);
  }

  .chip:hover {
    background: var(--color-ink);
    color: var(--color-paper);
  }
}

@media (pointer: coarse) {
  .mast__nav a,
  .link,
  .details a,
  .booking__call {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

/* ─────────────────────────────────────────────────────────────────────
   Responsive — content-driven, mobile first
   ───────────────────────────────────────────────────────────────────── */

/* Only the very narrowest phones lose the label; 375 px keeps it. */
@media (max-width: 21rem) {
  .callbar__note {
    display: none;
  }

  .callbar {
    justify-content: center;
  }
}

@media (min-width: 40rem) {
  .details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 60rem) {
  /* Diptych: text carries the weight, the photograph anchors the right. */
  .hero {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: var(--space-2xl);
  }

  .hero__display {
    max-width: 16ch;
  }

  /* Bleeds off the right edge only — the left stays on the text grid. */
  .hero__media {
    margin-inline: 0 calc(var(--page-gutter) * -1);
  }

  .hero__media img {
    aspect-ratio: 1 / 1;
  }

  .foot {
    padding-block-end: var(--space-3xl);
  }
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }

  .callbar {
    transition-property: opacity;
    transform: none;
    opacity: 0;
    pointer-events: none;
  }

  .callbar[data-shown="true"] {
    opacity: 1;
    pointer-events: auto;
  }
}

@media print {
  .callbar {
    display: none;
  }
}
