/* ==========================================================================
   THiRD Day & Night
   Tokens come from the site's active design direction. Do not add colours or
   faces that are not declared here.
   ========================================================================== */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/dm-sans-1.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/dm-sans-0.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg:      #FAF9F7;
  --surface: #FFFFFF;
  --night:   #161519;
  --ink:     #161519;
  --muted:   #6E6A64;
  --line:    #DFDCD6;
  --accent:  #CD8F46;

  /* Brand book 06.4: the artwork is white and its mid-grey, on black. */
  --art-ground: #161519;

  --line-night:  rgba(255,255,255,0.14);
  --muted-night: rgba(255,255,255,0.62);

  --font: 'DM Sans', 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --sp-xs: 8px;
  --sp-sm: 16px;
  --sp-md: 32px;
  --sp-lg: 64px;
  --sp-xl: 120px;

  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1480px;
  --pill: 999px;

  --section-y: clamp(72px, 11vw, 168px);
}

/* Neutralize UA defaults at zero specificity so component rules always win. */
:where(h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol) {
  margin: 0;
  padding: 0;
}
:where(ul, ol) { list-style: none; }
:where(img, svg, video) { display: block; max-width: 100%; height: auto; }
:where(button, input, textarea, select) { font: inherit; color: inherit; }
:where(a) { color: inherit; text-decoration: none; }

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: var(--night); }

/* --------------------------------------------------------------------------
   Shared container. Every section aligns to this one left edge.
   -------------------------------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }

.night {
  background: var(--night);
  color: #fff;
}
.night .muted { color: var(--muted-night); }
.night .rule  { background: var(--line-night); }

.day { background: var(--bg); }
.day .muted { color: var(--muted); }

.rule {
  height: 1px;
  width: 100%;
  background: var(--line);
  border: 0;
}

/* --------------------------------------------------------------------------
   Type
   -------------------------------------------------------------------------- */
.display,
.h1 { font-size: clamp(3.4rem, 11vw, 10.5rem); }
.h2 { font-size: clamp(2.2rem, 5.2vw, 4.6rem); }
.h3 { font-size: clamp(1.5rem, 2.6vw, 2.4rem); }
.h4 { font-size: clamp(1.15rem, 1.6vw, 1.5rem); }

.display, .h1, .h2, .h3, .h4 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.h3, .h4 { line-height: 1.12; letter-spacing: -0.02em; }

.lede {
  font-size: clamp(1.05rem, 1.35vw, 1.3rem);
  line-height: 1.55;
  max-width: 34ch;
}

.body { max-width: 62ch; }
.body p + p { margin-top: 1em; }

.muted { color: var(--muted); }

/* The light, wide-set face borrowed from the packaging. Names only. */
.label {
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.night .label { color: var(--muted-night); }

strong, b { font-weight: 700; }

/* --------------------------------------------------------------------------
   Buttons. One gold primary per page; everything else is an outline pill.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border-radius: var(--pill);
  border: 1px solid currentColor;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  background: transparent;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.night .btn:hover { background: #fff; color: var(--night); border-color: #fff; }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--night);
  font-weight: 700;
}
.btn--primary:hover,
.night .btn--primary:hover {
  background: #fff;
  border-color: #fff;
  color: var(--night);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* Text link with a hairline that grows on hover. */
.link {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--line);
  transition: border-color .25s ease;
}
.link:hover { border-color: var(--accent); }
.night .link { border-bottom-color: var(--line-night); }

/* --------------------------------------------------------------------------
   Header. One line at desktop, always.
   -------------------------------------------------------------------------- */
.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 40;
  padding-block: 24px;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}
