/* Chotki site: first draft. Palette follows the app (dark ground, gold, parchment). */
:root {
  --ground: #15161c;
  --ground-2: #1a1c23;
  --panel: #1c1e26;
  --line: #2e2a20;
  --line-soft: #2a2c36;
  --gold: #c9a227;
  --gold-dim: #8a7220;
  --parchment: #e8dfcd;
  --parchment-dim: #d8cfbd;
  --muted: #9a9588;
  --faint: #5a564c;
  --violet: #9a8fc4;
  --violet-bg: #3a3454;
  --ochre: #b8863a;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --serif: "Iowan Old Style", Charter, Palatino, "Palatino Linotype", Georgia, serif;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--parchment-dim);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #e3c24f; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Header: no bar. The ground colour fades down from the top edge, and
   whatever scrolls up into it dissolves. */
.site-head {
  position: sticky; top: 0; z-index: 20; height: 64px;
}
.site-head::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 128px; pointer-events: none;
  background: linear-gradient(180deg, var(--ground) 0, var(--ground) 50%, rgba(21,22,28,0.82) 62%, rgba(21,22,28,0.45) 78%, rgba(21,22,28,0) 100%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%);
  transition: opacity 0.35s;
}
.site-head.at-top::before { opacity: 0; }
.site-head .wrap { position: relative; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--parchment); text-decoration: none; font-family: var(--serif); font-size: 22px; letter-spacing: 0.02em; }
.brand img { width: 20px; height: 27px; }
.site-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.site-nav a:hover { color: var(--parchment); background: var(--panel); }
.site-nav a[aria-current="page"] { color: var(--parchment); }

/* Type */
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--parchment); line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(40px, 7vw, 68px); letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 4vw, 38px); }
h3 { font-size: 21px; }
p { margin: 0 0 1.1em; }
.eyebrow { font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.18em; font-size: 12px; color: var(--gold); margin-bottom: 14px; display: block; }
.lede { font-family: var(--serif); font-size: clamp(20px, 2.6vw, 25px); line-height: 1.5; color: var(--parchment); }
.small { font-size: 14px; color: var(--muted); }

