:root {
  --ink: #12203f;
  --ink-2: #1c2f57;
  --line: #7f9fdc;
  --line-dim: #3d548c;
  --paper: #f4f1e8;
  --paper-2: #ece6d4;
  --ink-text: #1a2238;
  --muted-text: #4b4536;
  --muted-label: #6b6450;
  --border: #ded6c1;
  --amber: #f2a93b;
  --amber-dim: #c98a2c;
  --white: #f7f8fb;
  --white-text: #cbd6ee;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink-text); font-family: 'IBM Plex Sans', sans-serif; line-height: 1.6; }
a { color: inherit; }
.mono { font-family: 'IBM Plex Mono', monospace; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 28px; }

.hero, .blueprint {
  background: repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(127, 159, 220, 0.14) 28px), repeating-linear-gradient(90deg, transparent, transparent 27px, rgba(127, 159, 220, 0.14) 28px), linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--white);
}

/* ---------- HEADER ---------- */
header.blueprint { padding: 2.5rem 0 1.25rem; }
.header-split { display: block; padding: 0 20px; }
.titleblock { width: 100%; font-size: 12px; letter-spacing: 0.08em; color: var(--line); }
.titleblock span { display: block; margin-bottom: 0.25rem; }
.titleblock span:first-child { font-size: 1.5rem; font-weight: 500; }
.titleblock strong { color: var(--white); }
.site-nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 1.5rem; margin-top: 1.35rem; padding-top: 0.9rem; border-top: 1px solid var(--line-dim); font-size: 0.95rem; }
.site-nav a, footer nav a { text-decoration: none; }
.site-nav a:hover, footer nav a:hover { opacity: 0.7; }

/* ---------- HERO ---------- */
.hero { padding: 70px 0 84px; }
.eyebrow { display: inline-block; margin-bottom: 22px; padding: 5px 10px; border: 1px solid var(--amber-dim); border-radius: 2px; color: var(--amber); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
h1 { margin: 0 0 20px; color: var(--white); font-family: 'IBM Plex Mono', monospace; font-size: clamp(32px, 5vw, 52px); font-weight: 600; line-height: 1.15; }
.hero-sub { max-width: 48ch; margin-bottom: 34px; color: var(--white-text); font-size: 18px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 3px; font-family: 'IBM Plex Mono', monospace; font-size: 14px; letter-spacing: 0.03em; text-decoration: none; transition: transform 0.15s ease, background 0.15s ease; }
.btn-primary { background: var(--amber); color: var(--ink); font-weight: 600; }
.btn-primary:hover { background: #ffbf5c; transform: translateY(-1px); }
.btn-ghost { border: 1px solid var(--line-dim); color: var(--white); }
.btn-ghost:hover { border-color: var(--line); transform: translateY(-1px); }
.btn-outline { border: 1px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }

/* ---------- INNER PAGE HERO ---------- */
.page-hero { padding: 64px 0; background: var(--ink); color: var(--white); }
.page-hero p { max-width: 60ch; margin: 0; color: var(--white-text); font-size: 18px; }
.page-hero .page-content { max-width: 70ch; margin-top: 28px; color: var(--white-text); }
.error-page .btn { margin-top: 28px; }

/* ---------- THEME CATALOG ---------- */
.catalog-section { padding: 72px 0 84px; }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.catalog-card { display: flex; flex-direction: column; overflow: hidden; background: var(--white); border: 1px solid var(--border); }
.catalog-preview { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); border-bottom: 1px solid var(--border); text-decoration: none; }
.catalog-preview img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.catalog-preview:hover img { transform: scale(1.02); }
.catalog-preview-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted-label); font-size: 12px; letter-spacing: 0.12em; }
.catalog-card-body { display: flex; flex-direction: column; flex-grow: 1; padding: 26px; }
.catalog-card h2 { margin: 8px 0 8px; font-size: 24px; }
.catalog-card h2 a { text-decoration: none; }
.catalog-card h2 a:hover { text-decoration: underline; }
.catalog-card-body > p { flex-grow: 1; margin: 0 0 18px; color: var(--muted-text); font-size: 14.5px; }
.catalog-card .btn { align-self: flex-start; margin-top: auto; }
.catalog-features { margin: 0 0 24px; padding: 0; list-style: none; color: var(--muted-text); font-size: 13.5px; }
.catalog-features li { position: relative; padding-left: 18px; }
.catalog-features li::before { content: '✓'; position: absolute; left: 0; color: var(--amber-dim); font-family: 'IBM Plex Mono', monospace; font-weight: 600; }

/* ---------- THEME DETAIL ---------- */
.theme-detail-hero { padding: 70px 0 84px; background: var(--ink); color: var(--white); }
.theme-detail-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); align-items: center; gap: 56px; }
.theme-detail-preview { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); border: 1px solid var(--line-dim); box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.14); }
.theme-detail-preview img { display: block; width: 100%; height: 100%; object-fit: cover; }
.theme-detail-content { padding: 84px 0; }
.theme-content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.7fr); gap: 64px; }
.page-content { max-width: 70ch; }
.page-content h2 { margin: 0 0 18px; font-family: 'IBM Plex Mono', monospace; font-size: 26px; }
.page-content h3 { margin: 34px 0 10px; font-size: 20px; }
.page-content p { margin: 0 0 18px; color: var(--muted-text); }
.page-content ul { margin: 0 0 24px; padding-left: 1.25rem; color: var(--muted-text); }
.page-content .btn { margin: 8px 8px 8px 0; }
.theme-features { align-self: start; padding: 26px; background: var(--paper-2); border: 1px solid var(--border); }
.theme-features .spec-head { margin-bottom: 24px; }
.theme-features ul { margin: 0; padding: 0; list-style: none; }
.theme-features li { padding: 10px 0 10px 22px; border-bottom: 1px solid var(--border); color: var(--muted-text); font-size: 14px; }
.theme-features li:last-child { border-bottom: 0; }
.theme-features li::before { content: '✓'; margin-left: -22px; margin-right: 8px; color: var(--amber-dim); font-family: 'IBM Plex Mono', monospace; font-weight: 600; }

