@import url("tokens.css");

@font-face {
  font-family: "Counting Display";
  src: url("fonts/counting-display.woff2") format("woff2-variations");
  font-weight: 100 900; font-display: swap;
}
@font-face {
  font-family: "Counting Serif";
  src: url("fonts/counting-serif.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Counting Serif";
  src: url("fonts/counting-serif-italic.woff2") format("woff2-variations");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Counting Text";
  src: url("fonts/counting-text.woff2") format("woff2-variations");
  font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--type-text);
  font-weight: var(--text-weight);
  font-size: var(--size-body);
  line-height: var(--leading-body);
}

a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 var(--space-4); max-width: var(--measure); }

.skip {
  position: absolute; left: var(--space-4); top: var(--space-2);
  transform: translateY(-200%);
  background: var(--ink); color: var(--ink-on-sunk);
  padding: var(--space-3) var(--space-4); min-height: 44px;
  font-size: var(--size-small); z-index: 20;
}
.skip:focus { transform: none; }

.column { max-width: var(--column); margin: 0 auto; padding: 0 var(--gutter); }

/* ── type roles ─────────────────────────────────────────────────────────── */
.display {
  font-family: var(--type-display); font-weight: var(--display-weight);
  line-height: var(--leading-display); letter-spacing: var(--tracking-display);
  text-transform: uppercase; margin: 0;
}
.serif {
  font-family: var(--type-serif); font-weight: var(--serif-weight);
  line-height: var(--leading-serif); margin: 0;
}
.label {
  font-size: var(--size-label); letter-spacing: var(--tracking-label); text-transform: uppercase;
  color: var(--ink-quiet);
}
.quiet { color: var(--ink-quiet); }
.link {
  min-width: 44px;
  display: inline-block; text-decoration: none; padding: var(--space-3) 0; min-height: 44px;
  border-bottom: var(--hairline) solid currentColor; line-height: 1.2;
  font-size: var(--size-small);
}
.link:hover { border-bottom-width: 2px; }

/* ── masthead: Coach's centred wordmark over a thin capitals nav ─────────── */
.masthead { position: relative; z-index: 5; background: var(--ground); }
.masthead .column { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-top: var(--space-4); padding-bottom: var(--space-2); }
.wordmark {
  grid-column: 2; text-decoration: none; text-align: center;
  font-family: var(--type-serif); font-weight: 500; font-size: 1.6rem; letter-spacing: 0.22em; text-transform: uppercase;
  padding: var(--space-2) 0; min-height: 44px; display: inline-flex; align-items: center;
}
.masthead .apply { grid-column: 3; justify-self: end; }
.nav { grid-column: 1 / -1; margin: var(--space-2) 0 0; padding: 0; list-style: none; display: flex; justify-content: center; gap: var(--space-8); flex-wrap: wrap; }
.nav a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-1); border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--ink); }
@media (max-width: 720px) {
  .masthead .column { grid-template-columns: 1fr auto; }
  .wordmark { grid-column: 1; justify-self: start; }
  .masthead .apply { grid-column: 2; }
  .nav { justify-content: flex-start; gap: var(--space-4); }
}

/* ── hero: Gagosian's full-bleed picture with the name set over it ───────── */
.hero { position: relative; min-height: min(92vh, 60rem); display: grid; align-items: end; color: var(--ink-on-sunk); isolation: isolate; }
.hero__picture { position: absolute; inset: 0; z-index: -1; overflow: hidden; background: var(--ground-sunk); }
.hero__picture img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
.hero__picture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.66) 0%, rgba(0,0,0,0.34) 50%, rgba(0,0,0,0) 82%); }
.hero .column { width: 100%; padding-bottom: clamp(2rem, 6vw, 5rem); padding-top: var(--space-24); }
.hero .display { font-size: var(--size-hero); max-width: 15ch; }
.hero .serif { font-size: var(--size-serif-lede); max-width: 34ch; margin: var(--space-4) 0 var(--space-6); }
.hero .label { color: var(--ink-on-sunk); }
.hero .link { color: var(--ink-on-sunk); }
.hero__credit { position: absolute; right: var(--gutter); bottom: var(--space-4); font-size: var(--size-label); color: var(--ink-quiet-on-sunk); }
@media (max-width: 720px) { .hero__credit { position: static; margin: var(--space-4) 0 0; } .hero .column { padding-bottom: var(--space-4); } }

