/*
 * Kondate — landing page.
 * Tokens and rules come from the visual identity canvas (the Web board):
 * claude.ai/artifact/Knn718GWAejJLnXx54VFti, transcribed in docs/visual-identity.md.
 * Light only, as the Web board specifies; the app's dark tokens are not used here.
 */

/*
 * Self-hosted, and subsetted to the characters this site prints — the full
 * families are 12.2 MB because they carry the whole Japanese glyph set.
 * Rebuild with scripts/web/subset-fonts.py after changing any copy; a
 * character outside the subset renders as tofu.
 *
 * font-display: swap, so text is readable while 54 KB arrives. Licences and
 * attribution: assets/fonts/OFL.txt.
 */
@font-face {
  font-family: "Zen Old Mincho";
  src: url("assets/fonts/zen-old-mincho-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("assets/fonts/zen-kaku-gothic-new-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("assets/fonts/zen-kaku-gothic-new-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Zen Kaku Gothic New";
  src: url("assets/fonts/zen-kaku-gothic-new-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Identity tokens */
  --washi: #fbf9f6;
  --surface: #ffffff;
  --border: #e6e0d8;
  --ink: #1c1a17;
  --ink-soft: #3a352f;
  --muted: #6b645c;
  --control: #8c8479;
  --kaki: #c4502a; /* fills, and text at 24px and up */
  --kaki-text: #9e3d1f; /* smaller text: kaki-600 fails AA on washi */
  --indigo: #2a4a6b; /* shelf and store information only */

  /* Web rhythm */
  --shell: 1120px;
  --gutter: 32px;
  --section: 128px;

  /* Web display scale */
  --hero: 76px;
  --section-title: 44px;
  --shelf-quote: 64px;
  --lead: 22px;
  --body: 17px;

  /* Store badges: the visible height both lockups are matched to. */
  --badge-h: 56px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--washi);
  color: var(--ink);
  font-family: "Zen Kaku Gothic New", system-ui, sans-serif;
  font-size: var(--body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* Japanese runs one step smaller and one step looser, and is never
   letter-spaced outside the こんだて wordmark. */
:lang(ja) {
  font-size: 0.94em;
  line-height: 1.9;
  letter-spacing: 0;
}

a {
  color: var(--kaki-text);
}

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

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

.shell {
  width: 100%;
  max-width: calc(var(--shell) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip:focus {
  left: var(--gutter);
  top: 12px;
  z-index: 10;
  background: var(--surface);
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

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

/* ---------- Brand ---------- */

.mark {
  width: 34px;
  height: 34px;
  color: var(--kaki);
  flex: none;
}

.mark--footer {
  width: 32px;
  height: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand__word {
  font-family: "Zen Old Mincho", serif;
  font-weight: 600;
  font-size: 24px;
  color: var(--kaki-text);
}

.brand__kana {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.22em; /* the one place Japanese is tracked */
  line-height: 1;
}

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

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
}

.site-header__link {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.site-header__link:hover {
  text-decoration: underline;
}

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

.display {
  margin: 0;
  font-family: "Zen Old Mincho", serif;
  font-weight: 600;
  font-size: var(--hero);
  line-height: 1.15;
  letter-spacing: 0.005em;
}

.section-title {
  margin: 0;
  font-family: "Zen Old Mincho", serif;
  font-weight: 600;
  font-size: var(--section-title);
  line-height: 1.25;
}

.lead {
  margin: 0;
  font-size: var(--lead);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 38ch;
}

.body {
  margin: 0;
  font-size: var(--body);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 68ch;
}

.small {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
}

.small--ink {
  color: var(--ink-soft);
}

.note {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 44ch;
  text-align: left;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kaki-text);
}

.eyebrow--muted {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.eyebrow--shelf {
  color: var(--indigo);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.shelf {
  color: var(--indigo);
  font-weight: 500;
}

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

.hero {
  padding-block: 88px 104px;
}

.hero__grid {
  display: flex;
  gap: 72px;
  align-items: flex-start;
  margin-bottom: 48px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: 26px;
  flex: 1 1 600px;
  min-width: 0;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 32px;
  flex: 0 1 auto;
  align-self: center;
}

/*
 * Apple's badge art is tight to its box; Google's carries 41px of padding on a
 * 168px badge (measured from the official PNG). Matching them by box height
 * would leave Google visibly smaller, so Google is scaled by 250/168 and the
 * padding pulled back out with a negative margin. Both then read at --badge-h,
 * and the 16px gap is real clear space — over a quarter of the badge height,
 * which satisfies both sets of guidelines.
 */
.badges {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  border-radius: 9px;
}

.badge__img {
  display: block;
}

.badge__img--apple {
  height: var(--badge-h);
  width: auto;
}

.badge__img--google {
  height: calc(var(--badge-h) * 1.4881);
  width: auto;
  margin: calc(var(--badge-h) * -0.244);
}

/* ---------- The film ---------- */

.film {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.film__video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--washi);
  box-shadow:
    0 30px 70px rgba(28, 26, 23, 0.1),
    0 8px 20px rgba(28, 26, 23, 0.06);
}

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

.rule {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0 auto;
  max-width: var(--shell);
  width: calc(100% - var(--gutter) * 2);
}

.section {
  padding-block: var(--section);
}

.problem {
  display: flex;
  gap: 72px;
  align-items: flex-start;
}

.problem__copy {
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1 1 480px;
  min-width: 0;
}

.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  flex: 1 1 520px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card--shelf {
  border-left: 3px solid var(--indigo);
}

.card--wide {
  padding: 34px 32px;
  gap: 14px;
}

.card__title {
  margin: 0;
  font-family: "Zen Old Mincho", serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.3;
}

.compare__word {
  margin: 0;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
}

.compare__word--dead {
  color: var(--control);
}

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

.steps {
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.step__number {
  margin: 0;
  font-family: "Zen Old Mincho", serif;
  font-weight: 600;
  font-size: 20px;
  color: var(--kaki-text);
}

.step__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* ---------- Waitlist ---------- */

.waitlist {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 72px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
}

.waitlist__body {
  max-width: 52ch;
}

.waitlist__form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.waitlist__input {
  width: 340px;
  max-width: 100%;
  height: 56px;
  padding-inline: 18px;
  font-family: inherit;
  font-size: var(--body);
  color: var(--ink);
  background: var(--washi);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.waitlist__input::placeholder {
  color: var(--muted); /* 5.55:1; --control is 3.5:1, large text only */
}

/* Bold on persimmon: 4.41:1, which passes the bold-text minimum. */
.button {
  height: 56px;
  padding-inline: 30px;
  font-family: inherit;
  font-size: var(--body);
  font-weight: 700;
  color: var(--washi);
  background: var(--kaki);
  border: none;
  border-radius: 12px;
  cursor: pointer;
}

.button:hover {
  background: var(--kaki-text);
}

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

.site-footer {
  margin-top: var(--section);
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-block: 40px;
}

.site-footer__line {
  font-family: "Zen Old Mincho", serif;
  font-size: 16px;
  color: var(--kaki-text);
  margin-left: 12px;
}

.site-footer__links {
  display: flex;
  gap: 26px;
  font-size: 14px;
}

/* ---------- Narrower ---------- */

@media (max-width: 1000px) {
  :root {
    --hero: 56px;
    --section-title: 36px;
    --lead: 20px;
  }

  .hero__grid,
  .problem {
    flex-direction: column;
    gap: 40px;
  }

  .hero__cta {
    align-self: flex-start;
  }

  .lead {
    max-width: 60ch;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .pair {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .specimen {
    height: 184px;
  }

  .specimen__ja {
    font-size: 54px;
  }

  .specimen__en {
    font-size: 19px;
  }

  :root {
    --gutter: 20px;
    --section: 72px;
    --hero: 42px;
    --section-title: 30px;
    --lead: 18px;
    --badge-h: 48px;
  }

  .hero {
    padding-block: 56px 72px;
  }

  .display br {
    display: none;
  }

  .compare {
    grid-template-columns: 1fr;
  }

  .waitlist {
    padding: 44px 24px;
  }

  .waitlist__form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .waitlist__input,
  .button {
    width: 100%;
  }

  .site-footer__line {
    margin-left: 0;
  }
}

/* ---------- Prose pages (privacy, terms) ---------- */

.prose {
  padding-block: 72px 96px;
  max-width: calc(760px + var(--gutter) * 2);
}

.prose > * + * {
  margin-top: 20px;
}

.prose__h2 {
  margin: 0;
  padding-top: 24px;
  font-family: "Zen Old Mincho", serif;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.3;
}

.prose__list {
  margin: 0;
  padding-left: 22px;
  font-size: var(--body);
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 68ch;
}

.prose__list li + li {
  margin-top: 10px;
}

.prose code {
  font-size: 0.92em;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
}

/* A draft warning, using the app's Notice rule. */
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--kaki);
  border-radius: 12px;
  padding: 18px 20px;
}

.callout p {
  margin: 0;
}

.site-footer__legal {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- The shelf-name specimen ---------- */

/*
 * Always in motion, but never the same thing twice. A loop that repeats one
 * gesture becomes wallpaper within two passes; this one changes its content
 * every three seconds, so each cycle teaches another shelf name and the motion
 * is the product rather than decoration.
 *
 * Five items, three seconds each, one 15s cycle. Pure CSS: the items are
 * stacked and each is given the same keyframe with its own delay.
 */

.specimen {
  position: relative;
  width: 420px;
  max-width: 100%;
  height: 232px;
}

.specimen__item {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  animation: specimen-cycle 15s ease-in-out infinite;
}

/*
 * Shifted back by 0.4s so the first specimen is already up when the page
 * paints — otherwise the slot is empty for the length of a fade on arrival,
 * which is exactly when someone is looking at it.
 */
.specimen__item:nth-child(1) {
  animation-delay: -0.4s;
}
.specimen__item:nth-child(2) {
  animation-delay: 2.6s;
}
.specimen__item:nth-child(3) {
  animation-delay: 5.6s;
}
.specimen__item:nth-child(4) {
  animation-delay: 8.6s;
}
.specimen__item:nth-child(5) {
  animation-delay: 11.6s;
}

.specimen__en {
  margin: 0;
  font-size: 22px;
  line-height: 1.4;
  color: var(--ink-soft);
}

.specimen__ja {
  margin: 0;
  font-size: 72px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--indigo);
}

.specimen__meta {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
  color: var(--muted);
}

@keyframes specimen-cycle {
  /*
   * No overlap: two specimens stacked in the same slot at part opacity read as
   * a double exposure. One leaves completely as the next arrives, and the
   * transitions are short so nothing sits half-faded for long.
   */
  0% {
    opacity: 0;
    translate: 0 18px;
  }
  1.8% {
    opacity: 1;
    translate: 0 0;
  }
  18.2% {
    opacity: 1;
    translate: 0 0;
  }
  20% {
    opacity: 0;
    translate: 0 -18px;
  }
  100% {
    opacity: 0;
    translate: 0 -18px;
  }
}

/* One specimen, held still. */
@media (prefers-reduced-motion: reduce) {
  .specimen__item {
    animation: none;
  }

  .specimen__item:first-child {
    opacity: 1;
  }

  .specimen__item:not(:first-child) {
    display: none;
  }
}

/* ---------- Countdown ---------- */

/*
 * One signature element: the number of days, in the display face at hero
 * scale. Hours and minutes are detail and sit with the date.
 *
 * The unit is a bilingual pair — 日 · days — the same shape every shelf line
 * in the app uses, so the closing card demonstrates the pairing rather than
 * only describing it. The Japanese half inherits the :lang(ja) rule above:
 * one step smaller, one step looser, never letter-spaced.
 */

.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-top: 12px;
}

/* Only appears once the script has real numbers in it. */
.countdown__figure,
.countdown__detail {
  display: none;
}

.countdown[data-live] .countdown__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.countdown[data-live] .countdown__detail {
  display: inline;
}

.countdown__value {
  font-family: "Zen Old Mincho", serif;
  font-weight: 600;
  font-size: 128px;
  line-height: 1;
  color: var(--kaki);
  /* Tabular, so the number does not shift width as it counts down. */
  font-variant-numeric: tabular-nums;
}

.countdown__unit {
  font-size: 19px;
  color: var(--muted);
}

/* The same short persimmon rule the film puts above a quoted shelf name. */
.countdown__rule {
  width: 72px;
  height: 3px;
  background: var(--kaki);
}

.countdown__date {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .countdown__value {
    font-size: 84px;
  }

  .countdown__unit {
    font-size: 17px;
  }
}
