/* margin.tektonlegacy.com
   Tokens come from Docs/DesignSystem/tokens (colors, type, spacing). Only the
   ones this site uses are copied here, under the same names, so a change to
   the design system is a find-and-replace away. Two web-only choices:
   - Text links use --clay-600 in light mode: --clay-500 on linen is 4.3:1,
     under WCAG AA for body text.
   - Gold stays decorative (rules and marks), never small text, for the same
     reason. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/newsreader-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/fonts/newsreader-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #F4EFE7;            /* linen-100 */
  --bg-secondary: #EBE4D8;  /* linen-200 */
  --surface: #FCFAF5;
  --surface-elevated: #FFFFFF;
  --text-primary: #211D17;  /* ink-900 */
  --text-secondary: #6A6255;/* ink-500 */
  --text-on-accent: #FCFAF5;
  --accent: #B0573A;        /* clay-500 */
  --accent-pressed: #954829;/* clay-600 */
  --link: #954829;          /* clay-600, see above */
  --accent-soft: #F1E1D8;   /* clay-100 */
  --gold: #9C7B3E;
  --gold-soft: #ECE0C8;
  --scripture: #37648B;
  --scripture-soft: #DCE7EF;
  --divider: rgba(33, 29, 23, 0.10);
  --hairline: rgba(33, 29, 23, 0.08);

  --font-serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 3px rgba(33, 29, 23, 0.06), 0 6px 16px rgba(33, 29, 23, 0.05);
  --shadow-elevated: 0 2px 6px rgba(33, 29, 23, 0.08), 0 16px 32px rgba(33, 29, 23, 0.08);
  --ease-standard: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-fast: 140ms;

  --gutter: 20px;
  --page: 1120px;
  --prose: 720px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140F;
    --bg-secondary: #201C16;
    --surface: #24201A;
    --surface-elevated: #2C2721;
    --text-primary: #F0EBE1;
    --text-secondary: #B3AA9A;
    --text-on-accent: #1A1610;
    --accent: #D07A57;
    --accent-pressed: #B8623F;
    --link: #D07A57;
    --accent-soft: rgba(208, 122, 87, 0.16);
    --gold: #C6A15E;
    --gold-soft: rgba(198, 161, 94, 0.16);
    --scripture: #7FAECF;
    --scripture-soft: rgba(127, 174, 207, 0.16);
    --divider: rgba(240, 235, 225, 0.12);
    --hairline: rgba(240, 235, 225, 0.08);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 6px 16px rgba(0, 0, 0, 0.3);
    --shadow-elevated: 0 2px 6px rgba(0, 0, 0, 0.5), 0 16px 32px rgba(0, 0, 0, 0.5);
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

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

a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 10px 16px;
  background: var(--surface-elevated);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  z-index: 10;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header and footer ---------- */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.2px;
}
.brand svg { width: 28px; height: 28px; color: var(--accent); flex: none; }
.brand:hover { text-decoration: none; }

.site-nav { display: flex; gap: 4px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.site-nav a:hover { color: var(--text-primary); background: var(--bg-secondary); }
.site-nav a[aria-current="page"] { color: var(--text-primary); background: var(--bg-secondary); }

.site-footer {
  margin-top: 96px;
  border-top: 1px solid var(--divider);
  padding: 40px 0 48px;
  color: var(--text-secondary);
  font-size: 15px;
}
.site-footer .wrap { display: grid; gap: 20px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-primary);
  text-decoration: none;
}
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0; }
.site-footer .fine { font-size: 13px; }
.site-footer .footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-primary); font-family: var(--font-serif); font-size: 19px; }
.site-footer .footer-brand svg { width: 22px; height: 22px; color: var(--accent); }

/* ---------- Shared type ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  flex: none;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.2px; margin: 0; }

.display {
  font-size: clamp(42px, 7vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.8px;
}

.section-title {
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.4px;
}

.lede {
  margin: 20px 0 0;
  max-width: 34em;
  color: var(--text-secondary);
  font-size: clamp(18px, 2vw, 20px);
  line-height: 1.55;
}

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

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}
.button:hover { text-decoration: none; }
.button:active { transform: scale(0.97); }
.button-primary { background: var(--accent); color: var(--text-on-accent); }
.button-primary:hover { background: var(--accent-pressed); }
.button-secondary { background: var(--surface); color: var(--text-primary); border: 1px solid var(--divider); }
.button-secondary:hover { background: var(--surface-elevated); }

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--text-primary);
  font-weight: 600;
}
.soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- Device frames ---------- */