/* Hero */
.hero { position: relative; padding: 110px 0 90px; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(21,22,28,0.55), var(--ground) 96%), url("img/nave.jpg") center 40% / cover no-repeat;
  opacity: 0.55;
}
.hero .wrap { position: relative; }
.hero p.lede { max-width: 640px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: 600 15px var(--sans); padding: 13px 24px; border-radius: 999px;
  border: 1px solid var(--gold); color: var(--gold); background: transparent;
}
.btn:hover { background: rgba(201,162,39,0.12); color: #e3c24f; }
.btn.solid { background: var(--gold); color: #1a1916; }
.btn.solid:hover { background: #dbb637; color: #1a1916; }
.btn[aria-disabled="true"] { opacity: 0.55; cursor: default; pointer-events: none; }

/* Sections */
section { padding: 84px 0; }
section.alt { background: var(--ground-2); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.section-head { max-width: 680px; margin-bottom: 40px; }

.intent p { font-family: var(--serif); font-size: 20px; line-height: 1.7; color: var(--parchment-dim); }
.intent p:first-of-type::first-letter { float: left; font-size: 3.6em; line-height: 0.85; padding: 6px 10px 0 0; color: var(--gold); }
.callout {
  border-left: 3px solid var(--gold); background: var(--panel);
  padding: 20px 24px; border-radius: 0 12px 12px 0; margin: 28px 0;
  font-family: var(--serif); font-size: 20px; line-height: 1.6; color: var(--parchment);
}

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 26px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .tag { display: inline-block; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }

.split { display: grid; gap: 48px; grid-template-columns: 1fr 1fr; align-items: center; }
.split img { border-radius: 14px; border: 1px solid var(--line-soft); width: 100%; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; gap: 28px; } }

/* Download tiles */
.platforms { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.platform { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 22px; text-align: left; }
.platform h3 { font-size: 20px; margin-bottom: 4px; }
.platform p { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.platform .btn { padding: 9px 18px; font-size: 14px; }

/* Prose pages */
.page-head { padding: 80px 0 30px; border-bottom: 1px solid var(--line-soft); }
.prose { padding: 56px 0 90px; }
.prose h2 { margin-top: 2.2em; font-size: 28px; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.8em; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.prose th { color: var(--parchment); font-weight: 600; width: 34%; }
.notice { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; margin: 1.4em 0; font-size: 16px; }
.placeholder { color: var(--ochre); }

/* Footer */
.site-foot { border-top: 1px solid var(--line-soft); padding: 44px 0 60px; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-foot p { margin: 0 0 8px; max-width: 520px; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--parchment); }

@media (max-width: 640px) {
  .site-head { height: 92px; }
  .site-head::before { height: 156px; }
  .site-head .wrap { height: 92px; padding-top: 8px; padding-bottom: 8px; flex-direction: column; justify-content: center; gap: 2px; }
  .site-nav { justify-content: center; gap: 0; }
  .site-nav a { padding: 6px 9px; }
  .hero { padding: 70px 0 60px; }
  section { padding: 60px 0; }
}

/* Anchors land below the header's fade. */
section[id] { scroll-margin-top: 40px; }
h2[id] { scroll-margin-top: 88px; }

/* Rising into view. Only when scripting is on, and never with reduced motion. */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1); will-change: opacity, transform; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .js .reveal { opacity: 1; transform: none; transition: none; } .site-head::before { transition: none; } }

/* Collapsible sections on About */
.fold { border-top: 1px solid var(--line-soft); }
.fold:last-of-type { border-bottom: 1px solid var(--line-soft); }
.fold summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary h2 { margin: 0; font-size: 1.25rem; }
.fold summary::after { content: "+"; color: var(--gold); font-size: 22px; line-height: 1; }
.fold[open] summary::after { content: "\2212"; }
.fold[open] > :last-child { margin-bottom: 18px; }

/* Donation addresses */
.addrs { list-style: none; padding: 0; margin: 0 0 14px; }
.addrs li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.addrs .coin { color: var(--muted); font-size: 14px; min-width: 110px; }
.addrs code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--parchment); word-break: break-all; }
.copy { font: 600 13px var(--sans); color: var(--gold); background: transparent; border: 1px solid var(--gold-dim); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.copy:hover { background: rgba(201,162,39,0.12); }
.copy.done { color: var(--parchment); border-color: var(--parchment-dim); }
.prose ul.addrs { padding-left: 0; }
.addrs li { margin-bottom: 0; }
.prose .lede + h2 { margin-top: 1.2em; }
.page-head.compact { padding: 56px 0 20px; }
.prose.compact { padding-top: 30px; }
.fold summary h2, .prose .fold summary h2 { margin-top: 0; }
.source-link { margin-top: 22px; text-align: center; }

/* Contact form */
.contact { display: grid; gap: 14px; max-width: 520px; margin-top: 10px; }
.contact label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.contact .opt { color: var(--faint); }
.contact input, .contact textarea { font: 16px var(--sans); color: var(--parchment); background: var(--panel); border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px; }
.contact input:focus, .contact textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.contact textarea { resize: vertical; }
.contact .btn { justify-self: start; cursor: pointer; }
.contact .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.4em; font-size: 15px; color: var(--parchment-dim); }

/* Contact form: a panel, like the cards elsewhere on the site */
.contact { max-width: 560px; background: var(--panel); border: 1px solid var(--line-soft); border-radius: 14px; padding: 26px; margin-top: 16px; }
.contact input, .contact textarea { background: var(--ground); transition: border-color .15s; }
.contact input:hover, .contact textarea:hover { border-color: var(--gold-dim); }
.contact label > span:first-child { color: var(--parchment-dim); font-size: 14px; }
.contact .btn:disabled { opacity: .55; cursor: default; }
