/* Gifting Circles. Fonts are self-hosted (SIL OFL); see /fonts. */
@font-face { font-family: "Bricolage Grotesque"; src: url("/fonts/bricolage-grotesque.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("/fonts/instrument-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  --ground: #eef0f3;
  --sheet: #ffffff;
  --ink: #1b1e27;
  --soft: #5b6170;
  --line: #d6dae2;
  --gold: #a86f00;
  --gold-soft: #f8ecd2;
  --red: #b5492f;
  --red-soft: #f6e1da;
  --blue: #3b6fa8;
  --blue-soft: #dfe9f5;
  --green: #4f6f40;
  --green-soft: #e3ecdc;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #12141a; --sheet: #1b1e27; --ink: #e9ebf0; --soft: #9aa1b0; --line: #2d313d;
    --gold: #e9b04a; --gold-soft: #3a2e14; --red: #ef8a70; --red-soft: #3d241e;
    --blue: #7eaee3; --blue-soft: #1e2c3d; --green: #9cc487; --green-soft: #232f1d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--ground); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 56px max(16px, env(safe-area-inset-left, 0px)); }
.narrow { max-width: 440px; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); line-height: 0.98; font-weight: 700; }
h1 .accent { color: var(--gold); }
h2 { font-size: 1.4rem; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--soft); }

/* Top bar */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 48px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand { display: inline-flex; align-items: center; }
.brand span { color: var(--gold); }
.mark { width: 32px; height: 32px; flex: none; margin-right: 8px; }
.mark .ring { fill: none; stroke: var(--red); stroke-width: 10; }
.mark .bow { fill: var(--gold); }
.bar nav { display: flex; gap: 8px; flex-wrap: wrap; }

/* Buttons */
.btn { display: inline-block; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); border-radius: 8px; padding: 9px 16px; font: 600 0.95rem var(--body); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.btn:disabled { opacity: 0.5; cursor: default; }
.linkbtn { border: 0; background: none; color: var(--blue); font: inherit; text-decoration: underline; cursor: pointer; padding: 0; }

/* Coming soon */
.hero { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.hero .lede { font-size: 1.2rem; color: var(--soft); max-width: 46ch; }
.soon { display: inline-block; align-self: flex-start; font: 600 0.78rem var(--body); text-transform: uppercase; letter-spacing: 0.1em; color: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: 4px 12px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; margin-top: 48px; }
.feature { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 8px; border-top: 5px solid var(--red); }
.feature.b { border-top-color: var(--blue); }
.feature.c { border-top-color: var(--green); }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--soft); font-size: 0.95rem; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.foot { margin-top: 56px; font-size: 0.85rem; color: var(--soft); }

/* Forms */
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
form { display: flex; flex-direction: column; gap: 14px; margin: 0; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.9rem; }
label .hint { font-weight: 400; color: var(--soft); font-size: 0.82rem; }
select, input[type="text"], input[type="email"], input[type="password"] { font: 1rem var(--body); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); color: var(--ink); width: 100%; }
.status { min-height: 1.3em; font-size: 0.9rem; }
.status.error { color: var(--red); }
.status.ok { color: var(--green); }
.alt { font-size: 0.9rem; color: var(--soft); }

/* App + admin */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; align-items: start; }
.roadmap { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.roadmap li { background: var(--ground); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.roadmap li b { font-weight: 600; }
.roadmap li span { color: var(--soft); font-size: 0.9rem; }
.pill { display: inline-block; font-size: 0.75rem; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--gold-soft); color: var(--gold); }
.pill.open { background: var(--green-soft); color: var(--green); }
.pill.used { background: var(--blue-soft); color: var(--blue); }
.pill.active { background: var(--green-soft); color: var(--green); }
.pill.revoked, .pill.expired, .pill.removed { background: var(--red-soft); color: var(--red); }
.codebox { font: 600 1.15rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.04em; background: var(--gold-soft); border-radius: 8px; padding: 12px; overflow-wrap: anywhere; }
.share { display: flex; flex-direction: column; gap: 12px; }
.message { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--ground); border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 0.92rem; }
.wide { grid-column: 1 / -1; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions select { width: auto; padding: 6px 8px; font-size: 0.85rem; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--soft); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .hero { animation: rise 0.5s ease-out both; } @keyframes rise { from { opacity: 0.6; transform: translateY(6px); } } }
