:root {
  --paper: #f4edd9;
  --ink: #322d24;
  --ink-soft: #6d6354;
  --blue: #2349aa;
  --blue-dark: #17347e;
  --yellow: #e7bd45;
  --yellow-soft: #f4dfa0;
  --wood: #5d4932;
  --rule: rgba(35, 73, 170, 0.18);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(244, 237, 217, 0.93), rgba(244, 237, 217, 0.93)),
    repeating-linear-gradient(0deg, transparent 0 31px, var(--rule) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, var(--rule) 31px 32px),
    var(--paper);
  font-family: var(--serif);
  line-height: 1.6;
}

a { color: var(--blue-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--blue); }
a:focus-visible { outline: 3px solid var(--blue-dark); outline-offset: 4px; }

.draft-bar {
  padding: 0.55rem 1rem;
  color: #fffdf5;
  background: var(--blue-dark);
  font: 700 0.72rem/1.3 var(--mono);
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.site-header {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.studio-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font: 700 0.78rem/1 var(--mono);
  letter-spacing: 0.13em;
  text-decoration: none;
  text-transform: uppercase;
}
.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a {
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.2rem;
  display: inline-flex;
  align-items: center;
  font: 700 0.74rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero, .content-shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.hero {
  min-height: 720px;
  padding: clamp(3rem, 8vw, 7rem) 0 clamp(4rem, 7vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 420px);
  align-items: center;
  gap: clamp(2rem, 7vw, 6rem);
}
.hero > * { min-width: 0; }
.kicker, .eyebrow, .meta {
  margin: 0 0 1rem;
  color: var(--blue-dark);
  font: 700 0.74rem/1.4 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, h3 { line-height: 1.08; }
h1 { margin: 0; font: 700 clamp(4.5rem, 13vw, 9rem)/0.86 var(--mono); letter-spacing: 0.12em; }
.subtitle { margin: 1.25rem 0 0; font: 700 clamp(1.15rem, 2.4vw, 1.65rem)/1.25 var(--mono); letter-spacing: 0.04em; }
.lede { max-width: 36rem; margin: 1.5rem 0 0; font-size: clamp(1.12rem, 2vw, 1.3rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.button {
  min-height: 48px;
  padding: 0.85rem 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--blue-dark);
  border-radius: 4px 7px 3px 6px;
  color: #fffdf5;
  background: var(--blue-dark);
  box-shadow: 4px 4px 0 var(--yellow-soft);
  font: 700 0.76rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.button.secondary { color: var(--blue-dark); background: transparent; box-shadow: none; }
.icon-sheet {
  position: relative;
  justify-self: center;
  width: min(100%, 360px);
  margin: 0;
  padding: 1rem;
  border: 2px solid var(--ink);
  border-radius: 18px 14px 21px 16px;
  background: #e8dfc7;
  box-shadow: 11px 13px 0 rgba(50, 45, 36, 0.13);
  transform: rotate(1deg);
}
.icon-sheet::before, .paper-card::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid var(--blue);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--yellow-soft);
}
.icon-sheet::before { top: -10px; left: calc(50% - 9px); }
.icon-sheet img { display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: 8px; }
.caption { margin: 0.8rem 0 0; color: var(--ink-soft); font: 600 0.68rem/1.5 var(--mono); text-align: center; }
.circuit-rule { height: 28px; border-top: 3px solid var(--yellow); border-right: 3px solid var(--yellow); border-radius: 0 18px 0 0; }
.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-heading { max-width: 680px; margin-bottom: 2.5rem; }
.section h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.4rem); font-weight: 500; }
.section-heading p { max-width: 50rem; font-size: 1.1rem; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.paper-card {
  position: relative;
  min-height: 240px;
  padding: 2rem 1.5rem 1.5rem;
  border: 2px solid var(--ink);
  border-radius: 5px 9px 4px 7px;
  background: rgba(255, 252, 241, 0.78);
  box-shadow: 6px 7px 0 rgba(35, 73, 170, 0.14);
}
.paper-card::before { top: -11px; right: 1.2rem; }
.paper-card h3 { margin: 0.3rem 0 0.8rem; font: 700 1.05rem/1.3 var(--mono); letter-spacing: 0.04em; }
.paper-card p { margin: 0; }
.notebook-note { padding: clamp(2rem, 5vw, 4rem); border-left: 8px solid var(--yellow); background: rgba(255, 252, 241, 0.8); }
.notebook-note h2 { max-width: 15ch; }
.notebook-note p { max-width: 58rem; }
.screen-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}
.screen-shot {
  margin: 0;
  padding: 0.55rem 0.55rem 0.8rem;
  border: 2px solid var(--ink);
  border-radius: 7px 10px 6px 9px;
  background: rgba(255, 252, 241, 0.82);
  box-shadow: 5px 6px 0 rgba(35, 73, 170, 0.13);
}
.screen-shot:nth-child(odd) { transform: rotate(-0.35deg); }
.screen-shot:nth-child(even) { transform: rotate(0.35deg); }
.screen-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(50, 45, 36, 0.68);
  border-radius: 5px;
}
.screen-shot figcaption {
  margin-top: 0.65rem;
  color: var(--ink-soft);
  font: 600 0.66rem/1.4 var(--mono);
}
.small-print { color: var(--ink-soft); font-size: 0.92rem; }
.legal-shell { width: min(800px, calc(100% - 2rem)); margin: 0 auto; padding: 3rem 0 6rem; }
.legal-shell h1 { max-width: 12ch; margin-bottom: 1.25rem; font-size: clamp(2.5rem, 8vw, 5.5rem); letter-spacing: 0.03em; }
.legal-shell h2 { margin: 3rem 0 0.8rem; font-size: 1.5rem; }
.legal-shell ul { padding-left: 1.4rem; }
.legal-shell li { margin: 0.5rem 0; }
.summary-box { position: relative; margin: 2rem 0; padding: 1.4rem; border: 2px solid var(--blue-dark); background: rgba(255, 252, 241, 0.82); }
.summary-box::after { content: ""; position: absolute; width: 11px; height: 11px; right: 1rem; top: -8px; border: 3px solid var(--blue); border-radius: 50%; background: var(--yellow-soft); }
.site-footer { margin-top: 2rem; padding: 2.5rem 1rem; color: #fffdf5; background: var(--wood); }
.footer-inner { width: min(1120px, 100%); margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer a { color: #fffdf5; }

@media (max-width: 780px) {
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 3.5rem; }
  .hero h1 { font-size: clamp(3.8rem, 18vw, 5.5rem); letter-spacing: 0.08em; }
  .icon-sheet { width: min(88vw, 340px); transform: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .site-header { align-items: flex-start; }
  .site-nav { gap: 0.75rem; flex-wrap: wrap; justify-content: flex-end; }
  .site-nav a { font-size: 0.65rem; }
  .screen-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }
  .screen-shot:nth-child(n) { transform: none; }
}

@media (min-width: 781px) and (max-width: 1050px) {
  .screen-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