/* ---------- SECTION HEADINGS ---------- */
.spec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 42px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }
.spec-head h2 { margin: 0; font-family: 'IBM Plex Mono', monospace; font-size: 26px; }
.spec-head span { color: var(--muted-label); font-family: 'IBM Plex Mono', monospace; font-size: 12px; }

/* ---------- SUITE ---------- */
.suite { padding: 84px 0; background: var(--paper); border-bottom: 1px solid var(--border); }
.suite-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.sheet-card { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px; background: var(--white); border: 1px solid var(--border); }
.sheet-card .corner { position: absolute; width: 12px; height: 12px; border: 2px solid var(--ink); }
.sheet-card .corner.tl { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.sheet-card .corner.br { right: -1px; bottom: -1px; border-left: none; border-top: none; }
.sheet-top { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; letter-spacing: 0.06em; }
.sheet-id, .flow-num { color: var(--amber-dim); font-weight: 600; }
.sheet-status { color: var(--muted-label); text-transform: uppercase; }
.sheet-card h3 { margin: 2px 0; font-size: 19px; }
.sheet-card p, .tool-card p, .flow-step p, .audience-card p { color: var(--muted-text); }
.sheet-card p { flex-grow: 1; margin: 0; font-size: 14px; }
.sheet-link { margin-top: 6px; color: var(--amber-dim); font-size: 13px; text-decoration: none; }
.sheet-link:hover { text-decoration: underline; }

/* ---------- FLOW ---------- */
.flow { padding: 84px 0; background: var(--paper-2); border-bottom: 1px solid var(--border); }
.flow-row { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.flow-step { flex: 1 1 180px; min-width: 160px; }
.flow-num { display: block; margin-bottom: 8px; font-size: 13px; }
.flow-step h3 { margin: 0 0 6px; font-size: 16px; }
.flow-step p { margin: 0; font-size: 13.5px; }
.flow-arrow { align-self: center; padding: 0 4px; color: var(--amber-dim); font-size: 20px; }

/* ---------- AUDIENCES ---------- */
.audiences { padding: 84px 0; }
.audience-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.audience-card { display: flex; flex-direction: column; gap: 14px; padding: 30px; border: 1px solid var(--ink); }
.audience-card h3 { margin: 0; font-size: 20px; }
.audience-card p { flex-grow: 1; margin: 0; font-size: 14.5px; }
.audience-card .btn { align-self: flex-start; }

/* ---------- FREE TOOLS ---------- */
.free-tools { padding: 0 0 84px; background: var(--paper); }
.free-tools-sub { max-width: 60ch; margin: -22px 0 32px; color: #5b5541; font-size: 14.5px; }
.free-tools-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.tool-card { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--paper-2); border: 1px dashed #b9b092; }
.tool-card h3 { margin: 0; font-size: 17px; }
.tool-card p { flex-grow: 1; margin: 0; font-size: 14px; }
.tool-card .sheet-link { font-size: 13px; }

/* ---------- CONTACT ---------- */
.contact { padding: 84px 0; background: var(--ink); color: var(--white); text-align: center; }
.contact h2 { margin: 0 0 14px; font-size: 26px; }
.contact p { max-width: 50ch; margin: 0 auto 28px; color: var(--white-text); }
.contact .btn { display: inline-flex; }

/* ---------- FOOTER ---------- */
footer { padding: 3rem 0; background: var(--ink); color: var(--line); border-top: 1px solid var(--line-dim); font-size: 12px; }
footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }
footer strong { color: var(--white); font-family: 'IBM Plex Mono', monospace; }
footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 1.25rem; }
footer span:last-child { margin-top: 0.5rem; font-size: 0.85rem; opacity: 0.8; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .suite-grid, .audience-grid, .free-tools-grid, .catalog-grid, .theme-detail-grid, .theme-content-grid { grid-template-columns: 1fr; }
  .flow-arrow { display: none; }
  .spec-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .theme-detail-preview { order: -1; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  header.blueprint { padding: 2rem 0 1rem; }
  .header-split { padding: 0; }
  .titleblock { text-align: center; }
  .titleblock span:first-child { font-size: 1.2rem; }
  .site-nav { justify-content: center; gap: 0.85rem 1rem; margin-top: 1.15rem; padding-top: 0.8rem; font-size: 0.88rem; }
  .hero { padding: 54px 0 64px; }
  .suite, .flow, .audiences, .contact, .theme-detail-content { padding: 64px 0; }
  .free-tools, .catalog-section { padding-bottom: 64px; }
  .theme-detail-hero { padding: 54px 0 64px; }
  .theme-detail-preview { box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.14); }
}

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