/*
 * /about: the room shown, not described. One promise, two buttons (the room, and the Chrome extension) and the room
 * itself on a laptop and a phone, its skins changing on both together every few seconds. Below: the new tab, sync,
 * three pictures, the price and a few questions (about-more.css). Motion is quiet and arrives once; under reduced
 * motion only the skins' dissolve stays (a dissolve, not movement), and without JS everything is simply there.
 * Colours are pages.css tokens.
 */

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

.hero {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(36px, 8vw, 92px) var(--gutter) 0;
  text-align: center;
}
.kicker {
  margin: 0 0 12px;
  color: var(--text-3);
  font: 700 0.8rem/1.2 var(--font-ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero h1 {
  max-width: 11ch;
  margin: 0 auto 18px;
  font: 400 clamp(2.9rem, 8.8vw, 5.6rem)/1 var(--font-display);
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  letter-spacing: -0.03em;
}
.hero .sub {
  max-width: 28em;
  margin: 0 auto 30px;
  color: var(--text-2);
  font-size: clamp(1.08rem, 2.4vw, 1.26rem);
}
.ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.btn--big {
  min-height: 56px;
  padding: 0 28px;
  font-size: 1.06rem;
}
.btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.small-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 22px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-3);
  font-size: 0.94rem;
}
.small-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.small-facts li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--leaf);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero > * {
  animation: rise var(--t-slow) var(--ease-out) both;
}
.hero > :nth-child(2) {
  animation-delay: 70ms;
}
.hero > :nth-child(3) {
  animation-delay: 140ms;
}
.hero > :nth-child(4) {
  animation-delay: 200ms;
}
.hero > .stage {
  animation: rise 1.1s var(--ease-out) 180ms both;
}
.hero > .skins {
  animation-delay: 760ms;
}

/* ---------- The devices: a laptop, a phone in front, the same room on both ---------- */

.stage {
  --glow: var(--skin-lofi);
  position: relative;
  max-width: 940px;
  margin: clamp(44px, 7vw, 72px) auto 0;
  padding-bottom: 6%;
}
.stage::before {
  content: '';
  position: absolute;
  inset: 12% 8% 6%;
  z-index: -1;
  border-radius: 50%;
  background-color: var(--glow);
  filter: blur(clamp(48px, 9vw, 96px));
  opacity: 0.55;
  transition: background-color var(--t-scene) ease;
}
.stage[data-skin='pro'] {
  --glow: var(--skin-pro);
}
.stage[data-skin='retro'] {
  --glow: var(--skin-retro);
}
.stage[data-skin='chroma'] {
  --glow: var(--skin-chroma);
}
.stage[data-skin='synth'] {
  --glow: var(--skin-synth);
}
.stage[data-skin='paper'] {
  --glow: var(--skin-paper);
}

.laptop {
  width: 86%;
  margin: 0 auto;
}
.lid {
  padding: 1.8% 1.8% 2.3%;
  border-radius: 18px 18px 6px 6px;
  background: var(--bezel);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px var(--device-edge);
}
.glass {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  background: var(--bezel);
}
.glass img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity var(--t-scene) ease;
}
.glass img.on {
  opacity: 1;
}
.deck {
  position: relative;
  height: clamp(9px, 1.6vw, 16px);
  margin: 0 -6.5%;
  border-radius: 2px 2px 16px 16px / 2px 2px 12px 12px;
  background: linear-gradient(180deg, var(--metal-1), var(--metal-2));
  box-shadow: var(--shadow);
}
.deck::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 15%;
  height: 40%;
  transform: translateX(-50%);
  border-radius: 0 0 8px 8px;
  background: var(--device-edge);
}

.phone {
  position: relative;
  width: 21%;
  min-width: 108px;
}
.stage .phone {
  position: absolute;
  right: 1%;
  bottom: 0;
  animation: rise 1.2s var(--ease-out) 520ms both;
}
.handset {
  padding: 4.5%;
  border-radius: 17% / 8.6%;
  background: var(--bezel);
  box-shadow:
    var(--shadow),
    inset 0 0 0 1.5px var(--device-edge);
}
.phone .glass {
  aspect-ratio: 600 / 1110;
  border-radius: 13% / 7%;
}

