/* Solvstream: Look, no hands.
   The page is a toy building-instructions booklet. Flat colours, ink outlines,
   one display face, and motion only where it means something. */

:root {
  --cream: #F3ECE0;
  --paper: #FBF7F0;
  --white: #FFFDF9;
  --ink: #2A2420;
  --ink-2: #5A4F46;
  --orange: #F39A24;
  --orange-hi: #F8A93D;
  --teal: #1E8E7A;
  --teal-deep: #136C5D;
  --plate: #D7E6DF;
  --side: #DCCBB2;
  --display: "Caprasimo", "Cooper Black", "Iowan Old Style", Georgia, serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: 1rem;
  --radius: 16px;
}
@media (min-width: 640px) { :root { --gutter: 2rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
h1, h2 { font-family: var(--display); letter-spacing: -0.012em; }
h2 { font-size: clamp(2.3rem, 5.2vw, 3.75rem); line-height: 1; }
h3 { font-family: var(--display); font-size: 1.7rem; line-height: 1.05; }
a { color: inherit; }
.num { font-variant-numeric: lining-nums tabular-nums; }

.wrap { width: min(100% - var(--gutter) * 2, 76rem); margin-inline: auto; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--ink); color: var(--white); padding: .6rem 1rem; border-radius: 8px;
}
.skip:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; border-radius: 4px; }

/* ---------------------------------------------------------------- buttons and links */

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.1rem 1.5rem; }

.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 9px;
  padding: .95rem 1.35rem 1rem;
  font: 700 1.0625rem/1.2 var(--sans);
  color: var(--ink);
  text-decoration: none;
  background: var(--orange);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 0 6px 0 -2px #C9740F, 0 6px 0 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
/* two studs on top: the button is a brick */
.btn::before {
  content: ""; position: absolute; left: 14px; top: -10px; width: 52px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='10'%3E%3Cpath d='M5 10V4.5Q5 1 8.5 1h9Q21 1 21 4.5V10' fill='%23F8A93D' stroke='%232A2420' stroke-width='2'/%3E%3C/svg%3E") repeat-x left bottom / 26px 10px;
}
.btn:hover { background: var(--orange-hi); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 -2px #C9740F, 0 2px 0 0 var(--ink); }

.link {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .22em;
  text-decoration-color: var(--orange);
}
.link:hover { text-decoration-color: var(--ink); }
.link--light { color: var(--white); }
.link--light:hover { text-decoration-color: var(--white); }

/* ---------------------------------------------------------------- top bar */

.top { padding: 1.1rem 0 .4rem; }
.top__in { display: flex; align-items: center; gap: 1.5rem; }
.logo { display: inline-flex; color: var(--ink); }
.logo svg { height: 26px; width: auto; }
.top__nav { display: none; margin-left: auto; gap: 1.6rem; font-weight: 600; }
.top__nav a { text-decoration: none; }
.top__nav a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.top__cta {
  margin-left: auto;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  padding: .5rem .85rem; border: 2px solid var(--ink); border-radius: 8px;
  box-shadow: 0 3px 0 var(--ink);
}
.top__cta:hover { background: var(--white); }
.top__cta:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
@media (min-width: 860px) {
  .top__nav { display: flex; }
  .top__cta { margin-left: .5rem; }
}

/* ---------------------------------------------------------------- hero */

.hero { padding: 1.4rem 0 4.5rem; }
.hero__grid {
  display: grid;
  grid-template-areas: "h" "stage" "rest";
  gap: 1.4rem;
}
.hero__h {
  grid-area: h;
  font-size: clamp(3.6rem, 13vw, 7.6rem);
  line-height: .9;
  letter-spacing: -0.02em;
  padding-top: .6rem;
}
.hero__stage {
  grid-area: stage;
  position: relative;
  margin: 0;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
}
.scene--hero { width: 100%; height: auto; max-height: 34rem; margin-inline: auto; }
.hero__rest { grid-area: rest; }
.hero__intro {
  display: flex; align-items: center; gap: 1rem;
  font-size: 1.25rem; line-height: 1.4; font-weight: 500;
  max-width: 31rem;
}
.avatar {
  flex: none; width: 3.6rem; height: 3.6rem; border-radius: 50%;
  border: 2px solid var(--ink); object-fit: cover; background: var(--side);
}
.hero__rest .actions { margin-top: 1.8rem; }

.replay {
  position: absolute; right: .9rem; bottom: .8rem;
  font: 600 .85rem/1 var(--sans); color: var(--ink);
  background: var(--white); border: 2px solid var(--ink); border-radius: 7px;
  padding: .45rem .7rem; cursor: pointer;
}
.replay:hover { background: #fff; }

@media (min-width: 960px) {
  .hero { padding: 2.2rem 0 6rem; }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr);
    grid-template-areas: "h stage" "rest stage";
    grid-template-rows: auto 1fr;
    column-gap: 3.5rem; row-gap: 2rem;
    align-items: start;
  }
  .hero__h { align-self: end; padding-top: 3.5rem; font-size: min(7.6rem, 8.5vw); }
  .hero__stage { align-self: center; }
}

