/* ivana. – ivana.tech
   Plain Apple-style look: system font (SF Pro on Apple devices), light greys,
   white cards with large radii, big headlines, little colour, black buttons
   (white in dark mode). No external fonts. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --bg: #F5F5F7;
  --card: #FFFFFF;
  --fg: #1D1D1F;
  --muted: #6E6E73;
  --line: #D2D2D7;
  --btn-bg: #000000;
  --btn-fg: #FFFFFF;
  --danger: #E30000;
  --ok: #1B7F3A;
  --mark-bg: #FFE9A8;
  --mark-fg: #5A4300;
  --radius: 28px;
  --gutter: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --bg: #000000;
    --card: #1C1C1E;
    --fg: #F5F5F7;
    --muted: #A1A1A6;
    --line: #38383A;
    --btn-bg: #FFFFFF;
    --btn-fg: #000000;
    --danger: #FF453A;
    --ok: #30D158;
    --mark-bg: #4A3B00;
    --mark-fg: #FFE38A;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.53 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid #0071E3; outline-offset: 3px; border-radius: 6px; }

.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-fg); padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wordmark { font-weight: 800; letter-spacing: -0.045em; }

/* ---------- draft banner ---------- */
.draft-banner {
  position: relative; z-index: 10;
  background: #1D1D1F; color: #F5F5F7;
  font-size: 14px; line-height: 1.4; text-align: center;
  padding: 10px var(--gutter);
}
mark.ph { background: var(--mark-bg); color: var(--mark-fg); border-radius: 4px; padding: 0 3px; }

/* ---------- buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font: 600 17px/1 var(--font); letter-spacing: -0.01em; text-decoration: none;
  cursor: pointer; transition: opacity .15s ease;
}
.button:hover { opacity: .85; text-decoration: none; }
.button[aria-disabled="true"] { cursor: default; opacity: 1; }
.button[disabled] { background: var(--line); color: var(--muted); cursor: default; opacity: 1; }
.button.destructive { background: var(--danger); color: #FFFFFF; }

/* ---------- home ---------- */
body.home { --bg: #F7F6FB; --fg: #000000; --muted: #3A3A3C; --btn-bg: #000; --btn-fg: #fff; background: var(--bg); color: var(--fg); color-scheme: light; }

/* Soft circles from app icon C (docs/design/welcome/README.md): five solid
   circles, blurred 40pt on a 402x874pt screen, scaled with the viewport. */
.mesh { position: fixed; inset: 0; overflow: hidden; background: #F7F6FB; z-index: 0; }
.stage {
  --w: min(100vw, 1100px);
  --u: min(calc(var(--w) / 402), calc(100svh / 546)); /* length of one design point */
  position: absolute; top: 0; bottom: 0; left: 50%; width: var(--w); transform: translateX(-50%);
}
.stage i {
  position: absolute; border-radius: 50%;
  width: calc(var(--d) * var(--u)); height: calc(var(--d) * var(--u));
  left: calc(var(--x) - var(--d) * var(--u) / 2); top: calc(var(--y) - var(--d) * var(--u) / 2);
  background: var(--c); filter: blur(calc(40 * var(--u)));
  animation: drift 13s ease-in-out infinite alternate;
}
.stage i:nth-child(1) { --c: #A98AF3; --x: 78%; --y: 17%; --d: 270; }
.stage i:nth-child(2) { --c: #62B9DE; --x: 22%; --y: 27%; --d: 230; animation-delay: -3s; }
.stage i:nth-child(3) { --c: #6A82EE; --x: 58%; --y: 37%; --d: 250; animation-delay: -6s; }
.stage i:nth-child(4) { --c: #6FD9C9; --x: 26%; --y: 53%; --d: 230; animation-delay: -9s; }
.stage i:nth-child(5) { --c: #AEEDC9; --x: 80%; --y: 60%; --d: 210; animation-delay: -11s; }
@keyframes drift { to { transform: translate(calc(8 * var(--u)), calc(-10 * var(--u))); } }
@media (prefers-reduced-motion: reduce) { .stage i { animation: none; } }

.hero {
  position: relative; z-index: 1;
  min-height: calc(100svh - 120px);
  max-width: 760px; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 48px 28px 24px;
}
.hero h1 { margin: 0; font-size: clamp(76px, 22vw, 176px); line-height: .95; }
.tagline { margin: 16px 0 0; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.08; font-weight: 700; letter-spacing: -0.03em; }
.lede { margin: 16px 0 32px; max-width: 32ch; font-size: clamp(19px, 2.2vw, 24px); line-height: 1.3; font-weight: 500; letter-spacing: -0.02em; }
.cta { margin: 0; }
.cta .button { width: 100%; max-width: 360px; }
body.home .site-footer { position: relative; z-index: 1; }

/* ---------- document pages ---------- */
.site-header { max-width: 860px; margin: 0 auto; padding: 28px var(--gutter) 8px; }
.home-link { text-decoration: none; font-size: 28px; }
body.doc main#main { max-width: 860px; margin: 0 auto; padding: 8px var(--gutter) 0; }

.card { background: var(--card); border-radius: var(--radius); padding: clamp(24px, 6vw, 56px); }

.prose { overflow-wrap: anywhere; }
.prose h1 { font-size: clamp(36px, 7vw, 56px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 24px; font-weight: 700; }
.prose h2 { font-size: clamp(24px, 4vw, 30px); line-height: 1.15; letter-spacing: -0.02em; margin: 48px 0 12px; font-weight: 700; }
.prose h3 { font-size: 20px; margin: 32px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li { margin: 4px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 16px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); min-width: 9em; }
.prose tr:last-child td { border-bottom: 0; }
.prose th { background: var(--bg); font-weight: 600; }

/* ---------- delete form ---------- */
.form-card { max-width: 560px; margin: 0 auto; }
.form-card h1 { font-size: clamp(30px, 6vw, 40px); line-height: 1.1; letter-spacing: -0.025em; margin: 8px 0 16px; }
.form-card label { display: block; font-weight: 600; margin: 8px 0 8px; }
.form-card input {
  width: 100%; font: inherit; padding: 14px 16px; margin: 0 0 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--bg); color: inherit;
}
.form-card .button { width: 100%; }
.lang { display: flex; justify-content: flex-end; gap: 6px; font-size: 15px; color: var(--muted); }
.lang button { background: none; border: 0; padding: 4px; font: inherit; color: var(--muted); cursor: pointer; text-decoration: underline; }
.lang button[aria-pressed="true"] { color: var(--fg); font-weight: 600; text-decoration: none; }
.muted { color: var(--muted); font-size: 15px; }
.msg { min-height: 24px; margin: 16px 0; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }
[hidden] { display: none !important; }

/* ---------- footer ---------- */
.site-footer { max-width: 860px; margin: 0 auto; padding: 32px var(--gutter) 48px; color: var(--muted); font-size: 14px; text-align: center; }
.site-footer ul { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover, .site-footer a[aria-current="page"] { color: var(--fg); text-decoration: underline; }
.site-footer p { margin: 0; }
body.home .site-footer { color: #3A3A3C; }
