/*
 * Coming Soon page. Same identity as the site (src/styles/tokens.css):
 * palette, self-hosted Instrument Sans, condensed display title, copper
 * kicker, night pill button, form field of the review form.
 */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("/fonts/instrument-sans-latin.woff2") format("woff2");
}

:root {
  color-scheme: only light;
  --ivory: #f4efe6;
  --paper: #fbf8f2;
  --deep: #112b3c;
  --night: #071b26;
  --copper: #b46a3c;
  --stone: #8a8178;
  --ink: #17242c;
  --line: rgba(17, 43, 60, 0.14);
  --line-strong: rgba(17, 43, 60, 0.3);
  --font: "Instrument Sans", Inter, system-ui, sans-serif;
  --condensed: 76%;
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --gutter: clamp(1.25rem, 0.6rem + 2.8vw, 3rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  min-width: 20rem;
  background: var(--ivory);
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--ivory);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.cs {
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  max-width: 80rem;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(1.75rem, 1rem + 2.5vw, 3.5rem) var(--gutter) clamp(2rem, 1rem + 3vw, 4rem);
}

.cs__brand img {
  display: block;
  width: clamp(9.5rem, 7rem + 6vw, 13rem);
  height: auto;
}

.cs__statement {
  align-self: end;
  padding-top: 2.5rem;
  container-type: inline-size;
}

.cs__rule {
  display: block;
  width: 3rem;
  height: 2px;
  margin-bottom: 1.5rem;
  background: var(--copper);
}

/* The title fills the width of the page ("Coming Soon" measures about 4.6em
   in this cut), without growing taller than about a third of the window. */
h1 {
  margin: 0 0 0 -0.04em;
  color: var(--deep);
  font-size: min(100cqi / 4.75, 36svh);
  font-stretch: var(--condensed);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -0.012em;
  white-space: nowrap;
}

/* Phones and narrow windows: one word per line, "Coming" fills the width. */
@media (max-width: 47.99rem) {
  h1 {
    font-size: min(100cqi / 2.8, 28svh);
  }

  h1 span {
    display: block;
  }
}

/* Private preview access ---------------------------------------------------- */
.cs-access {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.cs-access__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: var(--stone);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.cs-access__kicker::before {
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  content: "";
}

.cs-access__row {
  display: flex;
  gap: 0.6rem;
  width: 100%;
  max-width: 22rem;
}

/* 17px text: iOS does not zoom into a focused field. */
.cs-access__input {
  flex: 1 1 0;
  min-width: 0;
  min-height: 3rem;
  padding: 0 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  font: inherit;
  font-size: 1.0625rem;
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.cs-access__input:focus {
  outline: none;
  border-color: var(--copper);
  box-shadow: 0 0 0 3px rgba(180, 106, 60, 0.2);
}

.cs-access__input[aria-invalid="true"] {
  border-color: var(--copper);
  box-shadow: inset 0 0 0 1px var(--copper);
}

.cs-access__button {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  color: var(--paper);
  background: var(--night);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.5s var(--ease-out), background-color 0.5s var(--ease-out), scale 0.25s var(--ease-out);
}

.cs-access__button svg {
  transition: transform 0.5s var(--ease-out);
}

.cs-access__button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(180, 106, 60, 0.45);
}

@media (hover: hover) {
  .cs-access__button:hover {
    color: var(--night);
    background: var(--copper);
  }

  .cs-access__button:hover svg {
    transform: translateX(0.2rem);
  }
}

@media (hover: none) {
  .cs-access__button:active {
    color: var(--night);
    background: var(--copper);
    scale: 0.95;
  }
}

.cs-access__error {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: var(--ink);
  font-size: var(--t-sm);
}

.cs-access__error[hidden] {
  display: none;
}

.cs-access__error::before {
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  background: var(--copper);
  border-radius: 50%;
  content: "";
}

.cs-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Wider screens: kicker on the left, field on the right of the same line. */
@media (min-width: 48rem) {
  .cs-access {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 2rem;
  }

  .cs-access__row {
    width: 22rem;
  }

  .cs-access__error {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .cs__brand,
  .cs__statement,
  .cs-access {
    animation: cs-reveal 0.9s var(--ease-out) both;
  }

  .cs__statement {
    animation-delay: 0.12s;
  }

  .cs-access {
    animation-delay: 0.24s;
  }

  @keyframes cs-reveal {
    from {
      opacity: 0;
      transform: translateY(0.75rem);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }
}
