/* Homepage (Nov 2026 redesign). Self-contained: does not depend
   on homepage-2026.css or the global menu. Light-first with a matching dark theme.
   Layout: one nav row, playable hero, three-stage path, specs, contest proof,
   apps, plans, footer. One accent: transmit amber. */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/ibm-plex/IBMPlexSans-Regular-Latin1.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/ibm-plex/IBMPlexSans-Medium-Latin1.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/ibm-plex/IBMPlexSans-SemiBold-Latin1.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url(../assets/fonts/ibm-plex/IBMPlexSans-Bold-Latin1.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(../assets/fonts/ibm-plex/IBMPlexMono-Regular-Latin1.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(../assets/fonts/ibm-plex/IBMPlexMono-Medium-Latin1.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(../assets/fonts/ibm-plex/IBMPlexMono-SemiBold-Latin1.woff2) format("woff2"); }

:root {
  --paper: #f5f6f3;
  --panel: #ffffff;
  --ink: #12202f;
  --ink-2: #44515f;
  --ink-3: #66717d;
  --line: #d9ddd8;
  --line-2: #c4cac4;
  --navy: #12202f;
  --navy-ink: #e9edf0;
  --amber: #c9761a;
  --amber-ink: #8a4c08;
  --amber-soft: #f6e6cf;
  --on-amber: #1d1206;
  --shadow: rgba(18, 32, 47, 0.45);
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.1875rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 3.2vw, 2.25rem);
  --step-4: clamp(2.375rem, 5.2vw, 4rem);
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e161f; --panel: #142030; --ink: #e6ebef; --ink-2: #b3bec8; --ink-3: #8f9ba7;
    --line: #243345; --line-2: #33465b; --navy: #0a1119; --navy-ink: #e6ebef;
    --amber: #f0a24a; --amber-ink: #f6bd7c; --amber-soft: #3a2a17; --shadow: rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); font-size: var(--step-0); line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.hp-wrap { max-width: 1160px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.hp-label { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.hp-skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: var(--radius); z-index: 20; }
.hp-skip:focus { left: 8px; }

/* Preview notice */
.hp-preview-bar { background: var(--navy); color: var(--navy-ink); font-size: var(--step--1); }
.hp-preview-bar .hp-wrap { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between; padding-block: 8px; }
.hp-preview-bar a { color: inherit; }

/* Header */
.hp-head { position: sticky; top: 0; z-index: 10; background: var(--panel); border-bottom: 1px solid var(--line); }
.hp-head .hp-wrap { display: flex; align-items: center; gap: 28px; min-height: 60px; }
.hp-brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.hp-brand b { font-weight: 700; font-size: 1.0625rem; letter-spacing: 0.04em; }
.hp-brand span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--amber-ink); letter-spacing: 0.08em; }
.hp-nav { display: flex; gap: 22px; font-size: 0.9375rem; color: var(--ink-2); }
.hp-nav a { text-decoration: none; padding-block: 18px; border-bottom: 2px solid transparent; }
.hp-nav a:hover { color: var(--ink); border-bottom-color: var(--line-2); }
.hp-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.hp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font: 600 0.9375rem/1 var(--font-body); padding: 12px 18px; border-radius: var(--radius); text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.hp-btn-primary { background: var(--ink); color: var(--paper); }
.hp-btn-primary:hover { background: color-mix(in srgb, var(--ink) 86%, var(--amber)); }
.hp-btn-quiet { color: var(--ink); border-color: var(--line-2); background: transparent; }
.hp-btn-quiet:hover { border-color: var(--ink-3); }
.hp-btn-sm { min-height: 40px; padding: 9px 14px; font-size: 0.875rem; }
.hp-brand b, .hp-btn { white-space: nowrap; }
@media (max-width: 880px) { .hp-nav { display: none; } .hp-actions .hp-btn-quiet { display: none; } .hp-head .hp-wrap { gap: 12px; } }
@media (max-width: 420px) { .hp-brand span { display: none; } .hp-brand b { font-size: 0.9375rem; } }

/* Hero */
.hp-hero { padding-block: 56px 64px; border-bottom: 1px solid var(--line); }
.hp-hero .hp-wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; }
.hp-hero h1 { font-size: var(--step-4); margin-top: 14px; }
.hp-hero h1 em { font-style: normal; color: var(--amber-ink); }
.hp-lede { margin-top: 20px; font-size: var(--step-1); color: var(--ink-2); max-width: 34em; }
.hp-ctas { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; }
.hp-fine { margin-top: 16px; font-size: var(--step--1); color: var(--ink-3); }
@media (max-width: 920px) { .hp-hero .hp-wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; } .hp-hero { padding-block: 32px 44px; } }

