/* ==========================================================================
   Monarch Code — Coming Soon
   Palette and type are taken from the mcBRANDBOOK.
   ========================================================================== */

:root {
  /* Brand palette */
  --espresso:   #221210;  /* primary ground (brand book pages) */
  --espresso-2: #331b15;  /* left edge tab */
  --tan:        #916c54;  /* right edge tab, hairlines */
  --bronze:     #bf935b;  /* small labels on dark */
  --orange:     #f68712;  /* Monarch orange, the only accent */
  --ash:        #d3d2d2;  /* wordmark grey on dark, body text */
  --ash-muted:  #a39890;  /* secondary text, 6.4:1 on espresso */

  --rule: rgba(145, 108, 84, .42);

  /* Type */
  --serif: "Libre Caslon Display", "Big Caslon", "Libre Caslon Text", Baskerville, "Baskerville Old Face", Georgia, serif;
  --sans:  "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;

  /* Space */
  --pad:  clamp(1.375rem, 5.2vw, 5.5rem);
  --tab:  clamp(.5rem, 2.6vw, 3rem);
  --ease: cubic-bezier(.2, .7, .1, 1);
}

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

html {
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--espresso);
}

body {
  margin: 0;
  color: var(--ash);
  background: var(--espresso);
  font: 300 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }

::selection { background: var(--orange); color: var(--espresso); }

:focus-visible {
  outline: 1px solid var(--orange);
  outline-offset: 4px;
}

.sr-only,
.hp {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: var(--pad);
  top: -100px;
  z-index: 10;
  padding: .6rem .9rem;
  background: var(--orange);
  color: var(--espresso);
  font-weight: 500;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

/* --------------------------------------------------------------------------
   Edge tabs — the blocks that bleed off every brand book spread
   -------------------------------------------------------------------------- */

.tab {
  position: fixed;
  top: 50%;
  z-index: 0;
  width: var(--tab);
  height: clamp(9rem, 34vh, 22rem);
  transform: translateY(-50%);
  pointer-events: none;
}
.tab--left  { left: 0;  background: var(--espresso-2); }
.tab--right { right: 0; background: var(--tan); }

/* --------------------------------------------------------------------------
   Page frame
   -------------------------------------------------------------------------- */

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0 var(--pad);
  max-width: 1680px;
  margin: 0 auto;
}

/* Masthead ---------------------------------------------------------------- */

.masthead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-top: clamp(1.5rem, 3.6vh, 2.75rem);
}

.brand {
  display: block;
  width: clamp(4.25rem, 6.2vw, 5.75rem);
  /* the icon's left edge sits on the text column */
  margin-left: calc(var(--logo-optical, 0) * -1);
  transition: opacity .4s var(--ease);
}
.brand img { width: 100%; height: auto; }
.brand:hover { opacity: .82; }

.masthead__contact {
  margin-top: .35rem;
  font-size: .8125rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--ash-muted);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left 100% / 0 1px no-repeat;
  padding-bottom: 2px;
  transition: color .3s var(--ease), background-size .5s var(--ease);
}
.masthead__contact:hover,
.masthead__contact:focus-visible {
  color: var(--ash);
  background-size: 100% 1px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  align-items: center;
  padding: clamp(2rem, 4.5vh, 5rem) 0 clamp(2rem, 4vh, 4.5rem);
}

.hero__copy {
  position: relative;
  z-index: 2;
  grid-column: 1 / span 7;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: 0 0 clamp(1.25rem, 2.8vh, 2.25rem);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bronze);
}
.eyebrow time { color: var(--ash); letter-spacing: .14em; }

/* a miniature of the seal: the centre diamond of the mark */
.eyebrow__mark {
  flex: none;
  width: .5rem;
  height: .5rem;
  background: var(--orange);
  border-radius: 1px;
  transform: rotate(45deg);
}

.headline {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3rem, min(7.6vw, 11.2vh), 8.25rem);
  line-height: .96;
  letter-spacing: -.018em;
  color: #ece6e1;
  font-kerning: normal;
  font-feature-settings: "kern", "liga";
}
.headline .line {
  display: block;
  overflow: hidden;
  /* room for descenders inside the reveal mask */
  padding-bottom: .08em;
  margin-bottom: -.08em;
}
.headline .line > span { display: inline-block; }
.headline .stop { color: var(--orange); }