/* ── sections ───────────────────────────────────────────────────────────── */
.section { padding: var(--space-24) 0; }
.section + .section { border-top: var(--hairline) solid var(--rule); }
.section__head { margin-bottom: var(--space-12); display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-6); flex-wrap: wrap; }
.section__head .display { font-size: var(--size-title); }

/* on view: the three shops as exhibitions */
.exhibitions { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: var(--space-8) var(--space-6); list-style: none; margin: 0; padding: 0; }
.exhibition img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; background: var(--ground-raised); }
.exhibition .label { display: block; margin: var(--space-4) 0 var(--space-2); }
.exhibition .display { font-size: var(--size-name); }
.exhibition .serif { font-size: 1.35rem; margin: var(--space-2) 0 var(--space-3); }
.exhibition p { font-size: var(--size-small); color: var(--ink-quiet); }

/* pictures: Coach's row of photographs, each with one underlined link */
.pictures { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.pictures img { aspect-ratio: 1 / 1; width: 100%; object-fit: cover; background: var(--ground-raised); }
.pictures figcaption { text-align: center; margin-top: var(--space-3); }
/* every work on the page is a door to its own page on feverglass.com */
.exhibition a, .pictures a, .hero__credit a { display: block; color: inherit; text-decoration: none; }
.exhibition a:hover .display, .pictures a:hover figcaption, .hero__credit a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.14em; }

/* the black band: one paragraph in our own voice */
.band { background: var(--ground-sunk); color: var(--ink-on-sunk); }
.band .column { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--space-12); align-items: start; }
.band .display { font-size: var(--size-title); }
.band .serif { font-size: var(--size-serif-lede); max-width: 40ch; }
.band .label { color: var(--ink-quiet-on-sunk); }
.band .link { color: var(--ink-on-sunk); }
@media (max-width: 720px) { .band .column { grid-template-columns: 1fr; gap: var(--space-6); } }

/* what a shop gets: quiet two-column prose, no cards */
.offer { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: var(--space-8) var(--space-12); list-style: none; margin: 0; padding: 0; }
.offer li { border-top: var(--hairline) solid var(--rule-strong); padding-top: var(--space-4); }
.offer .serif { font-size: 1.5rem; margin-bottom: var(--space-3); }
.offer p { font-size: var(--size-small); color: var(--ink-quiet); }

/* where we are: the quiet raised band */
.status { background: var(--ground-raised); }
.status .serif { font-size: var(--size-serif-lede); max-width: 44ch; }
.status .status__dare { font-style: italic; margin: var(--space-4) 0 var(--space-2); }

/* footer: Coach's service band, without the icons */
.footer { border-top: var(--hairline) solid var(--rule); padding: var(--space-12) 0 var(--space-8); font-size: var(--size-small); color: var(--ink-quiet); }
.footer .column { display: flex; justify-content: space-between; gap: var(--space-8); flex-wrap: wrap; align-items: flex-start; }
.footer nav { display: flex; gap: var(--space-6); flex-wrap: wrap; }
.footer nav a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.footer nav a:hover { text-decoration: underline; }
.footer p { max-width: 56ch; }

/* legal pages */
.prose { max-width: 62ch; }
.prose h2 { font-family: var(--type-serif); font-weight: 500; font-size: 1.5rem; margin: var(--space-12) 0 var(--space-3); line-height: 1.25; }
.prose p { max-width: none; }

/* ── motion: one entrance on the hero, one reveal below it ──────────────── */
@media (prefers-reduced-motion: no-preference) {
  .hero__picture img { animation: settle 1600ms var(--ease-out) forwards; transform: scale(1.04); }
  @keyframes settle { to { transform: none; } }
  .enter { opacity: 0; transform: translateY(14px); animation: enter var(--t-enter) var(--ease-out) forwards; animation-delay: calc(240ms + var(--i, 0) * var(--stagger)); }
  @keyframes enter { to { opacity: 1; transform: none; } }
  html.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--t-enter) var(--ease-out), transform var(--t-enter) var(--ease-out); }
  html.js .reveal.is-in { opacity: 1; transform: none; }
  .exhibition img, .pictures img { transition: transform 700ms var(--ease-out); }
  .exhibition a:hover img, .pictures a:hover img { transform: scale(1.02); }
}
