/* Landing page (/) only. Legal/support pages keep using styles.css. */

:root {
  color-scheme: light;
  --paper: #ffffff;
  /* Matches the background of the App Store screenshots, so the cropped
     phone images blend into their panels without a visible edge. */
  --mist: #f2f1f8;
  --violet: #7f77dd;
  --violet-deep: #544cc0;
  --violet-press: #463fa6;
  --ink: #1e1c33;
  --muted: #5c5977;
  --line: #dcdaee;
  --line-strong: #b9b5d9;

  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", "Yu Gothic", Meiryo, system-ui, sans-serif;

  --gutter: 20px;
  --max: 1120px;
  --section-space: clamp(72px, 10vw, 128px);
  --radius-panel: 28px;
}

@media (min-width: 720px) {
  :root {
    --gutter: 32px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1,
h2,
h3,
p,
ul,
dl,
dd,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

a {
  color: var(--violet-deep);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--violet-press);
}

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

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

.nowrap {
  display: inline-block;
}

/* Break Japanese at phrase boundaries (BudouX in Chromium) so short lines
   never split a word like マイナンバーカード. */
h1,
h2,
h3,
summary,
figcaption,
.size-label,
.facts,
.footer-brand p,
.footer-links {
  word-break: auto-phrase;
  text-wrap: balance;
}

.section-title {
  font-size: clamp(1.625rem, 1.2rem + 1.9vw, 2.5rem);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: 0.01em;
  font-feature-settings: "palt";
}

.section-lede {
  max-width: 34em;
  margin-top: 16px;
  color: var(--muted);
}

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

.site-header {
  background: var(--mist);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  flex: none;
}

.brand img {
  height: 28px;
  width: auto;
}

.site-nav {
  display: none;
  gap: 32px;
  margin-left: auto;
  font-size: 0.9375rem;
  font-weight: 500;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--violet-deep);
  text-decoration: underline;
}

@media (min-width: 880px) {
  .site-nav {
    display: flex;
  }
}

.header-cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--violet-deep);
  color: #ffffff;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.header-cta:hover {
  background: var(--violet-press);
  color: #ffffff;
}

/* ---------- Store badges ---------- */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.store-badges a {
  display: block;
  border-radius: 9px;
}

.store-badges img {
  height: 52px;
  width: auto;
}

/* Keep both badges on one line on the narrowest phones. */
@media (max-width: 380px) {
  .store-badges img {
    height: 44px;
  }
}

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

.hero {
  background: var(--mist);
  padding-block: clamp(32px, 6vw, 72px) clamp(64px, 9vw, 112px);
  overflow: hidden;
}

.hero .wrap {
  display: grid;
  gap: 56px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 32px;
  }
}