.lede {
  max-width: 33rem;
  margin: clamp(1.25rem, 2.8vh, 2.25rem) 0 0;
  font-size: clamp(1.0625rem, 1.25vw, 1.1875rem);
  line-height: 1.62;
  color: var(--ash-muted);
}

/* Early access form ------------------------------------------------------- */

.notify {
  position: relative;
  max-width: 33rem;
  margin-top: clamp(1.75rem, 4vh, 3rem);
}

.notify__label {
  display: block;
  margin-bottom: .9rem;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bronze);
}

.notify__row {
  position: relative;
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--rule);
}
/* the underline draws in orange on focus */
.notify__row::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 1px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease);
}
.notify__row:focus-within::after { transform: scaleX(1); }

.notify__input {
  flex: 1;
  min-width: 0;
  padding: .95rem 0 .95rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ash);
  font: 300 1.0625rem/1.4 var(--sans);
  letter-spacing: .01em;
  -webkit-appearance: none;
  appearance: none;
}
.notify__input::placeholder { color: rgba(163, 152, 144, .62); }
.notify__input:focus { outline: none; }
.notify__input:-webkit-autofill {
  -webkit-text-fill-color: var(--ash);
  -webkit-box-shadow: 0 0 0 100px var(--espresso) inset;
  caret-color: var(--ash);
}

.notify__button {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  padding: 0 0 0 1.25rem;
  border: 0;
  background: none;
  color: var(--orange);
  font: 500 .8125rem/1 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  transition: color .3s var(--ease);
}
.notify__button svg {
  width: 1.5rem;
  height: .75rem;
  transition: transform .5s var(--ease);
}
.notify__button:hover svg,
.notify__button:focus-visible svg { transform: translateX(.35rem); }
.notify__button:focus-visible { outline-offset: 6px; }
.notify__button[disabled] { cursor: progress; color: var(--ash-muted); }

.notify__status {
  position: absolute;
  left: 0; right: 0; top: 100%;
  margin: .75rem 0 0;
  font-size: .875rem;
  color: var(--ash-muted);
}
.notify__status a { color: var(--ash); }
.notify.is-error .notify__status { color: #f3a76a; }
.notify.is-error .notify__row { border-bottom-color: #f3a76a; }

.notify.is-done .notify__row,
.notify.is-done .notify__label { display: none; }
.notify.is-done .notify__status {
  position: static;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  line-height: 1.3;
  color: var(--ash);
}
.notify.is-done .notify__status small {
  display: block;
  margin-top: .5rem;
  font: 300 .9375rem/1.5 var(--sans);
  color: var(--ash-muted);
}

/* --------------------------------------------------------------------------
   The mark — the logo icon drawn as dashed line, sealed by the orange diamond
   -------------------------------------------------------------------------- */

.mark {
  position: relative;
  z-index: 1;
  grid-column: 8 / 13;
  justify-self: end;
  width: min(100%, 60vh, 40rem);
  margin: 0;
  pointer-events: none;
}
.mark__svg { width: 100%; height: auto; overflow: visible; }

.shard {
  fill: none;
  stroke: var(--tan);
  stroke-width: 1.25;
  stroke-dasharray: 5 6;
  vector-effect: non-scaling-stroke;
  animation: march 90s linear infinite;
}
.seal { fill: var(--orange); }

@keyframes march { to { stroke-dashoffset: -660; } }

/* --------------------------------------------------------------------------
   Countdown — set like a ledger
   -------------------------------------------------------------------------- */

.countdown {
  position: relative;
  z-index: 2;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rule);
}

.countdown__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(1rem, 3vh, 2.25rem);
}

.countdown__title,
.countdown__date {
  margin: 0;
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--bronze);
}
.countdown__date { color: var(--ash-muted); letter-spacing: .16em; text-align: right; }

.countdown__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.unit {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 0 clamp(.75rem, 2vw, 2rem);
  border-left: 1px solid var(--rule);
}
.unit:first-child { padding-left: 0; border-left: 0; }

