@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #e8edf3;
  --paper-fold: #d6dde8;
  --sheet: #f6f8fb;
  --ink: #18202e;
  --ink-soft: #4a5568;
  --dot: #2d3ae0;
  --dot-ink: #ffffff;
  --rule: #c3ccd9;
  --focus: #2d3ae0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131926;
    --paper-fold: #1c2433;
    --sheet: #202a3b;
    --ink: #e6ebf3;
    --ink-soft: #a6b1c2;
    --dot: #7f89ff;
    --dot-ink: #0d1120;
    --rule: #2e3a4f;
    --focus: #9aa2ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131926;
  --paper-fold: #1c2433;
  --sheet: #202a3b;
  --ink: #e6ebf3;
  --ink-soft: #a6b1c2;
  --dot: #7f89ff;
  --dot-ink: #0d1120;
  --rule: #2e3a4f;
  --focus: #9aa2ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--paper);
  z-index: 10;
}
.skip:focus { top: 12px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* Header */
.site-head { padding-block: 20px; }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}
.brand svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; margin-inline-end: -12px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  text-decoration: none;
  color: var(--ink-soft);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* Hero */
.hero { padding-block: clamp(32px, 8vw, 96px) clamp(48px, 9vw, 112px); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.display {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 750;
  font-size: clamp(2.6rem, 7.2vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.lede {
  margin: 28px 0 0;
  max-width: 44ch;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.55;
  color: var(--ink-soft);
}
.actions { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--dot);
  color: var(--dot-ink);
  font-weight: 600;
  text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }

/* The sheet: a creased plane with one dot resting in the fold. */
.sheet { width: 100%; height: auto; display: block; max-width: 520px; justify-self: end; }
.sheet .plane-a { fill: var(--sheet); }
.sheet .plane-b { fill: var(--paper-fold); }
.sheet .crease { stroke: var(--rule); stroke-width: 1.5; fill: none; }
.sheet .dot { fill: var(--dot); }
.sheet .shadow { fill: var(--ink); opacity: 0.12; }
.dot-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 12%;
  aspect-ratio: 1;
  min-width: 48px;
  border-radius: 50%;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.is-dragging + .dot-handle { cursor: grabbing; }
.hint { margin: 12px 0 0; font-size: 0.95rem; color: var(--ink-soft); }
.sheet-wrap { position: relative; justify-self: end; width: 100%; max-width: 520px; }
.sheet-wrap .sheet { max-width: none; }
.sheet-wrap .hint { text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .sheet .dot-group { animation: settle 1.1s cubic-bezier(.2, .9, .25, 1.15) 0.25s both; }
  .sheet .shadow { animation: shadow 1.1s cubic-bezier(.2, .9, .25, 1.15) 0.25s both; transform-box: fill-box; transform-origin: center; }
}
@keyframes settle {
  from { transform: translateY(-120px); opacity: 0; }
  40% { opacity: 1; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes shadow {
  from { transform: scale(0.3); opacity: 0; }
  to { transform: scale(1); opacity: 0.12; }
}

/* What Wrinkledot builds */
.section { padding-block: clamp(48px, 8vw, 96px); border-top: 1px solid var(--rule); }
.section-title {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.builds {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
}
.builds h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 650;
  font-size: 1.3rem;
  line-height: 1.25;
}
.builds h3::before {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 50%;
  background: var(--dot);
}
.builds p { margin: 12px 0 0; color: var(--ink-soft); max-width: 36ch; }

.ai .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(24px, 5vw, 72px); }
.ai p { margin: 0 0 16px; max-width: 60ch; color: var(--ink-soft); }
.ai p:last-child { margin-bottom: 0; }

/* Prose pages */
.prose { padding-block: clamp(32px, 6vw, 72px) clamp(64px, 10vw, 120px); }
.prose .wrap { max-width: 720px; }
.prose h1 {
  margin: 0 0 8px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 750;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.prose h2 {
  margin: 40px 0 8px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.25;
}
.prose p, .prose li { color: var(--ink-soft); }
.prose .updated { margin-top: 0; font-size: 0.95rem; }

/* Footer */
.site-foot { border-top: 1px solid var(--rule); padding-block: 24px 32px; font-size: 0.95rem; color: var(--ink-soft); }
.site-foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.site-foot p { margin: 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 4px; margin-inline: -12px; }
.site-foot nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 12px; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .sheet-wrap { justify-self: center; max-width: 420px; }
  .builds { grid-template-columns: 1fr; }
  .ai .wrap { grid-template-columns: 1fr; }
}
