/*
 * The app's palette (src/global.css): a cool cloud-white page, white cards, the はちまき blue as
 * the brand, navy ink. Headings use M PLUS Rounded 1c like the app; body text uses the system
 * Japanese font, which reads better in long legal pages.
 */
/* Subsets of the app's own fonts with only the characters site/ uses (bun run site:fonts). */
@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("/assets/fonts/rounded-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("/assets/fonts/rounded-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #1b2433;
  --body: #3a475a;
  --muted: #6b7a90;
  --cloud: #f3f7fc;
  --surface: #ffffff;
  --surface-2: #edf3fb;
  --brand: #2f6be0;
  --brand-deep: #1f51b8;
  --brand-soft: #e3edfb;
  --border: #dce6f3;
  --flame: #ff8a3d;
  --flame-soft: #fff1e6;
  --radius: 24px;
  --shadow: 0 6px 16px rgba(47, 107, 224, 0.07);
  --font-body:
    -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    "Yu Gothic UI", Meiryo, sans-serif;
  --font-round: "M PLUS Rounded 1c", var(--font-body);
}

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

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

body {
  margin: 0;
  background: var(--cloud);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.8;
}

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

img,
svg {
  display: block;
  max-width: 100%;
}

.wrap {
  width: min(100% - 40px, 1040px);
  margin-inline: auto;
}

.wrap-narrow {
  width: min(100% - 40px, 720px);
  margin-inline: auto;
}

/* Header and footer */

.site-header {
  padding: 20px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-round);
  font-size: 20px;
  font-weight: 800;
  text-decoration: none;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

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

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

.copyright {
  margin: 0;
}

/* Landing page */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: center;
  padding: 40px 0 80px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-family: var(--font-round);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

h1,
h2,
h3 {
  font-family: var(--font-round);
  font-feature-settings: "palt";
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 6.4vw, 62px);
  font-weight: 800;
  line-height: 1.25;
}

.lead {
  max-width: 30em;
  margin: 0 0 28px;
  color: var(--body);
  font-size: 17px;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 12px 22px;
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-round);
  font-size: 15px;
  font-weight: 700;
}

.soon::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--flame);
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 48px;
}

.hero-art::before {
  content: "";
  position: absolute;
  inset: 10% 0 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--brand-soft), transparent);
}

.lumi {
  position: relative;
  width: min(300px, 64vw);
  transform-origin: bottom center;
  animation: breathe 3.2s ease-in-out 4;
}

/* ルミ's idle in the app: a few slow, squishy breaths, then rest. */
@keyframes breathe {
  50% {
    transform: scale(0.975, 1.035);
  }
}

.bubble {
  position: absolute;
  top: 0;
  right: 4%;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 18px 18px 18px 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-family: var(--font-round);
  font-size: 15px;
  font-weight: 700;
}

.section {
  padding: 0 0 80px;
}

.section h2 {
  margin: 0 0 28px;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  line-height: 1.35;
}

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

.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
}

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

.step-num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-bottom: 3px solid var(--brand-deep);
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-family: var(--font-round);
  font-size: 18px;
  font-weight: 800;
}

.aside {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.check-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  gap: 12px;
  color: var(--body);
}

.check-list li::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--brand)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.plan-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.card .plan-name {
  margin: 0 0 4px;
  color: var(--brand);
  font-family: var(--font-round);
  font-size: 14px;
  font-weight: 700;
}

/* Legal pages */

.doc {
  padding: 8px 0 80px;
}

.doc h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 800;
  line-height: 1.35;
}

.doc .meta {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 14px;
}

.doc h2 {
  margin: 44px 0 12px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.5;
}

.doc h3 {
  margin: 24px 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.doc p,
.doc li {
  color: var(--body);
  font-size: 15.5px;
}

.doc ol,
.doc ul {
  padding-left: 1.5em;
}

.doc li + li {
  margin-top: 6px;
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--brand-soft);
}

.callout p {
  margin: 0;
}

.table-scroll {
  overflow-x: auto;
}

.doc table {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 16px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: var(--surface);
  font-size: 14.5px;
}

.doc th,
.doc td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.doc tr:last-child th,
.doc tr:last-child td {
  border-bottom: 0;
}

.doc thead th {
  background: var(--surface-2);
  white-space: nowrap;
}

.kv th {
  width: 30%;
  background: var(--surface-2);
}

/* Operator details still to fill in before publishing. */
.todo {
  padding: 0 4px;
  border-radius: 4px;
  background: var(--flame-soft);
  color: #b4531a;
}

.not-found {
  padding: 80px 0 120px;
  text-align: center;
}

.not-found .lumi {
  width: 160px;
  margin: 0 auto 24px;
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 0 64px;
  }

  .hero-art {
    order: -1;
  }

  .lumi {
    width: min(220px, 56vw);
  }

  .grid-3,
  .plan-row {
    grid-template-columns: 1fr;
  }

  .kv th,
  .kv td {
    display: block;
    width: 100%;
  }

  .kv th {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .kv td {
    padding-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lumi {
    animation: none;
  }
}
