:root {
  --bg: #111318;
  --text: #f9fafb;
  --muted: #9ca3af;
  --accent: #38bdf8;
  --accent2: #a78bfa;
  --card: #1a1d24;
  --edge: rgba(255, 255, 255, 0.08);
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --max: 1120px;
  --pad: clamp(20px, 4vw, 32px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 1.05rem;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #0b0d10;
  padding: 8px 12px;
  z-index: 100;
}

.skip-link:focus {
  left: var(--pad);
  top: var(--pad);
}

.section {
  padding: clamp(3rem, 8vw, 5rem) var(--pad);
  max-width: var(--max);
  margin: 0 auto;
}

.section-intro {
  max-width: 38rem;
  margin-bottom: 2rem;
}

.section-intro h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

.section-lede {
  color: var(--muted);
  margin: 0;
}

.kicker {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

/* margin_dots nav */
.margin-dots {
  position: fixed;
  right: clamp(12px, 2vw, 20px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 50;
}

.margin-dots .dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--muted);
  background: transparent;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

.margin-dots .dot span {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.2s, transform 0.2s;
}

.margin-dots .dot.is-active span,
.margin-dots .dot:focus span {
  opacity: 1;
  transform: scale(1);
}

.margin-dots .dot.is-active,
.margin-dots .dot:focus {
  border-color: var(--accent);
}

.margin-dots .dot::after {
  content: attr(data-label);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  font-family: var(--mono);
  color: var(--muted);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}

.margin-dots .dot:hover::after,
.margin-dots .dot:focus::after {
  opacity: 1;
}

@media (max-width: 720px) {
  .margin-dots {
    top: auto;
    bottom: 16px;
    right: 50%;
    transform: translateX(50%);
    flex-direction: row;
  }

  .margin-dots .dot::after {
    display: none;
  }
}

/* window_frame hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: clamp(3rem, 10vw, 6rem) var(--pad) 3rem;
  max-width: var(--max);
  margin: 0 auto;
  min-height: min(92vh, 900px);
  align-items: center;
}

.hero-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
}

.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  filter: saturate(1.1);
}

.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(17, 19, 24, 0.2) 0%, var(--bg) 88%);
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.5rem);
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.tagline {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 32rem;
  margin: 0 0 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0b0d10;
}

.btn.ghost {
  border: 1px solid var(--edge);
  color: var(--text);
}

.window-shell {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  max-width: 320px;
  margin: 0 auto;
}

.window-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--edge);
  background: rgba(0, 0, 0, 0.25);
}

.window-chrome span:nth-child(-n + 3) {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3f4654;
}

.window-chrome span:nth-child(1) {
  background: #f87171;
}

.window-chrome span:nth-child(2) {
  background: #fbbf24;
}

.window-chrome span:nth-child(3) {
  background: #4ade80;
}

.window-title {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--muted);
}

.window-body img {
  width: 100%;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 320px;
    grid-template-areas:
      "copy window"
      "copy window";
  }

  .hero-copy {
    grid-area: copy;
  }

  .window-shell {
    grid-area: window;
    margin: 0;
  }
}

/* cork_notes */
.cork-board {
  position: relative;
}

.cork-board::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(56, 189, 248, 0.08), transparent 45%),
    radial-gradient(circle at 80% 80%, rgba(167, 139, 250, 0.1), transparent 40%);
  pointer-events: none;
}

.cork-notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 768px) {
  .cork-notes {
    grid-template-columns: repeat(3, 1fr);
    align-items: start;
  }
}

.note {
  position: relative;
  background: #f4ead5;
  color: #1f2937;
  padding: 1.25rem 1.1rem 1.1rem;
  border-radius: 4px;
  box-shadow: 4px 6px 18px rgba(0, 0, 0, 0.35);
  transform: rotate(var(--rot, -1deg));
}

.note-a {
  --rot: -2deg;
}

.note-b {
  --rot: 1.5deg;
  background: #e8f4fc;
}

.note-c {
  --rot: -0.5deg;
  background: #efe8ff;
}

.note h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.note p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
}

.pin {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fca5a5, #dc2626);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 2rem;
}

.gallery-strip img {
  border-radius: 12px;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--edge);
}

@media (max-width: 640px) {
  .gallery-strip {
    grid-template-columns: 1fr;
  }
}

/* device_pair */
.pair-stage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 2rem;
}

.device {
  margin: 0;
  text-align: center;
}

.device-bezel {
  background: #0b0d10;
  border-radius: 28px;
  padding: 10px;
  border: 2px solid #2a3140;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}

.device-bezel img {
  border-radius: 20px;
  width: 100%;
}

.device figcaption {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.device-wide {
  max-width: 280px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 640px) {
  .pair-stage {
    grid-template-columns: 1fr;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* inline_expand legal */
.legal-block {
  border: 1px solid var(--edge);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 1rem;
  overflow: hidden;
}

.legal-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  background: transparent;
  border: 0;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}

.legal-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.legal-block.is-collapsed .legal-chevron {
  transform: rotate(-135deg);
}

.legal-body {
  padding: 0 1.15rem 1.15rem;
  color: var(--muted);
}

.legal-block.is-collapsed .legal-body {
  display: none;
}

.legal-body p {
  margin: 0 0 0.85rem;
}

.site-footer {
  text-align: center;
  padding: 2rem var(--pad) 3rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--edge);
}
