/* h5bits — on the H5 Innovations brand: warm ink on near-black, ONE signal-orange accent.
   Each app page sets --app to the app's own colour for its buttons and highlights. */

@font-face { font-family: "Space Grotesk"; src: url("/fonts/SpaceGrotesk-300-700.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/Inter-100-900.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --page: #07060A;
  --raise: #0D0B12;
  --raise2: #14121A;
  --ink: #F2EFE9;
  --muted: rgba(242, 239, 233, 0.62);
  --faint: rgba(242, 239, 233, 0.32);
  --rule: rgba(242, 239, 233, 0.12);
  --signal: #FF5C1A;
  --soft: #FF9A4D;
  --app: var(--signal);
  --head: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --r: 16px;
  --max: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--page); color: var(--ink);
  font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--head); letter-spacing: -0.02em; line-height: 1.1; margin: 0; font-weight: 600; }
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 1.6rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
em { font-style: normal; color: var(--signal); }
main > section { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

.testbar { background: #3a2410; color: var(--soft); text-align: center; font-size: 13px; padding: 6px 12px; }

/* ---- header / footer */
.top {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  max-width: var(--max); margin: 0 auto; padding: 18px 24px;
  background: color-mix(in srgb, var(--page) 82%, transparent); backdrop-filter: blur(14px);
}
.logo { font-family: var(--head); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.03em; text-decoration: none; }
.logo span { color: var(--signal); }
.top nav { display: flex; gap: 26px; align-items: center; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); transition: color .15s; }
.top nav a:hover { color: var(--ink); }
.top nav a.account { color: var(--ink); border: 1px solid var(--rule); padding: 7px 14px; border-radius: 999px; }
.top nav a.account:hover { border-color: var(--faint); }

.foot { border-top: 1px solid var(--rule); margin-top: 120px; }
.foot-grid { max-width: var(--max); margin: 0 auto; padding: 56px 24px 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot-grid p { color: var(--muted); font-size: 14px; margin-top: 10px; }
.foot h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 12px; font-weight: 500; }
.foot-grid a:not(.logo) { display: block; color: var(--muted); text-decoration: none; font-size: 14px; padding: 3px 0; }
.foot-grid a:hover { color: var(--ink); }
.fine { max-width: var(--max); margin: 0 auto; padding: 16px 24px 40px; color: var(--faint); font-size: 13px; }

/* ---- buttons, badges, forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--signal); color: #07060A; font: 600 15px/1 var(--body);
  padding: 14px 22px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: transform .12s, filter .15s, background .15s;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.app { background: var(--app); color: var(--app-ink, #fff); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--faint); filter: none; }
.btn.small { padding: 9px 14px; font-size: 13px; border-radius: 9px; }
.btn.wide { width: 100%; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.badge { display: inline-block; font: 500 11px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; border: 1px solid var(--rule); color: var(--muted); vertical-align: middle; }
.badge.s-available { color: #7FD99A; border-color: rgba(127,217,154,.35); }
.badge.s-beta { color: var(--soft); border-color: rgba(255,154,77,.35); }

input[type=email], input[type=text] {
  width: 100%; background: var(--raise2); color: var(--ink); border: 1px solid var(--rule); border-radius: 12px;
  padding: 14px 16px; font: 16px var(--body); outline: none; transition: border-color .15s;
}
input:focus { border-color: var(--app); }
label { display: block; font-size: 14px; color: var(--muted); margin: 18px 0 8px; }
label.check { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; margin: 16px 0 20px; }
label.check input { margin-top: 3px; accent-color: var(--app); }
.err { color: #FF8A7A; background: rgba(255,92,26,.08); border: 1px solid rgba(255,92,26,.3); padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.ok { color: #7FD99A; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.stack { display: grid; gap: 12px; margin-top: 24px; }

/* ---- home */
.hero { padding-top: 96px !important; padding-bottom: 72px !important; }
.eyebrow { font: 500 13px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin-bottom: 22px; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--muted); max-width: 640px; margin-top: 22px; }
.hero h1 { max-width: 900px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  position: relative; display: block; text-decoration: none; padding: 24px; border-radius: var(--r);
  background: var(--raise); border: 1px solid var(--rule); transition: transform .18s, border-color .18s, background .18s;
  overflow: hidden;
}
.card::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 220px; height: 220px; border-radius: 50%; background: var(--app); opacity: 0; filter: blur(70px); transition: opacity .25s; pointer-events: none; }
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--app) 45%, transparent); background: var(--raise2); }
.card:hover::after { opacity: .18; }
.card img { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.card h3 { font-size: 1.4rem; }
.card .kind { font-size: 13px; color: var(--faint); margin-bottom: 12px; }
.card .kind i { font-style: normal; }
.card p:last-child { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0; }
.grid.small { grid-template-columns: repeat(7, 1fr); gap: 10px; }
.grid.small .card { padding: 16px; }
.grid.small .card img { width: 44px; height: 44px; border-radius: 11px; margin-bottom: 12px; }
.grid.small .card h3 { font-size: 1rem; }
.grid.small .card .badge, .grid.small .card p { display: none; }
.grid.small .card .kind { display: block; margin: 4px 0 0; }

.principles { padding-top: 120px !important; }
.four { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.four .num { font: 500 13px var(--head); color: var(--signal); display: block; margin-bottom: 14px; }
.four h3 { margin-bottom: 10px; }
.four p { color: var(--muted); font-size: 15px; }

.pricing { padding-top: 120px !important; }
.price-card { display: grid; grid-template-columns: 1fr 1.4fr; gap: 24px 48px; align-items: center; padding: 40px; border-radius: 22px; background: linear-gradient(140deg, var(--raise2), var(--raise)); border: 1px solid var(--rule); }
.price { font: 700 clamp(4rem, 9vw, 6.5rem)/1 var(--head); letter-spacing: -0.04em; }
.price small { display: block; font: 400 16px var(--body); letter-spacing: 0; color: var(--muted); margin-top: 10px; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 7px; border-left: 2px solid var(--signal); border-bottom: 2px solid var(--signal); transform: rotate(-45deg); }
.price-card .muted { grid-column: 1 / -1; font-size: 14px; margin: 0; }

.faq { padding-top: 120px !important; max-width: 820px !important; }
.faq details { border-top: 1px solid var(--rule); padding: 18px 0; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font: 500 1.1rem var(--head); list-style: none; display: flex; justify-content: space-between; }
.faq summary::after { content: "+"; color: var(--faint); font-size: 1.4rem; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 12px 0 0; }

/* ---- app page */
.app-hero { padding-top: 80px !important; padding-bottom: 40px !important; position: relative; }
.app-hero::before { content: ""; position: absolute; top: 20px; left: -80px; width: 520px; height: 520px; border-radius: 50%; background: var(--app); opacity: .12; filter: blur(120px); pointer-events: none; z-index: -1; }
.app-icon { width: 128px; height: 128px; border-radius: 28px; margin-bottom: 30px; box-shadow: 0 24px 60px -20px color-mix(in srgb, var(--app) 55%, transparent); }
.app-hero .eyebrow { display: flex; gap: 12px; align-items: center; }
.meaning { color: var(--faint); font-size: 15px; margin-top: 10px; }
.tagline { font: 500 clamp(1.4rem, 2.6vw, 2rem)/1.25 var(--head); letter-spacing: -0.02em; margin-top: 18px; color: var(--app); max-width: 760px; }
.app-hero .lede { margin-top: 14px; }
.notify { display: flex; gap: 10px; flex-wrap: wrap; max-width: 520px; width: 100%; }
.notify input { flex: 1; min-width: 220px; }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 40px !important; }
.shots figure { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--rule); background: var(--raise); }
.shots figure img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 10; }
.shots figure.first { grid-column: 1 / -1; }
.shots.empty { grid-template-columns: 1fr; }
.placeholder { border: 1px dashed var(--rule); border-radius: 18px; padding: 70px 24px; display: grid; place-items: center; text-align: center; color: var(--faint); background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--app) 10%, transparent), transparent 60%); }
.placeholder img { width: 120px; height: 120px; border-radius: 26px; margin-bottom: 20px; opacity: .9; }

