/* Fairtide Standards — getfairtide.com
   One stylesheet for every page. Values follow the design spec
   (Spec 1 Foundations, Spec 2 Components). Phone values apply at 720 px and below. */

/* ---------- Fonts (self-hosted, SIL OFL 1.1; licenses beside the files) ---------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter/Inter-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter/Inter-Italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter/Inter-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/manrope/Manrope-SemiBold.woff2") format("woff2");
}

/* ---------- Tokens ---------- */
:root {
  --plum: #8E2360;
  --teal: #1F756D;
  --paper: #F4F3EF;
  --ink: #1A1A1F;
  --graphite: #4B4B52;
  --white: #FFFFFF;
  --stone: #DDDAD1;
  --field: #8A8880;
  --error: #A1260D;
  --scrim: rgba(26, 26, 31, 0.6);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;

  --pad-section: 60px;
  --gutter: 24px;
  --gap-section: 48px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 28px;
}
h1, h2, h3, h4, p, ul, ol, figure, fieldset, legend { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
strong { font-weight: 600; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -100px;
  z-index: 10;
  padding: 12px 16px;
  background: var(--white);
  color: var(--plum);
  font-weight: 600;
  border-radius: 8px;
}
.skip-link:focus { top: 16px; }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: 20px; padding-right: 20px; box-sizing: content-box; }

/* ---------- Type styles ---------- */
.eyebrow {
  font-size: 14px; line-height: 20px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--plum);
}
.eyebrow--ink { color: var(--ink); }
.headline {
  font-family: var(--display); font-weight: 600;
  font-size: 56px; line-height: 64px; letter-spacing: -0.01em;
  text-wrap: balance;
}
.headline span { display: block; }
.h-section {
  font-family: var(--display); font-weight: 600;
  font-size: 36px; line-height: 44px; letter-spacing: -0.01em;
  text-wrap: balance; max-width: 996px;
}
.h-block {
  font-family: var(--display); font-weight: 600;
  font-size: 24px; line-height: 32px;
  text-wrap: balance;
}
.h-card { font-size: 18px; line-height: 26px; font-weight: 600; }
.lead { font-size: 20px; line-height: 30px; max-width: 792px; }
.body { font-size: 18px; line-height: 28px; }
.measure { max-width: 792px; }
.measure-wide { max-width: 894px; }
.quiet { font-size: 14px; line-height: 20px; color: var(--graphite); }
.graphite { color: var(--graphite); }
.tagline {
  font-family: var(--display); font-weight: 600;
  font-size: 20px; line-height: 30px; color: var(--teal);
}
.figure-line {
  font-family: var(--display); font-weight: 600;
  font-size: 40px; line-height: 48px;
  min-height: 48px; display: flex; align-items: flex-end;
  text-wrap: balance;
}
.fn-ref {
  font-size: 13px; line-height: 0; font-weight: 600; font-style: normal;
  position: relative; top: -0.5em; vertical-align: baseline;
}
.stack { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-48 { gap: 48px; } .gap-72 { gap: 72px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 0 24px;
  border-radius: 8px; border: 1.5px solid var(--plum);
  font-family: var(--sans); font-size: 16px; line-height: 24px; font-weight: 600;
  white-space: nowrap; cursor: pointer; text-decoration: none;
}
.btn--main { background: var(--plum); color: var(--white); }
.btn--main:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--white); }
.btn--main:active { background: var(--ink); border-color: var(--ink); }
.btn--second { background: transparent; color: var(--plum); }
.btn--second:hover { text-decoration: underline; text-underline-offset: 3px; border-width: 2.5px; padding: 0 23px; }
.btn--second:active { background: var(--plum); color: var(--white); }
.btn[aria-disabled="true"] { cursor: progress; }
.btn-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--stone); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 16px; padding-bottom: 16px;
}
.site-header__logo { display: block; flex: none; }
.site-header__logo img { width: 243px; height: auto; }
.site-header__right { display: flex; align-items: center; gap: 32px; }
.site-nav { display: flex; gap: 28px; font-size: 16px; line-height: 24px; }