.unit__value {
  display: flex;
  font-family: var(--serif);
  font-size: clamp(3rem, min(10.5vw, 14.5vh), 10.5rem);
  line-height: .82;
  letter-spacing: 0;
  color: #ece6e1;
  font-variant-numeric: lining-nums tabular-nums;
}
/* every digit sits in a fixed cell, so the row never shifts as it ticks */
.digit {
  display: inline-block;
  width: .56em;
  text-align: center;
}
.digit:first-child { text-align: left; }

.unit__label {
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--ash-muted);
}

/* time already spent under seal, out of the 37 days */
.countdown__progress {
  position: relative;
  height: 1px;
  margin-top: clamp(1.25rem, 3.2vh, 2.5rem);
  background: var(--rule);
}
.countdown__progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--orange);
  transition: width 1s linear;
}

.countdown.is-live .countdown__grid { opacity: .35; }

/* Colophon ---------------------------------------------------------------- */

.colophon {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 2.4vh, 1.75rem) 0;
  font-size: .75rem;
  letter-spacing: .06em;
  color: var(--ash-muted);
}
.colophon p { margin: 0; }
.colophon a { text-decoration: none; transition: color .3s var(--ease); }
.colophon a:hover { color: var(--ash); }

/* --------------------------------------------------------------------------
   Entrance
   -------------------------------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(1.1rem);
  transition:
    opacity 1s var(--ease) calc(var(--d, 0) * 110ms + 250ms),
    transform 1.2s var(--ease) calc(var(--d, 0) * 110ms + 250ms);
}
.js .headline .reveal { transform: translateY(105%); opacity: 1; }
.js.is-ready .reveal { opacity: 1; transform: none; }

/* the four parts of the mark close in on the centre, then the seal lands */
.js .shard {
  opacity: 0;
  transition: transform 1.6s var(--ease) .35s, opacity 1.2s var(--ease) .35s;
}
.js .shard--top    { transform: translateY(-36px); }
.js .shard--bottom { transform: translateY(36px); }
.js .shard--left   { transform: translateX(-36px); }
.js .shard--right  { transform: translateX(36px); }
.js .seal {
  opacity: 0;
  transform: scale(.4);
  transform-origin: 708.6px 551.1px;
  transition: transform .9s cubic-bezier(.3, 1.4, .5, 1) 1.45s, opacity .4s ease 1.45s;
}
.js.is-ready .shard,
.js.is-ready .seal { opacity: 1; transform: none; }

.js .countdown,
.js .colophon,
.js .masthead {
  opacity: 0;
  transition: opacity 1.2s var(--ease) .15s;
}
.js .countdown { transition-delay: .7s; }
.js .colophon  { transition-delay: .9s; }
.js.is-ready .countdown,
.js.is-ready .colophon,
.js.is-ready .masthead { opacity: 1; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .hero__copy { grid-column: 1 / span 8; }
  .mark { grid-column: 9 / 13; }
}

@media (max-width: 900px) {
  .hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding-top: 0;
  }
  .mark {
    order: -1;
    align-self: flex-end;
    width: min(60vw, 22rem);
    margin: -.5rem calc(var(--pad) * -1 - 9vw) 1.25rem 0;
  }
  .headline { font-size: clamp(3rem, 13vw, 5.5rem); }
  .lede, .notify { max-width: 34rem; }
  .notify { margin-bottom: 2.5rem; }
}

@media (max-width: 560px) {
  .masthead__contact { font-size: .75rem; }
  .eyebrow { font-size: .6875rem; letter-spacing: .18em; }
  .countdown__head { flex-direction: column; gap: .35rem; }
  .countdown__date { text-align: left; }
  .unit { gap: .7rem; padding: 0 .6rem; }
  .unit__value { font-size: clamp(2.5rem, 14.5vw, 4.5rem); }
  .unit__label { font-size: .5625rem; letter-spacing: .18em; }
  .notify__row { flex-wrap: wrap; border-bottom: 0; }
  .notify__row::after { display: none; }
  .notify__input {
    flex-basis: 100%;
    border-bottom: 1px solid var(--rule);
    transition: border-color .4s var(--ease);
  }
  .notify__input:focus { border-bottom-color: var(--orange); }
  .notify.is-error .notify__input { border-bottom-color: #f3a76a; }
  .notify__button { padding: 1.15rem 0 .25rem; }
  .colophon { flex-direction: column; gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}
