/* Unfold Walls — site styles
   The artwork carries the colour. The interface stays black, white and glass,
   exactly like the app. One accent per pair, taken from the art on show. */

:root {
  --black: #000;
  --white: #fff;
  --text-2: rgba(235, 235, 245, 0.66);
  --text-3: rgba(235, 235, 245, 0.42);
  --hair: rgba(255, 255, 255, 0.12);
  --fill: rgba(255, 255, 255, 0.07);
  --fill-2: rgba(255, 255, 255, 0.12);
  --accent: #a16e15; /* replaced per pair by unfold.js */

  --serif: ui-serif, "New York", "Newsreader", Georgia, serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: max(16px, min(4vw, 40px));
  --radius-art: 22px;
  --radius-control: 999px;

  color-scheme: dark;
}

/* Newsreader stands in for New York where ui-serif isn't available (Chrome, Windows, Android).
   Self-hosted so the site makes no third-party requests. SIL Open Font License, see fonts/OFL.txt. */
@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(fonts/newsreader-latin.woff2) format("woff2-variations"), url(fonts/newsreader-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Base (mobile-native baseline) ---------- */

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

html {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  background: var(--black);
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 1.0625rem/1.55 var(--sans);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

button, a, [role="button"], [role="tab"], [role="radio"] {
  touch-action: manipulation;
}
button, .btn, [role="tab"], [role="radio"], summary {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--white); color: var(--black);
  padding: 10px 14px; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: calc(12px + env(safe-area-inset-top, 0px)); }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}
.wrap--narrow { max-width: 760px; }

/* ---------- Type ---------- */

.display, .h2, h3, .brand span, .pair-name b, .plan__price, .steps__n {
  font-family: var(--serif);
  font-optical-sizing: auto;
}

.display {
  margin: 0 0 0.45em;
  font-size: clamp(2.6rem, 1.4rem + 4.2vw, 4.75rem);
  font-weight: 600;
  line-height: 1.0;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.h2 {
  margin: 0 0 0.5em;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

h3 {
  margin: 0 0 0.35em;
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.012em;
}

.lede {
  max-width: 34ch;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.45;
  color: var(--text-2);
}

.muted { color: var(--text-2); }
.fine { font-size: 0.875rem; line-height: 1.45; color: var(--text-3); letter-spacing: 0; }
.center { text-align: center; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border-radius: var(--radius-control);
  font: 600 1.0625rem/1 var(--sans);
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: transform 140ms var(--ease-out), background-color 200ms ease, opacity 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn--light { background: var(--white); color: var(--black); }
.btn--small { min-height: 36px; padding: 0 16px; font-size: 0.9375rem; }
.btn--block { width: 100%; }
.btn.is-soon {
  background: var(--fill-2); color: var(--white);
  cursor: default; pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
  .btn--light:hover { background: rgba(255, 255, 255, 0.86); }
}

/* ---------- Nav: material appears only once content scrolls under it ---------- */

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 240ms ease, -webkit-backdrop-filter 240ms ease, backdrop-filter 240ms ease, box-shadow 240ms ease;
}
.nav.is-scrolled {
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 0.5px 0 var(--hair);
}
.nav__inner {
  display: flex; align-items: center; gap: 24px;
  max-width: 1180px; height: 56px; margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; margin-right: auto;
}
.brand img { border-radius: 7px; }
.brand span { font-size: 1.1875rem; font-weight: 600; letter-spacing: -0.015em; }
.nav__links { display: flex; gap: 22px; font-size: 0.9375rem; }
.nav__links a { text-decoration: none; color: var(--text-2); transition: color 160ms ease; }
@media (hover: hover) and (pointer: fine) { .nav__links a:hover { color: var(--white); } }
@media (max-width: 720px) { .nav__links { display: none; } }

@media (prefers-reduced-transparency: reduce) {
  .nav.is-scrolled { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

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

.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(88px + env(safe-area-inset-top, 0px)) 0 56px;
  overflow: hidden;
  isolation: isolate;
}

.ambient { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ambient::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.55) 55%, #000 100%);
}
.ambient__layer {
  position: absolute; inset: -10%;
  width: 120%; height: 120%; max-width: none;
  object-fit: cover;
  filter: blur(40px) saturate(1.2);
  opacity: 0;
  transition: opacity 900ms ease;
}
.ambient__layer.is-on { opacity: 0.75; }

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
}
.hero__actions { display: grid; gap: 14px; justify-items: start; margin-top: 8px; }

@media (max-width: 900px) {
  .hero { align-items: flex-start; min-height: 0; padding-top: calc(84px + env(safe-area-inset-top, 0px)); }
  .hero__inner { grid-template-columns: 1fr; gap: 28px; }
  .hero__stage { order: 2; }
  .hero__copy { order: 1; }
  .lede { max-width: 40ch; }
}

/* ---------- The unfold stage ---------- */

.hero__stage { margin: 0; }

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 2670 / 1878;
  cursor: grab;
  touch-action: pan-y;               /* we own horizontal drags, the browser keeps vertical scroll */
  -webkit-user-select: none; user-select: none;
  outline-offset: 10px;
  transition: opacity 200ms ease;
}
.stage.is-dragging { cursor: grabbing; }
.stage.is-swapping { opacity: 0; transition-duration: 140ms; }