/* ---------- Sections ---------- */
.section { padding-top: var(--pad-section); padding-bottom: var(--pad-section); }
.section__body { display: flex; flex-direction: column; gap: var(--gap-section); }
.rule { height: 32px; display: flex; align-items: flex-end; }
.rule::before {
  content: ""; display: block; width: 100%; height: 1.5px;
  background: var(--teal);
  transform: rotate(-1.5deg); transform-origin: left bottom;
}
.hero__body { gap: 72px; }
.hero__top { gap: 48px; }
.hero__text { gap: 32px; }
.hero__head { gap: 24px; }
.hero__lede { gap: 16px; }
.hero__actions { gap: 24px; }
.hero__note { font-size: 16px; line-height: 24px; color: var(--graphite); }
.hero__foot { display: flex; gap: 24px; align-items: flex-end; }
.hero__foot .tagline { flex: none; white-space: nowrap; }
.hero__foot .rule { flex: 1; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 48px; align-items: start; }
.grid--stretch { align-items: stretch; }
.span-3 { grid-column: span 3; } .span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; } .span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.grid > * { min-width: 0; }

.card {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  padding: 24px; background: var(--white);
  border: 1px solid var(--stone); border-radius: 12px;
}
.panel {
  padding: 48px; background: var(--white);
  border: 1px solid var(--stone); border-radius: 12px;
}
.top-ruled { padding-top: 24px; border-top: 1px solid var(--ink); }

/* Steps (6.3) */
.step { display: flex; flex-direction: column; gap: 16px; }
.step .h-block { min-height: 64px; }

/* Numbered blocks (6.4) */
.block { display: flex; flex-direction: column; gap: 32px; }
.block__title { display: flex; gap: 16px; align-items: baseline; }
.block__num { color: var(--graphite); flex: none; }
.what-you-get { font-size: 20px; line-height: 30px; }

/* Dash list */
.dash { list-style: none; padding: 0; }
.dash li {
  display: flex; gap: 12px; padding: 12px 0;
  border-top: 1px solid var(--stone);
}
.dash li:last-child { border-bottom: 1px solid var(--stone); }
.dash li::before {
  content: ""; flex: none;
  width: 16px; height: 2px; margin: 13px 1px 0 1px;
  background: var(--teal);
}
.dash li > span { flex: 1; min-width: 0; }

/* Pull-out line */
.pullout { padding: 32px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }

/* Examiner block (6.6) */
.aside-rule { display: flex; flex-direction: column; justify-content: center; height: 100%; padding-left: 32px; border-left: 1.5px solid var(--ink); }
.aside-rule p { font-size: 24px; line-height: 32px; }

/* Tables (6.5, 6.7) */
.table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.table th, .table td { text-align: left; vertical-align: top; }
.table thead th, .table thead td {
  padding: 0 24px 12px 0; border-bottom: 1px solid var(--ink);
  font-size: 18px; line-height: 26px; font-weight: 600;
}
.table tbody th, .table tbody td { padding: 16px 24px 16px 0; border-bottom: 1px solid var(--stone); }
.table tbody th { font-size: 18px; line-height: 26px; font-weight: 600; }
.table tbody td { font-size: 18px; line-height: 28px; }
.table--ai col.c1 { width: 16%; } .table--ai col.c2, .table--ai col.c3 { width: 42%; }
.table--ai .never { border-left: 1.5px solid var(--ink); padding-left: 24px; }
.table--fits col.c1 { width: 26%; } .table--fits col.c2, .table--fits col.c3 { width: 37%; }

/* Who is behind it */
.owner-name { font-size: 18px; line-height: 26px; font-weight: 600; }

/* ---------- Plain pages (security, privacy, 404) ---------- */
.doc { padding-top: 60px; padding-bottom: 60px; }
.doc__inner { max-width: 792px; display: flex; flex-direction: column; gap: 48px; }
.doc h1 { font-family: var(--display); font-weight: 600; font-size: 36px; line-height: 44px; letter-spacing: -0.01em; text-wrap: balance; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--ink); }
.site-footer__inner { padding-top: 48px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 48px; }
.site-footer__logo { width: 216px; height: auto; }
.site-footer__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.site-footer__family { max-width: 690px; }
.footnotes { padding-top: 24px; border-top: 1px solid var(--stone); }
.footnotes ol { display: flex; flex-direction: column; gap: 12px; padding: 0 0 0 22px; }
.footnotes li { font-size: 13px; line-height: 20px; color: var(--graphite); }
.footnotes li:target { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }

