/* =========================================================================
   Closetelle — web port of the iOS design system (Views/Design/DesignSystem.swift)

   Y2K scrapbook: pale bondi plastic paper, molded dot grid, hard-edged
   translucent blobs, five-point sticker stars, chunky bubble type (Chewy),
   washi tape, polaroids, die-cut cutouts and candy-glass capsule buttons.
   ========================================================================= */

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

@font-face {
  font-family: "Chewy";
  src: url("/assets/fonts/Chewy-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* -------------------------------------------------------------------------
   Palette — values mirror DesignSystem.swift
   ------------------------------------------------------------------------- */

:root {
  color-scheme: light dark;

  /* Candy plastic set — translucent iMac G3 / funtastic N64 era */
  --pop: #ff338c;
  --bondi: #00a6e6;
  --grape: #8f45eb;
  --tangerine: #ff8c1a;
  --lime: #8ce01f;
  --cyber: #38d9ff;
  --ultravio: #8c59ff;

  /* Deepened candy, used only where white text sits on the colour so the
     label clears 4.5:1. The bright originals stay on glows and decoration. */
  --pop-deep: #e0186f;
  --bondi-deep: #0077a8;

  /* Washi tape tints — alpha baked in, so tape needs no colour maths */
  --washi-yellow: rgba(199, 245, 51, 0.62);
  --washi-pink: rgba(255, 140, 209, 0.62);
  --washi-blue: rgba(89, 222, 255, 0.62);
  --washi-sage: rgba(194, 158, 255, 0.62);

  /* Surfaces — light (pale bondi plastic) */
  --ink: #29125c;
  --ink-soft: #5b4a86;
  --paper: #e6f5fc;
  --card: #ffffff;
  --card-2: #ffffff;
  --hairline: rgba(41, 18, 92, 0.12);
  --dot: rgba(41, 18, 92, 0.06);
  --photo: #fcfaf4;
  --glass-stroke: rgba(255, 255, 255, 0.7);
  --blob-fill: 0.09;
  --gloss: 0.3;

  /* Pre-resolved theme colours (no colour maths, so every browser agrees) */
  --accent-text: #794fcb;
  --header-bg: rgba(230, 245, 252, 0.78);
  --notice-bg: #fff3e8;
  --contact-bg: #e0f4fc;
  --frame-bg: #eef6fb;

  /* Deep violet panel — the app's outfit card */
  --panel: #34156b;
  --panel-ink: #f5f0ff;
  --panel-soft: #c3b0e8;

  /* Metrics */
  --radius-card: 6px;   /* paperCard(cornerRadius: 6) */
  --radius-lg: 14px;
  --shell: min(1180px, calc(100% - 2.5rem));
  --shadow-card: 0 4px 6px rgba(140, 89, 255, 0.35);
  --shadow-lift: 0 10px 26px rgba(140, 89, 255, 0.28);
  --shadow-photo: 0 4px 6px rgba(0, 0, 0, 0.22);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f5f0ff;
    --ink-soft: #b6a8dc;
    --paper: #0d2133;      /* deep sea plastic */
    --card: #2b1c54;
    --card-2: #35216a;
    --hairline: rgba(245, 240, 255, 0.14);
    --dot: rgba(245, 240, 255, 0.06);
    --photo: #f7f4ee;
    --glass-stroke: rgba(255, 255, 255, 0.28);
    --blob-fill: 0.12;
    --gloss: 0.07;
    --accent-text: #a56aef;
    --header-bg: rgba(13, 33, 51, 0.78);
    --notice-bg: #40274e;
    --contact-bg: #262c65;
    --frame-bg: #2f2160;
    --panel: #1c1140;
    --shadow-card: 0 4px 8px rgba(0, 0, 0, 0.5);
    --shadow-lift: 0 12px 30px rgba(0, 0, 0, 0.55);
  }
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Inter, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-text);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 0.08em;
}