.device {
  position: absolute; inset: 0;
  display: flex;
  will-change: transform;
}
.panel {
  position: relative;
  width: 50%; height: 100%;
  overflow: hidden;
  /* Corner radius follows the device: about 6% of its height. */
  --r: calc(var(--stage-h, 400px) * 0.06);
}
.panel--left {
  border-radius: var(--r) 0 0 var(--r);
  transform-origin: 100% 50%;
  will-change: transform, opacity;
  opacity: 0;
}
.panel--right { border-radius: var(--r); }
/* One shadow under whatever is visible: the right half when closed, the whole phone when open. */
.device__shadow {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 50%;
  border-radius: calc(var(--stage-h, 400px) * 0.06);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.5);
  transform-origin: 100% 50%;
  will-change: transform;
}
/* Hairline round the closed phone so dark art doesn't melt into the page; it fades as the phone opens. */
.panel--right::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  opacity: var(--closed, 1);
}
.layer { position: absolute; inset: 0; will-change: opacity; }
.art {
  position: absolute; top: 0; height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}
.art--cover { left: 0; width: 100%; }
.art--inside { left: 0; width: 200%; max-width: none; }
.art--inside.art--right { left: -100%; }
.art--blur { transform: scale(1.04); }  /* hides the soft edge of the pre-blurred copy */
.shade { position: absolute; inset: 0; background: #000; opacity: 0.5; pointer-events: none; }

.stage__caption {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 4px 16px;
  margin-top: 22px;
}
.hint {
  order: 2;
  font-size: 0.875rem; color: var(--text-3);
}
.pair-name { display: grid; gap: 2px; }
.pair-name b { font-size: 1.375rem; font-weight: 600; letter-spacing: -0.012em; }
.pair-name span { font-size: 0.9375rem; color: var(--text-2); }

.switcher { display: flex; gap: 10px; margin-top: 18px; }
.switcher button {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
  transition: transform 140ms var(--ease-out), box-shadow 200ms ease;
}
.switcher button:active { transform: scale(0.94); }
.switcher button[aria-checked="true"] { box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--white); }
.switcher img { width: 100%; height: 100%; object-fit: cover; }
.switcher button:focus-visible { outline-offset: 5px; border-radius: 50%; }

/* ---------- Sections ---------- */

.section { padding-block: clamp(72px, 10vw, 140px); }
.section + .section { border-top: 0.5px solid var(--hair); }
.section__head { max-width: 680px; margin-bottom: clamp(28px, 4vw, 48px); }

