/* Harbor landing page. Warm paper, ink, and a tan-to-ember accent. */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --paper: #fbf7ef;
  --paper-deep: #f3ecdf;
  --ink: #221b17;
  --ink-soft: #4a403a;
  --muted: #7b6f66;
  --line: #e6dccb;
  --tan: #c99a6b;
  --ember: #e2642a;
  --ember-deep: #3a1408;
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 100px);
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  z-index: 50;
}
.skip:focus {
  left: 8px;
}

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

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

/* Navigation ---------------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.logo {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.05em;
  line-height: 1;
  text-decoration: none;
}
.logo.small {
  font-size: 22px;
}

.links {
  display: flex;
  gap: 32px;
  flex: 1;
}
.links a,
.signin {
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  color: var(--ink-soft);
}
.links a:hover,
.signin:hover {
  color: var(--ink);
}

.actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.button:hover {
  transform: translateY(-1px);
}
.button.dark {
  background: var(--ink);
  color: var(--paper);
}
.button.dark:hover {
  background: #000;
}
.button.light {
  background: var(--paper);
  color: var(--ink);
}
.button.ghost {
  color: var(--paper);
  border: 1px solid color-mix(in srgb, var(--paper) 50%, transparent);
}

.menu {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px 6px;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-between;
}
.menu span {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
}

.sheet {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  padding: 8px var(--gutter) 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.sheet[hidden] {
  display: none;
}
.sheet a {
  padding: 12px 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  text-decoration: none;
}

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

.hero {
  padding: clamp(36px, 7vw, 80px) var(--gutter) 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0;
  font-variation-settings: 'opsz' 144;
}

h1 {
  font-size: clamp(54px, 9.4vw, 140px);
  max-width: 14ch;
}
@media (min-width: 1100px) {
  h1 {
    max-width: none;
    white-space: nowrap;
  }
}

/* The glowing words: ember fading into ink, with a soft, defocused halo. */
.glow {
  position: relative;
  display: inline-block;
  background: linear-gradient(100deg, var(--ember) 0%, #a8381a 28%, var(--ember-deep) 62%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 0.06em rgba(226, 100, 42, 0.55))
    drop-shadow(0 0 0.18em rgba(226, 100, 42, 0.28));
}
.glow.soft {
  filter: drop-shadow(0 0 0.08em rgba(226, 100, 42, 0.35));
}

.stage {
  position: relative;
  margin-top: clamp(24px, 3vw, 36px);
  aspect-ratio: 16 / 9;
  min-height: 420px;
  max-height: 78vh;
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
  background: #3a2418;
}
.stage .still,
.stage .live {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stage .live {
  opacity: 0;
  transition: opacity 1.2s ease;
}
.stage .live.on {
  opacity: 1;
}

.ask {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -30%);
  width: min(800px, calc(100% - 48px));
  min-height: 132px;
  padding: 22px 26px 66px;
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.6) inset,
    0 24px 60px -20px rgba(30, 12, 4, 0.55);
}
.ask input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink);
}
.ask input::placeholder {
  color: #9a8f86;
}
.answer {
  margin: 10px 0 0;
  min-height: 1.6em;
  font-size: 15px;
  color: var(--muted);
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}
.answer.on {
  opacity: 1;
  transform: none;
}
.answer b {
  color: var(--ink);
  font-weight: 600;
}
.go {
  position: absolute;
  right: 18px;
  bottom: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  box-shadow: -2px 2px 0 var(--ember);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.go svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--paper);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lede {
  max-width: 38ch;
  margin: clamp(28px, 4vw, 48px) 0 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink-soft);
}

/* Definition -------------------------------------------------------------------------------- */

.definition {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  padding: clamp(72px, 10vw, 140px) var(--gutter);
}
.kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tan);
}
.entry h2 {
  font-size: clamp(64px, 10vw, 150px);
  letter-spacing: -0.045em;
}
.say {
  margin: 10px 0 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  color: var(--muted);
}
.entry ol {
  margin: 0;
  padding: 0 0 0 1.4em;
  display: grid;
  gap: 18px;
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.38;
}
.entry li::marker {
  color: var(--tan);
  font-weight: 700;
}
.pos {
  font-style: italic;
  color: var(--muted);
  margin-right: 0.3em;
}
.entry em {
  display: block;
  margin-top: 10px;
  color: var(--ember);
}
.plate {
  margin: 0;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}
.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Features ---------------------------------------------------------------------------------- */

.features {
  padding: clamp(64px, 9vw, 120px) var(--gutter);
  background: var(--paper-deep);
}
.features > h2 {
  font-size: clamp(44px, 6.4vw, 96px);
  max-width: 12ch;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.row {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 5vw, 80px);
  align-items: center;
  padding: clamp(24px, 3vw, 40px) 0;
}
.row.flip img {
  order: 2;
}
.row img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}
.row h3 {
  font-size: clamp(32px, 3.6vw, 52px);
  margin-bottom: 18px;
}
.row p:not(.kicker),
.grid p,
.scanning p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 46ch;
}
.grid {
  list-style: none;
  margin: clamp(48px, 7vw, 96px) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.grid li {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--line);
}
.grid h3 {
  font-size: 28px;
  margin-bottom: 12px;
}

/* Scanning ---------------------------------------------------------------------------------- */

.scanning {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(72px, 10vw, 140px) var(--gutter);
}
.scanning h2 {
  font-size: clamp(44px, 6vw, 88px);
  margin-bottom: 22px;
}
.facts {
  margin: 0;
  display: grid;
  gap: 0;
  align-content: center;
}
.facts div {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.facts div:last-child {
  border-bottom: 1px solid var(--line);
}
.facts dt {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.facts dd {
  margin: 4px 0 0;
  color: var(--muted);
}

/* Closing band ------------------------------------------------------------------------------ */

.band {
  position: relative;
  margin: 0 var(--gutter) clamp(48px, 7vw, 96px);
  min-height: 480px;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  background: #2d1b12;
}
.band .still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.band-copy {
  position: relative;
  padding: 48px 24px;
  color: var(--paper);
}
.band h2 {
  font-size: clamp(42px, 6.5vw, 100px);
  max-width: 14ch;
  margin: 0 auto 30px;
  text-shadow: 0 2px 40px rgba(20, 8, 2, 0.5);
}
.band-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer ------------------------------------------------------------------------------------ */

.footer {
  display: flex;
  align-items: baseline;
  gap: 24px;
  flex-wrap: wrap;
  padding: 0 var(--gutter) 48px;
  color: var(--muted);
  font-size: 15px;
}
.footer p {
  margin: 0;
}
.footer .fine {
  margin-left: auto;
}

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

@media (max-width: 860px) {
  .links,
  .signin {
    display: none;
  }
  .menu {
    display: flex;
  }
  .nav {
    gap: 16px;
  }
  .definition,
  .row,
  .scanning {
    grid-template-columns: 1fr;
  }
  .row.flip img {
    order: 0;
  }
  .plate {
    aspect-ratio: 4 / 3;
  }
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }
  .logo {
    font-size: 27px;
  }
  .button {
    padding: 11px 14px;
  }
  .stage {
    aspect-ratio: 3 / 4;
    min-height: 0;
  }
  .ask {
    top: 32%;
    width: calc(100% - 40px);
    padding: 18px 20px 62px;
  }
  .footer .fine {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .button,
  .answer,
  .stage .live {
    transition: none;
  }
}
