:root {
  --ink: #11110f;
  --muted: #64645f;
  --line: #c9c8c1;
  --paper: #f4f3ee;
  --white: #fff;
  --blue: #145cff;
  --green: #087a57;
  --red: #c53131;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { max-width: 100%; }

#site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 58px;
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.header-inner, main, .footer-inner {
  width: min(1160px, calc(100% - 48px));
  margin-inline: auto;
}
.header-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo, .footer-logo {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -.06em;
}
.logo span, .footer-logo span { color: var(--blue); }
.nav-menu ul { display: flex; align-items: center; gap: 0; list-style: none; }
.nav-menu a {
  display: block;
  padding: 18px 14px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
}
.nav-menu a:hover, .nav-menu a[aria-current="page"] { color: var(--blue); }
.nav-menu .nav-contact {
  margin-left: 8px;
  padding: 8px 13px;
  color: var(--white);
  background: var(--ink);
}
.menu-toggle { display: none; border: 0; background: transparent; font-size: .78rem; font-weight: 800; }

main { padding: 34px 0 64px; }
.hero {
  position: relative;
  padding: 64px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.hero-home { min-height: 440px; display: flex; flex-direction: column; justify-content: center; }
.eyebrow, .card-number, .tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.eyebrow { color: var(--blue); }
.hero h1 {
  max-width: 960px;
  margin-top: 14px;
  font-size: clamp(3rem, 7.4vw, 6.2rem);
  line-height: 1.03;
  letter-spacing: -.07em;
}
.hero h1 span { color: var(--blue); }
.hero-copy { max-width: 680px; margin-top: 22px; color: var(--muted); font-size: .98rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.button {
  display: inline-flex;
  min-height: 44px;
  padding: 9px 17px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  font-size: .78rem;
  font-weight: 800;
}
.button-primary { color: var(--white); background: var(--ink); }
.button-primary:hover { background: var(--blue); border-color: var(--blue); }
.button-secondary { background: transparent; }
.button-secondary:hover { color: var(--blue); border-color: var(--blue); }
.button-light { color: var(--ink); background: var(--white); }

.section { margin-top: 58px; }
.intro-grid, .split-section {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 64px;
  align-items: start;
  padding: 34px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
h2 { font-size: clamp(1.65rem, 3.7vw, 2.8rem); line-height: 1.2; letter-spacing: -.045em; }
.intro-grid > p, .body-copy p { color: var(--muted); }
.body-copy p + p { margin-top: 14px; }
.section-heading { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.section-heading h2 { margin-top: 5px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.feature-card, .content-card {
  min-height: 245px;
  padding: 22px;
  border-right: 1px solid var(--line);
}
.feature-card:last-child, .content-card:last-child { border-right: 0; }
.feature-card { display: flex; flex-direction: column; }
.card-number { color: var(--muted); }
.feature-card h3, .content-card h3 { margin-top: 34px; font-size: 1.25rem; }
.feature-card p, .content-card p { margin-top: 8px; color: var(--muted); font-size: .85rem; }
.text-link { margin-top: auto; padding-top: 22px; color: var(--blue); font-size: .76rem; font-weight: 800; }

.cta-band {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 58px;
  padding: 30px;
  color: var(--white);
  background: var(--ink);
}
.cta-band .eyebrow { color: #82a8ff; }
.cta-band h2 { margin-top: 4px; font-size: clamp(1.25rem, 2.8vw, 1.9rem); }

.page-hero { padding: 52px 0; }
.page-hero h1 { font-size: clamp(2.7rem, 6vw, 4.8rem); }
.breadcrumb { display: flex; gap: 9px; margin-bottom: 16px; color: var(--muted); font-size: .72rem; }
.breadcrumb a { text-decoration: underline; text-underline-offset: 3px; }
.value-list { border-top: 1px solid var(--ink); }
.value-item {
  display: grid;
  grid-template-columns: .55fr 1.45fr;
  gap: 30px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
}
.value-item p { color: var(--muted); font-size: .86rem; }
.tag { display: inline-block; color: var(--blue); }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); }
.project-card { min-height: 260px; padding: 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--ink); display: flex; flex-direction: column; }
.project-card:last-child { border-right: 0; }
.project-card h2 { margin-top: 34px; font-size: 1.45rem; }
.project-card p { margin-top: 9px; color: var(--muted); font-size: .86rem; }
.project-card .meta { margin-top: auto; padding-top: 22px; color: var(--muted); font-size: .73rem; font-weight: 700; }
.notice { margin-top: 18px; padding: 14px 0 14px 18px; border-left: 3px solid var(--blue); color: var(--muted); font-size: .8rem; }

.app-listing-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.app-listing-copy { display: flex; align-items: center; gap: 22px; }
.app-listing-icon, .app-icon { border-radius: 22%; }
.app-listing-copy h2 { margin-top: 3px; font-size: 1.6rem; }
.app-listing-copy p { max-width: 640px; margin-top: 4px; color: var(--muted); font-size: .86rem; }

/* Legacy product detail page */
body[data-page="mirai-shushi"] { --app-blue: #0787f7; --app-soft: #eaf5ff; }
.app-hero { display: grid; grid-template-columns: 1fr .8fr; gap: 60px; padding: 50px 0 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); overflow: hidden; }
.app-title-row { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; }
.app-name { font-size: 1.45rem; font-weight: 850; }
.app-hero h1 { font-size: clamp(3rem, 6vw, 5rem); line-height: 1.05; letter-spacing: -.065em; }
.app-hero h1 span { color: var(--app-blue); }
.app-availability { margin-top: 12px; color: var(--muted); font-size: .72rem; }
.app-hero-visual { position: relative; min-height: 560px; }
.phone-shot { position: absolute; width: min(300px, 76%); border: 1px solid var(--ink); overflow: hidden; background: #fff; }
.phone-shot img, .feature-screen img { display: block; width: 100%; }
.phone-shot-front { z-index: 2; left: 0; bottom: -90px; }
.phone-shot-back { right: -6%; top: 65px; opacity: .76; }
.app-intro { display: grid; grid-template-columns: .55fr 1.2fr 1fr; gap: 44px; padding: 64px 0 28px; border-bottom: 1px solid var(--line); }
.app-intro > p:last-child { color: var(--muted); }
.feature-showcase { margin-top: 58px; }
.app-feature { display: grid; grid-template-columns: 1fr .8fr; gap: 60px; align-items: center; padding: 38px 0 0; border-top: 1px solid var(--ink); overflow: hidden; }
.app-feature-reverse .app-feature-copy { order: 2; }
.app-feature-reverse .feature-screen { order: 1; }
.feature-index { color: var(--app-blue); font: 800 .72rem ui-monospace, monospace; }
.app-feature h3 { margin-top: 18px; font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
.app-feature-copy p { max-width: 440px; margin-top: 13px; color: var(--muted); }
.feature-screen { width: min(300px, 100%); max-height: 480px; margin-inline: auto; border: 1px solid var(--ink); border-bottom: 0; overflow: hidden; }
.app-details { display: grid; grid-template-columns: .7fr 1.3fr; gap: 50px; margin-top: 58px; padding: 40px; color: #fff; background: var(--ink); }
.app-detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.app-detail-grid article { padding: 19px; border-top: 1px solid #4a4a46; }
.app-detail-grid p { margin-top: 4px; color: #aaa; font-size: .78rem; }
.app-cta { margin-top: 58px; padding: 45px 0; text-align: center; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.app-cta > p:not(.eyebrow) { margin: 10px 0 22px; color: var(--muted); }

.contact-panel { max-width: 760px; margin: 52px auto 0; padding: 38px 0; text-align: center; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.contact-panel p { max-width: 540px; margin: 13px auto 0; color: var(--muted); }
.status-pill { display: inline-block; margin-top: 24px; color: var(--green); font: 800 .72rem ui-monospace, monospace; text-transform: uppercase; }
.site-map-list { border-top: 1px solid var(--ink); }
.site-map-item { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 17px 4px; border-bottom: 1px solid var(--line); }
.site-map-item small { display: block; color: var(--muted); font-size: .76rem; }
.site-map-item > span:last-child { color: var(--blue); font-weight: 800; }

#site-footer { color: #aaa; background: var(--ink); }
.footer-inner { min-height: 190px; padding: 34px 0 22px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 42px; }
.footer-logo, .footer-map-title { color: var(--white); }
.footer-inner > div p { margin-top: 4px; font-size: .76rem; }
.footer-map-title { margin-bottom: 8px; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px 18px; font-size: .74rem; font-weight: 700; }
.footer-nav a:hover { color: #fff; }
.copyright { grid-column: 1 / -1; padding-top: 17px; border-top: 1px solid #3b3b38; font-size: .68rem; }

@media (max-width: 760px) {
  .header-inner, main, .footer-inner { width: min(100% - 28px, 1160px); }
  #site-header, .header-inner { min-height: 54px; }
  main { padding: 22px 0 48px; }
  .menu-toggle { display: block; }
  .nav-menu { display: none; position: absolute; top: 54px; left: 0; right: 0; padding: 8px 14px 14px; border-bottom: 1px solid var(--ink); background: var(--paper); }
  .nav-menu.is-open { display: block; }
  .nav-menu ul { display: block; }
  .nav-menu a { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .nav-menu .nav-contact { margin: 8px 0 0; padding: 10px; text-align: center; }
  .hero { padding: 44px 0; }
  .hero-home { min-height: 430px; }
  .hero h1 { font-size: clamp(2.7rem, 14vw, 4.2rem); }
  .section { margin-top: 44px; }
  .intro-grid, .split-section { grid-template-columns: 1fr; gap: 22px; padding: 26px 0; }
  .card-grid, .project-grid { grid-template-columns: 1fr; }
  .feature-card, .content-card, .project-card { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .feature-card h3, .content-card h3 { margin-top: 24px; }
  .value-item { grid-template-columns: 1fr; gap: 5px; }
  .app-listing-card, .app-listing-copy { align-items: flex-start; flex-direction: column; }
  .app-listing-card .button { width: 100%; }
  .app-hero { grid-template-columns: 1fr; gap: 28px; }
  .app-hero-visual { min-height: 470px; }
  .app-intro { grid-template-columns: 1fr; gap: 14px; padding-top: 48px; }
  .app-feature, .app-feature-reverse { grid-template-columns: 1fr; gap: 28px; }
  .app-feature-reverse .app-feature-copy, .app-feature-reverse .feature-screen { order: initial; }
  .app-details { grid-template-columns: 1fr; gap: 26px; padding: 28px 20px; }
  .app-detail-grid { grid-template-columns: 1fr; }
  .cta-band { align-items: flex-start; flex-direction: column; padding: 24px; }
  .contact-panel { padding-inline: 14px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-nav { grid-template-columns: repeat(2, 1fr); }
  .copyright { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