/* Signal instrument */
.hp-instrument { background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 1px 0 var(--line), 0 18px 40px -28px var(--shadow); overflow: hidden; }
.hp-inst-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.hp-led { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--ink-3); }
.hp-led i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.hp-led.is-on i { background: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.hp-readout { padding: 20px 16px 8px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.hp-char { font-family: var(--font-mono); font-weight: 600; font-size: 4rem; line-height: 1; min-width: 1.4ch; text-align: center; }
.hp-char.is-long { font-size: 2.5rem; }
.hp-pattern { font-family: var(--font-mono); font-size: 1.5rem; letter-spacing: 0.25em; color: var(--ink-2); overflow-wrap: anywhere; }
.hp-note { font-size: var(--step--1); color: var(--ink-3); margin-top: 4px; }
.hp-timing { padding: 4px 16px 0; overflow-x: auto; }
.hp-timing svg { display: block; width: 100%; min-width: 300px; height: auto; }
.hp-controls { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: center; justify-content: space-between; padding: 14px 16px 16px; border-top: 1px solid var(--line); margin-top: 10px; }
.hp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hp-chip { font: 600 0.9375rem var(--font-mono); min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--paper); color: var(--ink); cursor: pointer; }
.hp-chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.hp-chip.is-word { font-family: var(--font-body); font-size: 0.875rem; }
.hp-speed { display: flex; align-items: center; gap: 10px; font-size: var(--step--1); color: var(--ink-2); }
.hp-speed select { font: 500 0.875rem var(--font-mono); min-height: 44px; padding: 8px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); }
.hp-play { background: var(--amber); color: var(--on-amber); border: none; }
.hp-play:hover { background: color-mix(in srgb, var(--amber) 88%, #000); }
.hp-order { padding: 12px 16px 14px; border-top: 1px dashed var(--line); font-family: var(--font-mono); font-size: 0.8125rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.hp-order b { color: var(--ink); font-weight: 600; }
.hp-order .hp-order-label { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; margin-right: 6px; }

/* Sections */
.hp-band { padding-block: 72px; border-bottom: 1px solid var(--line); }
.hp-sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px 56px; align-items: end; margin-bottom: 40px; }
.hp-sec-head h2 { font-size: var(--step-3); }
.hp-sec-head p { color: var(--ink-2); max-width: 36em; }
@media (max-width: 800px) { .hp-sec-head { grid-template-columns: minmax(0, 1fr); } .hp-band { padding-block: 52px; } }

/* Path (a real sequence, so numbered) */
.hp-path { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.hp-stage { padding: 22px 28px 26px 0; display: grid; grid-template-rows: auto auto auto 1fr auto; gap: 12px; }
.hp-stage + .hp-stage { padding-left: 28px; border-left: 1px solid var(--line); }
.hp-stage-n { font-family: var(--font-mono); font-size: 0.8125rem; color: var(--amber-ink); letter-spacing: 0.06em; }
.hp-stage h3 { font-size: var(--step-2); }
.hp-stage p { color: var(--ink-2); }
.hp-shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--navy); aspect-ratio: 960 / 300; }
.hp-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.hp-trainers { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.hp-trainers li { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.hp-trainers a { text-decoration: none; font-weight: 500; padding: 11px 0; flex: 1; }
.hp-trainers a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hp-tier { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); white-space: nowrap; align-self: center; }
.hp-tier.is-pro { color: var(--amber-ink); }
@media (max-width: 880px) { .hp-path { grid-template-columns: minmax(0, 1fr); } .hp-stage, .hp-stage + .hp-stage { padding: 22px 0; border-left: none; } .hp-stage + .hp-stage { border-top: 1px solid var(--line); } }

/* Specs */
.hp-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.hp-spec { padding: 18px 20px; }
.hp-spec + .hp-spec { border-left: 1px solid var(--line); }
.hp-spec dt { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.hp-spec dd { margin: 6px 0 0; font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.hp-spec dd small { display: block; font-weight: 400; font-size: var(--step--1); color: var(--ink-2); margin-top: 2px; letter-spacing: 0; }
@media (max-width: 880px) and (min-width: 521px) { .hp-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hp-spec:nth-child(3) { border-left: none; } .hp-spec:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 520px) { .hp-specs { grid-template-columns: minmax(0, 1fr); } .hp-spec + .hp-spec { border-left: none; border-top: 1px solid var(--line); } }

/* Contest */
.hp-contest .hp-wrap { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: center; }
.hp-contest h2 { font-size: var(--step-3); margin-top: 12px; }
.hp-contest .hp-copy p { margin-top: 16px; color: var(--ink-2); }
.hp-contest .hp-copy .hp-ctas { margin-top: 24px; }
.hp-figure { margin: 0; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; }
.hp-figure img { width: 100%; }
.hp-figure figcaption { padding: 10px 14px; font-size: var(--step--1); color: var(--ink-3); border-top: 1px solid var(--line); }
@media (max-width: 920px) { .hp-contest .hp-wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* Apps */
.hp-apps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.hp-main-app { background: var(--navy); color: var(--navy-ink); border-radius: 10px; padding: 28px; display: grid; gap: 14px; }
.hp-main-app .hp-label { color: color-mix(in srgb, var(--navy-ink) 65%, transparent); }
.hp-main-app h3 { font-size: var(--step-2); display: flex; align-items: center; gap: 14px; }
.hp-main-app h3 img { width: 52px; height: 52px; border-radius: 12px; }
.hp-main-app p { color: color-mix(in srgb, var(--navy-ink) 82%, transparent); }
.hp-store { color: var(--navy-ink); border-color: color-mix(in srgb, var(--navy-ink) 35%, transparent); background: transparent; justify-self: start; }
.hp-micro { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.hp-micro li { border-bottom: 1px solid var(--line); }
.hp-micro a { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; text-decoration: none; }
.hp-micro img { width: 44px; height: 44px; border-radius: 10px; }
.hp-micro b { display: block; font-weight: 600; }
.hp-micro span { font-size: var(--step--1); color: var(--ink-3); }
.hp-micro a:hover b { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 880px) { .hp-apps { grid-template-columns: minmax(0, 1fr); } }

/* Plans */
.hp-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.hp-plan { padding: 26px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 12px; }
.hp-plan + .hp-plan { border-left: 1px solid var(--line); }
.hp-plan h3 { font-size: var(--step-2); }
.hp-price { font-family: var(--font-mono); font-size: 0.875rem; color: var(--ink-3); }
.hp-plan ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); display: grid; gap: 6px; }
.hp-plan .hp-btn { justify-self: start; }
.hp-plan.is-featured { box-shadow: inset 0 3px 0 var(--amber); }
@media (max-width: 880px) { .hp-plans { grid-template-columns: minmax(0, 1fr); } .hp-plan + .hp-plan { border-left: none; border-top: 1px solid var(--line); } }

/* Blog */
.hp-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.hp-post { display: grid; gap: 12px; text-decoration: none; }
.hp-post img { border-radius: var(--radius); border: 1px solid var(--line); aspect-ratio: 1120 / 487; object-fit: cover; width: 100%; }
.hp-post time { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); letter-spacing: 0.04em; }
.hp-post h3 { font-size: var(--step-1); line-height: 1.25; }
.hp-post:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
/* Cards injected by index.php (includes/public-blog-card.php markup). */
.hp-posts .blog-card { display: grid; gap: 12px; align-content: start; }
.hp-posts .blog-card__media { position: relative; display: block; aspect-ratio: 1120 / 487; border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; background: var(--navy); text-decoration: none; }
.hp-posts .blog-card__picture, .hp-posts .blog-card__picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hp-posts .blog-card__fallback { position: absolute; inset: 0; display: grid; align-content: center; justify-items: start; gap: 4px; padding: 16px; color: var(--navy-ink); font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; }
.hp-posts .blog-card__fallback strong { font-family: var(--font-body); font-size: 1rem; text-transform: none; letter-spacing: 0; }
.hp-posts .blog-card__media:not(.is-missing) .blog-card__fallback { visibility: hidden; }
.hp-posts .blog-card__body { display: grid; gap: 8px; }
.hp-posts .blog-card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-3); letter-spacing: 0.04em; }
.hp-posts .blog-card h3 { font-size: var(--step-1); line-height: 1.25; }
.hp-posts .blog-card h3 a { text-decoration: none; }
.hp-posts .blog-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hp-posts .blog-card p { color: var(--ink-2); font-size: 0.9375rem; }
.hp-posts .blog-card__link { font-weight: 600; font-size: 0.9375rem; text-decoration: none; color: var(--amber-ink); }
.hp-posts .blog-card__link:hover { text-decoration: underline; text-underline-offset: 3px; }
.hp-posts > .home-intro { grid-column: 1 / -1; color: var(--ink-2); }
@media (max-width: 880px) { .hp-posts { grid-template-columns: minmax(0, 1fr); } }

/* Footer */
.hp-foot { padding-block: 44px 56px; color: var(--ink-3); font-size: var(--step--1); }
.hp-foot .hp-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.hp-foot h4 { font-size: 0.75rem; font-family: var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 10px; font-weight: 500; }
.hp-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hp-foot a { text-decoration: none; }
.hp-foot a:hover { color: var(--ink); text-decoration: underline; }
.hp-foot .hp-sign { font-family: var(--font-mono); margin-top: 10px; }
@media (max-width: 760px) { .hp-foot .hp-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hp-foot .hp-about { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