a:hover {
  color: var(--pop);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 60;
  padding: 0.7rem 1.1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

/* -------------------------------------------------------------------------
   Paper background: molded dot grid + hard-edged plastic blobs + star field
   (PaperBackground in DesignSystem.swift)
   ------------------------------------------------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.backdrop::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: radial-gradient(var(--dot) 0.8px, transparent 0.9px);
  background-size: 22px 22px;
  background-position: 6px 6px;
}

.blob {
  position: absolute;
  width: var(--size);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
}

.blob svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.blob .blob-fill {
  fill: var(--tint);
  fill-opacity: var(--blob-fill);
  stroke: var(--tint);
  stroke-opacity: 0.18;
  stroke-width: 0.6;
}

/* Gloss catch-light on the shell */
.blob .blob-gloss {
  fill: #fff;
  fill-opacity: var(--gloss);
}

.stars {
  position: absolute;
  inset: 0;
}

.star {
  position: absolute;
  width: var(--size, 14px);
  aspect-ratio: 1;
  transform: rotate(var(--rot, 0deg));
  fill: var(--tint, var(--pop));
  fill-opacity: 0.42;
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 4;
  stroke-linejoin: round;
  overflow: visible;
}

/* Solid sticker star used inline in content */
.sticker-star {
  width: var(--size, 34px);
  aspect-ratio: 1;
  fill: var(--tint, var(--pop));
  stroke: #fff;
  stroke-width: 9;
  stroke-linejoin: round;
  transform: rotate(var(--rot, 0deg));
  filter: drop-shadow(0 2px 2px rgba(143, 69, 235, 0.25));
  overflow: visible;
}

/* -------------------------------------------------------------------------
   Display type — ScrapHeader: bubble lettering with a hard candy offset
   ------------------------------------------------------------------------- */

.scrap {
  font-family: Chewy, "Chalkboard SE", "Comic Sans MS", ui-rounded, cursive;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0.005em;
}

h1,
h2,
h3 {
  margin: 0;
}

.h-xl,
.h-lg,
.h-md {
  font-family: Chewy, "Chalkboard SE", "Comic Sans MS", ui-rounded, cursive;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: 0.004em;
  text-wrap: balance;
}

/* Chewy carries no CJK glyphs, so Japanese and Korean headings fell back to a
   default serif that reads nothing like the rest of the design. These are the
   closest rounded faces shipped on Apple and Windows for each script. */
:lang(ja) .h-xl,
:lang(ja) .h-lg,
:lang(ja) .h-md,
:lang(ja) .scrap,
:lang(ja) .wordmark {
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic UI",
    "Meiryo", system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
}

:lang(ko) .h-xl,
:lang(ko) .h-lg,
:lang(ko) .h-md,
:lang(ko) .scrap,
:lang(ko) .wordmark {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR",
    system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: 0.01em;
}

/* The wordmark is a Latin logotype and must stay in Chewy in every locale. */
:lang(ja) .wordmark,
:lang(ko) .wordmark {
  font-family: Chewy, cursive;
  font-weight: 400;
}

.h-xl {
  font-size: clamp(2.9rem, 7.4vw, 5.4rem);
}

.h-lg {
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  transform: rotate(-1deg);            /* ScrapHeader rotationEffect(-1º) */
  transform-origin: left center;
}

.h-md {
  font-size: clamp(1.35rem, 2.4vw, 1.65rem);
}

/* Hard, zero-blur candy offset underneath the letters */
.offset-bondi {
  text-shadow: 0.075em 0.075em 0 var(--bondi);
}

.offset-pop {
  text-shadow: 0.075em 0.075em 0 var(--pop);
}

.offset-grape {
  text-shadow: 0.075em 0.075em 0 var(--grape);
}

.offset-lime {
  text-shadow: 0.075em 0.075em 0 var(--lime);
}

.pop-line {
  display: block;
  color: var(--pop);
}

.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--accent-text);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.lede {
  max-width: 42rem;
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  text-wrap: pretty;
}

.section-head {
  max-width: 44rem;
  margin-bottom: 2.4rem;
}

.section-head .lede {
  margin-top: 1rem;
}