.split {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 5vw, 72px); align-items: center;
}
.split__text p { max-width: 46ch; color: var(--text-2); }
.split__text p.muted { color: var(--text-3); font-size: 0.9375rem; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* What a pair is: the cover frame drawn over the inside picture */
.diagram { margin: 0; }
.diagram__frame {
  position: relative;
  border-radius: var(--radius-art);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.diagram__frame img { width: 100%; height: auto; }
.diagram__frame::before {               /* dim the half the cover doesn't cover */
  content: ""; position: absolute; inset: 0 50% 0 0;
  background: rgba(0, 0, 0, 0.42);
  z-index: 1;
}
.diagram__cover {
  position: absolute; z-index: 2;
  top: 3.5%; bottom: 3.5%; right: 2%;
  width: 46%;
  border-radius: 18px;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 6px rgba(0, 0, 0, 0.25);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 12px;
}
.diagram__cover span {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.01em;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.diagram__legend {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: 14px; font-size: 0.875rem; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.diagram__legend b { color: var(--text-2); font-weight: 600; margin-right: 6px; }

/* ---------- Gallery ---------- */

.segmented {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  width: min(100%, 460px);
  padding: 3px;
  margin-bottom: 14px;
  border-radius: 999px;
  background: var(--fill);
  box-shadow: inset 0 0 0 0.5px var(--hair);
}
.segmented button {
  position: relative; z-index: 1;
  height: 36px; border-radius: 999px;
  font-size: 0.9375rem; font-weight: 600; color: var(--text-2);
  transition: color 200ms ease;
}
.segmented button[aria-selected="true"] { color: var(--black); }
.segmented__thumb {
  position: absolute; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px) / 4);
  border-radius: 999px;
  background: var(--white);
  transform: translateX(calc(var(--i, 0) * 100%));
  transition: transform 320ms cubic-bezier(0.32, 0.72, 0, 1);
}
.theme-tagline { margin: 0 0 28px; color: var(--text-3); font-size: 0.9375rem; }

.cards {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 20px);
  list-style: none; margin: 0; padding: 0;
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: none;
    grid-auto-flow: column; grid-auto-columns: min(62vw, 260px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding-inline: var(--gutter);
    padding-bottom: 8px;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }
  .cards::-webkit-scrollbar { display: none; }
  .cards > li { scroll-snap-align: start; }
}

.card { display: block; width: 100%; text-align: left; }
.card__art {
  position: relative;
  display: block;
  aspect-ratio: 1398 / 2034;
  border-radius: var(--radius-art);
  overflow: hidden;
  background: #111;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 140ms var(--ease-out);
}
.card:active .card__art { transform: scale(0.97); }
.card__art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* The frost hand-off: the cover frosts out, then the inside clears in. */
.card__cover { transition: opacity 420ms ease 0ms, filter 420ms ease 0ms; }
.card__inside {
  opacity: 0; filter: blur(14px);
  transform: scale(1.04);
  transition: opacity 420ms ease 0ms, filter 520ms ease 0ms, transform 520ms var(--ease-out) 0ms;
}
.card[aria-pressed="true"] .card__cover { opacity: 0; filter: blur(14px); }
.card[aria-pressed="true"] .card__inside {
  opacity: 1; filter: blur(0); transform: none;
  transition-delay: 140ms, 140ms, 140ms;
}
.card__state {
  position: absolute; left: 10px; bottom: 10px;
  display: inline-flex; padding: 3px; gap: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  font-size: 0.75rem; font-weight: 600;
}
.card__state i {
  font-style: normal; padding: 4px 9px; border-radius: 999px;
  color: rgba(255, 255, 255, 0.75);
  transition: background-color 200ms ease, color 200ms ease;
}
.card[aria-pressed="false"] .card__state i:first-child,
.card[aria-pressed="true"] .card__state i:last-child { background: var(--white); color: var(--black); }
.card__title { display: block; margin-top: 12px; font: 600 1.125rem/1.25 var(--serif); letter-spacing: -0.01em; }
.card__sub { display: block; margin-top: 2px; font-size: 0.875rem; line-height: 1.4; color: var(--text-2); }

@media (hover: hover) and (pointer: fine) {
  .card:hover .card__art { box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28); }
}

/* ---------- Steps ---------- */