.brand { display: block; flex: 0 0 auto; }
.brand img { width: 108px; height: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 40px);
}
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  transition: color .2s ease;
}
.nav a:hover, .nav a[aria-current] { color: #fff; }
.nav .btn { color: #fff; }

.nav-toggle { display: none; }
.nav-panel { display: none; }

/* --------------------------------------------------------------------------
   Hero. Split: type on the left, a night photograph bleeding off the right.
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  align-items: end;
  background: var(--night);
  color: #fff;
  overflow: clip;
}
.hero__text {
  grid-column: 1;
  padding: 152px var(--sp-md) clamp(56px, 8vh, 104px) max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  max-width: 46rem;
}
.hero__title {
  letter-spacing: -0.045em;
  line-height: 0.88;
}
.hero__title em {
  font-style: normal;
  font-weight: 300;
}
.hero__lede { margin-top: 26px; color: var(--muted-night); }
.hero__actions { margin-top: 38px; }

.hero__media {
  grid-column: 2;
  position: relative;
  align-self: stretch;
  min-height: 100svh;
}
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}
/* A narrow feather on the seam only. The photograph carries the right half. */
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--night) 0%, rgba(22,21,25,0) 12%);
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   The Day & Night artwork. It stands alone, uncaptioned.
   -------------------------------------------------------------------------- */
.artwork {
  background: var(--art-ground);
  color: #fff;
  padding-block: clamp(64px, 9vw, 132px);
}
.artwork__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: center;
}
.artwork img { width: 100%; height: auto; }

/* The brand book allows copy beside the artwork, never over it. */
.artwork__text { max-width: 44ch; }
.artwork__text .h3 { margin-bottom: 20px; }
.artwork__text p { color: var(--muted-night); }
.artwork__text p + p { margin-top: 1em; }

/* --------------------------------------------------------------------------
   Editorial grid. Asymmetric two column with images breaking the right edge.
   -------------------------------------------------------------------------- */
.editorial__head {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--sp-lg);
  align-items: end;
}
.editorial__head .h2 { max-width: 15ch; }

.editorial__grid {
  margin-top: clamp(48px, 6vw, 96px);
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(32px, 4vw, 72px) var(--sp-lg);
  align-items: start;
}
.ed-item { grid-column: span 5; }
.ed-item:nth-child(2) { grid-column: 8 / span 5; }
.ed-item:nth-child(3) { grid-column: 1 / span 5; }
.ed-item:nth-child(4) { grid-column: 8 / span 5; }
.ed-item .h4 { margin-bottom: 14px; }
.ed-item .rule { margin-bottom: 22px; }

.ed-media { grid-column: span 12; }
.ed-media--split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 32px);
  align-items: stretch;
}
.ed-media img { width: 100%; height: 100%; object-fit: cover; }
.ed-media--split img:first-child { aspect-ratio: 16 / 10; }
.ed-media--split img:last-child  { aspect-ratio: 4 / 5; }

/* --------------------------------------------------------------------------
   Equipment. Night band, photograph bleeding off the left edge.
   -------------------------------------------------------------------------- */
.equip {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 6vw, 104px);
}
.equip__media { position: relative; align-self: stretch; min-height: 460px; }
.equip__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.equip__body {
  padding-block: var(--section-y);
  padding-right: max(var(--gutter), calc((100vw - var(--maxw)) / 2 + var(--gutter)));
  padding-left: 0;
  max-width: 46rem;
}
.machines { margin-top: clamp(32px, 4vw, 56px); }
.machine { padding-block: 28px; border-top: 1px solid var(--line-night); }
.machine:last-child { border-bottom: 1px solid var(--line-night); }
.machine .h4 { margin-bottom: 10px; }
.machine p { color: var(--muted-night); }

/* --------------------------------------------------------------------------
   Brand graphic devices: the gold rule and the index numeral.
   -------------------------------------------------------------------------- */
.gold-rule {
  display: block;
  width: 34px;
  height: 2px;
  background: var(--accent);
  margin-bottom: clamp(20px, 2.4vw, 30px);
}