/* -------------------------------------------------------------------------
   Candy-glass controls — StickerButtonStyle / StickerChip
   ------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.78rem 1.35rem;
  border: 1px solid var(--glass-stroke);
  border-radius: 999px;
  background: rgba(0, 166, 230, 0.18);
  background: color-mix(in srgb, var(--bondi) 18%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  box-shadow: 0 4px 5px rgba(0, 166, 230, 0.3);
  box-shadow: 0 4px 5px color-mix(in srgb, var(--bondi) 30%, transparent);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

.btn:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.btn:active {
  transform: scale(0.96);           /* scaleEffect(isPressed ? 0.96 : 1) */
}

.btn--pop {
  background: var(--pop-deep);
  box-shadow: 0 4px 8px rgba(255, 51, 140, 0.5);
  box-shadow: 0 4px 8px color-mix(in srgb, var(--pop) 50%, transparent);
  color: #fff;
}

.btn--pop:hover {
  color: #fff;
}

.btn--lg {
  padding: 0.95rem 1.7rem;
  font-size: 1.06rem;
}

.btn--ghost {
  background: rgba(143, 69, 235, 0.12);
  background: color-mix(in srgb, var(--grape) 12%, transparent);
  box-shadow: 0 3px 5px rgba(143, 69, 235, 0.22);
  box-shadow: 0 3px 5px color-mix(in srgb, var(--grape) 22%, transparent);
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--glass-stroke);
  border-radius: 999px;
  background: rgba(143, 69, 235, 0.14);
  background: color-mix(in srgb, var(--grape) 14%, transparent);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 2px 3px rgba(143, 69, 235, 0.25);
  box-shadow: 0 2px 3px color-mix(in srgb, var(--grape) 25%, transparent);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}

.chip--pop {
  background: var(--pop-deep);
  box-shadow: 0 3px 5px rgba(255, 51, 140, 0.45);
  box-shadow: 0 3px 5px color-mix(in srgb, var(--pop) 45%, transparent);
  color: #fff;
}

.chip svg {
  width: 1em;
  height: 1em;
  flex: none;
}

/* -------------------------------------------------------------------------
   Washi tape, paper cards, polaroids
   ------------------------------------------------------------------------- */

.tape {
  position: absolute;
  z-index: 3;
  width: 62px;
  height: 20px;
  border: 0.8px solid rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  background: var(--tint, var(--washi-yellow));
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
  transform: rotate(var(--rot, -5deg));
  pointer-events: none;
}

.tape--top {
  top: -9px;
  left: 50%;
  margin-left: -31px;
}

/* Taped across the corner: half on the paper, half off */
.tape--tl {
  top: -8px;
  left: -46px;
  width: 104px;
  height: 24px;
  transform: rotate(-45deg);
}

.tape--tr {
  top: 20px;
  right: -18px;
  width: 74px;
  transform: rotate(38deg);
}

