/* Longwave showcase. Own token set: warm paper ground, deep teal accent. */
:root {
  --ground: #f6f3ec;
  --surface: #fffdf8;
  --ink: #1b1f1c;
  --ink-2: #3f4741;
  --ink-3: #5c645d;
  --line: #e6e0d4;
  --line-2: #d3cbbb;
  --accent: #0e6b55;
  --accent-deep: #0a5241;
  --accent-soft: #e3f0ea;

  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --container: 1152px;
  --gutter: 16px;
  --header: 64px;
  --section: clamp(64px, 9vw, 112px);
  --ease-settle: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
  :root {
    --gutter: 24px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header) + 16px);
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-2);
  font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  color: var(--ink);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 150ms ease;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  color: var(--ink);
}

.skip:focus {
  top: 12px;
}

/* ---------- Buttons */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: #fffdf8;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms ease;
}

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

.btn-ghost {
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease;
}

.btn-ghost:hover {
  background: var(--ground);
  color: var(--ink);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.text-link svg {
  transition: transform 150ms ease;
}

/* ---------- Brand, header, footer */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.wordmark {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header);
}

.header-nav {
  display: none;
  gap: 2px;
  margin-left: auto;
}

.header-cta {
  margin-left: auto;
}

@media (min-width: 860px) {
  .header-nav {
    display: flex;
  }
  .header-cta {
    margin-left: 8px;
  }
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  gap: 32px;
  padding-block: 48px 32px;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-brand p {
  margin-top: 14px;
  max-width: 34ch;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--ink);
}

.kicker,
.label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kicker {
  margin-bottom: 4px;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-block: 20px 32px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

/* ---------- Category marker (signature component) */

.marker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
  white-space: nowrap;
}

.marker::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--dot, var(--ink-3));
}

