:root {
  --paper: #f6f3ed;
  --surface: #fffaf1;
  --ink: #18212a;
  --muted: #66717c;
  --line: #ded6c9;
  --accent: #c54d34;
  --teal: #0f766e;
  --gold: #a96f18;
  --steel: #26384a;
  --shadow: 0 18px 50px rgba(24, 33, 42, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 12% 0%, #fff6df 0, transparent 28rem), var(--paper);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); background: rgba(246, 243, 237, .86); border-bottom: 1px solid rgba(222, 214, 201, .82); }
.topbar .shell { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; }
.brand { font-weight: 800; letter-spacing: .02em; color: var(--steel); }
nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
nav a:hover { color: var(--accent); }
.hero { padding: 54px 0 48px; }
.hero .shell { width: min(1500px, calc(100% - 72px)); }
.hero-layout { display: grid; grid-template-columns: minmax(350px, .62fr) minmax(680px, 1.38fr); align-items: center; gap: 54px; }
.hero-content { min-width: 0; }
.hero-head { max-width: 780px; }
.hero-copy { margin-top: 20px; }
.eyebrow { color: var(--accent); font-weight: 800; text-transform: uppercase; font-size: 13px; letter-spacing: .12em; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: 0; }
h1 { margin-top: 12px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(40px, 4.35vw, 66px); max-width: 10ch; }
.hero h1 { max-width: 10.8ch; }
h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(31px, 4.8vw, 54px); }
h3 { font-size: 20px; }
p { margin: 0; }
.lead { margin-top: 0; max-width: 50ch; color: #3d4853; font-size: 17px; }
.hero-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; padding: 0 15px; border: 1px solid var(--ink); border-radius: 8px; font-weight: 750; }
.button.primary { background: var(--ink); color: white; }
.button.secondary { border-color: transparent; padding-inline: 4px; color: var(--ink); }
.button.secondary:hover { color: var(--accent); }
.hero-board { display: grid; grid-template-columns: 1fr 330px; gap: 1px; margin-top: 30px; border: 1px solid var(--line); background: var(--line); box-shadow: var(--shadow); }
.hero-art { margin: 0; border: 1px solid var(--line); border-radius: 8px; background: #eef3f6; box-shadow: var(--shadow); overflow: hidden; }
.hero-art img { width: 100%; aspect-ratio: 2.357; object-fit: cover; object-position: center; }
.hero-map { background: linear-gradient(135deg, rgba(255,250,241,.95), #eaf4f2); padding: 28px; }
.source-node { max-width: 420px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--ink); color: white; }
.source-node span, .flow-track span { display: inline-flex; margin-bottom: 8px; font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.source-node span { color: #f2c17d; }
.source-node strong, .source-node em, .flow-track strong, .flow-track em { display: block; }
.source-node strong { font-size: 24px; }
.source-node em { margin-top: 8px; color: #d9e1e8; font-style: normal; }
.flow-track { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 24px; }
.flow-track::before { content: ""; position: absolute; left: 0; right: 0; top: 28px; height: 2px; background: var(--teal); opacity: .38; }
.flow-track > div { position: relative; min-height: 156px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,250,241,.95); }
.flow-track span { color: var(--accent); }
.flow-track strong { font-size: 17px; color: var(--ink); }
.flow-track em { margin-top: 8px; color: var(--muted); font-style: normal; font-size: 13px; line-height: 1.35; }
.screen-frame { border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); overflow: hidden; }
.screen-frame img { width: 100%; object-fit: cover; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }
.hero-metrics { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: -14px; border: 1px solid var(--line); background: var(--line); max-width: none; }
.hero-board .metrics { grid-template-columns: 1fr; }
.metric { background: rgba(255,250,241,.9); padding: 18px; min-height: 114px; }
.hero-metrics .metric { min-height: 76px; padding: 12px 16px; background: rgba(255,250,241,.88); }
.metric strong { display: block; font-size: 28px; color: var(--teal); }
.hero-metrics .metric strong { font-size: 22px; line-height: 1; }
.metric span { display: block; color: var(--muted); font-size: 14px; }
.hero-metrics .metric span { margin-top: 5px; font-size: 12px; line-height: 1.25; }
section { padding: 58px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 28px; margin-bottom: 28px; }
.section-head p { max-width: 62ch; color: var(--muted); }
.matrix { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.matrix > div { background: var(--surface); padding: 18px; min-height: 140px; }
.tag { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 800; color: white; background: var(--teal); margin-bottom: 12px; }
.tag.warn { background: var(--gold); }
.tag.custom { background: var(--accent); }
.library-cover { appearance: none; position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: white; box-shadow: var(--shadow); overflow: hidden; cursor: zoom-in; }
.library-cover img { width: 100%; aspect-ratio: 1.46; object-fit: cover; object-position: top center; }
.library-cover:hover img { filter: saturate(1.05) contrast(1.02); }
.library-badge, .library-zoom { position: absolute; background: rgba(24, 33, 42, .86); color: white; border-radius: 999px; font-weight: 800; }
.library-badge { top: 14px; left: 14px; padding: 6px 10px; font-size: 13px; }
.library-zoom { right: 14px; bottom: 14px; padding: 9px 12px; font-size: 14px; }
.library-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.library-list span { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--muted); font-size: 13px; }
.library-cover:focus-visible, .lightbox button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.profile-intro { max-width: 980px; margin-bottom: 26px; }
.profile-intro p:not(.eyebrow) { margin-top: 16px; max-width: 68ch; color: var(--muted); }
.profile-proof { display: grid; gap: 14px; }
.profile-cover img, .structure-cover img, .rbac-cover img, .onboarding-cover img, .worktime-cover img, .communication-cover img, .ai-sop-cover img { aspect-ratio: 1.82; }
.rbac-cover img { aspect-ratio: 1.56; object-fit: contain; background: #eef3f6; }
.ai-sop-cover img { object-fit: contain; background: #eef3f6; }
.proof-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); }
.proof-meta p { max-width: 52ch; }
figcaption { padding: 15px; color: var(--muted); font-size: 14px; }
figcaption b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.structure-intro { max-width: 980px; margin-bottom: 26px; }
.structure-intro p:not(.eyebrow) { margin-top: 16px; max-width: 68ch; color: var(--muted); }
.architecture-visual { margin: 0 0 26px; border: 1px solid var(--line); border-radius: 8px; background: #fffaf1; box-shadow: var(--shadow); overflow: hidden; }
.architecture-visual img { width: 100%; aspect-ratio: 1916 / 821; object-fit: contain; background: #fffaf1; }
.structure-capabilities { margin-top: 24px; }
.structure-capabilities .eyebrow { margin-bottom: 10px; }
.structure-capabilities + .profile-proof { margin-top: 22px; }
.structure-matrix, .onboarding-matrix, .rbac-example-grid, .store-flow-grid, .roadmap-grid { grid-template-columns: repeat(3, 1fr); }
.rbac-matrix { grid-template-columns: repeat(4, 1fr); }
.rbac-example { margin-top: 24px; }
.rbac-example .eyebrow { margin-bottom: 10px; }
.note { border: 1px dashed var(--accent); background: #fff4ec; border-radius: 8px; padding: 18px; color: #5c3a2f; }
.profile-note { margin-top: 18px; }
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; gap: 12px; padding: 24px; background: rgba(12, 18, 24, .92); }
.lightbox[hidden] { display: none; }
.lightbox-panel { min-width: 0; margin: 0; }
.lightbox-panel img { width: 100%; max-height: calc(100dvh - 150px); object-fit: contain; background: transparent; border-radius: 8px; }
.lightbox-panel figcaption { max-width: 900px; margin: 12px auto 0; padding: 0; color: #d9e1e8; }
.lightbox-panel figcaption b { display: inline; color: white; margin-right: 8px; }
.lightbox-close, .lightbox-nav { border: 1px solid rgba(255,255,255,.3); background: rgba(255,255,255,.08); color: white; cursor: pointer; }
.lightbox-close { position: absolute; top: 18px; right: 18px; width: 46px; height: 46px; border-radius: 50%; font-size: 30px; }
.lightbox-nav { width: 54px; height: 72px; border-radius: 8px; font-size: 42px; justify-self: center; }
.footer { padding: 36px 0 52px; color: var(--muted); border-top: 1px solid var(--line); }

@media (max-width: 900px) {
  .hero-layout, .hero-head, .hero-board, .section-head, .profile-intro, .structure-intro { grid-template-columns: 1fr; display: grid; }
  .hero-layout { gap: 30px; }
  .hero-metrics { max-width: none; }
  .flow-track { grid-template-columns: 1fr 1fr; }
  .proof-meta { align-items: flex-start; flex-direction: column; }
  .metrics, .matrix { grid-template-columns: 1fr 1fr; }
  h1 { max-width: 12ch; }
}

@media (max-width: 620px) {
  .shell { width: min(100% - 28px, 1180px); }
  .hero .shell { width: min(100% - 28px, 1180px); }
  .topbar { position: static; }
  .topbar .shell { align-items: flex-start; }
  nav { gap: 10px; font-size: 13px; }
  .hero { padding-top: 42px; }
  .hero h1 { max-width: 10.5ch; }
  .hero-art img { aspect-ratio: 1.45; }
  .hero-map { padding: 16px; }
  .flow-track { grid-template-columns: 1fr; }
  .flow-track::before { display: none; }
  .metrics, .matrix { grid-template-columns: 1fr; }
  .hero-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .button.secondary { border-color: var(--ink); padding: 0 15px; }
  main > section:not(.hero) > .shell { display: flex; flex-direction: column; }
  main > section:not(.hero) > .shell > * { order: 3; }
  main > section:not(.hero) > .shell > .section-head,
  main > section:not(.hero) > .shell > .profile-intro,
  main > section:not(.hero) > .shell > .structure-intro { order: 1; }
  main > section:not(.hero) > .shell > .architecture-visual,
  main > section:not(.hero) > .shell > .profile-proof { order: 2; }
  main > section:not(.hero) > .shell > .rbac-example { order: 4; }
  main > section:not(.hero) > .shell > .profile-note { order: 5; }
  .lightbox { grid-template-columns: 1fr; padding: 62px 12px 18px; }
  .lightbox-nav { position: fixed; top: 50%; width: 44px; height: 56px; transform: translateY(-50%); }
  .lightbox-nav.prev { left: 8px; }
  .lightbox-nav.next { right: 8px; }
  .button { width: 100%; }
}