.device {
  margin: 0;
  border-radius: 13% / 6%;
  overflow: hidden;
  border: 1px solid var(--divider);
  background: var(--surface);
  box-shadow: var(--shadow-elevated);
}
.device-phone { width: min(100%, 320px); aspect-ratio: 1320 / 2868; }
.device-tablet { width: 100%; border-radius: 3.4% / 2.6%; aspect-ratio: 2064 / 2752; }
.device-watch { width: min(100%, 190px); border-radius: 22% / 19%; aspect-ratio: 416 / 496; background: #000; }
.device img, .device picture { width: 100%; height: 100%; }
.device img { object-fit: cover; }

/* ---------- Home: hero ---------- */

.hero { padding: 40px 0 24px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
.hero-shot { display: flex; justify-content: center; }
.hero-shot .device { width: min(78vw, 340px); }

.assurances {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  color: var(--text-secondary);
  font-size: 15px;
}
.assurances li { display: inline-flex; align-items: center; gap: 8px; }
.assurances svg { width: 18px; height: 18px; color: var(--gold); flex: none; }

.platforms { margin: 16px 0 0; color: var(--text-secondary); font-size: 15px; }

@media (min-width: 880px) {
  .hero { padding: 56px 0 40px; }
  .hero .wrap { grid-template-columns: 1.15fr 0.85fr; gap: 64px; }
}

/* ---------- Home: features ---------- */

.feature { padding: 72px 0; }
.feature + .feature { border-top: 1px solid var(--hairline); }
.feature .wrap { display: grid; gap: 40px; align-items: center; }
.feature-media { display: flex; justify-content: center; gap: 20px; }
.feature-copy { max-width: 34em; }

.points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.points li { position: relative; padding-left: 26px; color: var(--text-secondary); }
.points li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.points strong { color: var(--text-primary); font-weight: 600; }

.note { margin: 20px 0 0; color: var(--text-secondary); font-size: 15px; }

@media (min-width: 880px) {
  .feature { padding: 96px 0; }
  .feature .wrap { grid-template-columns: 1fr 1fr; gap: 72px; }
  .feature.flip .feature-media { order: -1; }
  .feature-wide .wrap { grid-template-columns: 0.8fr 1.2fr; }
  .feature-wide.flip .wrap { grid-template-columns: 1.2fr 0.8fr; }
}

/* Scripture specimen, built from the design system's TranscriptSegment and
   ScriptureChip, so the section shows the real look without a screenshot. */
.specimen {
  width: min(100%, 440px);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--divider);
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.specimen-time {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.specimen-line {
  margin: 8px 0 0;
  padding-left: 14px;
  border-left: 2px solid var(--gold);
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.5;
}
.specimen-line + .specimen-time { display: block; margin-top: 22px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--hairline); }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-xs);
  background: var(--scripture-soft);
  color: var(--scripture);
  font-size: 15px;
  font-weight: 600;
}
.specimen-caption { margin: 14px 0 0; color: var(--text-secondary); font-size: 13px; }

/* ---------- Home: privacy band and closing ---------- */

.band {
  margin: 24px 0;
  padding: 72px 0;
  background: var(--surface);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}
.band .wrap { display: grid; gap: 40px; }
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.promise-list li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--hairline);
}
.promise-list svg { width: 22px; height: 22px; color: var(--accent); margin-top: 1px; }
.promise-list strong { display: block; font-weight: 600; }
.promise-list span { color: var(--text-secondary); font-size: 15px; }

@media (min-width: 880px) {
  .band { padding: 96px 0; }
  .band .wrap { grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: start; }
  .promise-list { grid-template-columns: 1fr 1fr; }
}

.closing { padding: 96px 0 24px; text-align: center; }
.closing .wrap { display: grid; justify-items: center; }
.closing .lede { margin-left: auto; margin-right: auto; }
.closing .actions { justify-content: center; }

/* ---------- Prose pages (support, privacy, 404) ---------- */

.prose {
  max-width: calc(var(--prose) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 32px var(--gutter) 0;
}
.prose h1 { font-size: clamp(36px, 6vw, 52px); line-height: 1.08; letter-spacing: -0.6px; }
.prose h2 {
  margin: 48px 0 0;
  padding-top: 28px;
  border-top: 1px solid var(--divider);
  font-size: 28px;
  line-height: 1.2;
}
.prose h3 {
  margin: 32px 0 0;
  font-family: var(--font-ui);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0;
}
.prose p, .prose ul { margin: 16px 0 0; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose li::marker { color: var(--gold); }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 1px 6px;
  border-radius: var(--radius-xs);
  background: var(--bg-secondary);
  overflow-wrap: anywhere;
}
.prose .meta { margin-top: 12px; color: var(--text-secondary); font-size: 15px; }
.prose .contact {
  margin-top: 48px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--divider);
}
.prose h2:target, .prose h3:target { scroll-margin-top: 24px; }

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