/* Pergamed — site styles (identity v2: Fraunces, ivory, bordeaux, ember). Self-hosted fonts only. */
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces.woff") format("woff"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces-italic.woff") format("woff"); font-weight: 100 900; font-style: italic; font-display: swap; }

:root {
  --bordeaux: #4A0F1E;
  --burgundy: #7A1C2C;
  --ember: #C2561C;
  --ember-deep: #A3450F;
  --ivory: #F1E6D3;
  --ivory-light: #F7F0E4;
  --ivory-deep: #E9DCC6;
  --ink: #1C1316;
  --graphite: #6B5F63;
  --rule: #DCCDBE;
  --font: "Fraunces", "Iowan Old Style", Georgia, serif;
  --measure: 40rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font-family: var(--font); font-size: 1.0625rem; line-height: 1.65;
  font-variation-settings: "opsz" 17;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ember-deep); text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--bordeaux); }
:focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: #fff; padding: 6px 10px; z-index: 10; }

/* ---------- header ---------- */
.site-header .inner { max-width: 80rem; margin: 0 auto; padding: 26px 40px; display: flex; align-items: center; gap: 36px; flex-wrap: wrap; }
.wordmark { font-size: 1.6rem; font-weight: 550; letter-spacing: -0.01em; color: var(--bordeaux); text-decoration: none; margin-right: auto; font-variation-settings: "opsz" 48; }
.wordmark:hover { color: var(--bordeaux); }
.site-nav { display: flex; gap: 28px; flex-wrap: wrap; font-size: 1.05rem; font-variation-settings: "opsz" 20; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 4px 0; border-bottom: 1.5px solid transparent; }
.site-nav a:hover { color: var(--bordeaux); border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--bordeaux); border-bottom-color: var(--ember); }
.lang { font-size: 0.95rem; color: var(--graphite); text-decoration: none; border: 1px solid var(--rule); padding: 7px 12px; border-radius: 999px; font-variation-settings: "opsz" 16; }
.lang:hover { color: var(--bordeaux); border-color: var(--bordeaux); }

/* ember period: wordmark and page titles share one mark */
.wordmark i, .site-footer .wm i { font-style: normal; color: var(--ember); }
.dot { color: var(--ember); }
.site-footer .wm { display: block; font-size: 1.35rem; font-weight: 550; color: var(--bordeaux); font-variation-settings: "opsz" 48; letter-spacing: -0.01em; margin-bottom: 6px; }

/* ---------- frame ---------- */
main { max-width: 80rem; margin: 0 auto; padding: 0 40px 96px; }
.measure { max-width: var(--measure); }
h1, h2, h3 { color: var(--bordeaux); font-weight: 450; letter-spacing: -0.025em; line-height: 1.04; margin: 0; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-variation-settings: "opsz" 144; max-width: 16ch; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); font-variation-settings: "opsz" 96; margin: 0 0 20px; max-width: 22ch; }
h3 { font-size: 1.35rem; font-variation-settings: "opsz" 48; letter-spacing: -0.015em; line-height: 1.2; margin: 0 0 8px; }
p, ul, ol, dl, table { margin: 0 0 1em; }
li { margin-bottom: 0.4em; }
.lede { font-size: clamp(1.2rem, 1.9vw, 1.5rem); line-height: 1.45; color: var(--graphite); max-width: 36rem; font-variation-settings: "opsz" 24; }
.small { font-size: 0.92rem; color: var(--graphite); font-variation-settings: "opsz" 14; }

/* ---------- hero (home) ---------- */
.hero { padding: 88px 0 0; }
.hero .lede { margin: 30px 0 38px; }
.cta { display: flex; gap: 14px; flex-wrap: wrap; }
.button { display: inline-block; font-size: 1.05rem; padding: 14px 24px; border-radius: 999px; text-decoration: none; font-variation-settings: "opsz" 20; }
.button.primary { background: var(--bordeaux); color: var(--ivory); }
.button.primary:hover { background: var(--ember-deep); color: #fff; }
.button.secondary { color: var(--bordeaux); border: 1px solid var(--rule); background: transparent; }
.button.secondary:hover { border-color: var(--bordeaux); color: var(--bordeaux); }

.family { margin: 80px 0 0; border-top: 2px solid var(--ember); padding-top: 28px; display: flex; gap: 44px; flex-wrap: wrap; }
.family .item { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); font-variation-settings: "opsz" 16; }
.family .item small { display: block; color: var(--graphite); font-size: 0.9rem; }
.family .item img { width: 48px; height: 48px; border-radius: 12px; }
.family .ghost { width: 48px; height: 48px; border-radius: 12px; border: 1.5px dashed var(--rule); flex: none; }
.family .item.next { color: var(--graphite); }
.family a.item:hover { color: var(--bordeaux); }

/* ---------- sections ---------- */
.section { padding: 96px 0 0; }
.section-grid { display: grid; grid-template-columns: minmax(0, 24rem) minmax(0, 1fr); gap: 40px 72px; align-items: start; }
.section-grid .intro p { color: var(--graphite); font-size: 1.12rem; font-variation-settings: "opsz" 20; max-width: 30rem; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 36px 40px; }
.cols p { color: var(--ink); }

/* ember marker: a short rule above each principle */
.mark { display: block; width: 36px; height: 3px; background: var(--ember); margin: 0 0 18px; border-radius: 2px; }

