/* Capsa Software ~ capsule clay */

:root {
  --lavender: #E7E0FF;
  --lavender-deep: #D3C8F7;
  --mint: #C9F2E2;
  --navy: #1B1F4B;
  --tangerine: #FF8A4C;
  --peach: #FFE3D2;
  --white: #FFFFFF;
  --display: "Unbounded", "Trebuchet MS", "Segoe UI", sans-serif;
  --text: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --clay: 0 26px 40px -22px rgba(27, 31, 75, .42), inset 0 -12px 18px rgba(27, 31, 75, .09), inset 0 12px 16px rgba(255, 255, 255, .85);
  --clay-sm: 0 12px 18px -10px rgba(27, 31, 75, .45), inset 0 -6px 9px rgba(27, 31, 75, .13), inset 0 6px 8px rgba(255, 255, 255, .7);
  --clay-night: 0 26px 40px -22px rgba(27, 31, 75, .7), inset 0 -12px 18px rgba(0, 0, 0, .35), inset 0 12px 16px rgba(255, 255, 255, .13);
  --round: clamp(34px, 7vw, 92px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-padding-top: 110px; }

body {
  margin: 0;
  padding: 104px 0 0;
  background: var(--lavender);
  color: var(--navy);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
}

h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.18; margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.55rem, 5.2vw, 3.5rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.25rem, 3.2vw, 2rem); letter-spacing: -.01em; }
h3 { font-size: clamp(1rem, 2vw, 1.15rem); font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--navy); text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--tangerine); }
a:hover { text-decoration-color: var(--navy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 4px; border-radius: 999px; }
[data-tint="navy"] :focus-visible, .base :focus-visible { outline-color: var(--tangerine); }
.hide-visually { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ===== floating capsule nav ===== */
.dock {
  position: fixed;
  z-index: 50;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  display: flex;
  align-items: center;
  gap: 6px 14px;
  padding: 9px 10px 9px 22px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--clay);
}
.dock-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  white-space: nowrap;
}
.dock-logo {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--tangerine) 50%, var(--navy) 50%);
  box-shadow: var(--clay-sm);
  transform: rotate(-24deg);
  flex: none;
}
.dock-links { display: flex; align-items: center; gap: 4px; }
.dock-links a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 17px;
  border-radius: 999px;
  font-size: .97rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .15s;
}
.dock-links a:hover { background: var(--lavender); }
.dock-links a[aria-current="page"] { background: var(--tangerine); box-shadow: var(--clay-sm); font-weight: 600; }
.dock-btn {
  display: none;
  flex: none;
  width: 48px;
  height: 48px;
  margin-left: auto;
  border: 0;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: var(--clay-sm);
  cursor: pointer;
  position: relative;
}
.dock-btn i {
  position: absolute;
  left: 13px;
  width: 22px;
  height: 5px;
  border-radius: 999px;
  background: var(--navy);
  transition: transform .2s, top .2s;
}
.dock-btn i:first-child { top: 16px; }
.dock-btn i:last-child { top: 27px; }
.dock-btn[aria-expanded="true"] { background: var(--tangerine); }
.dock-btn[aria-expanded="true"] i:first-child { top: 21.5px; transform: rotate(45deg); }
.dock-btn[aria-expanded="true"] i:last-child { top: 21.5px; transform: rotate(-45deg); }

/* ===== stage and pods (capsule frames) ===== */
.stage {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
  display: grid;
  gap: clamp(22px, 4vw, 46px);
}
.stage > * { min-width: 0; }

.pod {
  position: relative;
  overflow: hidden;
  border-radius: var(--round);
  padding: clamp(30px, 6vw, 84px) clamp(22px, 6vw, 84px);
  background: var(--white);
  box-shadow: var(--clay);
}
.pod[data-tint="mint"] { background: var(--mint); }
.pod[data-tint="peach"] { background: var(--peach); }
.pod[data-tint="deep"] { background: var(--lavender-deep); }
.pod[data-tint="tangerine"] { background: var(--tangerine); }
.pod[data-tint="navy"] { background: var(--navy); color: var(--white); box-shadow: var(--clay-night); }
.pod[data-tint="navy"] a { color: var(--white); }

.tagpill {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--mint);
  box-shadow: var(--clay-sm);
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .04em;
}
[data-tint="mint"] .tagpill { background: var(--white); }
[data-tint="navy"] .tagpill { background: var(--tangerine); color: var(--navy); }
.big { font-size: clamp(1.1rem, 2.1vw, 1.3rem); line-height: 1.55; }