.meta {
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------- Sections */

.section {
  padding-block: var(--section);
}

.section--surface {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section-head {
  display: grid;
  align-content: start;
  gap: 14px;
  max-width: 640px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head h2 {
  font-size: clamp(26px, 2.2vw + 14px, 34px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-head p {
  font-size: 17px;
  max-width: 576px;
}

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

.hero {
  padding-block: clamp(32px, 4vw, 56px) clamp(56px, 8vw, 104px);
}

.hero-grid {
  display: grid;
  gap: clamp(40px, 5vw, 64px);
  align-items: start;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
  }
}

.hero-copy {
  display: grid;
  gap: 22px;
  max-width: 560px;
}

.hero h1 {
  font-size: clamp(32px, 2.6vw + 18px, 46px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
}

.dek {
  font-size: clamp(17px, 0.4vw + 15px, 19px);
  line-height: 1.6;
  color: var(--ink-2);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-3);
}

.hero-facts strong {
  color: var(--ink);
  font-weight: 600;
}

/* The issue as it lands: a letter sheet rendered in HTML */
.letter {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.letter-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.45;
}

.letter-head dt {
  color: var(--ink-3);
}

.letter-head dd {
  color: var(--ink);
  min-width: 0;
}

.letter-head .from {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.letter-body {
  padding: 22px;
}

.letter-lead {
  display: grid;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.letter-lead .title {
  color: var(--ink);
  font-size: clamp(19px, 0.6vw + 15px, 22px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.letter-lead p {
  font-size: 14.5px;
  line-height: 1.6;
}

.letter-list li {
  display: grid;
  gap: 5px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
}

.letter-list li:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.letter-list .title {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.letter-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 22px;
  background: var(--ground);
  border-top: 1px solid var(--line);
}

.letter-foot .text-link:hover svg {
  transform: translateX(2px);
}

@media (min-width: 640px) {
  .letter-head,
  .letter-body,
  .letter-foot {
    padding-inline: 28px;
  }
}

/* Settle-in: the hero letter is the page's one authored motion. */
@keyframes settle {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.settle {
  animation: settle 640ms var(--ease-settle) both;
}

.settle-late {
  animation-delay: 120ms;
}

/* ---------- How it works */

.how-grid {
  display: grid;
  gap: 48px;
}

@media (min-width: 1024px) {
  .how-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 64px;
  }
  .how-grid .section-head {
    margin-bottom: 0;
    position: sticky;
    top: calc(var(--header) + 32px);
    align-self: start;
  }
}

.stages {
  counter-reset: stage;
}

.stage {
  display: grid;
  gap: 10px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
}

.stage:first-child {
  padding-top: 0;
  border-top: 0;
}

@media (min-width: 640px) {
  .stage {
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 24px;
  }
}

.stage h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.stage-body {
  display: grid;
  gap: 18px;
  max-width: 576px;
}

.languages {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}

@media (min-width: 520px) {
  .languages {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .languages {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.languages li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.languages .code {
  width: 2ch;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---------- Coverage */

.coverage-list {
  display: grid;
  column-gap: 40px;
}

@media (min-width: 720px) {
  .coverage-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .coverage-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.coverage-list li {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-block: 22px 26px;
  border-top: 1px solid var(--line-2);
}

.coverage-list p {
  font-size: 15px;
  line-height: 1.6;
  max-width: 44ch;
}

/* ---------- Sample issue */

.sample-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 16px 32px;
  margin-bottom: clamp(32px, 4vw, 44px);
}

.sample-head .section-head {
  margin-bottom: 0;
}

.illustrative {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 40ch;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-3);
}

.illustrative::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--ink-3);
}

.sheet {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  overflow: hidden;
}

.sheet-mast {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--ground);
}

.sheet-mast .brand .wordmark {
  font-size: 16px;
}

.sheet-grid {
  display: grid;
  grid-template-areas: 'lead' 'register' 'notes';
}

.sheet-lead {
  grid-area: lead;
}

.register {
  grid-area: register;
}

.anatomy-wrap {
  grid-area: notes;
  display: grid;
  gap: 16px;
  padding: 22px;
  border-top: 1px solid var(--line);
  background: var(--ground);
}

@media (min-width: 1024px) {
  .sheet-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    grid-template-areas: 'lead register' 'notes register';
    grid-template-rows: auto 1fr;
  }
  .sheet-lead,
  .anatomy-wrap {
    border-right: 1px solid var(--line);
  }
  .anatomy-wrap {
    align-self: end;
  }
}

.sheet-lead {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 26px 22px;
}

.sheet-lead h3 {
  font-size: clamp(24px, 1.6vw + 14px, 32px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.sheet-lead .cover {
  aspect-ratio: 2 / 1;
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  margin-block: 6px;
}

.sheet-lead p {
  font-size: 16px;
  max-width: 576px;
}

.register article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px 16px;
  padding: 20px 22px;
  border-top: 1px solid var(--line);
}

@media (min-width: 1024px) {
  .register article:first-child {
    border-top: 0;
  }
}

.register .text {
  display: grid;
  align-content: start;
  gap: 8px;
}

.register h3 {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.register p {
  font-size: 14px;
  line-height: 1.55;
}

.register .thumb {
  width: 72px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

@media (min-width: 640px) {
  .sheet-lead,
  .register article,
  .sheet-mast,
  .anatomy-wrap {
    padding-inline: 28px;
  }
  .register article {
    grid-template-columns: minmax(0, 1fr) 112px;
  }
  .register .thumb {
    width: 112px;
  }
}

.anatomy {
  display: grid;
  gap: 16px 28px;
}

@media (min-width: 760px) {
  .anatomy {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.anatomy div {
  display: grid;
  align-content: start;
  gap: 4px;
}

.anatomy dt {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.anatomy dd {
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Plan */

.plan-grid {
  display: grid;
  gap: 40px;
  align-items: start;
}

@media (min-width: 960px) {
  .plan-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    gap: 64px;
  }
}

.plan-grid .section-head {
  margin-bottom: 0;
}

.plan-card {
  display: grid;
  gap: 22px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
}

@media (min-width: 640px) {
  .plan-card {
    padding: 32px;
  }
}

.plan-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.price .amount {
  color: var(--ink);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
}

.price .period {
  color: var(--ink-3);
  font-size: 16px;
  font-weight: 500;
}

.includes {
  display: grid;
  gap: 12px;
}

.includes li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

.includes svg {
  margin-top: 3px;
  color: var(--ink);
}

.plan-note {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--ink-3);
}

/* ---------- FAQ */

.faq {
  border-top: 1px solid var(--line);
}

.faq-grid {
  display: grid;
  gap: 32px;
}

@media (min-width: 960px) {
  .faq-grid {
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: 64px;
  }
  .faq-grid .section-head {
    margin-bottom: 0;
  }
}

.faq-list details {
  border-bottom: 1px solid var(--line-2);
}

.faq-list details:first-child {
  border-top: 1px solid var(--line-2);
}

.faq-list summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-block: 18px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  transition: color 150ms ease;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary:hover {
  color: var(--accent);
}

.faq-list summary svg {
  flex: none;
  color: var(--ink-3);
  transition: transform 150ms ease;
}

.faq-list details[open] summary svg {
  transform: rotate(180deg);
}

.faq-list .answer {
  padding-bottom: 20px;
  max-width: 576px;
  font-size: 15.5px;
}

/* ---------- Plain pages (legal, 404) */

.page {
  padding-block: clamp(48px, 7vw, 88px) clamp(64px, 9vw, 112px);
}

.prose {
  max-width: 576px;
}

.prose h1 {
  font-size: clamp(30px, 2vw + 18px, 40px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.prose .meta {
  margin-bottom: 32px;
}

.prose h2 {
  margin-top: 36px;
  margin-bottom: 10px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.prose p + p,
.prose p + ul,
.prose ul + p {
  margin-top: 12px;
}

.prose ul {
  display: grid;
  gap: 8px;
  padding-left: 0;
}

.prose li {
  position: relative;
  padding-left: 18px;
}

.prose li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--line-2);
}

.notfound {
  display: grid;
  gap: 18px;
  max-width: 576px;
}

.notfound h1 {
  font-size: clamp(30px, 2vw + 18px, 40px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}


/* ---------- Motion preferences */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .settle {
    animation: none;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