/* dark band (bordeaux) */
.band { background: var(--bordeaux); color: var(--ivory); margin: 96px calc(50% - 50vw) 0; padding: 88px calc(50vw - 50%); }
.band h2, .band h3 { color: var(--ivory); }
.band p { color: #E6D3C2; }
.band a { color: #F4C9A8; }
.band a:hover { color: #fff; }
.band .button.primary { background: var(--ember); color: #fff; }
.band .button.primary:hover { background: #fff; color: var(--bordeaux); }
.band .button.secondary { color: var(--ivory); border-color: rgba(241,230,211,.4); }
.band .button.secondary:hover { border-color: var(--ivory); }
.band .mark { background: var(--ember); }
.band .lede { color: #E6D3C2; }

/* ---------- generic pages (support, legal, 404) ---------- */
.page { padding-top: 72px; max-width: 46rem; }
.page h1 { font-size: clamp(2.4rem, 5vw, 4rem); margin-bottom: 24px; }
.page h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 56px 0 14px; }
.page .lede { margin-bottom: 18px; }

/* ---------- product page ---------- */
.status { display: flex; align-items: center; gap: 12px; color: var(--ink); font-size: 1.02rem; margin-top: 8px; font-variation-settings: "opsz" 18; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ember); flex: none; box-shadow: 0 0 0 0 rgba(194,86,28,.45); animation: pulse 2.4s ease-out 3; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(194,86,28,0); } 100% { box-shadow: 0 0 0 0 rgba(194,86,28,0); } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.product-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 20rem); gap: 40px 64px; align-items: end; padding-top: 72px; }
.product-head h1 { margin-bottom: 26px; max-width: 14ch; }
.section h2:not(:first-child) { margin-top: 80px; }
.product-head .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.product-head .lockup { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.product-head .lockup img { width: 64px; height: 64px; border-radius: 16px; }
.product-head .lockup span { font-size: 1.05rem; color: var(--graphite); font-variation-settings: "opsz" 16; }
.figures { display: grid; grid-template-columns: repeat(4, auto); gap: 24px 36px; align-self: start; padding-top: 12px; }
.figures div { border-top: 2px solid var(--ember); padding-top: 12px; }
.figures b { display: block; font-size: 2.2rem; font-weight: 450; color: var(--bordeaux); line-height: 1; font-variation-settings: "opsz" 72; letter-spacing: -0.02em; }
.figures span { display: block; font-size: 0.92rem; color: var(--graphite); margin-top: 6px; font-variation-settings: "opsz" 14; }

.terms-list { margin: 0; }
.terms-list > div { padding: 22px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 8px 40px; }
.terms-list > div:last-child { border-bottom: 1px solid var(--rule); }
.terms-list dt { font-size: 1.2rem; font-weight: 500; color: var(--bordeaux); font-variation-settings: "opsz" 32; letter-spacing: -0.01em; }
.terms-list dd { margin: 0; max-width: 36rem; }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 20px; margin: 8px 0 20px; }
.plan { background: var(--ivory-light); border: 1px solid var(--rule); border-radius: 16px; padding: 26px 26px 14px; }
.plan h3 { margin-bottom: 14px; }
.plan ul { padding-left: 1.1em; margin: 0; }
.plan.platinum { background: var(--bordeaux); color: var(--ivory); border-color: var(--bordeaux); }
.plan.platinum h3 { color: var(--ivory); }
.plan.platinum .tag { color: var(--ember); }
.plan .tag { display: block; font-size: 0.85rem; color: var(--ember-deep); margin-bottom: 6px; font-variation-settings: "opsz" 14; }

.notice { border-left: 3px solid var(--ember); padding: 6px 0 6px 20px; margin: 40px 0; max-width: 40rem; color: var(--ink); }

/* ---------- FAQ ---------- */
details { border-top: 1px solid var(--rule); padding: 14px 0; max-width: 44rem; }
details:last-of-type { border-bottom: 1px solid var(--rule); }
summary { cursor: pointer; font-size: 1.15rem; font-weight: 500; color: var(--bordeaux); list-style: none; padding-right: 32px; position: relative; font-variation-settings: "opsz" 24; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: -2px; font-weight: 300; font-size: 1.5rem; color: var(--ember); }
details[open] summary::after { content: "–"; }
details > div { padding-top: 10px; max-width: 40rem; }

/* ---------- legal ---------- */
.legal { max-width: 44rem; }
.legal h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
.legal h2 { font-size: 1.5rem; margin: 44px 0 10px; max-width: none; }
.legal .table-wrap { overflow-x: auto; margin-bottom: 1em; }
.legal table { border-collapse: collapse; width: 100%; font-size: 0.92rem; line-height: 1.5; font-variation-settings: "opsz" 14; }
.legal th, .legal td { border: 1px solid var(--rule); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--ivory-light); color: var(--bordeaux); }
.legal code { font-size: 0.9em; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .inner { max-width: 80rem; margin: 0 auto; padding: 36px 40px 48px; display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; font-size: 0.95rem; color: var(--graphite); font-variation-settings: "opsz" 16; }
.site-footer .legalname { margin-right: auto; }
.site-footer .legalname strong { color: var(--bordeaux); font-weight: 550; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--graphite); text-decoration: none; }
.site-footer a:hover { color: var(--bordeaux); text-decoration: underline; }

@media (max-width: 900px) {
  .section-grid, .product-head { grid-template-columns: 1fr; }
  .terms-list > div { grid-template-columns: 1fr; }
  .figures { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  main, .site-header .inner, .site-footer .inner { padding-left: 20px; padding-right: 20px; }
  .site-nav { width: 100%; order: 3; gap: 20px; }
  .hero { padding-top: 56px; }
  .section { padding-top: 72px; }
  .band { margin-top: 72px; padding-top: 64px; padding-bottom: 64px; }
  .family { gap: 24px; }
  .figures { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .figures b { font-size: 1.7rem; }
}
