/* Gilware — shared styles. Colors from the brand kit (~/projects/gilware-brand/README.md). */
:root {
  --ink: #14213D;
  --ink-soft: #3A4766;
  --muted: #5F6B85;
  --line: #E3E7F0;
  --bg: #FFFFFF;
  --bg-soft: #F6F8FC;
  --bg-deep: #0D1730;
  --amber: #F5A524;
  --amber-ink: #8A5A00;
  --teal: #0E9F8E;
  --link: #0B7D70;
  --code-bg: #EEF2F8;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 12px 32px rgba(20, 33, 61, .08);
  --radius: 14px;
  --max: 1120px;
  --font-head: "Sora", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E6EAF5;
    --ink-soft: #C3CADB;
    --muted: #94A0BA;
    --line: #233152;
    --bg: #0B1328;
    --bg-soft: #101B36;
    --bg-deep: #070E1F;
    --amber-ink: #F5A524;
    --teal: #2DD4BF;
    --link: #2DD4BF;
    --code-bg: #16233F;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); letter-spacing: -.025em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--font-mono); font-size: .88em; background: var(--code-bg); padding: .12em .4em; border-radius: 6px; }
pre { font-family: var(--font-mono); font-size: .86rem; line-height: 1.6; background: var(--code-bg); padding: 16px 18px; border-radius: 10px; overflow-x: auto; }
pre code { background: none; padding: 0; }

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

/* Theme-aware logos: the -dark files on dark backgrounds */
.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .on-light { display: none; }
  :root:not([data-theme="light"]) .on-dark { display: block; }
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: 28px; align-items: center; font-size: .95rem; }
.nav a { color: var(--ink-soft); }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 600; font-size: .98rem; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--bg); box-shadow: var(--shadow); }
.btn-accent { background: var(--amber); color: #1B1405; box-shadow: 0 8px 24px rgba(245, 165, 36, .3); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--bg); }
.btn-ghost:hover { border-color: var(--ink-soft); }

/* Sections */
section { padding: 96px 0; }
.section-soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-block; font: 600 .78rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--amber-ink); margin-bottom: 18px; }
.lead { font-size: 1.2rem; color: var(--ink-soft); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Hero */
.hero { padding: 120px 0 104px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 760px; height: 760px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 165, 36, .14), transparent 70%);
  pointer-events: none;
}
.hero h1 { max-width: 820px; }
.hero h1 .bar { display: inline-block; width: .9em; height: .16em; background: var(--amber); border-radius: 99px; vertical-align: .18em; margin-left: .1em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: center; }

/* Release card illustration in the hero */
.release { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 26px; font-size: .92rem; position: relative; }
.release .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.release .title { font: 600 .78rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.release .versions { display: flex; align-items: center; gap: 12px; margin: 18px 0 20px; font: 600 1.9rem/1 var(--font-head); }
.release .versions .old { color: var(--muted); }
.release .versions .arrow { width: 28px; height: 6px; border-radius: 6px; background: var(--amber); }
.release .pill { font: 600 .72rem/1 var(--font-head); padding: 6px 10px; border-radius: 99px; letter-spacing: .04em; }
.release .pill.major { background: rgba(245, 165, 36, .18); color: var(--amber-ink); }
.release .pill.ok { background: rgba(14, 159, 142, .14); color: var(--teal); }
.release .change { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: start; }
.release .change code { font-size: .8rem; }
.release .change span { color: var(--ink-soft); font-size: .86rem; }
.release .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--amber); }
.release .dot.teal { background: var(--teal); }

/* Grid of cards */
.grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 48px; }
.card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { margin-top: 14px; }
.card p { color: var(--ink-soft); margin: 0; }
.icon-dot { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--code-bg); }
.icon-dot svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-dot svg .accent { stroke: var(--amber); }

