/* Earthquake Global — shared site styles
   Signal yellow + logo ink on seismograph graph paper. */

:root {
  --yellow: #FCBA03;
  --ink: #191414;          /* the logo's own ink */
  --paper: #FFFFFF;
  --grid: #E9EBF0;
  --grid-strong: #D5D9E1;
  --slate: #5A6070;
  --alarm: #C8102E;
  --alarm-soft: #FDECEF;
  --surface: #F6F7F9;
  --text: var(--ink);
  --muted: var(--slate);
  --rule: var(--grid-strong);
  --link: #8A5A00;
  --focus: #1F6FEB;

  --font: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --measure: 66ch;
  --radius-s: 6px;
  --radius-m: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #191414;
    --grid: #241E1E;
    --grid-strong: #352D2D;
    --slate: #B3ADA6;
    --surface: #221C1C;
    --text: #F3EFE9;
    --muted: #B3ADA6;
    --rule: #3A3131;
    --link: #FCBA03;
    --alarm: #FF5A6E;
    --alarm-soft: #3A1A1F;
    --focus: #7FB2FF;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  font-variation-settings: "wdth" 100;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg { display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ---------- Header ---------- */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.brand span {
  font-weight: 800; font-size: 17px; letter-spacing: -0.01em;
  font-variation-settings: "wdth" 118;
}
.lang {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 14px;
}
.lang svg { width: 16px; height: 16px; }
.lang select {
  appearance: none; -webkit-appearance: none;
  font: inherit; color: var(--text);
  background: transparent;
  border: 1px solid var(--rule); border-radius: var(--radius-s);
  padding: 7px 30px 7px 10px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat;
}
.lang select option { color: #191414; }

/* ---------- Footer ---------- */
.site-footer { margin-top: auto; background: #191414; color: #CFC8C0; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 40px; display: grid; gap: 28px; grid-template-columns: 1fr auto; align-items: start; }
.site-footer .brand { color: #F3EFE9; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: flex-end; }
.site-footer a { color: #F3EFE9; text-decoration: none; font-size: 15px; }
.site-footer a:hover { color: var(--yellow); }
.site-footer .copy { grid-column: 1 / -1; font-size: 13px; color: #9C948B; border-top: 1px solid #2E2727; padding-top: 18px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.site-footer .copy a { font-size: 13px; color: #CFC8C0; }
@media (max-width: 720px) {
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer nav { justify-content: flex-start; }
}

/* ---------- Home ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: -1px -1px;
}
.hero .wrap { position: relative; padding-top: 72px; padding-bottom: 0; }
.hero h1 {
  margin: 0; max-width: 14ch;
  font-size: clamp(44px, 8.2vw, 104px);
  line-height: 0.92; letter-spacing: -0.035em;
  font-weight: 850; font-variation-settings: "wdth" 125;
  overflow-wrap: anywhere;
}
.hero p.lead {
  margin: 24px 0 0; max-width: 34ch;
  font-size: clamp(18px, 2.1vw, 22px); line-height: 1.45; color: var(--muted);
}
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 20px 0 16px;
  background: #191414; color: #fff; text-decoration: none;
  border-radius: var(--radius-m); font-weight: 700; font-size: 16px;
  border: 1px solid #191414;
}
.store img { width: 22px; height: 22px; object-fit: contain; }
.store.ios img { filter: brightness(0) invert(1); }
.store:hover { background: #2A2323; text-decoration: none; }
@media (prefers-color-scheme: dark) {
  .store { background: var(--yellow); color: #191414; border-color: var(--yellow); }
  .store.ios img { filter: none; }
  .store:hover { background: #FFD24D; }
}

/* the signature: a seismogram trace across the page */
.trace { position: relative; height: 210px; margin-top: 40px; }
.trace svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.trace .line { fill: none; stroke: var(--text); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trace .event { fill: none; stroke: var(--alarm); stroke-width: 2.2; stroke-linejoin: round; }
.trace .base { stroke: var(--grid-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.trace.draw .line, .trace.draw .event { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 2.4s cubic-bezier(.4,.1,.2,1) .2s forwards; }
.trace.draw .event { animation-delay: .9s; animation-duration: 1.6s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .trace.draw .line, .trace.draw .event { animation: none; stroke-dashoffset: 0; }
}

.features { padding: 72px 0 88px; }
.features .wrap { display: grid; grid-template-columns: repeat(3, 1fr); }
.feature { padding: 4px 32px 0; border-left: 1px solid var(--rule); }
.feature:first-child { padding-left: 0; border-left: 0; }
.feature .glyph { width: 40px; height: 40px; margin-bottom: 20px; color: var(--text); }
.feature .glyph .accent { color: var(--yellow); }
.feature h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; font-weight: 750; font-variation-settings: "wdth" 112; }
.feature p { margin: 0; color: var(--muted); max-width: 32ch; }
@media (max-width: 860px) {
  .features { padding: 48px 0 64px; }
  .features .wrap { grid-template-columns: 1fr; gap: 0; }
  .feature, .feature:first-child { padding: 28px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .feature:first-child { border-top: 0; padding-top: 0; }
  .hero .wrap { padding-top: 48px; }
  .trace { height: 150px; margin-top: 28px; }
}

/* ---------- Legal / document pages ---------- */
.doc { padding: 56px 0 96px; }
.doc .wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; align-items: start; }
.toc { position: sticky; top: 24px; font-size: 14px; }
.toc p { margin: 0 0 10px; color: var(--muted); font-weight: 600; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--rule); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--text); }
.toc a.on { color: var(--text); border-left-color: var(--yellow); font-weight: 600; }

.lang-content { display: none; max-width: var(--measure); }
.lang-content.active { display: block; }
.lang-content h1 {
  margin: 0 0 10px; font-size: clamp(34px, 5vw, 54px); line-height: 1; letter-spacing: -0.03em;
  font-weight: 850; font-variation-settings: "wdth" 122;
}
.lang-content .updated { margin: 0 0 32px; color: var(--muted); font-size: 15px; }
.lang-content .highlight-box {
  margin: 0 0 44px; padding: 18px 22px;
  background: var(--surface); border-left: 4px solid var(--yellow);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
}
.lang-content .highlight-box p { margin: 0; font-size: 17px; line-height: 1.55; }
.lang-content section { margin: 0 0 36px; scroll-margin-top: 24px; }
.lang-content h2 { margin: 0 0 10px; font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 750; font-variation-settings: "wdth" 110; }
.lang-content p { margin: 0 0 12px; }
.lang-content ul { margin: 0 0 12px; padding-left: 20px; }
.lang-content li { margin: 0 0 8px; }
.lang-content li::marker { color: var(--slate); }
@media (max-width: 900px) {
  .doc { padding: 36px 0 72px; }
  .doc .wrap { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}

/* ---------- Account deletion ---------- */
.narrow { max-width: 560px; margin: 0 auto; padding: 56px 28px 96px; width: 100%; }
.narrow h1 { margin: 0 0 12px; font-size: clamp(32px, 5vw, 44px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 850; font-variation-settings: "wdth" 120; }
.narrow .intro { margin: 0 0 28px; color: var(--muted); font-size: 18px; }
.warning { margin: 0 0 32px; padding: 18px 22px; background: var(--alarm-soft); border-left: 4px solid var(--alarm); border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.warning p { margin: 0 0 6px; font-weight: 700; }
.warning ul { margin: 0; padding-left: 20px; }
.warning li { margin: 4px 0; }
.field label { display: block; font-weight: 600; margin-bottom: 8px; }
.field input {
  width: 100%; font: inherit; color: var(--text); background: var(--paper);
  border: 1.5px solid var(--grid-strong); border-radius: var(--radius-s);
  padding: 13px 14px; margin-bottom: 24px;
}
.field input:focus { border-color: var(--text); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 35%, transparent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 0 20px;
  font: inherit; font-weight: 700; font-size: 16px;
  border-radius: var(--radius-s); border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
}
.btn-danger { background: var(--alarm); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-danger:disabled { opacity: .4; cursor: not-allowed; filter: none; }
.btn-plain { background: transparent; color: var(--text); border-color: var(--grid-strong); }
.btn-plain:hover { border-color: var(--text); }
.btn-ink { background: #191414; color: #fff; }
@media (prefers-color-scheme: dark) { .btn-ink { background: var(--yellow); color: #191414; } }
.note { margin-top: 18px; font-size: 14px; color: var(--muted); }

dialog {
  width: min(440px, calc(100% - 40px)); padding: 28px; border: 0; border-radius: var(--radius-m);
  background: var(--paper); color: var(--text); box-shadow: 0 24px 60px rgba(25,20,20,.35);
}
dialog::backdrop { background: rgba(25,20,20,.55); }
dialog[open] { animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
dialog h2 { margin: 0 0 10px; font-size: 22px; font-weight: 800; font-variation-settings: "wdth" 115; }
dialog p { margin: 0 0 24px; color: var(--muted); }
dialog p strong { color: var(--text); overflow-wrap: anywhere; }
dialog .actions { display: grid; gap: 10px; }

.done-mark { width: 56px; height: 56px; margin-bottom: 24px; }
.steps { margin: 28px 0 32px; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.steps svg { width: 22px; height: 22px; margin-top: 2px; color: var(--muted); }

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

@media (max-width: 560px) {
  .wrap { padding: 0 20px; }
  .site-header .wrap { min-height: 60px; }
  .brand span { white-space: nowrap; font-size: 16px; }
  .brand svg { width: 30px; height: 30px; }
  .lang > svg { display: none; }
  .lang select { max-width: 132px; padding: 6px 26px 6px 9px; font-size: 14px; }
  .narrow { padding: 40px 20px 72px; }
}