.blob {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: var(--tangerine);
  color: var(--navy);
  box-shadow: var(--clay-sm);
  font-family: var(--display);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.blob:hover { transform: translateY(-3px); }
.blob:active { transform: translateY(1px); box-shadow: inset 0 6px 10px rgba(27, 31, 75, .25); }
.blob[data-kind="soft"] { background: var(--white); }
.blob[data-kind="night"] { background: var(--navy); color: var(--white); box-shadow: 0 12px 18px -10px rgba(27, 31, 75, .6), inset 0 -6px 9px rgba(0, 0, 0, .35), inset 0 6px 8px rgba(255, 255, 255, .16); }
.pod[data-tint="navy"] a.blob { color: var(--navy); }
.blobs { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* ===== hero ===== */
.opening { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 30px; align-items: center; }
.opening > * { min-width: 0; }
.heap { position: relative; height: 340px; }
.heap span {
  position: absolute;
  border-radius: 999px;
  box-shadow: var(--clay);
}
.heap span:nth-child(1) { width: 250px; height: 96px; left: 4%; top: 30px; background: var(--mint); transform: rotate(-18deg); }
.heap span:nth-child(2) { width: 290px; height: 108px; left: 10%; top: 130px; background: linear-gradient(90deg, var(--tangerine) 50%, var(--white) 50%); transform: rotate(12deg); }
.heap span:nth-child(3) { width: 200px; height: 80px; left: 22%; top: 244px; background: var(--navy); box-shadow: var(--clay-night); transform: rotate(-8deg); }
.heap span:nth-child(4) { width: 76px; height: 76px; left: 68%; top: 22px; background: var(--lavender-deep); }
.heap span:nth-child(5) { width: 46px; height: 46px; left: 2%; top: 212px; background: var(--tangerine); }

/* ===== tall capsule cards ===== */
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 3vw, 34px); }
.tall {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 50px 34px 54px;
  border-radius: 170px;
  background: var(--white);
  box-shadow: var(--clay);
  text-decoration: none;
  transition: transform .2s;
  min-width: 0;
}
.tall:nth-child(2) { background: var(--mint); margin-top: 34px; }
.tall:nth-child(3) { background: var(--peach); }
.tall:hover { transform: translateY(-8px); }
.tall h3 { font-size: clamp(1.05rem, 1.9vw, 1.25rem); margin: 22px 0 12px; }
.tall p { margin: 0 0 20px; font-size: 1rem; }
.tall .go { margin-top: auto; padding: 9px 20px; border-radius: 999px; background: var(--navy); color: var(--white); font-weight: 600; font-size: .92rem; }
.orb {
  display: grid;
  place-items: center;
  flex: none;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--lavender);
  box-shadow: var(--clay-sm);
}
.orb svg { width: 44px; height: 44px; }
.rowhead { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 30px; padding: 0 clamp(8px, 3vw, 40px); }
.rowhead p { margin: 0; max-width: 30em; }

/* ===== step pills ===== */
.flow { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: n; }
.flow li {
  counter-increment: n;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 36px 12px 12px;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--clay-sm);
  max-width: 760px;
}
.flow li::before {
  content: counter(n);
  display: grid;
  place-items: center;
  flex: none;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--tangerine);
  box-shadow: var(--clay-sm);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.2rem;
}
.flow li:nth-child(2) { margin-left: 6%; }
.flow li:nth-child(3) { margin-left: 12%; }
.flow li:nth-child(4) { margin-left: 18%; }
.flow b { font-family: var(--display); font-weight: 600; font-size: .95rem; display: block; }
.flow span { display: block; }