/* Product feature (Bumpwise on the home page) */
.product { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 20px; padding: 48px; box-shadow: var(--shadow); margin-top: 48px; }
.product .logo img { height: 40px; width: auto; margin-bottom: 22px; }
.product ul { padding: 0; margin: 0 0 28px; list-style: none; }
.product li { padding: 6px 0 6px 28px; position: relative; color: var(--ink-soft); }
.product li::before { content: ""; position: absolute; left: 0; top: 15px; width: 14px; height: 4px; border-radius: 4px; background: var(--amber); }
.shot { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; background: #1E1F22; }

/* Feature rows (product page) */
.feature { display: grid; grid-template-columns: 1fr 1.4fr; gap: 56px; align-items: center; padding: 56px 0; }
.feature.reverse { grid-template-columns: 1.4fr 1fr; }
.feature.reverse .text { order: 2; }
.feature + .feature { border-top: 1px solid var(--line); }
.feature .text p { color: var(--ink-soft); }

/* Languages strip */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.chip { border: 1px solid var(--line); background: var(--bg); padding: 7px 14px; border-radius: 99px; font-size: .9rem; color: var(--ink-soft); }
.chip b { color: var(--ink); font-weight: 600; }

/* Editions */
.editions { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 48px; }
.edition { border: 1px solid var(--line); border-radius: 18px; padding: 36px; background: var(--bg); }
.edition.featured { border: 2px solid var(--ink); box-shadow: var(--shadow); position: relative; }
.edition .tag { position: absolute; top: -13px; left: 32px; background: var(--amber); color: #1B1405; font: 600 .75rem/1 var(--font-head); padding: 7px 12px; border-radius: 99px; letter-spacing: .05em; }
.edition h3 { font-size: 1.4rem; }
.edition .sub { color: var(--muted); margin-bottom: 22px; }
.edition ul { list-style: none; padding: 0; margin: 0 0 28px; }
.edition li { padding: 7px 0 7px 26px; position: relative; color: var(--ink-soft); border-top: 1px solid var(--line); }
.edition li:first-child { border-top: none; }
.edition li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }

/* Call to action band */
.cta { background: var(--bg-deep); color: #E6EAF5; border-radius: 20px; padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin: 0 0 6px; }
.cta p { color: #B7C0D6; margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.site-footer img { height: 24px; width: auto; }
.site-footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Documentation layout */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; padding: 48px 0 96px; }
.toc { position: sticky; top: 92px; align-self: start; max-height: calc(100vh - 110px); overflow-y: auto; font-size: .92rem; }
.toc p { font: 600 .75rem/1 var(--font-head); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.toc a { display: block; padding: 5px 0 5px 12px; color: var(--ink-soft); border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); border-left-color: var(--amber); text-decoration: none; }
.prose { max-width: 760px; }
.prose h1 { font-size: 2.4rem; }
.prose h2 { margin-top: 64px; padding-top: 8px; scroll-margin-top: 90px; }
.prose h3 { margin-top: 32px; scroll-margin-top: 90px; }
.prose p, .prose li { color: var(--ink-soft); }
.prose figure { margin: 28px 0; }
.prose figcaption { font-size: .88rem; color: var(--muted); margin-top: 10px; }
.prose table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .94rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--font-head); font-weight: 600; color: var(--ink); }
.note { border-left: 4px solid var(--amber); background: var(--bg-soft); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 20px 0; }
.note p:last-child { margin: 0; }
.team { font: 600 .7rem/1 var(--font-head); letter-spacing: .06em; color: #1B1405; background: var(--amber); padding: 4px 8px; border-radius: 99px; vertical-align: .2em; margin-left: 6px; }

/* Legal pages */
.legal { max-width: 760px; padding: 64px 0 96px; }
.legal h1 { font-size: 2.4rem; }
.legal h2 { font-size: 1.3rem; margin-top: 40px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal .updated { color: var(--muted); }

@media (max-width: 900px) {
  section { padding: 72px 0; }
  .hero { padding: 80px 0 72px; }
  .product, .feature, .feature.reverse, .editions, .hero-grid { grid-template-columns: 1fr; }
  .feature.reverse .text { order: 0; }
  .product { padding: 28px; gap: 32px; }
  .docs { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
  .nav .hide-sm { display: none; }
  .cta { padding: 36px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .nav { gap: 16px; }
  .brand img { height: 26px; }
}

/* Home: products only */
.intro { padding: 88px 0 8px; }
.intro h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
.products { padding: 40px 0 112px; }
.products .product { margin-top: 0; }
.product-link { color: inherit; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.product-link:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--ink-soft); }
