/* Haily website — one stylesheet for every page. No external fonts or CDNs. */
:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --surface-2: #f3ece3;
  --fg: #2a1f17;
  --muted: #6e6156;
  --border: #e6dccf;
  --accent: #8a5a34;
  --accent-strong: #6b4224;
  --accent-soft: #f1e2cf;
  --ok: #3f7a4f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(42, 31, 23, .05), 0 12px 32px rgba(42, 31, 23, .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: "Cascadia Code", Consolas, "SFMono-Regular", Menlo, monospace;
  --wrap: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17120e;
    --surface: #211a14;
    --surface-2: #2a211a;
    --fg: #f1e9e0;
    --muted: #b3a597;
    --border: #3a2f26;
    --accent: #d9a46f;
    --accent-strong: #ebbd8c;
    --accent-soft: #3a2a1c;
    --ok: #7cc28f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .4em; border-radius: 6px; }
.pixel { image-rendering: pixelated; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .8em 1.4em; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); color: #fff; }
@media (prefers-color-scheme: dark) { .btn-primary, .btn-primary:hover { color: #1b140f; } }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--fg); }
.btn svg { width: 1.15em; height: 1.15em; }
.btn.is-suggested { box-shadow: 0 0 0 4px var(--accent-soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.center .actions, .actions.center { justify-content: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 1.25rem var(--serif); color: var(--fg); text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--fg); }
.lang { font-size: .85rem; border: 1px solid var(--border); border-radius: 999px; padding: .25em .8em; }
.nav .btn { padding: .55em 1.1em; font-size: .9rem; color: #fff; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px; color: var(--fg); font-size: 1.1rem; }
@media (max-width: 860px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 24px 16px; }
  .nav.is-open { display: flex; }
  .nav a { padding: 10px 0; }
  .nav .btn { justify-content: center; margin-top: 8px; }
}
@media (max-width: 860px) and (prefers-color-scheme: dark) { .nav .btn { color: #1b140f; } }

/* Sections */
section { padding: 88px 0; }
section + section { border-top: 1px solid var(--border); }
.eyebrow { font: 600 .8rem/1 var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin-bottom: 14px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; }
.center .lead { margin-left: auto; margin-right: auto; }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }

.hero { padding: 96px 0 72px; text-align: center; border-top: 0; }
.hero h1 { max-width: 820px; margin: 0 auto .4em; }
.hero .lead { margin: 0 auto 32px; }
.hero .shot { margin-top: 64px; }
.note { font-size: .9rem; color: var(--muted); margin-top: 14px; }

.shot { border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; background: var(--surface); }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.split h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.card h3 { margin-top: 0; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }
.icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; font-size: 1.3rem; }
.icon svg { width: 22px; height: 22px; }

.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } .split.reverse > :first-child { order: 0; } }
.ticks { list-style: none; padding: 0; margin: 0 0 1em; }
.ticks li { position: relative; padding-left: 28px; margin-bottom: .6em; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); }

.band { background: var(--surface-2); }
.cta { text-align: center; }

/* Tables (Free vs Pro, downloads) */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table thead th { background: var(--surface-2); font-family: var(--sans); font-size: .9rem; }
.table tr:last-child td { border-bottom: 0; }
.table .yes { color: var(--ok); font-weight: 700; }
.table-scroll { overflow-x: auto; }
.badge { display: inline-block; font: 600 .75rem/1 var(--sans); padding: .35em .7em; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); vertical-align: middle; }

/* FAQ */
.faq-group { margin-bottom: 48px; }
.faq details { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 20px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }

/* Guide / prose pages */
.page-head { padding: 72px 0 32px; border-top: 0; }
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 56px; padding-top: 24px; border-top: 0; }
.toc { position: sticky; top: 88px; align-self: start; font-size: .92rem; }
.toc ol { list-style: none; padding: 0; margin: 0; counter-reset: toc; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--fg); }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .toc { position: static; } }
.prose h2 { font-size: 1.7rem; margin-top: 2.2em; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ol, .prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose .shot { margin: 24px 0; }
.callout { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 20px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0; font-size: .92rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px 48px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--fg); }

/* Home (picture page) */
.home { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; gap: 28px; overflow: hidden; }
.home .logo { width: 120px; height: 120px; }
.home h1 { font-size: clamp(3rem, 9vw, 5.5rem); margin: 0; }
.home .shot { width: min(960px, 100%); animation: rise .9s ease both .15s; }
.home .langs { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.home .dl { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.home .dl .btn { padding: .7em 1.1em; }
.home footer { font-size: .85rem; color: var(--muted); }
.home footer a { color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