.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  counter-reset: none;
}
.steps li { border-top: 1px solid var(--hair); padding-top: 22px; }
.steps__n {
  display: block; margin-bottom: 18px;
  font-size: 3rem; font-weight: 500; line-height: 1;
  color: var(--text-3);
}
.steps p { color: var(--text-2); max-width: 32ch; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* ---------- Plans ---------- */

.plans {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px; max-width: 880px;
}
.plan {
  padding: clamp(24px, 3vw, 36px);
  border-radius: 28px;
  background: var(--fill);
  box-shadow: inset 0 0 0 0.5px var(--hair);
}
.plan--pro {
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 60%),
    rgba(255, 255, 255, 0.09);
  transition: background-color 600ms ease;
}
.plan h3 { font-size: 1.125rem; font-family: var(--sans); font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.plan__price { font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 6px; }
.plan__price span { display: block; margin-top: 6px; font: 400 1rem/1.4 var(--sans); color: var(--text-2); letter-spacing: -0.01em; }
.plan__alt { color: var(--text-2); margin-bottom: 18px; }
.plan ul { list-style: none; margin: 20px 0 26px; padding: 0; display: grid; gap: 10px; }
.plan li { padding-left: 26px; position: relative; color: var(--text-2); }
.plan li::before {
  content: ""; position: absolute; left: 2px; top: 0.5em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--white); border-bottom: 2px solid var(--white);
  transform: rotate(-45deg) translateY(-2px);
}
.plan .btn { margin-top: 4px; }
.plans + .fine { max-width: 880px; margin-top: 16px; text-align: left; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

.promises {
  list-style: none; margin: clamp(48px, 7vw, 88px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
}
.promises li { color: var(--text-2); }
.promises b { display: block; color: var(--white); font: 600 1.25rem/1.25 var(--serif); letter-spacing: -0.01em; margin-bottom: 6px; }
@media (max-width: 760px) { .promises { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { margin: 8px 0 32px; border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 0;
  font-size: 1.125rem; font-weight: 600; letter-spacing: -0.012em;
  cursor: pointer;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none;
  width: 9px; height: 9px;
  border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 200ms var(--ease-out);
}
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { color: var(--text-2); padding-bottom: 22px; max-width: 60ch; }

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

.footer {
  border-top: 0.5px solid var(--hair);
  padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px));
}
.footer__inner { display: grid; grid-template-columns: auto 1fr; gap: 18px 32px; align-items: center; }
.footer nav { display: flex; gap: 22px; justify-self: end; font-size: 0.9375rem; }
.footer nav a { text-decoration: none; color: var(--text-2); }
.footer .fine { grid-column: 1 / -1; }
@media (hover: hover) and (pointer: fine) { .footer nav a:hover { color: var(--white); } }
@media (max-width: 560px) {
  .footer__inner { grid-template-columns: 1fr; }
  .footer nav { justify-self: start; }
}

/* ---------- Legal and support pages ---------- */

.doc { padding: calc(110px + env(safe-area-inset-top, 0px)) 0 96px; }
.doc .h2 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); }
.doc .updated { color: var(--text-3); font-size: 0.9375rem; margin-bottom: 40px; }
.doc h2.sub {
  margin: 2.2em 0 0.5em;
  font: 600 1.5rem/1.2 var(--serif); letter-spacing: -0.015em;
}
.doc h3 { font-size: 1.1875rem; margin-top: 1.6em; }
.doc p, .doc li { color: var(--text-2); max-width: 66ch; }
.doc ul, .doc ol { padding-left: 1.2em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.4em; }
.doc a { color: var(--white); text-underline-offset: 3px; }
.doc strong { color: var(--white); font-weight: 600; }
.doc table { border-collapse: collapse; width: 100%; max-width: 66ch; margin: 0 0 1.4em; font-size: 0.9375rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--hair); color: var(--text-2); }
.doc th { color: var(--white); font-weight: 600; }
.contact-card {
  display: grid; gap: 6px; padding: 24px 26px; margin: 8px 0 40px;
  border-radius: 24px; background: var(--fill); box-shadow: inset 0 0 0 0.5px var(--hair);
  max-width: 560px;
}
.contact-card a { font: 600 1.375rem/1.2 var(--serif); text-decoration: none; letter-spacing: -0.01em; }
.contact-card p { margin: 0; }