/* ===== inner pages ===== */
.duo { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.duo > * { min-width: 0; }
.duo[data-flip] { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.duo[data-flip] > :first-child { order: 2; }
.copy h2 { margin-bottom: 16px; }
.copy h2:not(:first-child) { margin-top: 1.5em; }
.copy p { max-width: 38em; }

.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.stack li {
  padding: 16px 26px;
  border-radius: 999px;
  background: var(--white);
  box-shadow: var(--clay-sm);
  font-size: 1rem;
  line-height: 1.4;
}
.stack li b { font-family: var(--display); font-size: .88rem; font-weight: 600; display: block; margin-bottom: 2px; }
.stack li:nth-child(odd) { background: var(--lavender); }
.stack li:nth-child(3n) { background: var(--peach); }
[data-tint="navy"] .stack li { color: var(--navy); }

.dots { list-style: none; margin: 0; padding: 0; }
.dots li { position: relative; padding: 0 0 12px 34px; }
.dots li::before { content: ""; position: absolute; left: 0; top: .42em; width: 22px; height: 12px; border-radius: 999px; background: var(--tangerine); box-shadow: var(--clay-sm); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(22px, 4vw, 46px); }
.pair > * { min-width: 0; }
.pair .pod { padding: clamp(28px, 4.5vw, 56px); }
.pair h2 { margin-bottom: 18px; }

/* phone and cloud drawings made of capsules */
.phone { position: relative; width: min(230px, 70%); margin: 0 auto; aspect-ratio: 9 / 17; border-radius: 46px; background: var(--navy); box-shadow: var(--clay-night); padding: 18px 14px; display: grid; align-content: start; gap: 12px; }
.phone i { display: block; height: 32px; border-radius: 999px; background: var(--lavender); }
.phone i:nth-child(1) { width: 42%; height: 12px; margin: 0 auto 8px; background: rgba(255, 255, 255, .25); }
.phone i:nth-child(2) { background: var(--tangerine); height: 74px; border-radius: 26px; }
.phone i:nth-child(3) { width: 78%; background: var(--mint); }
.phone i:nth-child(4) { width: 58%; }
.phone i:nth-child(5) { width: 86%; background: var(--white); }
.phone i:nth-child(6) { width: 50%; height: 44px; margin: 14px auto 0; background: var(--tangerine); }

.cloud { position: relative; width: 100%; height: 250px; max-width: 360px; margin: 0 auto; }
.cloud i { position: absolute; border-radius: 999px; background: var(--white); box-shadow: var(--clay); }
.cloud i:nth-child(1) { left: 6%; right: 6%; bottom: 40px; height: 96px; }
.cloud i:nth-child(2) { left: 16%; width: 40%; aspect-ratio: 1; bottom: 78px; }
.cloud i:nth-child(3) { right: 14%; width: 32%; aspect-ratio: 1; bottom: 86px; background: var(--lavender); }
.cloud i:nth-child(4) { left: 22%; width: 26%; height: 22px; bottom: 0; background: var(--tangerine); box-shadow: var(--clay-sm); }
.cloud i:nth-child(5) { right: 20%; width: 18%; height: 22px; bottom: 0; background: var(--navy); box-shadow: var(--clay-sm); }

/* ===== game of life ===== */
.life-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 30px; margin-bottom: 26px; }
.life-head p { margin: 0; max-width: 32em; color: #DCD8F5; }
.life-board { display: flex; justify-content: center; padding: clamp(10px, 2vw, 18px); border-radius: clamp(24px, 4vw, 46px); background: var(--white); box-shadow: inset 0 8px 16px rgba(27, 31, 75, .25); }
.life-board canvas { display: block; max-width: 100%; border-radius: 14px; touch-action: pan-y; cursor: pointer; }
.life-board canvas:focus-visible { outline: 3px solid var(--tangerine); outline-offset: 4px; border-radius: 14px; }
.life-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.life-controls .blob { min-height: 50px; padding: 0 24px; }
.life-speed { display: inline-flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 20px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-weight: 500; }
.life-speed input { width: 110px; accent-color: var(--tangerine); }
.life-readout { margin: 18px 0 0; font-weight: 500; color: #DCD8F5; }
.life-hint { margin: 6px 0 0; font-size: 1rem; color: #DCD8F5; }

/* ===== contact ===== */
.sheet { display: grid; gap: 12px; margin: 0; }
.sheet-row { padding: 14px 28px; border-radius: 999px; background: var(--white); box-shadow: var(--clay-sm); }
.sheet dt { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.sheet dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; line-height: 1.4; }

.capform { display: grid; gap: 18px; }
.capform label { display: block; margin: 0 0 6px 22px; font-family: var(--display); font-size: .85rem; font-weight: 600; }
.capform input, .capform select, .capform textarea {
  width: 100%;
  min-height: 56px;
  padding: 14px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--lavender);
  color: var(--navy);
  box-shadow: inset 0 6px 10px rgba(27, 31, 75, .16), inset 0 -4px 6px rgba(255, 255, 255, .8);
  font-family: var(--text);
  font-size: 1.05rem;
}
.capform textarea { min-height: 180px; border-radius: 32px; resize: vertical; line-height: 1.5; }
.capform input:focus-visible, .capform select:focus-visible, .capform textarea:focus-visible { outline-offset: 2px; }
.capform textarea:focus-visible { border-radius: 32px; }
.capform [aria-invalid="true"] { box-shadow: inset 0 0 0 3px var(--tangerine), inset 0 6px 10px rgba(27, 31, 75, .16); }
.capform .oops { margin: 8px 0 0 22px; font-weight: 600; color: #9A3A06; }
.capform .sendrow { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.capform .sendrow p { margin: 0; flex: 1 1 240px; font-size: 1rem; }
.capform .ready { margin: 0; padding: 16px 26px; border-radius: 30px; background: var(--mint); font-weight: 500; }

/* ===== footer ===== */
.base {
  margin: clamp(22px, 4vw, 46px) 16px 0;
  padding: clamp(34px, 6vw, 70px) clamp(24px, 6vw, 84px) 40px;
  border-radius: var(--round) var(--round) 0 0;
  background: var(--navy);
  color: var(--white);
  box-shadow: inset 0 12px 16px rgba(255, 255, 255, .1);
}
.base-in { max-width: 1010px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 34px 60px; }
.base-in > * { min-width: 0; }
.base .dock-brand { color: var(--white); font-size: 1.1rem; }
.base p { color: #DCD8F5; margin: 14px 0 20px; max-width: 26em; }
.base-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.base-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: rgba(255, 255, 255, .12); color: var(--white); text-decoration: none; font-weight: 500; font-size: .97rem; }
.base-links a:hover { background: var(--tangerine); color: var(--navy); }
.base dl { margin: 0; display: grid; gap: 10px; }
.base dl div { padding: 12px 24px; border-radius: 28px; background: rgba(255, 255, 255, .08); }
.base dt { font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--mint); }
.base dd { margin: 0; overflow-wrap: anywhere; }
.base dd a { color: var(--white); }

/* ===== smaller screens ===== */
@media (max-width: 940px) {
  body { padding-top: 96px; }
  .dock { left: 16px; right: 16px; transform: none; width: auto; max-width: none; flex-wrap: wrap; border-radius: 36px; padding: 8px 8px 8px 20px; }
  .dock-btn { display: block; }
  .dock-links { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 4px 8px 0; margin-left: -8px; }
  .dock.is-open .dock-links { display: flex; }
  .dock-links a { min-height: 50px; padding: 0 22px; background: var(--lavender); font-size: 1.02rem; }

  .opening, .duo, .duo[data-flip] { grid-template-columns: minmax(0, 1fr); }
  .duo[data-flip] > :first-child { order: 0; }
  .heap { height: 190px; }
  .heap span:nth-child(1) { width: 170px; height: 64px; top: 10px; }
  .heap span:nth-child(2) { width: 200px; height: 74px; top: 70px; }
  .heap span:nth-child(3) { width: 140px; height: 56px; top: 130px; left: 40%; }
  .heap span:nth-child(4) { width: 54px; height: 54px; }
  .heap span:nth-child(5) { top: 140px; left: 8%; }
  .trio { grid-template-columns: minmax(0, 1fr); }
  .tall { border-radius: 52px; padding: 30px 28px 32px; align-items: flex-start; text-align: left; }
  .tall:nth-child(2) { margin-top: 0; }
  .tall h3 { margin-top: 18px; }
  .orb { width: 72px; height: 72px; }
  .orb svg { width: 34px; height: 34px; }
  .pair, .base-in { grid-template-columns: minmax(0, 1fr); }
  .flow li:nth-child(n) { margin-left: 0; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .flow li { align-items: flex-start; border-radius: 38px; padding: 14px 22px 16px 14px; gap: 14px; }
  .flow li::before { width: 50px; height: 50px; font-size: 1.05rem; }
  .stack li { border-radius: 30px; padding: 14px 22px; }
  .sheet-row { border-radius: 30px; padding: 14px 22px; }
  .blobs .blob { width: 100%; }
  .life-controls .blob { flex: 1 1 40%; padding: 0 12px; }
  .life-speed { flex: 1 1 100%; justify-content: center; }
  .base { margin-left: 8px; margin-right: 8px; }
  .dock-brand { font-size: .9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .tall, .dock-btn i, .dock-links a { transition: none; }
  .blob:hover, .tall:hover { transform: none; }
}