.idx {
  display: block;
  font-size: clamp(1.7rem, 2.7vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}
@supports (-webkit-text-stroke: 1px currentColor) {
  .idx {
    -webkit-text-stroke: 1.2px var(--accent);
    color: transparent;
  }
}

/* --------------------------------------------------------------------------
   The branch timeline. A ledger, not a card grid: it carries seven entries,
   only some of which have a year or a photograph, without leaving holes.
   -------------------------------------------------------------------------- */
.branches__lede { max-width: 42ch; }

.tl {
  margin-top: clamp(48px, 6vw, 88px);
  border-top: 1px solid var(--line);
}
.tl__row {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(20px, 3vw, 56px);
  align-items: start;
  padding-block: clamp(32px, 4vw, 60px);
  border-bottom: 1px solid var(--line);
}
.tl__meta { grid-column: 1 / span 2; }
.tl__year {
  display: block;
  margin-top: 10px;
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.tl__body { grid-column: 3 / span 5; }
.tl__row--nomedia .tl__body { grid-column: 3 / span 8; }
.tl__media { grid-column: 9 / span 4; }
/* Square keeps the ledger even across a mix of portrait phone shots and
   landscape interiors; the bias is slightly high so signage survives the crop. */
.tl__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 40%;
}

.tl__name { margin-bottom: 14px; }
.tl__addr { margin-top: 18px; font-size: 0.95rem; }
.tl__status {
  display: block;
  margin-bottom: 10px;
  font-weight: 300;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   Closing band
   -------------------------------------------------------------------------- */
.band__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 88px);
  align-items: end;
}
.band__grid .body { color: var(--muted-night); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--night); color: #fff; padding-block: clamp(56px, 7vw, 96px) 40px; }
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}
.footer__brand img { width: 132px; }
.footer__col .label { display: block; margin-bottom: 16px; }
.footer__col li + li { margin-top: 10px; }
.footer__col a { color: rgba(255,255,255,0.78); }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  margin-top: clamp(40px, 5vw, 72px);
  padding-top: 24px;
  border-top: 1px solid var(--line-night);
  display: flex;
  flex-wrap: wrap;
  gap: 12px var(--sp-md);
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--muted-night);
}

/* --------------------------------------------------------------------------
   Interior pages
   -------------------------------------------------------------------------- */
.page-hero {
  background: var(--night);
  color: #fff;
  padding-top: clamp(150px, 18vh, 230px);
  padding-bottom: clamp(64px, 8vw, 120px);
}
.page-hero .h1 { font-size: clamp(2.8rem, 8vw, 7rem); }
.page-hero .lede { margin-top: 24px; color: var(--muted-night); max-width: 40ch; }

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}

.criteria { display: grid; gap: 0; margin-top: var(--sp-md); }
.criteria li {
  padding-block: 22px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: var(--sp-md);
  align-items: baseline;
}
.criteria li:last-child { border-bottom: 1px solid var(--line); }
.criteria .h4 { letter-spacing: -0.015em; }

/* --------------------------------------------------------------------------
   Forms. Underline only, gold on focus. No filled boxes.
   -------------------------------------------------------------------------- */
.form-block { margin-top: clamp(32px, 4vw, 56px); }

.wpcf7 { max-width: 760px; }
.wpcf7 form > div,
.wpcf7 .field { margin-bottom: 26px; }
.wpcf7 label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 0;
  font-size: 1.05rem;
  color: var(--ink);
  transition: border-color .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.wpcf7 input::placeholder,
.wpcf7 textarea::placeholder { color: var(--muted); opacity: 1; }
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus { outline: none; border-bottom-color: var(--accent); }
.wpcf7 textarea { min-height: 150px; resize: vertical; }
.wpcf7 input[type="submit"] {
  width: auto;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--night);
  font-weight: 700;
  border-radius: var(--pill);
  min-height: 52px;
  padding: 0 34px;
  cursor: pointer;
  transition: background-color .25s ease, color .25s ease;
}
.wpcf7 input[type="submit"]:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.wpcf7-not-valid-tip { color: #A33A2B; font-size: 0.85rem; margin-top: 6px; }
.wpcf7-response-output {
  border: 0 !important;
  border-left: 2px solid var(--accent) !important;
  margin: var(--sp-md) 0 0 !important;
  padding: 12px 0 12px 16px !important;
  font-size: 0.95rem;
}
.wpcf7-spinner { display: inline-block; margin-left: 12px; }

/* Two column form rows on wide screens. */
@media (min-width: 860px) {
  .wpcf7 .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--sp-lg); }
}

