/*
 * Homeprice site. No webfonts, no trackers, no third party requests at all.
 * The product's whole claim is that it does not phone home, so the site that
 * makes that claim should not either.
 */

:root {
  --bg: #fbfbfd;
  --surface: #ffffff;
  --fg: #16161a;
  --muted: #62626f;
  --line: #e6e6ee;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --ink: #1c1c22;
  --radius: 14px;
  --measure: 62ch;
  /* Light only, on purpose: the mark and the screenshots are tuned for it. */
  color-scheme: light;
}


* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* ---------------------------------------------------------------- header */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-decoration: none;
}

.mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: var(--accent);
  box-shadow: inset -4px -4px 0 rgba(255, 255, 255, 0.34);
  flex: 0 0 auto;
}

.site-nav { display: flex; gap: 20px; align-items: center; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 14.5px; }
.site-nav a:hover { color: var(--fg); }

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

.hero { padding: 40px 0 8px; }

h1 {
  font-size: clamp(32px, 5.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
  max-width: 16ch;
}

.lede {
  font-size: clamp(17px, 2.2vw, 20px);
  color: var(--muted);
  max-width: 54ch;
  margin: 0 0 12px;
}

.hero-note { color: var(--muted); font-size: 15px; max-width: 52ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px;
  background: var(--accent); color: #fff;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }

.btn-quiet {
  background: transparent; color: var(--fg); border-color: var(--line);
}
.btn-quiet:hover { border-color: var(--accent); filter: none; }

/*
 * The store link does not exist yet. Rather than a dead button, the state says
 * what is true and what to do instead.
 */
.pending {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 18px; border-radius: 10px;
  border: 1px dashed var(--line); color: var(--muted); font-size: 14.5px;
}
.dot-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .dot-pulse { animation: none; } }

/* ------------------------------------------------------------- carousel */

/*
 * The walkthrough. Built as a scroll-snap rail so that with the script
 * blocked or still loading it is a normal gallery you can swipe and scroll,
 * rather than one frozen frame. carousel.js adds the timer and the buttons,
 * and sets data-js="on" to reveal them.
 */

.stage {
  margin: 40px 0 0;
  --dwell: 5.5s;
}

.stage-track {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(20, 20, 40, 0.08);
}
.stage-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* The scrollbar is the only affordance until the script arrives, so it stays
   until the buttons exist to replace it. */
.stage[data-js="on"] .stage-track { scrollbar-width: none; }
.stage[data-js="on"] .stage-track::-webkit-scrollbar { display: none; }

.stage-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.stage-slide img { display: block; width: 100%; height: auto; }

.stage-cap {
  margin: 0;
  max-width: none;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
}
.stage-cap strong { color: var(--fg); font-weight: 600; }

/* ------------------------------------------------------------ its controls */

.stage-bar { display: none; }
.stage[data-js="on"] .stage-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: 14px;
}

.stage-steps { display: flex; gap: 8px; flex: 1 1 auto; min-width: 0; }

.stage-step {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  margin: 0;
  padding: 9px 2px 0;
  border: 0;
  border-top: 2px solid var(--line);
  background: none;
  font: inherit;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
}

/*
 * The trimming lives on this span, not the button. The fill below sits at
 * top: -2px, over the button's own border, so clipping on the button would
 * cut the timer out of the paint entirely.
 */
