/*
 * graphein.app coming-soon sheet. Tokens, type and controls copied from the
 * main site (apps/web/app/globals.css): chart paper in light, night chart in
 * dark, following the OS setting. No scripts, no storage.
 */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/Archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("/fonts/Archivo-Italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/InstrumentSans-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f6f7f4;
  --ink: #132b3e;
  --text: #17242f;
  --text-muted: #4a5a68;
  --ocean: #22597f;
  --ocean-hover: #1d4f72;
  --on-ocean: #ffffff;
  --north: #cf6f1e;
  --contour: rgba(34, 89, 127, 0.16);
  --contour-major: rgba(34, 89, 127, 0.32);
  --rule: rgba(19, 43, 62, 0.12);
  --rule-strong: rgba(19, 43, 62, 0.24);
  --halo: rgba(246, 247, 244, 0.92);
  --focus: #3a7db0;
  --selected: rgba(34, 89, 127, 0.16);

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  --ease-lens: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0b1824;
    --ink: #f3ecdd;
    --text: #e6eef4;
    --text-muted: #9fb2c2;
    --ocean: #8cc3ea;
    --ocean-hover: #a9d4f1;
    --on-ocean: #0b1824;
    --north: #f3a83e;
    --contour: rgba(210, 238, 248, 0.1);
    --contour-major: rgba(210, 238, 248, 0.22);
    --rule: rgba(255, 255, 255, 0.08);
    --rule-strong: rgba(255, 255, 255, 0.18);
    --halo: rgba(11, 24, 36, 0.88);
    --focus: #8cc3ea;
    --selected: rgba(140, 195, 234, 0.22);
  }
}

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

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

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background-color: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background-color: var(--selected);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Map furniture ---------- */

/* Fixed behind the page, bled past the edges so the field's closing segments stay out of view. */
.terrain {
  position: fixed;
  top: -16px;
  left: -16px;
  width: calc(100% + 32px);
  height: calc(100% + 32px);
  opacity: 0.8;
  pointer-events: none;
}
.terrain path {
  vector-effect: non-scaling-stroke;
  stroke: var(--contour);
  stroke-width: 0.8;
}
.terrain path.major {
  stroke: var(--contour-major);
  stroke-width: 1.1;
}

/* The sheet's border runs round the whole document, so it never crosses content on scroll. */
.neatline {
  position: absolute;
  inset: 12px;
  border: 1px solid var(--rule-strong);
  pointer-events: none;
}
.corner {
  position: absolute;
  padding: 0 0.5rem;
  background: var(--paper);
}
.corner-tl {
  top: -0.55rem;
  left: 1.25rem;
}
.corner-br {
  bottom: -0.55rem;
  right: 1.25rem;
}

.coord {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.6875rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

/* ---------- Sheet layout ---------- */

.sheet {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 2.25rem;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 72rem;
  margin: 0 auto;
  padding: 2.75rem 2rem 3.25rem;
}

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--ink);
  text-decoration: none;
}
.logo svg {
  color: var(--ocean);
}
.wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  font-stretch: 72%;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.content {
  align-self: center;
  max-width: 42rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ocean);
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-stretch: 82%;
  font-weight: 600;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}

.lede {
  margin: 1.75rem 0 0;
  font-size: 1.1875rem;
  line-height: 1.55;
  max-width: 38rem;
  text-wrap: pretty;
}
.lede-2 {
  margin: 1rem 0 0;
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 38rem;
}

.availability {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.25rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule-strong);
  font-family: var(--font-display);
  font-stretch: 68%;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}
/* The north kite from the brand glyph. */
.kite {
  flex: none;
  width: 0.625rem;
  height: 1.125rem;
  background: var(--north);
  clip-path: polygon(50% 0, 100% 100%, 50% 85%, 0 100%);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 1.75rem;
}
.action-note {
  margin: 0;
  max-width: 24rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 1.25rem;
  border-radius: 2px;
  border: 1px solid var(--ocean);
  background-color: var(--ocean);
  color: var(--on-ocean);
  font-family: var(--font-display);
  font-stretch: 72%;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 150ms var(--ease-lens), border-color 150ms var(--ease-lens);
}
.btn-primary:hover {
  background-color: var(--ocean-hover);
  border-color: var(--ocean-hover);
}

.link {
  color: var(--ocean);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.link:hover {
  color: var(--ocean-hover);
}

.brand-line {
  margin: 2.25rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-stretch: 90%;
  font-size: 1.125rem;
  color: var(--ink);
}

/* ---------- Imprint ---------- */

.title-block {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--rule-strong);
  background: var(--rule-strong);
}
.title-block > div {
  padding: 0.625rem 0.75rem;
  background: var(--paper);
}
.title-block dd {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--ink);
}

.notice {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-muted);
}

/* ---------- Small screens ---------- */

@media (max-width: 47.99rem) {
  .sheet {
    gap: 2.5rem;
    padding: 2.25rem 1.5rem 3rem;
  }
  .title-block {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lede {
    font-size: 1.0625rem;
  }
}

@media (max-width: 24rem) {
  .title-block {
    grid-template-columns: minmax(0, 1fr);
  }
  .masthead .coord {
    display: none;
  }
}

/* ---------- Motion: one rise on load, none when reduced ---------- */

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.content > * {
  animation: rise-in 600ms var(--ease-lens) both;
}
.content > :nth-child(2) { animation-delay: 60ms; }
.content > :nth-child(3) { animation-delay: 120ms; }
.content > :nth-child(4) { animation-delay: 160ms; }
.content > :nth-child(n + 5) { animation-delay: 220ms; }

@media (prefers-reduced-motion: reduce) {
  .content > * {
    animation: none;
  }
  .btn-primary {
    transition: none;
  }
}

@media print {
  .terrain,
  .neatline {
    display: none;
  }
}