/* --------------------------------------------------------------------------
   Reveal. Degrades to visible when JS never runs.
   -------------------------------------------------------------------------- */
.js .reveal { opacity: 0; transform: translateY(14px); }
.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --------------------------------------------------------------------------
   Responsive. Every multi column layout declares its collapse.
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .ed-item,
  .ed-item:nth-child(2),
  .ed-item:nth-child(3),
  .ed-item:nth-child(4) { grid-column: span 6; }
}

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

  .site-header { padding-block: 18px; }
  .brand img { width: 88px; }
  .nav { gap: 16px; }
  .nav a:not(.btn) { display: none; }
  .nav .btn { min-height: 44px; padding: 0 20px; font-size: 0.85rem; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
  }
  .nav-panel {
    position: fixed;
    inset: 0;
    background: var(--night);
    z-index: 60;
    padding: 88px var(--gutter) var(--gutter);
    display: none;
    flex-direction: column;
    gap: 6px;
  }
  .nav-panel.is-open { display: flex; }
  .nav-panel a {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #fff;
    padding-block: 14px;
    border-bottom: 1px solid var(--line-night);
  }
  .nav-panel .btn { margin-top: 24px; align-self: flex-start; border-bottom: 0; font-size: 0.95rem; }
  /* The panel colours its links white; the gold button must keep ink text. */
  .nav-panel .btn--primary { color: var(--night); }
  .nav-close {
    position: absolute;
    top: 22px;
    right: var(--gutter);
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    padding: 8px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    align-items: stretch;
  }
  .hero__media { grid-column: 1; grid-row: 1; min-height: 62svh; }
  .hero__media::after {
    background: linear-gradient(180deg, rgba(22,21,25,0.55) 0%, rgba(22,21,25,0.15) 45%, var(--night) 97%);
  }
  .hero__text {
    grid-column: 1;
    grid-row: 2;
    padding: 0 var(--gutter) clamp(56px, 9vw, 88px);
    margin-top: -40px;
    position: relative;
    z-index: 2;
    max-width: none;
  }
  .hero__title { font-size: clamp(3.2rem, 17vw, 5.6rem); }

  .editorial__head { grid-template-columns: 1fr; gap: var(--sp-md); align-items: start; }
  .editorial__grid { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .ed-item,
  .ed-item:nth-child(2),
  .ed-item:nth-child(3),
  .ed-item:nth-child(4),
  .ed-media { grid-column: 1 / -1; }
  .ed-media--split { grid-template-columns: 1fr; }
  .ed-media--split img:last-child { display: none; }

  .artwork__grid { grid-template-columns: 1fr; gap: var(--sp-md); }

  .equip { grid-template-columns: 1fr; gap: 0; }
  .equip__media { min-height: 62vw; }
  .equip__body { padding-inline: var(--gutter); padding-block: clamp(48px, 9vw, 80px); }


  /* Timeline: image first, then the numeral and the copy. */
  .tl__row { grid-template-columns: 1fr; gap: var(--sp-sm); padding-block: clamp(28px, 6vw, 44px); }
  .tl__media { grid-column: 1 / -1; order: 1; margin-bottom: 6px; }
  .tl__media img { aspect-ratio: 16 / 10; }
  .tl__meta { grid-column: 1 / -1; order: 2; }
  .tl__body,
  .tl__row--nomedia .tl__body { grid-column: 1 / -1; order: 3; }
  .tl__meta .idx { margin-bottom: 6px; }
  .tl__year { margin-top: 0; }

  .band__grid { grid-template-columns: 1fr; gap: var(--sp-md); align-items: start; }
  .two-col { grid-template-columns: 1fr; }
  .criteria li { grid-template-columns: 1fr; gap: 8px; }

  .footer__top { grid-template-columns: 1fr 1fr; gap: var(--sp-lg) var(--sp-md); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .footer__top { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
}

/* Keep the admin bar from covering the fixed header for logged in users. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--night);
  padding: 12px 20px;
  z-index: 100;
  font-weight: 700;
}
.skip-link:focus { left: 0; }
