/* jithin.site: the only stylesheet. Inline styles are blocked by the CSP in _headers, so all styling lives here. */

:root {
  color-scheme: light dark;
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #111827;
  --muted: #545d6e;
  --border: #e4e6eb;
  --accent: #047857;
  --accent-hover: #065f46;
  --accent-ink: #ffffff;
  --accent-text: #047857;
  --accent-soft: #e3f4ec;
  --ok: #047857;
  --bad: #b42318;
  --code-bg: #f0f2f4;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 10px 30px rgb(16 24 40 / 0.06);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0e14;
    --surface: #121722;
    --text: #e6e9ef;
    --muted: #9aa3b2;
    --border: #232a37;
    --accent: #34d399;
    --accent-hover: #6ee7b7;
    --accent-ink: #052e1f;
    --accent-text: #34d399;
    --accent-soft: #0f2a21;
    --ok: #4ade80;
    --bad: #f97066;
    --code-bg: #1a2130;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 10px 30px rgb(0 0 0 / 0.3);
  }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--code-bg);
  padding: 0.12em 0.4em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.wrap { width: min(1040px, 100% - 32px); margin-inline: auto; }

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

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

/* Header */

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none;
}
.brand:hover { color: inherit; }
.brand img { display: block; border-radius: 7px; }
.tld { color: var(--accent-text); }
.site-header nav a { margin-left: 22px; color: var(--muted); font-size: 0.95rem; text-decoration: none; }
.site-header nav a:hover { color: var(--text); }
@media (max-width: 640px) { .site-header nav a:not(:last-child) { display: none; } }

/* Hero and claim form */

.hero { padding: 96px 0 80px; }
.eyebrow {
  margin: 0 0 18px;
  font: 600 0.8rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-text);
}
h1 { margin: 0 0 20px; font-size: clamp(2.5rem, 7vw, 4.25rem); line-height: 1.04; letter-spacing: -0.035em; }
.lede { margin: 0 0 36px; max-width: 40rem; font-size: 1.15rem; color: var(--muted); }

.claim { display: flex; gap: 10px; max-width: 640px; }
.claim-field {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  padding: 0 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.claim-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent);
}
.claim-field input {
  flex: 1; min-width: 0;
  padding: 16px 0;
  border: 0; outline: 0; background: transparent;
  color: var(--text);
  font: 600 1.15rem var(--mono);
}
.claim-field input::placeholder { color: var(--muted); opacity: 0.6; }
.claim-field input:focus-visible { outline: none; }
.claim-suffix { font: 1.15rem var(--mono); color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 24px;
  border: 0; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 1rem var(--font);
  white-space: nowrap; cursor: pointer;
  transition: background-color 0.15s;
}
.btn:hover { background: var(--accent-hover); }

.claim-status { min-height: 1.6em; margin: 12px 2px 0; font-size: 0.95rem; color: var(--muted); }
.claim-status[data-state="ok"] { color: var(--ok); }
.claim-status[data-state="bad"], .claim-status[data-state="taken"] { color: var(--bad); }
.fineprint { margin: 4px 2px 0; font-size: 0.875rem; color: var(--muted); }

@media (max-width: 560px) {
  .hero { padding: 64px 0 56px; }
  .claim { flex-direction: column; }
  .btn { padding: 14px 24px; }
}

/* Sections */

.section { padding: 76px 0; border-top: 1px solid var(--border); }
h2 { margin: 0 0 8px; font-size: clamp(1.6rem, 3.2vw, 2.1rem); letter-spacing: -0.02em; line-height: 1.2; }
.section-lede { margin: 0 0 32px; max-width: 42rem; color: var(--muted); }
.note { margin: 16px 0 0; font-size: 0.9rem; color: var(--muted); }

.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin: 0; padding: 0; list-style: none; counter-reset: step;
}
.steps li {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 34px; height: 34px; margin-bottom: 16px;
  border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-text);
  font: 700 0.95rem var(--mono);
}
.steps h3 { margin: 0 0 6px; font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; } }

.table-wrap {
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 600; white-space: nowrap; }
td code { white-space: nowrap; overflow-wrap: normal; }
td:last-child { color: var(--muted); }

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rule-card {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.rule-card h3 { margin: 0 0 12px; font-size: 1.05rem; }
.rule-card.yes h3 { color: var(--ok); }
.rule-card.no h3 { color: var(--bad); }
.rule-card ul { margin: 0; padding-left: 1.15rem; color: var(--muted); }
.rule-card li + li { margin-top: 4px; }
@media (max-width: 720px) { .rules { grid-template-columns: 1fr; } }

.faq details { padding: 18px 0; border-bottom: 1px solid var(--border); }
.faq h2 + details { margin-top: 16px; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-weight: 600; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.4rem/1 var(--mono); color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 10px 0 0; max-width: 46rem; color: var(--muted); }

/* Footer */

.site-footer { padding: 32px 0 48px; border-top: 1px solid var(--border); font-size: 0.9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-inner p { margin: 0; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

/* Text pages (terms, 404) */

.prose { max-width: 46rem; padding: 56px 0 88px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.prose h2 { margin: 44px 0 10px; font-size: 1.35rem; }
.prose p, .prose li { max-width: 44rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 6px; }
.muted { color: var(--muted); }
.callout {
  margin: 28px 0 0; padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
}
.center { text-align: center; }
.prose.center { margin-inline: auto; padding-top: 120px; }
.prose.center .btn { padding: 14px 24px; text-decoration: none; }
.prose.center .btn:hover { color: var(--accent-ink); }
