/* Tokens: HANDOFF.md, Direction C */

:root {
  --bg: #F4F1EA;
  --sand: #E8E2D6;
  --ink: #1B211F;
  --ink-2: #46504D;
  --muted: #5F6865;
  --line: #DDD8CD;
  --line-soft: #EEEAE1;
  --accent: #1F4E4A;
  --accent-deep: #1F3A37;
  --sage: #C9D3C4;
  --mist: #D9E0D6;
  --on-dark: #DCE2DD;

  --serif: 'Instrument Serif', serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

/* Base */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
  color: var(--ink-2);
  line-height: 1.65;
}

/* Instrument Serif has weight 400 only. Emphasis is italic, never bold. */
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
}

h1 {
  font-size: 84px;
  line-height: 0.98;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 52px;
  line-height: 1.02;
}

h3 {
  font-size: 30px;
}

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

.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding-inline: 32px;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--sage);
}

main {
  flex: 1;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary:hover {
  background: var(--accent-deep);
}

.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg);
}

.btn-secondary {
  border: 1px solid var(--ink);
  color: var(--ink);
}

.btn-small {
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
}

.btn-large {
  min-height: 52px;
  padding: 0 30px;
}

/* Header */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(244, 241, 234, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo img {
  width: auto;
  height: 56px;
}

.wordmark {
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-size: 36px;
  line-height: 1;
}

.wordmark small {
  margin-top: 5px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.34em;
}

.logo-large {
  gap: 18px;
  margin-bottom: 14px;
  text-align: left;
}

.logo-large img {
  height: 104px;
}

.logo-large .wordmark {
  font-size: 56px;
}

.logo-large small {
  margin-top: 8px;
  font-size: 15px;
}

/* Sub pages (pilot, contact) */

.page-head {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 104px;
  padding-bottom: 88px;
}

.page-head .lead {
  max-width: 620px;
}

.navlinks {
  display: flex;
  gap: 32px;
  font-size: 14px;
  color: var(--ink-2);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language switch: two links in one pill. The current page is the filled one. */
.lang {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
}

.lang a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--ink-2);
  transition: background-color 0.2s, color 0.2s;
}

.lang a:hover {
  color: var(--accent);
}

.lang a[aria-current] {
  background: var(--ink);
  color: var(--bg);
}

.navlinks a {
  white-space: nowrap;
  transition: color 0.2s;
}

.navlinks a:hover {
  color: var(--accent);
}

/* Hero */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 64px;
  padding-top: 88px;
  padding-bottom: 104px;
}

.hero-copy {
  flex: 1 1 440px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.lead {
  max-width: 520px;
  font-size: 19px;
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-mock {
  flex: 1.4 1 520px;
  min-width: 0;
  position: relative;
}

.blob {
  position: absolute;
  top: -44px;
  right: -24px;
  width: 94%;
  height: auto;
  fill: var(--mist);
}

/* Screenshots */

.shot {
  position: relative;
  margin: 0;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
}

.browser,
.phone {
  overflow: hidden;
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(27, 33, 31, 0.04), 0 16px 40px rgba(27, 33, 31, 0.07);
}

.browser {
  border-radius: 14px;
}

/* Window bar with three dots: one gradient for each dot, no extra markup. */
.browser::before {
  content: "";
  display: block;
  height: 30px;
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 18px 50%, var(--line) 4px, transparent 5px),
    radial-gradient(circle at 34px 50%, var(--line) 4px, transparent 5px),
    radial-gradient(circle at 50px 50%, var(--line) 4px, transparent 5px);
}

.phone {
  width: 280px;
  max-width: 100%;
  border-radius: 28px;
  border-width: 6px;
  border-color: var(--ink);
}

/* Problem */

.problem {
  padding-bottom: 104px;
}

.card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding: 56px;
  background: var(--sand);
  border-radius: 20px;
}

.card-art {
  flex: 1 1 300px;
  min-width: 0;
  display: flex;
  justify-content: center;
}

.art-fill {
  fill: var(--sage);
  stroke: none;
}

.card-copy {
  flex: 1.4 1 420px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card-copy p {
  font-size: 17px;
}

/* How it works */

.how {
  display: flex;
  flex-direction: column;
  gap: 96px;
  padding-bottom: 112px;
}

.how h2 {
  max-width: 720px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 40px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
}

.step p {
  font-size: 16px;
}

/* Product tour */

.tour-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 64px;
}

.tour-row .shot {
  flex: 0 1 280px;
  margin-inline: auto;
}

.tour-row-flip .shot {
  order: 1;
}

.tour-copy {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--ink);
}

.tour-copy p {
  font-size: 17px;
}

.tour-wide {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.tour-wide .tour-copy {
  flex: none;
  max-width: 720px;
}

/* The record */

.record {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-bottom: 112px;
}

/* Who it's for (dark section) */

.who {
  background: var(--accent-deep);
  color: var(--bg);
}

.who-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  padding-top: 104px;
  padding-bottom: 104px;
}

.who-title {
  flex: 1 1 320px;
  min-width: 0;
}

.who h2 {
  font-size: 56px;
}

.who-list {
  flex: 1 1 360px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.audience {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(244, 241, 234, 0.22);
}

.audience:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.audience p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--on-dark);
}

/* Pilot CTA */

.pilot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding-top: 120px;
  padding-bottom: 120px;
  text-align: center;
}

.pilot h2 {
  max-width: 820px;
  font-size: 64px;
}

/* Footer */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Motion: blocks fade in when they enter the viewport. CSS only.
   A browser without scroll-driven animations shows the blocks with no motion. */

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn {
    transition: none;
  }
}

/* Mobile */

@media (max-width: 720px) {
  .wrap {
    padding-inline: 16px;
  }

  h1 {
    font-size: 54px;
  }

  h2,
  .who h2,
  .pilot h2 {
    font-size: 40px;
  }

  .navlinks {
    display: none;
  }

  /* Logo, language switch and button must fit in 328px. */
  .site-header {
    gap: 12px;
  }

  .site-header .logo {
    gap: 10px;
  }

  .site-header .logo img {
    height: 52px;
  }

  .site-header .wordmark {
    font-size: 28px;
  }

  .site-header .wordmark small {
    margin-top: 4px;
    font-size: 9px;
    letter-spacing: 0.22em;
  }

  .page-head {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .header-actions {
    gap: 8px;
  }

  .lang a {
    padding: 0 8px;
  }

  .btn-small {
    padding: 0 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .card {
    padding: 28px;
  }

  .how {
    gap: 72px;
  }

  .tour-row {
    gap: 32px;
  }

  /* On a phone the screenshot always comes before its text. */
  .tour-row-flip .shot {
    order: 0;
  }

  /* The blob must not go past the 16px gutter, or the page scrolls sideways. */
  .blob {
    right: -16px;
  }
}

/* Tablet: logo, three links, language switch and button do not fit in one row. The links go first. */
@media (max-width: 960px) {
  .navlinks {
    display: none;
  }
}

/* Very small phones (320px): the header shows the mark without the name, or the button goes past the edge. */
@media (max-width: 359px) {
  .site-header .wordmark {
    display: none;
  }
}
