:root {
  --red: #b81419;
  --red-deep: #8c0d12;
  --ink: #121417;
  --charcoal: #2d2f31;
  --muted: #68707a;
  --line: #e4e6e8;
  --paper: #ffffff;
  --wash: #f6f7f8;
  --create: #fff0f0;
  --simulate: #eef9f2;
  --learn: #f4efff;
  --discover: #eef5ff;
  --shadow: 0 18px 45px rgba(18,20,23,.08);
  --radius: 22px;
  --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input { font: inherit; }
.shell { width: var(--shell); margin-inline: auto; }
.section-pad { padding: 84px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: #fff; }
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(228,230,232,.75);
}
.header-inner { min-height: 86px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; min-width: 210px; }
.brand img { width: 36px; height: 70px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; line-height: .88; }
.brand-name { font-weight: 900; letter-spacing: -.04em; font-size: 22px; }
.brand-name strong { color: var(--red); }
.brand-tag { margin-top: 8px; font-size: 8px; letter-spacing: .26em; font-weight: 800; }
.primary-nav { display: flex; justify-content: center; gap: 22px; }
.primary-nav a, .site-footer nav a { text-decoration: none; font-size: 14px; font-weight: 700; }
.primary-nav a:hover, .site-footer nav a:hover { color: var(--red); }
.menu-toggle { display: none; border: 0; background: transparent; padding: 8px; }
.menu-toggle span:not(.sr-only) { display: block; width: 26px; height: 2px; margin: 5px 0; background: var(--ink); }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 20px; border-radius: 10px; text-decoration: none; font-weight: 800; border: 1px solid transparent; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(184,20,25,.18); }
.button-primary:hover { background: var(--red-deep); }
.button-secondary { border-color: #c9cdd1; background: #fff; }
.button-secondary:hover { box-shadow: var(--shadow); }
.button-light { background: #fff; color: var(--ink); }

.hero { overflow: hidden; background: radial-gradient(circle at 68% 20%, #fafafa 0, #fff 48%, #f7f7f7 100%); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 580px; align-items: center; gap: 60px; }
.eyebrow { margin: 0 0 14px; color: var(--red); font-size: 12px; letter-spacing: .22em; font-weight: 900; }
.eyebrow.light { color: #ff8a8d; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(54px, 7vw, 92px); line-height: .92; letter-spacing: -.065em; }
h1 span { color: var(--red); }
h2 { margin-bottom: 14px; font-size: clamp(34px, 4vw, 56px); line-height: .98; letter-spacing: -.045em; }
h3 { letter-spacing: -.03em; }
.hero-lede { max-width: 710px; margin-bottom: 12px; font-size: clamp(20px, 2.1vw, 28px); line-height: 1.25; color: #4d535a; font-weight: 650; }
.hero-support { max-width: 660px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 20px; padding: 0; margin: 24px 0 0; list-style: none; color: #4e555c; font-size: 14px; font-weight: 700; }
.hero-points li::before { content: "✓"; color: var(--red); margin-right: 7px; }
.hero-art { min-height: 520px; position: relative; }
.hero-art img { position: absolute; width: 250px; height: auto; left: 18%; top: 0; z-index: 2; filter: drop-shadow(0 25px 30px rgba(0,0,0,.08)); }
.hero-letter { position: absolute; right: 4%; bottom: -18%; font-size: 440px; line-height: 1; font-weight: 950; letter-spacing: -.12em; color: #2d2f31; opacity: .98; }
.scribble { position: absolute; z-index: 3; right: 0; top: 35px; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 28px; line-height: 1.03; transform: rotate(-3deg); }
.scribble::after { content: ""; display: block; width: 150px; height: 4px; background: var(--red); margin-top: 8px; transform: rotate(-5deg); }

.principles { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.principle-grid { display: grid; grid-template-columns: repeat(5,1fr); }
.principle-grid article { min-height: 88px; display: flex; gap: 12px; align-items: center; padding: 16px 18px; border-right: 1px solid var(--line); }
.principle-grid article:last-child { border-right: 0; }
.principle-grid .icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--red); font-weight: 900; font-size: 20px; }
.principle-grid strong, .principle-grid small { display: block; }
.principle-grid small { color: var(--muted); font-size: 12px; }

.section-heading { max-width: 760px; margin-bottom: 34px; }
.section-heading > p:last-child { color: var(--muted); font-size: 17px; }
.split-heading { max-width: none; display: grid; grid-template-columns: 1fr 360px; gap: 50px; align-items: end; }
.search-wrap label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; }
.search-wrap input { width: 100%; min-height: 48px; border: 1px solid #cfd3d6; border-radius: 12px; padding: 0 15px; outline: none; }
.search-wrap input:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(184,20,25,.09); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.filter { border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 9px 15px; font-weight: 750; cursor: pointer; }
.filter.active, .filter:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.tool-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.tool-card { position: relative; display: flex; flex-direction: column; min-height: 300px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 10px 25px rgba(18,20,23,.04); transition: transform .2s ease, box-shadow .2s ease; }
.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.tool-card[data-category="create"] { background: linear-gradient(145deg, var(--create), #fff 72%); }
.tool-card[data-category="simulate"] { background: linear-gradient(145deg, var(--simulate), #fff 72%); }
.tool-card[data-category="learn"] { background: linear-gradient(145deg, var(--learn), #fff 72%); }
.tool-card[data-category="discover"] { background: linear-gradient(145deg, var(--discover), #fff 72%); }
.tool-card .tool-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: #fff; font-size: 20px; font-weight: 900; margin-bottom: 22px; }
.tool-card .tool-type { font-size: 11px; letter-spacing: .16em; font-weight: 900; text-transform: uppercase; color: var(--red); }
.tool-card h3 { font-size: 24px; margin: 8px 0 8px; }
.tool-card p { color: #565d64; }
.tool-meta { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; margin: 4px 0 22px; list-style: none; }
.tool-meta li { font-size: 11px; font-weight: 800; color: #596168; padding: 5px 8px; background: rgba(255,255,255,.7); border: 1px solid rgba(207,211,214,.8); border-radius: 999px; }
.tool-actions { display: flex; gap: 12px; margin-top: auto; }
.tool-actions a { font-weight: 850; font-size: 14px; text-decoration: none; }
.tool-actions a:first-child { color: var(--red); }
.tool-actions a:hover { text-decoration: underline; }
.status { position: absolute; top: 22px; right: 22px; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; padding: 5px 8px; border-radius: 999px; background: #fff; border: 1px solid var(--line); }
.status.coming { color: #7b5b00; background: #fff9df; border-color: #efe1a6; }
.empty-state { padding: 30px; border-radius: 16px; background: var(--wash); color: var(--muted); text-align: center; }

.category-band { background: var(--wash); }
.category-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.category-card { min-height: 240px; padding: 28px; border-radius: 20px; border: 1px solid rgba(18,20,23,.06); }
.category-card span { font-weight: 900; color: var(--red); }
.category-card h3 { font-size: 30px; margin: 48px 0 8px; }
.category-card p { color: #555c63; }
.category-card.create { background: var(--create); }
.category-card.simulate { background: var(--simulate); }
.category-card.learn { background: var(--learn); }
.category-card.discover { background: var(--discover); }

.dark-section { position: relative; overflow: hidden; background: #232527; color: #fff; }
.simulator-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.dark-section p { color: #c7cbce; }
.big-copy { font-size: 22px; line-height: 1.35; color: #fff !important; }
.simulator-art { min-height: 390px; position: relative; overflow: hidden; border-radius: 28px; background: linear-gradient(#35383b, #202224); }
.simulator-art img { position: absolute; width: 125px; left: 48%; top: 18%; z-index: 3; transform: rotate(-4deg); filter: brightness(1.08); }
.simulator-art p { position: absolute; right: 28px; top: 28px; z-index: 5; font-family: "Segoe Print", "Bradley Hand", cursive; font-size: 23px; line-height: 1.1; color: #fff; transform: rotate(3deg); }
.mountain { position: absolute; bottom: -40px; width: 380px; height: 280px; background: #3f4245; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.m1 { left: -80px; }
.m2 { left: 140px; background: #333638; height: 340px; }
.m3 { right: -130px; background: #45484b; height: 300px; }

.three-col { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.info-panel { min-height: 310px; padding: 30px; border: 1px solid var(--line); border-radius: 22px; }
.info-panel h2 { font-size: 34px; }
.info-panel p { color: var(--muted); }
.info-panel a { display: inline-block; margin-top: 16px; color: var(--red); font-weight: 850; text-decoration: none; }
.info-panel a:hover { text-decoration: underline; }

.open-source { background: #f9f9f9; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.open-source-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 70px; align-items: center; }
.open-source p { color: var(--muted); }
.metrics { display: flex; gap: 32px; margin: 28px 0; }
.metrics strong, .metrics span { display: block; }
.metrics strong { font-size: 28px; }
.metrics span { color: var(--muted); font-size: 12px; }
.code-card { border-radius: 22px; background: #1f2123; color: #f8f8f8; padding: 24px; box-shadow: var(--shadow); }
.code-dots { display: flex; gap: 8px; margin-bottom: 24px; }
.code-dots span { width: 11px; height: 11px; border-radius: 50%; background: #62666a; }
.code-card pre { margin: 0; overflow-x: auto; color: #e6e7e8; font-size: 15px; line-height: 1.75; }

.about-grid { display: grid; grid-template-columns: 1fr .85fr; gap: 80px; align-items: center; }
.about p { color: var(--muted); font-size: 17px; }
blockquote { position: relative; margin: 0; padding: 42px; border-left: 4px solid var(--red); background: var(--wash); border-radius: 0 20px 20px 0; font-family: Georgia, serif; font-size: 30px; line-height: 1.25; font-style: italic; }
blockquote span { position: absolute; left: 18px; top: 0; color: var(--red); font-size: 70px; }

.site-footer { background: #202224; color: #fff; padding: 42px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 28px; align-items: center; }
.footer-brand { color: #fff; }
.site-footer nav { display: flex; gap: 18px; }
.footer-note { text-align: right; display: flex; flex-direction: column; }
.footer-note span { color: #aeb3b7; font-size: 12px; }

@media (max-width: 1020px) {
  .header-inner { grid-template-columns: auto auto; }
  .header-cta { display: none; }
  .menu-toggle { display: block; justify-self: end; }
  .primary-nav { display: none; position: absolute; left: 20px; right: 20px; top: 82px; padding: 18px; border-radius: 16px; background: #fff; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
  .primary-nav.open { display: flex; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .hero-art { min-height: 420px; max-width: 620px; width: 100%; margin: -30px auto 0; }
  .hero-letter { font-size: 360px; right: 12%; }
  .hero-art img { left: 25%; width: 210px; }
  .principle-grid { grid-template-columns: repeat(2,1fr); }
  .principle-grid article { border-bottom: 1px solid var(--line); }
  .tool-grid { grid-template-columns: repeat(2,1fr); }
  .category-grid { grid-template-columns: repeat(2,1fr); }
  .simulator-grid, .open-source-grid, .about-grid { grid-template-columns: 1fr; }
  .three-col { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: left; }
  .footer-note { text-align: left; }
}

@media (max-width: 680px) {
  :root { --shell: min(100% - 28px, 1180px); --radius: 18px; }
  .section-pad { padding: 62px 0; }
  .site-header .brand-tag { display: none; }
  .brand { min-width: 0; }
  .brand img { width: 30px; height: 58px; }
  .brand-name { font-size: 19px; }
  .hero { padding-top: 48px; }
  .hero-grid { gap: 18px; }
  h1 { font-size: clamp(50px, 17vw, 72px); }
  .hero-lede { font-size: 20px; }
  .hero-art { min-height: 300px; }
  .hero-letter { font-size: 260px; right: 3%; bottom: -14%; }
  .hero-art img { width: 145px; left: 14%; top: 25px; }
  .scribble { font-size: 20px; right: 8px; top: 14px; }
  .principle-grid { grid-template-columns: 1fr; }
  .principle-grid article { border-right: 0; }
  .split-heading { grid-template-columns: 1fr; gap: 18px; }
  .tool-grid, .category-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 0; }
  .metrics { flex-wrap: wrap; }
  .site-footer nav { flex-direction: column; }
  blockquote { font-size: 24px; padding: 34px 28px 34px 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
