/* ===========================================================================
   moechz.com — personal site styles
   No external fonts, no frameworks, no third-party requests.
   =========================================================================== */

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --brand: #0d9488;
  --brand-2: #4f46e5;
  --brand-ink: #0b3b39;
  --accent: #0ea5a4;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .18);
  --max: 1060px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC",
          "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1017;
    --surface: #111827;
    --surface-2: #0f1623;
    --ink: #e8eef8;
    --ink-soft: #c3cddd;
    --muted: #8fa0b8;
    --line: #1e2a3a;
    --brand: #2dd4bf;
    --brand-2: #a5b4fc;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 18px 40px -20px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background:
    radial-gradient(900px 480px at 85% -10%, color-mix(in oklab, var(--brand) 14%, transparent), transparent 60%),
    radial-gradient(700px 420px at 5% 0%, color-mix(in oklab, var(--brand-2) 10%, transparent), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.wrap { width: min(100% - 40px, var(--max)); margin-inline: auto; }

/* ------------------------------------------------------------------ nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(160%) blur(12px);
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in oklab, var(--line) 80%, transparent);
}
.nav-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 14.5px; color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); text-decoration: none; }

.lang {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
  background: var(--surface);
}
.lang button {
  border: 0; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }

/* ---------------------------------------------------------------- hero */
/* First screen gets a soft "horizon" backdrop: a white dome whose rim glows
   with atmosphere. Pure local SVG, no external request, and a dark twin so
   the artwork follows the system theme. */
.hero {
  position: relative;
  isolation: isolate;
  padding: 38px 0 44px;
  background: url("hero-light.svg") center / cover no-repeat;
}
/* dissolve the artwork into the page background at the section seam */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px;
  z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg));
}
@media (prefers-color-scheme: dark) {
  .hero { background-image: url("hero-dark.svg"); }
}
@media (max-width: 720px) {
  /* keep the curve visible instead of flattening into a band */
  .hero { background-size: 190% auto; background-position: center bottom; }
  .hero::after { height: 90px; }
}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); font-size: 13px; padding: 6px 12px; border-radius: 999px;
  box-shadow: var(--shadow);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* round portrait beside the credential badge */
.intro { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.avatar {
  width: clamp(84px, 10.5vw, 134px);
  aspect-ratio: 1 / 1; height: auto;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
  box-shadow:
    0 0 0 3px var(--surface),
    0 0 0 4px color-mix(in oklab, var(--line) 90%, transparent),
    0 20px 40px -18px rgba(15, 23, 42, .40);
}

h1 {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.08; letter-spacing: -.03em; margin: 20px 0 14px;
  max-width: 21ch;
}
.grad {
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--ink-soft); max-width: 62ch; margin: 0 0 26px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn.primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(100deg, var(--brand), var(--brand-2));
}
.btn.primary:hover { box-shadow: 0 10px 26px -10px color-mix(in oklab, var(--brand) 70%, transparent); }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; margin-top: 44px;
}
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow);
}
.stat b { display: block; font-size: 26px; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: 13.5px; }

/* -------------------------------------------------------------- sections */
section { padding: 56px 0; }
.section-head { max-width: 62ch; margin-bottom: 28px; }
.kicker {
  font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brand); font-weight: 700; margin: 0 0 10px;
}
h2 { font-size: clamp(24px, 3.4vw, 34px); line-height: 1.18; letter-spacing: -.02em; margin: 0 0 10px; }
.section-head p { color: var(--ink-soft); margin: 0; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
}
.card h3 { margin: 12px 0 8px; font-size: 17.5px; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.icon {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in oklab, var(--brand) 14%, transparent);
  color: var(--brand); border: 1px solid color-mix(in oklab, var(--brand) 22%, transparent);
}
.icon svg { width: 20px; height: 20px; }

/* ---------------------------------------------------------------- apps */
.apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.app {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 14px 16px; box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}
.app:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--brand) 45%, var(--line)); text-decoration: none; }
.app b { display: block; font-size: 15px; letter-spacing: -.01em; }
.app span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.app small {
  display: inline-block; margin-top: 6px; font-size: 11.5px; color: var(--brand);
  background: color-mix(in oklab, var(--brand) 10%, transparent);
  border-radius: 999px; padding: 2px 8px;
}
.more-note { margin-top: 14px; color: var(--muted); font-size: 14px; }

/* -------------------------------------------------------------- process */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; counter-reset: step; }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--mono); font-size: 12px; color: var(--brand); font-weight: 700;
}
.step h3 { margin: 8px 0 6px; font-size: 15.5px; }
.step p { margin: 0; color: var(--ink-soft); font-size: 14px; }

/* -------------------------------------------------------------- support */
.support {
  background:
    linear-gradient(180deg, color-mix(in oklab, var(--brand) 8%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in oklab, var(--brand) 28%, var(--line));
  border-radius: 22px; padding: 34px; box-shadow: var(--shadow);
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: center;
}
.support h2 { margin-top: 0; }
.support p { color: var(--ink-soft); margin: 0 0 14px; }
.support ul { margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 14.5px; }
.support li { margin: 6px 0; }
.support-cta {
  background: var(--surface-2); border: 1px dashed color-mix(in oklab, var(--brand) 35%, var(--line));
  border-radius: 16px; padding: 22px; text-align: center;
}
.support-cta .amount { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.support-cta .btn { width: 100%; justify-content: center; }
.support-cta .fine { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ faq */
.faq { display: grid; gap: 10px; max-width: 820px; }
details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
details[open] { border-color: color-mix(in oklab, var(--brand) 40%, var(--line)); }
summary { cursor: pointer; font-weight: 600; font-size: 15.5px; list-style: none; display: flex; gap: 10px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font-family: var(--mono); color: var(--brand); font-weight: 700; }
details[open] summary::before { content: "−"; }
details p { margin: 10px 0 0; color: var(--ink-soft); font-size: 14.5px; }

/* -------------------------------------------------------------- contact */
.contact {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow);
}
.contact h2 { margin: 0 0 8px; }
.contact p { margin: 0; color: var(--ink-soft); }
.contact-links { display: grid; gap: 10px; align-content: start; }
.contact-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px 14px; background: var(--surface-2); font-size: 14.5px;
}
.contact-links a:hover { text-decoration: none; border-color: color-mix(in oklab, var(--brand) 40%, var(--line)); }
.contact-links span { color: var(--muted); font-size: 12.5px; }

/* --------------------------------------------------------------- footer */
footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 28px 0 40px; }
.foot {
  display: flex; flex-wrap: wrap; gap: 18px; align-items: center;
  color: var(--muted); font-size: 13.5px;
}
.foot nav { margin-left: auto; display: flex; gap: 18px; }
.foot a:hover { color: var(--ink); }
.disclaimer { margin-top: 14px; color: var(--muted); font-size: 12.5px; max-width: 78ch; }

/* ------------------------------------------------------------- legal */
.legal { padding: 48px 0 24px; max-width: 780px; }
.notfound { padding-top: 96px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); max-width: none; margin: 8px 0 6px; }
.legal h2 { font-size: 20px; margin: 32px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 15px; }
.legal ul { padding-left: 20px; }
.legal .meta { color: var(--muted); font-size: 13.5px; }
.legal .note {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 10px; padding: 14px 16px; margin: 20px 0;
}
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.back:hover { color: var(--ink); }

/* --------------------------------------------------------- responsive */
@media (max-width: 900px) {
  .cards, .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .support, .contact { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 560px) {
  .hero { padding: 48px 0 30px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .apps, .steps { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
  .support { padding: 24px; }
}

/* keyboard focus */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}