.hero-title {
  font-size: clamp(2.375rem, 1.3rem + 4.6vw, 4.25rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0.01em;
  font-feature-settings: "palt";
}

.hero-lede {
  max-width: 30em;
  margin-top: 24px;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  color: var(--muted);
}

.hero .store-badges {
  margin-top: 32px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 24px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.facts li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.facts li::before {
  content: "";
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--violet-deep)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.8 6.3l2.2 2.2 4.3-4.6'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* ---------- Hero specimen: selfie → ID photo with its real dimensions ---------- */

.specimen {
  --pw: clamp(184px, 52vw, 290px);
  justify-self: center;
  padding: 52px 60px 0 calc(var(--pw) * 0.4);
}

@media (min-width: 960px) {
  .specimen {
    --pw: clamp(220px, 22vw, 290px);
    justify-self: end;
  }
}

.specimen-stage {
  position: relative;
  width: var(--pw);
  aspect-ratio: 30 / 40;
}

.specimen-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  background: #7ba3cf;
}

.bracket {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 0 solid var(--violet);
}

.bracket-tl {
  top: -12px;
  left: -12px;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 10px;
}

.bracket-tr {
  top: -12px;
  right: -12px;
  border-width: 3px 3px 0 0;
  border-top-right-radius: 10px;
}

.bracket-bl {
  bottom: -12px;
  left: -12px;
  border-width: 0 0 3px 3px;
  border-bottom-left-radius: 10px;
}

.bracket-br {
  bottom: -12px;
  right: -12px;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 10px;
}

/* Dimension lines, drawn like a technical drawing: a thin rule with end
   ticks and the measurement breaking the line. */
.dim {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
}

.dim::before,
.dim::after {
  content: "";
  position: absolute;
  background: var(--line-strong);
}

.dim span {
  position: relative;
  background: var(--mist);
}

.dim-x {
  left: 0;
  right: 0;
  top: -40px;
  height: 12px;
  border-inline: 1px solid var(--line-strong);
}

.dim-x::before {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}

.dim-x::after {
  display: none;
}

.dim-x span {
  padding: 0 8px;
}

.dim-y {
  top: 0;
  bottom: 0;
  right: -44px;
  width: 12px;
  border-block: 1px solid var(--line-strong);
}

.dim-y::before {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.dim-y::after {
  display: none;
}

.dim-y span {
  writing-mode: vertical-rl;
  padding: 8px 0;
}

.specimen-selfie {
  position: absolute;
  top: calc(var(--pw) * 0.08);
  left: calc(var(--pw) * -0.4);
  width: calc(var(--pw) * 0.46);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 5px solid #ffffff;
  box-shadow: 0 6px 18px rgb(46 40 110 / 0.16);
  object-fit: cover;
}

.specimen-arrow {
  position: absolute;
  top: calc(var(--pw) * 0.58);
  left: calc(var(--pw) * -0.3);
  width: calc(var(--pw) * 0.27);
  height: auto;
  overflow: visible;
  color: var(--violet);
}

.specimen figcaption {
  margin-top: 28px;
  margin-right: -60px;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* One orchestrated moment on load: the selfie lands, the arrow draws, the
   ID photo develops, then its measurements appear. */
@media (prefers-reduced-motion: no-preference) {
  .specimen-selfie {
    animation: selfie-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  }

  .specimen-arrow .arrow-shaft {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: arrow-draw 0.45s 0.35s ease-out forwards;
  }

  .specimen-arrow .arrow-head {
    opacity: 0;
    animation: fade-in 0.15s 0.75s forwards;
  }

  .specimen-photo {
    animation: develop 0.9s 0.7s cubic-bezier(0.3, 0.7, 0.2, 1) both;
  }

  .bracket,
  .dim {
    animation: fade-in 0.4s 1.45s both;
  }
}

@keyframes selfie-in {
  from {
    opacity: 0;
    transform: scale(0.88);
  }
}

@keyframes arrow-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes develop {
  from {
    clip-path: inset(0 0 100% 0);
    filter: saturate(0) brightness(1.25);
  }
  60% {
    clip-path: inset(0 0 0 0);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ---------- Sizes, drawn to scale ---------- */

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

.sizes-list {
  --mm: 2.3px;
  display: grid;
  gap: 24px;
  margin-top: 48px;
}

.size-item {
  display: grid;
  grid-template-columns: calc(50 * var(--mm)) 1fr;
  gap: 20px;
  align-items: center;
}

.size-stage {
  display: flex;
}

.size-frame {
  width: calc(var(--w) * var(--mm));
  height: calc(var(--h) * var(--mm));
  object-fit: cover;
  object-position: center 30%;
  outline: 1px solid var(--line);
  outline-offset: -1px;
}

.size-label {
  display: flex;
  flex-direction: column;
}

.size-label strong {
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.size-label span {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}

/* From tablet up, the four sizes stand side by side on a millimetre ruler. */
@media (min-width: 720px) {
  .sizes-list {
    --mm: 3.4px;
    position: relative;
    display: flex;
    width: fit-content;
    gap: clamp(28px, 4vw, 56px);
    margin-top: 56px;
  }

  .sizes-list::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50 * var(--mm) + 10px);
    height: 12px;
    background:
      linear-gradient(var(--line-strong), var(--line-strong)) top left / 100% 1px no-repeat,
      repeating-linear-gradient(to right, var(--line-strong) 0 1px, transparent 1px calc(10 * var(--mm)))
        top left / 100% 12px no-repeat,
      repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px var(--mm)) top left / 100% 6px
        no-repeat;
  }

  .size-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: flex-start;
  }

  .size-stage {
    height: calc(50 * var(--mm));
    align-items: flex-end;
  }

  .size-label {
    margin-top: 40px;
    max-width: 12em;
  }
}

@media (min-width: 1040px) {
  .sizes-list {
    --mm: 4.2px;
  }
}

.sizes-note {
  max-width: 44em;
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* ---------- Features ---------- */

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

.feature-list {
  display: grid;
  gap: clamp(64px, 9vw, 112px);
  margin-top: clamp(40px, 6vw, 72px);
}

.feature {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 880px) {
  .feature {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
  }

  .feature > .feature-media {
    justify-self: end;
  }

  .feature:nth-child(even) .feature-media {
    order: -1;
    justify-self: start;
  }
}

.feature-title {
  font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
  font-weight: 900;
  line-height: 1.45;
  font-feature-settings: "palt";
}

.feature-body {
  max-width: 28em;
  margin-top: 16px;
  color: var(--muted);
}

.feature-link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
}

.options {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 20px;
  max-width: 28em;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}

.options dt {
  font-weight: 700;
}

.options dd {
  color: var(--muted);
}

.feature-media {
  justify-self: center;
  width: 100%;
  max-width: 440px;
}

.feature-media img {
  width: 100%;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  object-position: center top;
  border-radius: var(--radius-panel);
  background: var(--mist);
}

/* For screens whose key content sits in a bottom sheet (save format, QR code). */
.feature-media-bottom img {
  object-position: center bottom;
}

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

.faq {
  padding-block: var(--section-space);
  border-top: 1px solid var(--line);
}

.faq .wrap {
  display: grid;
  gap: 32px;
}

@media (min-width: 880px) {
  .faq .wrap {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 64px;
    align-items: start;
  }
}

.faq-more {
  display: inline-block;
  margin-top: 16px;
  font-weight: 700;
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  position: relative;
  padding: 20px 44px 20px 0;
  font-weight: 700;
  line-height: 1.6;
  cursor: pointer;
  list-style: none;
}

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

.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 2px;
  background: var(--violet-deep);
  transition: transform 0.2s ease;
}

.faq-list summary::after {
  transform: rotate(90deg);
}

.faq-list details[open] summary::after {
  transform: rotate(0deg);
}

.faq-list summary:hover {
  color: var(--violet-deep);
}

.faq-answer {
  padding-bottom: 24px;
  color: var(--muted);
}

/* ---------- Closing call to action ---------- */

.closing {
  background: var(--mist);
  padding-block: clamp(64px, 9vw, 104px);
}

.closing .wrap {
  display: grid;
  justify-items: center;
  text-align: center;
}

.closing-icon {
  width: 64px;
  height: auto;
}

.closing .section-title {
  margin-top: 24px;
}

.closing p {
  margin-top: 12px;
  color: var(--muted);
}

.closing .store-badges {
  justify-content: center;
  margin-top: 32px;
}

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

.site-footer {
  padding-block: 56px 40px;
  font-size: 0.875rem;
}

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

.footer-brand {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
  }

  .footer-brand {
    grid-column: auto;
  }
}

.footer-brand img {
  height: 24px;
  width: auto;
}

.footer-brand p {
  max-width: 22em;
  margin-top: 12px;
  color: var(--muted);
}

.footer-heading {
  font-size: 0.875rem;
  font-weight: 700;
}

.footer-links {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--violet-deep);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer-bottom a {
  color: var(--muted);
}