/* ---------- Interest form dialog ---------- */
.form-dialog {
  position: fixed; inset: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 48px 0; border: 0;
  background: var(--scrim);
  overflow-y: auto; overscroll-behavior: contain;
  color: var(--ink);
}
.form-dialog::backdrop { background: transparent; }
.form-dialog:not([open]) { display: none; }
.form-panel {
  width: 560px; max-width: calc(100% - 40px); margin: 0 auto;
  background: var(--white); border-radius: 12px;
  font-size: 18px; line-height: 28px;
}
.form-panel__body { display: flex; flex-direction: column; gap: 24px; padding: 48px; }
.form-panel__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.form-title { font-family: var(--display); font-weight: 600; font-size: 24px; line-height: 32px; text-wrap: balance; }
.icon-btn {
  flex: none; width: 44px; height: 44px; margin: 0; padding: 0;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.icon-btn:hover { background: var(--paper); }
.icon { flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.msg {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; border: 2px solid var(--error); border-radius: 8px;
  background: var(--white); color: var(--error);
}
.msg .icon { margin-top: 4px; }
.msg__text { flex: 1; min-width: 0; }
.msg--summary .msg__text { font-weight: 600; }
.msg--failed { padding: 16px; }
.msg--failed .msg__text { color: var(--ink); }
.msg--failed strong { color: var(--error); }
.msg[hidden] { display: none; }

.fields { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field__label { display: block; font-size: 18px; line-height: 26px; }
.field__label strong { font-weight: 600; }
.field__input {
  display: block; width: 100%; height: 48px; padding: 0 16px;
  border: 1px solid var(--field); border-radius: 8px; background: var(--white);
  font-family: var(--sans); font-size: 17px; line-height: 24px; color: var(--ink);
}
textarea.field__input { height: auto; min-height: 120px; padding: 12px 16px; resize: vertical; field-sizing: content; }
.field__input[aria-invalid="true"] { border: 2px solid var(--error); padding-left: 15px; padding-right: 15px; }
textarea.field__input[aria-invalid="true"] { padding: 11px 15px; }
.field__help { font-size: 14px; line-height: 20px; color: var(--graphite); }
.field__error { display: flex; gap: 8px; align-items: flex-start; color: var(--error); }
.field__error[hidden] { display: none; }
.field__error .icon { margin-top: 2px; }
.field__error span { font-size: 14px; line-height: 20px; font-weight: 600; }

.choice { border: 0; padding: 0; min-width: 0; }
.choice legend { padding: 0; margin: 0 0 8px 0; font-size: 18px; line-height: 26px; font-weight: 600; }
.choice__options { display: flex; flex-direction: column; gap: 12px; }
.choice__option {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 12px 16px;
  border: 1px solid var(--field); border-radius: 8px; background: var(--white);
  font-size: 17px; line-height: 24px; cursor: pointer;
}
.choice__option input { accent-color: var(--plum); width: 20px; height: 20px; margin: 0; flex: none; }
.choice__option:has(input:checked) { border: 2px solid var(--plum); padding: 11px 15px; font-weight: 600; }
.choice__option:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.choice__option input:focus-visible { outline: none; }
.choice[aria-invalid="true"] .choice__option { border: 2px solid var(--error); padding: 11px 15px; }

.form-actions { display: flex; flex-direction: column; gap: 16px; }
.form-actions__row { display: flex; }

.trap { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.sent { display: flex; flex-direction: column; gap: 32px; padding: 48px; }
.sent__top { display: flex; justify-content: flex-end; }
.sent__body { display: flex; flex-direction: column; gap: 16px; }
.sent__title { font-family: var(--display); font-weight: 600; font-size: 36px; line-height: 44px; letter-spacing: -0.01em; text-wrap: balance; }
.sent[hidden], .form-panel__body[hidden] { display: none; }

/* ---------- Mid widths ---------- */
@media (max-width: 1080px) {
  .site-nav { display: none; }
  .span-3 { grid-column: span 6; }
}

/* ---------- Phone (390 drawings) ---------- */
@media (max-width: 720px) {
  :root { --pad-section: 36px; --gutter: 16px; --gap-section: 32px; }
  body { font-size: 17px; line-height: 26px; }

  .site-header__logo img { width: 189px; }
  .site-header__right { display: none; }

  .headline { font-size: 34px; line-height: 40px; }
  .h-section { font-size: 26px; line-height: 32px; }
  .h-block { font-size: 20px; line-height: 28px; }
  .h-card, .owner-name { font-size: 17px; line-height: 24px; }
  .lead, .what-you-get { font-size: 18px; line-height: 28px; }
  .body { font-size: 17px; line-height: 26px; }
  .tagline { font-size: 18px; line-height: 28px; }
  .hero__lede .graphite { font-size: 17px; line-height: 26px; }
  .hero__body { gap: 48px; }
  .hero__top { gap: 32px; }
  .hero__text { gap: 24px; }
  .hero__head, .hero__lede { gap: 12px; }
  .hero__actions { gap: 16px; }
  .hero__foot { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero__foot .tagline { white-space: normal; }
  .rule { height: 12px; }
  .rule::before { transform: rotate(-2deg); }

  .grid { display: flex; flex-direction: column; gap: 32px; }
  .grid--cards { gap: 16px; }
  .grid.not-yet { gap: 0; }
  .not-yet > :first-child .dash li:last-child { border-bottom: 0; }
  .step { gap: 12px; }
  .step .h-block { min-height: 0; }
  .card { padding: 20px; }
  .panel { padding: 20px; }
  .panel--ask { padding: 24px; }
  .aside-rule { padding: 24px 0 0 0; border-left: 0; border-top: 1.5px solid var(--ink); }
  .aside-rule p { font-size: 20px; line-height: 28px; }
  .dash li > span { font-size: 17px; line-height: 26px; }

  .btn-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .btn-row .btn { width: 100%; }

  /* Tables become one White card per row, column names repeated as labels */
  .table, .table tbody, .table tr, .table th, .table td { display: block; width: 100%; }
  .table colgroup, .table thead { display: none; }
  .table tbody { display: flex; flex-direction: column; gap: 16px; }
  .table tbody tr {
    display: flex; flex-direction: column; gap: 16px; padding: 20px;
    background: var(--white); border: 1px solid var(--stone); border-radius: 12px;
  }
  .table tbody th, .table tbody td { padding: 0; border: 0; }
  .table tbody th { font-family: var(--display); font-size: 20px; line-height: 28px; }
  .table tbody td { font-size: 17px; line-height: 26px; }
  .table tbody td::before {
    content: attr(data-label); display: block; margin-bottom: 8px;
    font-family: var(--sans); font-size: 17px; line-height: 24px; font-weight: 600;
  }
  .table--ai .never { border-left: 0; padding: 16px 0 0 0; border-top: 1.5px solid var(--ink); }

  .doc { padding-top: 36px; padding-bottom: 36px; }
  .doc h1 { font-size: 26px; line-height: 32px; }

  .site-footer__inner { padding-top: 32px; padding-bottom: 32px; gap: 32px; }
  .site-footer__logo { width: 189px; }
  .site-footer__links { font-size: 17px; }
  .footnotes .grid { gap: 12px; }

  .form-dialog { padding: 0; background: var(--white); }
  .form-panel { width: 100%; max-width: none; min-height: 100%; border-radius: 0; font-size: 17px; line-height: 26px; }
  .form-panel__body { padding: 24px 20px 32px; }
  .form-title { font-size: 20px; line-height: 28px; }
  .field__label, .choice legend { font-size: 17px; line-height: 24px; }
  .sent { padding: 24px 20px 32px; }
  .sent__title { font-size: 26px; line-height: 32px; }
  .form-actions__row .btn { width: 100%; }
}

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