.paper {
  position: relative;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.card {
  position: relative;
  padding: 1.6rem 1.5rem 1.75rem;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.25s;
}

.card:hover {
  transform: translateY(-4px) rotate(var(--hover-rot, 0.4deg));
  box-shadow: var(--shadow-lift);
}

.card p {
  margin: 0;
  color: var(--ink-soft);
}

.card .h-md {
  margin-bottom: 0.55rem;
}

.jitter-a { transform: rotate(-1.1deg); }
.jitter-b { transform: rotate(0.9deg); }
.jitter-c { transform: rotate(-0.5deg); }
.jitter-d { transform: rotate(1.4deg); }

/* Polaroid — photo paper, fat bottom lip, tape on top */
.polaroid {
  position: relative;
  padding: 10px 10px 22px;
  background: var(--photo);
  box-shadow: var(--shadow-photo);
}

.polaroid img,
.polaroid .frame {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.polaroid figcaption {
  padding-top: 0.5rem;
  color: #3f2673;                        /* violet marker */
  font-family: Chewy, cursive;
  font-size: 1.05rem;
  text-align: center;
}

/* Die-cut sticker: white cut edge + lifted shadow (Stickerizer + shadow) */
.cutout {
  filter:
    drop-shadow(0 0 2.5px #fff) drop-shadow(0 0 2.5px #fff)
    drop-shadow(0 0 2.5px #fff) drop-shadow(0 0 2.5px #fff)
    drop-shadow(0 3px 4px rgba(0, 0, 0, 0.28));
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.7rem 0;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s;
}

.site-header.is-stuck {
  border-bottom-color: var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: var(--shell);
  margin-inline: auto;
}

/* Wordmark: bubble letters cut out of a white sticker edge */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
}

/* The logotype is a sticker: deep-violet letters on a white die-cut edge.
   It keeps those colours in both themes, exactly like the app icon. */
.brand-hanger {
  width: 1.5rem;
  height: 1.5rem;
  flex: none;
  color: #29125c;
  filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 2px #fff)
    drop-shadow(0 0 2px #fff) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.22));
  transform: rotate(-4deg);
}

/* Baseline: the white cut edge is built from shadows, which every browser
   supports. Where paint-order works on HTML text (Safari 17.4+, Chrome,
   Firefox) an outward stroke replaces it for a cleaner edge. */
.wordmark {
  font-family: Chewy, cursive;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: 0.005em;
  color: #29125c;
  text-shadow:
    0 -3px 0 #fff, 2px -2px 0 #fff, 3px 0 0 #fff, 2px 2px 0 #fff,
    0 3px 0 #fff, -2px 2px 0 #fff, -3px 0 0 #fff, -2px -2px 0 #fff,
    0 5px 2px rgba(0, 0, 0, 0.22);
  transform: rotate(-1.5deg);
}

@supports (paint-order: stroke fill) {
  .wordmark {
    -webkit-text-stroke: 0.2em #fff;
    paint-order: stroke fill;
    text-shadow: none;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.22));
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav a {
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(0, 166, 230, 0.16);
  background: color-mix(in srgb, var(--bondi) 16%, transparent);
  color: var(--ink);
}

.header-cta {
  display: inline-flex;
}

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

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.98fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 6rem);
}

.hero h1 {
  max-width: 13ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* Stage: phone + floating garment stickers */
.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 34rem;
}

.phone {
  position: relative;
  z-index: 2;
  width: min(300px, 76%);
  padding: 9px;
  border-radius: 3rem;
  background: linear-gradient(160deg, #4a4258, #14121c 42%, #2b2735);
  box-shadow: 0 30px 60px rgba(41, 18, 92, 0.34), 0 2px 0 rgba(255, 255, 255, 0.22) inset;
}

.phone img {
  display: block;
  width: 100%;
  border-radius: 2.45rem;
}

.phone::after {
  position: absolute;
  top: 20px;
  left: 50%;
  width: 32%;
  height: 22px;
  content: "";
  transform: translateX(-50%);
  border-radius: 999px;
  background: #0b0a0f;
}

.phone .tape {
  top: -11px;
  z-index: 4;
  width: 96px;
  height: 26px;
  margin-left: -48px;
}

/* Garment stickers scattered around the phone. Positions live here so the
   scatter can tighten on narrow screens instead of running off the page. */
.float {
  position: absolute;
  z-index: 1;
  width: var(--w, 26%);
  transform: rotate(var(--rot, 0deg));
  animation: bob 7s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.float--tl {
  --w: 27%;
  --rot: -8deg;
  --delay: 0s;
  left: -12%;
  top: 4%;
}

.float--tr {
  --w: 23%;
  --rot: 7deg;
  --delay: 1.1s;
  right: -11%;
  top: 0;
}

.float--bl {
  --w: 26%;
  --rot: 5deg;
  --delay: 2.2s;
  left: -14%;
  bottom: 8%;
}

.float--br {
  --w: 25%;
  --rot: -6deg;
  --delay: 3s;
  right: -12%;
  bottom: 4%;
}

.float img {
  display: block;
  width: 100%;
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

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

.section {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section--tight {
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
}

/* A star stuck beside the heading, hand-placed */
.section-head {
  position: relative;
}

.section-head .sticker-star {
  position: absolute;
  top: -1.1rem;
  right: 1.5rem;
}

@media (max-width: 1100px) {
  .section-head .sticker-star {
    display: none;
  }
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.4rem;
}

.feature-card {
  --hover-rot: 0.6deg;
  padding-top: 1.9rem;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  margin-bottom: 1rem;
  border: 1px solid var(--glass-stroke);
  border-radius: 50%;
  background: rgba(0, 166, 230, 0.22);
  background: color-mix(in srgb, var(--tint, var(--bondi)) 22%, transparent);
  box-shadow: 0 3px 6px rgba(0, 166, 230, 0.32);
  box-shadow: 0 3px 6px color-mix(in srgb, var(--tint, var(--bondi)) 32%, transparent);
  color: var(--ink);
}

.feature-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

/* Alternating showcase rows */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  padding-block: clamp(1.5rem, 3vw, 2.5rem);
}

.showcase--flip .showcase-media {
  order: -1;
}

.showcase-media {
  position: relative;
  display: grid;
  place-items: center;
}

.showcase-media .phone {
  width: min(270px, 82%);
}

.showcase ul {
  margin: 1.3rem 0 0;
  padding: 0;
  list-style: none;
}

.showcase li {
  position: relative;
  margin-bottom: 0.6rem;
  padding-left: 1.9rem;
  color: var(--ink-soft);
}

.showcase li::before {
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 0.85rem;
  height: 0.85rem;
  content: "";
  background: var(--tick, var(--pop));
  clip-path: polygon(
    50% 0%, 63.5% 31.4%, 97.6% 34.5%, 71.9% 57.1%, 79.4% 90.5%,
    50% 73%, 20.6% 90.5%, 28.1% 57.1%, 2.4% 34.5%, 36.5% 31.4%
  );
}

/* Steps — polaroid row */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.step {
  position: relative;
}

.step .polaroid {
  transform: rotate(var(--rot, -1.5deg));
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.step:hover .polaroid {
  transform: rotate(0deg) translateY(-4px);
}

.step-body {
  margin-top: 1.15rem;
}

.step-body p {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
}

.step-num {
  position: absolute;
  z-index: 4;
  top: -18px;
  left: -14px;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--tint, var(--pop));
  box-shadow: 0 4px 8px rgba(41, 18, 92, 0.28);
  color: #fff;
  font-family: Chewy, cursive;
  font-size: 1.3rem;
  transform: rotate(-8deg);
}

/* Square photo window, garment scaled to fit inside it whatever its ratio */
.step .frame {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--frame-bg);
  background: color-mix(in srgb, var(--tint, var(--bondi)) 14%, #fff);
}

.step .frame img {
  width: auto;
  max-width: 76%;
  height: auto;
  max-height: 86%;
  aspect-ratio: auto;
  object-fit: contain;
}

/* Deep violet panel — the app's outfit card */
.panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 4.5vw, 3.5rem);
  border-radius: 18px;
  background:
    radial-gradient(120% 90% at 12% 0%, rgba(143, 69, 235, 0.55), transparent 60%),
    radial-gradient(90% 80% at 100% 100%, rgba(0, 166, 230, 0.35), transparent 55%),
    var(--panel);
  box-shadow: 0 22px 50px rgba(41, 18, 92, 0.32);
  color: var(--panel-ink);
}

.panel .lede,
.panel li,
.panel p {
  color: var(--panel-soft);
}

.panel .h-lg,
.panel .h-md {
  color: var(--panel-ink);
}

.panel .eyebrow {
  color: var(--cyber);
}

.panel .showcase {
  padding-block: 0;
}

.panel .btn {
  color: #fff;
}

.panel-note {
  margin-top: 1.6rem;
  padding: 0.85rem 1.1rem;
  border-left: 4px solid var(--tangerine);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.94rem;
}

/* FAQ */
.faq {
  display: grid;
  gap: 0.85rem;
  max-width: 52rem;
}

.faq details {
  padding: 0.35rem 1.3rem;
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.faq summary {
  padding: 0.95rem 1.6rem 0.95rem 0;
  font-family: Chewy, cursive;
  font-size: 1.2rem;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  position: absolute;
  right: 1.3rem;
  content: "+";
  color: var(--pop);
  font-size: 1.5rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "–";
}

.faq summary {
  position: relative;
}

.faq p {
  margin: 0 0 1.1rem;
  color: var(--ink-soft);
}

/* Closing call to action */
/* Same treatment as the in-post banner: the app's deep violet outfit card
   with its molded dot texture, not a gradient. */
.cta {
  position: relative;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
  border-radius: 18px;
  background-color: #34156b;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.1px);
  background-size: 22px 22px;
  background-position: 9px 9px;
  box-shadow: 0 22px 50px rgba(41, 18, 92, 0.35);
  color: #fff;
  text-align: center;
}

@media (prefers-color-scheme: dark) {
  .cta {
    background-color: #43209c;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.5);
  }
}

.cta .tape {
  top: -11px;
  left: 50%;
  width: 110px;
  height: 26px;
  margin-left: -55px;
}

.cta h2 {
  color: #fff;
  text-shadow: 0.06em 0.06em 0 var(--pop);   /* misregistered-print offset */
  transform: rotate(-1deg);
}

.cta p {
  max-width: 34rem;
  margin: 1rem auto 0;
  color: #fff;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.9rem;
}

/* Candy-pink pill, the same control the app uses on its outfit cards */
.cta .btn {
  border-color: rgba(255, 255, 255, 0.55);
  background: var(--pop-deep);
  box-shadow: 0 6px 20px rgba(255, 51, 140, 0.45);
  color: #fff;
}

.cta .btn:hover {
  background: var(--pop);
  color: #fff;
}

/* Email is the quieter of the two closing actions */
.cta .cta-secondary {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: none;
  color: #fff;
}

.cta .cta-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #fff;
}

.cta-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* -------------------------------------------------------------------------
   Legal / support documents
   ------------------------------------------------------------------------- */

.doc-shell {
  width: min(880px, calc(100% - 2.5rem));
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5rem);
}

.doc {
  position: relative;
  padding: clamp(1.6rem, 5vw, 3.6rem);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.doc h1 {
  font-family: Chewy, cursive;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.08;
  font-weight: 400;
}

.doc h2 {
  margin: 2.5rem 0 0.7rem;
  font-family: Chewy, cursive;
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  font-weight: 400;
  line-height: 1.2;
}

.doc h3 {
  margin: 1.7rem 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.doc p,
.doc li {
  color: var(--ink-soft);
}

.doc li {
  margin-bottom: 0.4rem;
}

.doc strong {
  color: var(--ink);
}

.doc a {
  font-weight: 600;
}

.meta {
  margin: 0.75rem 0 2rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.notice {
  position: relative;
  margin: 1.6rem 0;
  padding: 1rem 1.2rem;
  border-left: 4px solid var(--tangerine);
  border-radius: 4px;
  background: var(--notice-bg);
}

.notice p:last-child {
  margin-bottom: 0;
}

.contact-card {
  position: relative;
  margin: 1.75rem 0 2.5rem;
  padding: 1.4rem 1.5rem;
  border-radius: var(--radius-card);
  background: var(--contact-bg);
  box-shadow: 0 3px 6px rgba(0, 166, 230, 0.26);
  box-shadow: 0 3px 6px color-mix(in srgb, var(--bondi) 26%, transparent);
}

.contact-card p {
  margin: 0.3rem 0;
}

/* -------------------------------------------------------------------------
   Blog
   ------------------------------------------------------------------------- */

/* Product-intent pages */
.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.48fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  width: var(--shell);
  min-height: 34rem;
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.product-hero .btn { margin-top: 1.7rem; }

.product-phone {
  position: relative;
  width: min(270px, 80vw);
  margin: auto;
  padding: 0.65rem;
  border-radius: 2.8rem;
  background: #15131d;
  box-shadow: var(--shadow-card);
  transform: rotate(2deg);
}

.product-phone img { display: block; width: 100%; border-radius: 2.2rem; }
.product-explainer { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 1.5rem; align-items: start; }
.product-copy { max-width: 42rem; color: var(--ink-soft); font-size: clamp(1.12rem, 2vw, 1.35rem); line-height: 1.65; }
.product-faq { padding: 1.5rem; }
.product-faq h3 { margin: 1rem 0 0.6rem; font-size: 1rem; }
.product-faq p { color: var(--ink-soft); }
.product-links { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.1rem; }
.product-guides { margin-top: 0.7rem; padding-top: 0.9rem; border-top: 1px solid var(--hairline); }

@media (max-width: 720px) {
  .product-hero, .product-explainer { grid-template-columns: 1fr; }
  .product-hero { min-height: 0; }
  .product-phone { width: min(220px, 65vw); }
}

.blog-head {
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem);
}

.blog-head .lede {
  margin-top: 1rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.6rem 1.4rem;
  width: var(--shell);
  margin-inline: auto;
  padding-bottom: clamp(2.5rem, 6vw, 4rem);
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0 0 1.4rem;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.post-card > :not(.post-card-img):not(.tape) {
  margin-inline: 1.4rem;
}

.post-card-img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  margin-bottom: 0.5rem;
  object-fit: cover;
}

.post-card:hover {
  color: inherit;
}

.post-card h2,
.post-card h3 {
  font-family: Chewy, cursive;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.16;
}

.post-card p {
  flex: 1;
  font-size: 0.98rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

.post-meta .dot {
  opacity: 0.5;
}

.tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 166, 230, 0.16);
  background: color-mix(in srgb, var(--tag-tint, var(--bondi)) 18%, transparent);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Article body */
.post-header {
  margin-bottom: 1.6rem;
}

.post-hero-img {
  display: block;
  width: 100%;
  aspect-ratio: 1200 / 630;
  margin-bottom: 2rem;
  border-radius: var(--radius-card);
  object-fit: cover;
}

.post-header h1 {
  margin-bottom: 0.9rem;
}

.prose > * + * {
  margin-top: 1.1rem;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose h2 {
  margin: 2.4rem 0 0.2rem;
  font-family: Chewy, cursive;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}

.prose h3 {
  margin: 1.8rem 0 0.2rem;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--ink);
}

.prose ul,
.prose ol {
  margin-left: 0;
  padding-left: 1.3rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose li::marker {
  color: var(--pop);
}

.prose strong {
  color: var(--ink);
}

.prose a {
  font-weight: 600;
}

/* Pull-out advice, taped to the page */
.takeaway {
  position: relative;
  margin: 2rem 0;
  padding: 1.2rem 1.35rem;
  border-radius: var(--radius-card);
  background: var(--contact-bg);
  box-shadow: 0 3px 6px rgba(0, 166, 230, 0.26);
}

.takeaway p {
  margin: 0;
  color: var(--ink);
}

.takeaway strong {
  font-family: Chewy, cursive;
  font-size: 1.05rem;
  font-weight: 400;
}

.post-faq {
  margin-top: 2.6rem;
}

.post-faq .h-md {
  margin-bottom: 1rem;
}

.post-faq .faq details {
  background: var(--frame-bg);
  box-shadow: none;
}

.post-faq .faq summary {
  font-size: 1.05rem;
}

.post-foot {
  margin-top: 2.8rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--hairline);
}

.post-foot .h-md {
  margin-bottom: 1rem;
}

.related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.related a {
  display: block;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-card);
  background: var(--frame-bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.3;
  text-decoration: none;
}

.related a:hover {
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

/* Modelled on the app's outfit card: deep violet plastic with a molded dot
   texture and a candy-pink pill — not a generic gradient. */
.post-cta {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.1rem;
  margin-top: 2.4rem;
  padding: 1.5rem 1.6rem;
  border-radius: 10px;
  background-color: #34156b;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.1px);
  background-size: 20px 20px;
  background-position: 8px 8px;
  box-shadow: 0 8px 20px rgba(41, 18, 92, 0.28);
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  /* The document card is violet too, so lift the banner off it */
  .post-cta {
    background-color: #43209c;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  }
}

.post-cta p {
  margin: 0;
  max-width: 32ch;
  color: #fff;   /* beats the inherited `.doc p` ink colour */
  font-family: Chewy, cursive;
  font-size: 1.22rem;
  line-height: 1.28;
}

.post-cta .btn {
  flex: none;
  border-color: rgba(255, 255, 255, 0.55);
  background: var(--pop-deep);
  box-shadow: 0 4px 14px rgba(255, 51, 140, 0.45);
  color: #fff;
}

.post-cta .btn:hover {
  background: var(--pop);
  color: #fff;
}

.post-cta .sticker-star {
  position: absolute;
  right: -10px;
  top: -12px;
}

.breadcrumb {
  width: var(--shell);
  margin: 0 auto;
  padding-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.breadcrumb a {
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

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

.site-footer {
  width: var(--shell);
  margin-inline: auto;
  padding: 2.5rem 0 3.5rem;
  border-top: 1px solid var(--hairline);
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.footer-links a {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  background: rgba(0, 166, 230, 0.16);
  background: color-mix(in srgb, var(--bondi) 16%, transparent);
  color: var(--ink);
}

/* Language switcher — every locale that has the current page */
.lang-switch {
  margin-top: 1.4rem;
}

.lang-switch ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-switch a {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.lang-switch a:hover {
  background: rgba(0, 166, 230, 0.16);
  background: color-mix(in srgb, var(--bondi) 16%, transparent);
  color: var(--ink);
}

.lang-switch a[aria-current="true"] {
  border-color: transparent;
  background: var(--pop-deep);
  color: #fff;
}

.footer-fine {
  margin: 1.75rem 0 0;
  max-width: 60ch;
  font-size: 0.85rem;
  line-height: 1.55;
}

/* -------------------------------------------------------------------------
   Scroll reveal
   ------------------------------------------------------------------------- */

/* Scoped to .js so the page is fully visible when scripting is unavailable */
.js .reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.6s ease, translate 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.js .reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

/* Below the widest layout the shell sits close to the window edge, so the
   scatter tucks in rather than being clipped by the viewport. */
@media (max-width: 1300px) {
  .float--tl { left: -2%; }
  .float--tr { right: -2%; }
  .float--bl { left: -2%; }
  .float--br { right: -2%; }
}

@media (max-width: 960px) {
  .hero,
  .showcase {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 1.5rem;
    text-align: left;
  }

  .hero-stage {
    min-height: 30rem;
  }

  .showcase--flip .showcase-media {
    order: 0;
  }

  .showcase-media {
    margin-top: 0.5rem;
  }

  /* Stage is full-width here, so the scatter sits flush inside the shell
     (the rotation still needs a few px of the page gutter). */
  .float--tl,
  .float--bl { left: 0; }

  .float--tr,
  .float--br { right: 0; }
}

@media (max-width: 720px) {
  :root {
    --shell: calc(100% - 2rem);
  }

  .header-cta {
    display: none;
  }

  .site-nav {
    gap: 0.1rem;
  }

  .site-nav a {
    padding: 0.4rem 0.55rem;
    font-size: 0.9rem;
  }

  .wordmark {
    font-size: 1.45rem;
  }

  .hero-stage {
    min-height: 26rem;
  }

  /* Pull the scatter inside the viewport on phones */
  .float--tl { --w: 24%; left: 0; }
  .float--tr { --w: 21%; right: 0; }
  .float--bl { --w: 23%; left: 0; }
  .float--br { --w: 22%; right: 0; }

  .h-lg {
    transform: none;
  }
}

@media (max-width: 560px) {
  /* Keep the header on one row: in-page links drop, section jumps stay
     reachable by scrolling. */
  .nav-anchor {
    display: none;
  }
}

@media (max-width: 420px) {
  .brand-hanger {
    display: none;
  }
}

/* -------------------------------------------------------------------------
   Motion & print
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js .reveal {
    opacity: 1;
    translate: none;
  }
}

@media print {
  .backdrop,
  .site-header,
  .tape,
  .site-footer .footer-links {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  .doc {
    padding: 0;
    box-shadow: none;
  }
}