/* "In sync", above the phone: its dot answers each change of skin, as the laptop changes. */
.in-sync {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--bg-raised);
  color: var(--text-2);
  font: 700 0.78rem/1 var(--font-ui);
  white-space: nowrap;
  transform: translateX(-50%);
}
.in-sync i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf);
}
.in-sync.beat i {
  animation: beat 900ms var(--ease-out);
}
@keyframes beat {
  from {
    box-shadow: 0 0 0 0 var(--leaf);
  }
  to {
    box-shadow: 0 0 0 9px transparent;
  }
}

/* The skins by name. While they change by themselves, the one on screen fills as its turn runs out. */
.skins {
  display: none;
}
.js .skins {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 26px auto 0;
}
.skins button {
  position: relative;
  overflow: hidden;
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--text-2);
  font: 600 0.9rem/1 var(--font-ui);
  cursor: pointer;
  transition:
    background-color var(--t-base),
    color var(--t-base),
    border-color var(--t-base);
}
.skins button:hover {
  border-color: var(--line-strong);
  color: var(--text-1);
}
.skins button[aria-pressed='true'] {
  border-color: var(--text-1);
  background: var(--text-1);
  color: var(--bg);
}
.skins button::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.35;
  transform: scaleX(0);
  transform-origin: left;
}
.skins.turning button[aria-pressed='true']::after {
  animation: turn var(--turn, 4500ms) linear forwards;
}
@keyframes turn {
  to {
    transform: scaleX(1);
  }
}
@media (pointer: coarse) {
  .skins button {
    min-height: 44px;
  }
}

/* ---------- The frame every section below shares ---------- */

.section {
  max-width: var(--wide);
  margin: 0 auto;
  padding: clamp(80px, 13vw, 140px) var(--gutter) 0;
}
.section > header {
  max-width: 640px;
  margin: 0 0 clamp(28px, 5vw, 44px);
}
.center > header {
  margin-inline: auto;
  text-align: center;
}
.section h2 {
  margin: 0 0 12px;
  font: 400 clamp(2rem, 5vw, 3.2rem)/1.06 var(--font-display);
  font-variation-settings: 'SOFT' 100, 'opsz' 144;
  letter-spacing: -0.02em;
}
.section header p {
  margin: 0;
  color: var(--text-2);
  font-size: 1.1rem;
}
.section p {
  color: var(--text-2);
}

/* ---------- Free forever, and a coffee ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 760px;
  margin: 0 auto;
}
.plan {
  padding: 26px 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--panel);
  text-align: left;
}
.plan--premium {
  border-color: var(--line-strong);
  background: linear-gradient(180deg, rgba(var(--ink), 0.05), transparent 70%), var(--panel);
}
.plan .kicker {
  margin-bottom: 10px;
}
.price {
  margin: 0;
  font: 400 2.6rem/1.1 var(--font-display);
}
.section .price {
  color: var(--text-1);
}
.price small {
  margin-left: 6px;
  color: var(--text-2);
  font: 600 1rem var(--font-ui);
}
.plan .alt {
  margin: 8px 0 0;
}
.section .perks,
.section .fine {
  max-width: 780px;
  margin: 22px auto 0;
  text-align: center;
  color: var(--text-3);
  font-size: 0.95rem;
}
.section .fine {
  margin-top: 8px;
}

/* ---------- Questions ---------- */

.faq {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  font: 700 1.06rem/1.4 var(--font-ui);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--text-2);
  font: 400 1.15rem/1 var(--font-ui);
  transition: transform var(--t-base) var(--ease-out);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  max-width: 62ch;
  margin: 0 0 20px;
}

/* ---------- The last word: a sprout grows, and the two ways in ---------- */

.last {
  text-align: center;
}
.last h2 {
  margin-bottom: 26px;
}
.last .sub {
  margin: 16px 0 0;
  color: var(--text-3);
}

/* ---------- Arrivals, once, in view; reduced motion keeps only the dissolve ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
}
.js .reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
  }
  .glass img {
    transition-duration: var(--t-scene) !important;
  }
  .skins button::after {
    display: none;
  }
}

@media (max-width: 600px) {
  .stage {
    padding-bottom: 10%;
  }
  .stage .phone {
    width: 27%;
    min-width: 0;
  }
  .plans {
    grid-template-columns: 1fr;
  }
  .ctas .btn {
    flex: 1 1 100%;
  }
}