.features { padding-top: 110px !important; }
.feat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.feat { background: var(--page); padding: 26px 24px; }
.feat h3 { margin-bottom: 8px; font-size: 1.05rem; }
.feat h3::before { content: ""; display: block; width: 18px; height: 3px; border-radius: 2px; background: var(--app); margin-bottom: 16px; }
.feat p { color: var(--muted); font-size: 15px; margin: 0; }
.replaces { margin-top: 26px; color: var(--muted); }
.replaces b { color: var(--ink); font-weight: 500; }

.price-strip { margin-top: 100px !important; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding: 36px 40px !important; border-radius: 22px; background: color-mix(in srgb, var(--app) 9%, var(--raise)); border: 1px solid color-mix(in srgb, var(--app) 30%, transparent); max-width: calc(var(--max) - 48px) !important; }
.price-strip h2 { margin: 0 0 6px; }
.price-strip p { color: var(--muted); margin: 0; }
.price-strip .cta { margin: 0; }
.more { padding-top: 110px !important; }
.more h2 { font-size: 1.4rem; }

/* ---- narrow pages: checkout, account */
.narrow { max-width: 620px !important; padding-top: 80px !important; }
.narrow.wide-ish { max-width: 820px !important; }
.narrow h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.checkout { background: var(--raise); border: 1px solid var(--rule); border-radius: 22px; padding: 36px; }
.checkout img { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 20px; }
.checkout h1 { font-size: 2.2rem; }
.checkout .muted { margin-top: 6px; }
.line { display: flex; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin: 24px 0 8px; }
.checkout .small { margin: 18px 0 0; }

.key { background: var(--raise); border: 1px solid var(--rule); border-radius: 14px; padding: 18px; margin: 20px 0; }
.key code { display: block; font: 12.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; color: var(--ink); max-height: 4.8em; overflow: hidden; mask-image: linear-gradient(#000 65%, transparent); }
.key-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.steps { color: var(--muted); padding-left: 20px; }
.steps li { margin: 6px 0; }
.steps b { color: var(--ink); font-weight: 500; }

.acct-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 30px; }
.acct-head .eyebrow { margin-bottom: 10px; }
.h-email { font-size: clamp(1.6rem, 4vw, 2.4rem) !important; word-break: break-all; }
.licence { border-top: 1px solid var(--rule); padding: 26px 0 6px; }
.lic-head { display: flex; gap: 14px; align-items: center; }
.lic-head img { width: 48px; height: 48px; border-radius: 12px; }
.lic-head p { margin: 2px 0 0; }
.licence .btn:not(.ghost) { background: var(--app); color: var(--app-ink, #fff); }
.empty-box { border: 1px dashed var(--rule); border-radius: 18px; padding: 32px; }

.prose h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
.prose p { color: var(--muted); }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .grid.small { grid-template-columns: repeat(4, 1fr); }
  .four, .feat-grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .top nav a:not(.account) { display: none; }
  .grid, .four, .feat-grid, .ticks, .price-card { grid-template-columns: 1fr; }
  .grid.small { grid-template-columns: repeat(2, 1fr); }
  .shots { grid-template-columns: 1fr; }
  .price-card, .checkout { padding: 26px; }
  .hero { padding-top: 56px !important; }
}