/* the hero film: your finger props the top brick up, the orange brick clicks in, the finger lets go */
.scene--hero .h-top { transform-box: fill-box; transform-origin: 8% 100%; }
.scene--hero .h-flag { transform-box: fill-box; transform-origin: 0% 100%; }
.scene--hero .h-clicks { transform-box: fill-box; transform-origin: 50% 50%; }
.js .scene--hero .h-orange { opacity: 0; transform: translate(60px, 35px); }
.js .scene--hero .h-flag { transform: scale(0); }
.js .scene--hero .h-clicks { opacity: 0; }
.js .scene--hero .h-finger { animation: strain 1.7s ease-in-out infinite; }
.js .scene--hero .h-top { animation: wobble 1.7s ease-in-out infinite; }
.js .scene--hero.play .h-top { animation: settle .5s ease-out both; }
.js .scene--hero.play .h-orange { animation: brick-in .8s cubic-bezier(.22, .9, .32, 1.1) .1s both; }
.js .scene--hero.play .h-clicks { animation: click .7s ease-out .82s both; }
.js .scene--hero.play .h-finger { animation: finger-out 1.05s cubic-bezier(.5, 0, .75, .25) 1.25s both; }
.js .scene--hero.play .h-flag { animation: flag-up .55s cubic-bezier(.3, 1.6, .5, 1) 2.2s both; }

