/* Finger Paint Duo marketing site
   Palette: poster paint on a yellow craft table.
   Type: Bagel Fat One (display), Figtree (text). Both self-hosted, OFL licensed. */

@font-face {
  font-family: "Bagel Fat One";
  src: url("fonts/bagel-fat-one.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("fonts/figtree-variable.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --sun: #ffc72c;
  --sun-deep: #f2b300;
  --ink: #171a4a;
  --ink-soft: #3d4070;
  --paper: #ffffff;
  --red: #e5382b;
  --blue: #2748d8;
  --green: #26a153;
  --pink: #f0569b;

  --display: "Bagel Fat One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 62ch;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --wrap: 72rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

img, svg, canvas { max-width: 100%; display: block; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.09em; }
a:hover { text-decoration-thickness: 0.16em; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 6px;
}
.on-ink :focus-visible { outline-color: var(--sun); }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 10.5vw, 5.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(2rem, 6vw, 3.25rem); }
h3 { font-size: 1.5rem; line-height: 1.1; }

p { margin: 0; max-width: var(--measure); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1;
  text-decoration: none;
}
.icon-slot {
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  border-radius: 0.6rem;
  border: 2px dashed var(--ink);
  background: var(--paper);
  overflow: hidden;
}
.icon-slot img { width: 100%; height: 100%; object-fit: cover; }
.topnav { display: flex; gap: 1.1rem; font-weight: 600; font-size: 1rem; }

/* ---------- Hero ---------- */

.hero { background: var(--sun); padding-bottom: clamp(2.5rem, 7vw, 5rem); }

.hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding-top: clamp(1rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}

.hero-copy > * + * { margin-top: 1.35rem; }
.hero-copy > .lede { margin-top: 1.75rem; }
.lede { font-size: clamp(1.15rem, 2.4vw, 1.35rem); line-height: 1.45; max-width: 34ch; }

.store-note {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
}
.store-note .dab {
  width: 0.7rem; height: 0.7rem;
  border-radius: 50%;
  background: var(--red);
  flex: none;
}
a.store-note:hover { background: #0d0f33; }

/* ---------- The foldable demo ---------- */

.demo { max-width: 36rem; width: 100%; margin-inline: auto; }

.device {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  aspect-ratio: 6 / 5;
  perspective: 1700px;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: crosshair;
  transition: transform 260ms ease;
}
.half {
  position: relative;
  background: var(--ink);
  padding: 9px;
  min-width: 0;
}
.half--left { border-radius: 26px 0 0 26px; padding-right: 0; }
.half--right { border-radius: 0 26px 26px 0; padding-left: 0; }

.half canvas {
  width: 100%;
  height: 100%;
  background: var(--paper);
}
.half--left canvas { border-radius: 18px 0 0 18px; }
.half--right canvas { border-radius: 0 18px 18px 0; }

/* The hinge crease, drawn over the join */
.device::after {
  content: "";
  position: absolute;
  top: 9px; bottom: 9px;
  left: calc(50% - 1px);
  width: 2px;
  background: linear-gradient(to right, rgba(23, 26, 74, 0.16), rgba(23, 26, 74, 0.04));
  pointer-events: none;
  z-index: 1;
}

.flap {
  position: relative;
  z-index: 2;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 720ms cubic-bezier(0.6, 0.02, 0.3, 1);
}
.flap-front,
.flap-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flap-back {
  transform: rotateY(180deg);
  background: var(--ink);
  border-radius: 26px 0 0 26px;
  display: grid;
  place-items: center;
}
/* The small cover screen on the outside of the phone */
.flap-back::before {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 18px;
  background: #23276a;
}
.flap-back span {
  position: relative;
  font-family: var(--display);
  color: var(--sun);
  font-size: clamp(1rem, 4vw, 1.5rem);
  transform: rotate(-6deg);
}

.device.is-folded .flap { transform: rotateY(-180deg); }
.device.is-pressed { transform: scale(0.975); }
.device.is-busy { cursor: default; }

.demo-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem 1.2rem;
  margin-top: 1.1rem;
}

.pots { display: flex; gap: 0.55rem; border: 0; padding: 0; margin: 0; }
.pot { position: relative; }
.pot input {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.pot .swatch {
  display: block;
  width: 2.6rem; height: 2.6rem;
  border-radius: 50%;
  background: var(--pot);
  border: 3px solid var(--ink);
  transition: transform 140ms ease;
}
.pot input:checked + .swatch { transform: scale(1.14); box-shadow: 0 0 0 3px var(--sun), 0 0 0 6px var(--ink); }
.pot input:focus-visible + .swatch { outline: 3px solid var(--ink); outline-offset: 6px; }

.demo-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
}
.btn:hover { background: #0d0f33; }
.btn--quiet { background: transparent; color: var(--ink); }
.btn--quiet:hover { background: rgba(23, 26, 74, 0.1); }
.btn[disabled] { opacity: 0.55; cursor: default; }

.demo-status { margin-top: 0.9rem; font-weight: 600; min-height: 1.6em; }

/* ---------- Content sections ---------- */

.section { padding-block: clamp(3rem, 9vw, 6rem); }
.section > .wrap > h2 { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.25rem;
  counter-reset: step;
}
@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
}
.steps li { counter-increment: step; }
.steps svg { width: 100%; max-width: 15rem; height: auto; margin-bottom: 1rem; }
.steps h3::before {
  content: counter(step) ". ";
  color: var(--red);
}
.steps p { margin-top: 0.5rem; }

.shots { background: var(--ink); color: var(--paper); }
.shots p { color: #d7d9f2; }
.shot-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(78vw, 26rem);
  gap: 1.1rem;
  overflow-x: auto;
  padding: 0.5rem var(--gutter) 1.25rem;
  margin-top: 2rem;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
}
.shot {
  margin: 0;
  scroll-snap-align: start;
}
.shot-frame {
  aspect-ratio: 6 / 5;
  border-radius: 20px;
  border: 2px dashed #7f83c4;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.25rem;
  color: #b9bce6;
  font-weight: 600;
  overflow: hidden;
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { margin-top: 0.7rem; font-size: 1rem; color: #d7d9f2; }

.needs { background: var(--sun); }
.needs .wrap > * + * { margin-top: 1.25rem; }

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: var(--paper);
  padding-block: 2.5rem;
  font-size: 1rem;
}
.footer .wrap { display: grid; gap: 1rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; font-weight: 600; }
.footer small { color: #b9bce6; font-size: 0.875rem; line-height: 1.5; max-width: var(--measure); }

/* ---------- Privacy and support pages ---------- */

.page-head { background: var(--sun); padding-bottom: clamp(2rem, 6vw, 3.5rem); }
.page-head h1 { font-size: clamp(2.4rem, 8vw, 4.25rem); padding-top: clamp(1rem, 4vw, 2.5rem); }
.page-head p { margin-top: 1rem; font-size: 1.2rem; }

.prose { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.prose > .wrap > * + * { margin-top: 1.1rem; }
.prose h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-top: 2.75rem; }
.prose ul { margin: 1.1rem 0 0; padding-left: 1.2rem; max-width: var(--measure); }
.prose li + li { margin-top: 0.4rem; }
.prose .updated { color: var(--ink-soft); font-size: 1rem; }

.faq { max-width: var(--measure); border-top: 2px solid var(--ink); }
.faq details { border-bottom: 2px solid var(--ink); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.05rem 2.5rem 1.05rem 0;
  font-weight: 700;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--red);
}
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding-bottom: 1.2rem; }
.faq details p + p { margin-top: -0.4rem; }

.contact-card {
  margin-top: 2.5rem;
  max-width: var(--measure);
  background: var(--sun);
  border-radius: 20px;
  padding: 1.5rem;
}
.contact-card h2 { margin-top: 0; }
.contact-card p { margin-top: 0.75rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .flap, .device, .pot .swatch { transition: none; }
}