.stage-step-label {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.stage-step:hover { color: var(--fg); }
.stage-step[aria-current="true"] { color: var(--fg); font-weight: 600; }
.stage-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* The bar that fills is the timer, made visible. It is also what tells the
   script to move on: carousel.js advances on its animationend. */
.stage-fill {
  position: absolute;
  left: 0;
  top: -2px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.stage-step[aria-current="true"] .stage-fill {
  animation: stage-fill var(--dwell) linear forwards;
}
.stage[data-paused="true"] .stage-step[aria-current="true"] .stage-fill {
  animation-play-state: paused;
}
@keyframes stage-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.stage-tools { display: flex; gap: 6px; flex: 0 0 auto; }

.stage-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.stage-nav:hover { color: var(--fg); border-color: var(--accent); }
.stage-nav:active { transform: translateY(1px); }
.stage-nav:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* One button, two icons: whichever the current state is not. */
.stage-play .ico-play { display: none; }
.stage[data-paused="true"] .stage-play .ico-pause { display: none; }
.stage[data-paused="true"] .stage-play .ico-play { display: block; }

/* Nothing to pause when the timer is off, so the button goes away. */
.stage[data-auto="off"] .stage-play { display: none; }
.stage[data-auto="off"] .stage-step[aria-current="true"] .stage-fill {
  animation: none;
  transform: scaleX(1);
}

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

@media (max-width: 560px) {
  .stage[data-js="on"] .stage-bar { flex-direction: column; align-items: stretch; gap: 12px; }
  .stage-tools { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .stage-track { scroll-behavior: auto; }
  .stage-step[aria-current="true"] .stage-fill { animation: none; transform: scaleX(1); }
  .stage-nav:active { transform: none; }
}

/* ------------------------------------------------------ before and after */

/*
 * A wipe between two captures of the same page. The split lives in one
 * custom property, --split, which the clip, the divider and the labels all
 * read, so a single number moves the whole thing.
 *
 * The control is a real range input stretched invisibly over the frame.
 * That is what carries the drag, the touch, the arrow keys and the screen
 * reader announcement, none of which is worth reimplementing by hand.
 */

.ba { margin: 28px 0 0; }

.ba-frame {
  /*
   * The starting split lives here rather than in a style attribute on the
   * element. The site ships style-src 'self' with no unsafe-inline, which
   * blocks style attributes outright; the script may still set this property
   * through the CSSOM, which CSP does allow.
   */
  --split: 50%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(20, 20, 40, 0.08);
  /* Held open before the lazy frames arrive, so nothing below it jumps. */
  aspect-ratio: 1920 / 1200;
  touch-action: pan-y;
}

.ba-base,
.ba-top img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-top {
  position: absolute;
  inset: 0;
  z-index: 2;
  clip-path: inset(0 0 0 var(--split));
}

/* Along the bottom, because both top corners are Uniqlo's own chrome. */
.ba-tag {
  position: absolute;
  bottom: 12px;
  z-index: 5;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(22, 22, 26, 0.72);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  pointer-events: none;
}
.ba-tag-a { left: 12px; pointer-events: none; }
.ba-tag-b { right: 12px; }

/*
 * The right hand label is the control. It reads like the app's own currency
 * menu, CODE then name, because it is the same choice made in the same words.
 */
.ba-pick {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-right: 8px;
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 0.15s ease;
}
.ba-pick:hover { background: rgba(22, 22, 26, 0.88); }

/* The real select sits invisibly on top, so the menu is the platform's own. */
.ba-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font: inherit;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
}
.ba-pick:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Held while a frame swaps, so the label never blinks empty. */
.ba-frame[data-swapping="true"] .ba-top { opacity: 0.55; }
.ba-top { transition: opacity 0.18s ease; }
@media (prefers-reduced-motion: reduce) { .ba-top { transition: none; } }

/*
 * Invisible, and deliberately the full size of the frame: pressing anywhere
 * jumps the split there and starts a drag, which is the gesture people try
 * first.
 */
.ba-range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: ew-resize;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.ba-range::-webkit-slider-runnable-track { height: 100%; }
.ba-range::-webkit-slider-thumb { -webkit-appearance: none; width: 2px; height: 100%; }
.ba-range::-moz-range-track { height: 100%; }
.ba-range::-moz-range-thumb { width: 2px; height: 100%; border: 0; border-radius: 0; }

.ba-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  z-index: 4;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(20, 20, 40, 0.16);
  pointer-events: none;   /* every press belongs to the input underneath */
}

.ba-grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 3px 14px rgba(20, 20, 40, 0.28);
}

/* The input is invisible, so its focus ring has to be borrowed by the line. */
.ba-range:focus-visible + .ba-line .ba-grip {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.ba-cap {
  margin: 12px 0 0;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 13.5px;
}

@media (max-width: 560px) {
  .ba-grip { width: 34px; height: 34px; }
  .ba-tag { font-size: 11px; padding: 3px 8px; }
}

/* --------------------------------------------------------------- content */

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--line); }

h2 {
  font-size: clamp(22px, 3vw, 27px);
  letter-spacing: -0.025em;
  margin: 0 0 10px;
}

h3 { font-size: 17px; margin: 0 0 6px; letter-spacing: -0.015em; }

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
  margin-top: 28px;
}

.card-plain p { color: var(--muted); font-size: 15px; margin: 0; }

/* Example block that mimics the extension's own tooltip */
.demo {
  background: var(--ink);
  color: #f2f2f5;
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 420px;
  margin-top: 24px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}
.demo-row { display: flex; gap: 12px; }
.demo-row + .demo-row { margin-top: 3px; }
.demo-label { color: #9a9aa8; font-size: 12px; min-width: 88px; flex: 0 0 auto; }
.demo-note { color: #a9a9b6; font-size: 13px; margin-top: 8px; }
.demo-warn { color: #ffcf8b; }

.checklist { list-style: none; padding: 0; margin: 18px 0 0; max-width: var(--measure); }
.checklist li { padding-left: 26px; position: relative; margin-bottom: 10px; color: var(--muted); }
.checklist li strong { color: var(--fg); font-weight: 600; }
.checklist li::before {
  content: ""; position: absolute; left: 6px; top: 10px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ------------------------------------------------------------- legal doc */

.doc { padding: 24px 0 72px; }
.doc h1 { font-size: clamp(28px, 4vw, 36px); max-width: none; margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 36px; }
.doc h2 { font-size: 19px; margin: 36px 0 8px; }
.doc p, .doc li { color: var(--fg); }
.doc ul { max-width: var(--measure); padding-left: 20px; }
.doc li { margin-bottom: 7px; }
.doc a { color: var(--accent); }

.callout {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  padding: 14px 18px;
  border-radius: 0 10px 10px 0;
  margin: 24px 0;
  max-width: var(--measure);
}
.callout p { margin: 0; }

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

.site-foot {
  border-top: 1px solid var(--line);
  padding: 34px 0 56px;
  color: var(--muted);
  font-size: 14px;
}
.foot-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; align-items: center; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--fg); }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }

a:focus-visible, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.pad-top { margin-top: 22px; }