@keyframes strain { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
@keyframes wobble { 0%, 100% { transform: rotate(0deg); } 35% { transform: rotate(-1.3deg); } 70% { transform: rotate(.5deg); } }
@keyframes settle { from { transform: rotate(-1deg); } to { transform: rotate(0deg); } }
@keyframes brick-in {
  from { opacity: 0; transform: translate(60px, 35px); }
  35% { opacity: 1; }
  to { opacity: 1; transform: translate(0, 0); }
}
@keyframes click {
  0% { opacity: 0; transform: scale(.55); }
  30% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.12); }
}
@keyframes finger-out { from { transform: translate(0, 0); } to { transform: translate(24px, 290px); } }
@keyframes flag-up { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------------------------------------------------------------- what are you holding up */

.hold {
  padding: 4.5rem 0 5rem;
  background-color: var(--plate);
  /* a base plate: rows of faint studs */
  background-image:
    radial-gradient(circle at 50% 46%, rgba(255, 255, 255, .55) 0 4.5px, transparent 5px),
    radial-gradient(circle at 50% 50%, rgba(42, 36, 32, .09) 0 7px, transparent 7.5px);
  background-size: 30px 30px;
}
.lede { margin-top: .9rem; font-size: 1.2rem; font-weight: 500; max-width: 34rem; }
.bricks {
  list-style: none; margin: 2.4rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 2.9rem .7rem;
}
@media (min-width: 640px) { .bricks { gap: 3.4rem .85rem; } }
.jb {
  position: relative;
  display: inline-flex; align-items: center;
  min-height: 3rem;
  margin-top: 10px;
  padding: .62rem .85rem .68rem;
  font: 600 .95rem/1.25 var(--sans);
  color: var(--ink);
  text-align: left;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 7px;
  box-shadow: 0 7px 0 -2px var(--side), 0 7px 0 0 var(--ink);
  cursor: pointer;
  transition: transform .16s cubic-bezier(.3, 1.4, .5, 1), background-color .15s ease;
}
.jb::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: -10px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='10'%3E%3Cpath d='M5 10V4.5Q5 1 8.5 1h9Q21 1 21 4.5V10' fill='%23FFFDF9' stroke='%232A2420' stroke-width='2'/%3E%3C/svg%3E") space left bottom / 26px 10px;
}
.jb:hover { background: #fff; }
@media (min-width: 640px) { .jb { min-height: 3.2rem; padding: .72rem 1.05rem .78rem; font-size: 1rem; } }
.jb__finger {
  position: absolute; left: 50%; top: calc(100% + 9px);
  width: 30px; height: 70px; margin-left: -15px;
  overflow: visible;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .14s ease, transform .2s cubic-bezier(.3, 1.4, .5, 1);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 55%, transparent);
  mask-image: linear-gradient(#000 55%, transparent);
}
.jb[aria-pressed="true"] { transform: translateY(-5px); background: #FFF6E6; }
.jb[aria-pressed="true"] .jb__finger { opacity: 1; transform: translateY(0); }

.tally { margin-top: 3.4rem; max-width: 40rem; }
.tally__count { font: 400 clamp(1.7rem, 3.4vw, 2.3rem)/1.15 var(--display); }
.tally__count:empty { display: none; }
.tally__line { margin-top: .6rem; font-size: 1.15rem; font-weight: 500; }
.tally__count:empty + .tally__line { margin-top: 0; }
.tally .actions { margin-top: 1.4rem; }

/* ---------------------------------------------------------------- what came back */

.came { padding: 6rem 0 5.5rem; }
.cards { display: grid; gap: 1.25rem; margin-top: 2.6rem; }
.card {
  display: flex; flex-direction: column; gap: 1rem;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem 1.7rem;
}
.duo { display: flex; align-items: flex-start; justify-content: center; gap: .4rem; margin: .2rem 0 .3rem; }
.duo figure { margin: 0; flex: 1 1 0; max-width: 12.5rem; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.duo .scene--tower { width: 100%; height: auto; }
.duo figcaption { margin-top: .35rem; display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center; }
.duo figcaption span { font-size: .85rem; font-weight: 700; color: var(--ink-2); }
.duo figcaption b { font: 400 clamp(1.25rem, 2.1vw, 1.6rem)/1.08 var(--display); }
@media (min-width: 620px) { .duo figcaption b { white-space: nowrap; } }
.cards > * { min-width: 0; }
.duo figcaption em { font-style: normal; font-size: .86rem; color: var(--ink-2); }
.duo .now { color: var(--teal-deep); }
.duo__arrow {
  flex: none; align-self: center; width: 2.6rem; height: 1.5rem; margin-top: -3.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 30'%3E%3Cpath d='M2 10h30V3l18 12-18 12v-7H2z' fill='%231E8E7A' stroke='%232A2420' stroke-width='2.4' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.key { margin-top: 1.4rem; font-size: .95rem; font-weight: 600; color: var(--ink-2); }
@media (min-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- steps */

.steps { padding: 6rem 0; background: var(--paper); }
.booklet {
  list-style: none; margin: 2.6rem 0 0; padding: 0;
  display: grid; gap: 1.25rem;
}
.panel {
  position: relative;
  display: flex; flex-direction: column; gap: .75rem;
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  padding: 1rem 1.3rem 1.5rem;
}
.panel__n { font: 400 2.7rem/1 var(--display); }
.panel .scene--step { width: 100%; height: 10.5rem; margin: -.6rem 0 .2rem; }
@media (min-width: 640px) { .panel .scene--step { height: 12.5rem; } }
.panel h3 { margin-top: .2rem; }
.small { font-size: .92rem; color: var(--ink-2); }
.panel__more { margin-top: auto; padding-top: .4rem; align-self: flex-start; }

.tag {
  position: relative;
  align-self: flex-start;
  margin-top: .2rem;
  padding: .32rem .85rem .36rem 1.55rem;
  font-weight: 700; font-size: .98rem;
  color: var(--white);
  background: var(--teal);
  border-radius: 0 6px 6px 0;
  clip-path: polygon(.8rem 0, 100% 0, 100% 100%, .8rem 100%, 0 50%);
}
.tag::before {
  content: ""; position: absolute; left: .62rem; top: 50%;
  width: .4rem; height: .4rem; margin-top: -.2rem;
  border-radius: 50%; background: var(--paper);
}
@media (min-width: 640px) { .booklet { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1120px) { .booklet { grid-template-columns: repeat(4, 1fr); } }

/* ---------------------------------------------------------------- build your own */

.own { padding: 5rem 0; }
.own__grid { display: grid; gap: 2rem; align-items: center; }
.own__copy { display: flex; flex-direction: column; gap: 1.1rem; max-width: 34rem; }
.own__copy p:not(.tag) { font-size: 1.2rem; font-weight: 500; }
.own__copy .tag { margin-top: .3rem; }
.own__copy .tag::before { background: var(--cream); }
.scene--kit { width: 100%; max-width: 30rem; height: auto; margin-inline: auto; }
.scene--kit .cover { font: 400 40px/1 var(--display); }
@media (min-width: 900px) {
  .own__grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

/* ---------------------------------------------------------------- meet Shaun */

.meet { padding: 5rem 0 6rem; }
.meet__grid { display: grid; gap: 2.4rem; align-items: start; }
.meet__photo { position: relative; margin: 0; max-width: 19rem; }
@media (min-width: 900px) { .meet__photo { max-width: 24rem; } }
.meet__photo img {
  width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border: 2px solid var(--ink); border-radius: var(--radius);
}
.meet__photo .sticker { position: absolute; right: -14px; bottom: -18px; width: 78px; transform: rotate(-9deg); }
.meet__copy { display: flex; flex-direction: column; gap: 1.1rem; max-width: 38rem; }
.meet__copy h2 { margin-bottom: .4rem; }
.meet__copy p { font-size: 1.15rem; }
.sign { font-weight: 700; font-size: 1rem !important; color: var(--ink-2); }
@media (min-width: 900px) {
  .meet__grid { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 4.5rem; align-items: center; }
}

/* ---------------------------------------------------------------- questions */

.faq { padding: 1rem 0 6rem; }
.faq__grid { display: grid; gap: 2rem; }
.faq__list { border-top: 2px solid var(--ink); }
.faq details { border-bottom: 2px solid var(--ink); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.15rem .1rem;
  font-weight: 700; font-size: 1.15rem;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i {
  position: relative; flex: none; width: 1.7rem; height: 1.7rem;
  border: 2px solid var(--ink); border-radius: 50%; background: var(--white);
  transition: transform .2s ease, background-color .2s ease;
}
.faq summary i::before, .faq summary i::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: .7rem; height: 2px;
  margin: -1px 0 0 -.35rem; background: var(--ink); border-radius: 1px;
}
.faq summary i::after { transform: rotate(90deg); }
.faq details[open] summary i { transform: rotate(45deg); background: var(--orange); }
.faq details p { padding: 0 .1rem 1.4rem; max-width: 42rem; color: var(--ink-2); font-size: 1.08rem; }
@media (min-width: 900px) {
  .faq__grid { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: 3rem; align-items: start; }
}

/* ---------------------------------------------------------------- close */

.close { background: var(--teal); color: var(--white); padding: 5rem 0 0; overflow: hidden; }
.close__grid { display: grid; gap: 2rem; align-items: end; }
.close__copy { padding-bottom: 1rem; }
.close__copy h2 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
.close__copy .actions { margin-top: 2rem; }
.close__art .scene--done { width: 100%; max-width: 34rem; height: auto; margin: 0 auto -6px; }
@media (min-width: 900px) {
  .close__grid { grid-template-columns: 1fr 1fr; }
  .close__copy { padding-bottom: 5.5rem; }
}

/* ---------------------------------------------------------------- footer */

.foot { background: #221E1A; color: #EFE6D8; padding: 3.5rem 0 2.2rem; font-size: .98rem; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: .25em; }
.foot .logo { color: #EFE6D8; }
.foot__grid { display: grid; gap: 2.2rem; }
.foot__brand p { margin-top: 1rem; color: #CFC3B2; line-height: 1.7; }
.foot__col h2 { font: 700 .95rem/1.2 var(--sans); letter-spacing: 0; color: #fff; margin-bottom: .8rem; }
.foot__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; color: #CFC3B2; }
.foot__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem;
  margin-top: 3rem; padding-top: 1.4rem; border-top: 1px solid rgba(239, 230, 216, .18);
  color: #A99D8C; font-size: .9rem;
}
.foot__base p:last-child { display: flex; gap: 1.4rem; }
@media (min-width: 760px) {
  .foot__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

/* ---------------------------------------------------------------- drawings */

.scene { overflow: hidden; }
.qty { font: 700 18px/1 var(--sans); }
.tagtext { font: 700 18px/1 var(--sans); }
