@font-face {
  font-family: "Bricolage Wordmark";
  src: url("/assets/fonts/bricolage-wordmark.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f3ede0;
  --surface: #fffdf6;
  --paper: #fff9e8;
  --ink: #2d3548;
  --ink-muted: #596780;
  --border: #d2c8b6;
  --grid: rgba(158, 172, 188, 0.28);
  --accent: #304b89;
  --accent-deep: #213666;
  --pencil: #ac5737;
  --pencil-soft: #f4e1d4;
  --success: #2e7d5b;
  --gold: #e5a93c;
  --radius: 20px;
  --shadow: 0 18px 44px rgba(33, 54, 102, 0.14), 0 2px 6px rgba(33, 54, 102, 0.06);
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--pencil);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: min(var(--max), 100% - 32px);
  margin-inline: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(243, 237, 224, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(210, 200, 182, 0.7);
}

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

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

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(33, 54, 102, 0.2);
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 14px;
  font-weight: 700;
}

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

.site-nav a:hover {
  color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 0 var(--accent-deep);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 var(--accent-deep);
}

.btn-ghost {
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
}

.btn svg {
  width: 20px;
  height: 20px;
  flex: none;
}

.soon {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-muted);
}

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

.hero {
  padding: 72px 0 56px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--pencil-soft);
  color: var(--pencil);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.wordmark {
  margin: 0;
  font-family: "Bricolage Wordmark", "Hiragino Sans", sans-serif;
  font-weight: 800;
  font-size: clamp(52px, 8vw, 96px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.wordmark-ja {
  display: block;
  margin-top: 10px;
  font-family: inherit;
  font-size: 0.26em;
  letter-spacing: 0.18em;
  color: var(--pencil);
}

.lead {
  margin: 26px 0 32px;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 700;
  line-height: 1.8;
}

.lead small {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.phone {
  width: min(100%, 300px);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-visual .phone:first-child {
  transform: rotate(-4deg) translateX(18px);
  z-index: 2;
}

.hero-visual .phone:last-child {
  transform: rotate(5deg) translate(-18px, 34px);
  opacity: 0.96;
}

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

section {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.6vw, 36px);
  line-height: 1.35;
}

.section-head p {
  margin: 0;
  color: var(--ink-muted);
}

.kicker {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--pencil);
}

/* Notebook card */
.sheet {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 2px 0 rgba(210, 200, 182, 0.8);
}

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

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

.step {
  padding: 28px 24px 26px;
}

.step-art {
  width: 100%;
  aspect-ratio: 2 / 1;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px dashed var(--border);
}

.step h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 6px;
  font-size: 19px;
}

.step h3::before {
  counter-increment: step;
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
}

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

/* ---------- Gallery ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.gallery figure {
  margin: 0;
}

.gallery img {
  border-radius: 22px;
  box-shadow: var(--shadow);
  background: var(--surface);
}

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

.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.feature {
  display: flex;
  gap: 18px;
  padding: 26px;
}

.feature-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #e5e9f4;
  color: var(--accent);
}

.feature:nth-child(2) .feature-icon {
  background: var(--pencil-soft);
  color: var(--pencil);
}

.feature:nth-child(3) .feature-icon {
  background: #f1e8c8;
  color: #8a6a1c;
}

.feature:nth-child(4) .feature-icon {
  background: #dcefe5;
  color: var(--success);
}

.feature-icon svg {
  width: 26px;
  height: 26px;
}

.feature h3 {
  margin: 2px 0 4px;
  font-size: 18px;
}

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

/* ---------- Levels ---------- */

.levels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.level {
  padding: 16px;
  text-align: center;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.level b {
  display: block;
  font-size: 17px;
}

.level span {
  font-size: 13px;
  color: var(--ink-muted);
}

.level i {
  display: block;
  width: 36px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 2px;
}

/* ---------- CTA band ---------- */

.cta-band {
  padding: 56px 32px;
  text-align: center;
  color: #fff;
  border-radius: 28px;
  background-color: #3a56a0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 22px 22px;
  box-shadow: var(--shadow);
}

.cta-band img {
  width: 88px;
  height: 88px;
  margin: 0 auto 18px;
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.cta-band h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3.4vw, 34px);
}

.cta-band p {
  margin: 0 0 26px;
  opacity: 0.88;
}

.cta-band .btn-primary {
  color: var(--accent-deep);
  background: #fff;
  box-shadow: 0 4px 0 #c9d3ea;
}

.cta-band .soon {
  color: rgba(255, 255, 255, 0.8);
}

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

.site-footer {
  padding: 40px 0 48px;
  font-size: 14px;
  color: var(--ink-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

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

/* ---------- Policy page ---------- */

.policy {
  padding: 48px 0 24px;
}

.policy .sheet {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 56px);
}

.policy h1 {
  margin: 0 0 6px;
  font-size: clamp(26px, 4vw, 34px);
  line-height: 1.35;
}

.policy .meta {
  margin: 0 0 28px;
  font-size: 14px;
  color: var(--ink-muted);
}

.policy .summary {
  margin: 0 0 32px;
  padding: 18px 20px;
  border-radius: 14px;
  background: #e8eef0;
  border-left: 4px solid var(--success);
}

.policy .summary ul {
  margin: 6px 0 0;
  padding-left: 1.2em;
}

.policy h2 {
  margin: 36px 0 8px;
  padding-bottom: 6px;
  font-size: 19px;
  border-bottom: 1px dashed var(--border);
}

.policy p,
.policy li {
  font-size: 15.5px;
}

.policy ul {
  padding-left: 1.3em;
}

.policy table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 10px 0;
}

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

.policy th {
  background: var(--surface);
  white-space: nowrap;
}

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

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

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-visual .phone {
    width: min(44%, 240px);
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 520px;
    margin-inline: auto;
  }

  .gallery {
    grid-template-columns: repeat(4, 72%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 16px 24px;
    margin-inline: -16px;
  }

  .gallery figure {
    scroll-snap-align: center;
  }

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

  .levels {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .site-nav a:not(:last-child) {
    display: none;
  }

  .hero {
    padding-top: 44px;
  }

  section {
    padding: 52px 0;
  }

  .feature {
    padding: 20px;
  }

  .cta-band {
    padding: 44px 20px;
  }
}

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

  .btn {
    transition: none;
  }
}
