/* =========================================================
   Jmail.co.jp
   Japanese memorial / apology site stylesheet
   ---------------------------------------------------------
   Tone: quiet, sincere, readable, archival.
   Updated for canonical image collection and image-led heroes.
   ========================================================= */

:root {
  --paper: #f7f1e7;
  --paper-soft: #fffaf1;
  --paper-deep: #eadfce;

  --ink: #1f1a16;
  --ink-soft: #4d433a;
  --muted: #74685d;

  --line: rgba(31, 26, 22, 0.16);
  --line-strong: rgba(31, 26, 22, 0.28);

  --accent: #7b1f1f;
  --accent-dark: #541414;
  --gold: #9b7a42;

  --shadow: 0 28px 80px rgba(31, 26, 22, 0.16);
  --shadow-soft: 0 14px 42px rgba(31, 26, 22, 0.1);

  --max: 1180px;
  --wide: 1320px;
  --text: 760px;
}

/* -----------------------------
   Base
----------------------------- */

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 5%, rgba(123, 31, 31, 0.08), transparent 34rem),
    radial-gradient(circle at 90% 12%, rgba(155, 122, 66, 0.1), transparent 30rem),
    linear-gradient(180deg, var(--paper-soft), var(--paper));
  color: var(--ink);
  font-family:
    "Hiragino Mincho ProN",
    "Yu Mincho",
    "YuMincho",
    "Noto Serif JP",
    "Times New Roman",
    serif;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.02em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(31, 26, 22, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 26, 22, 0.025) 1px, transparent 1px);
  background-size: 38px 38px;
  z-index: -1;
}

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

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

p {
  margin: 0 0 1.25rem;
}

strong {
  font-weight: 700;
}

em {
  font-style: normal;
  color: var(--accent-dark);
}

::selection {
  background: rgba(123, 31, 31, 0.18);
}

/* -----------------------------
   Layout helpers
----------------------------- */

.page {
  min-height: 100vh;
}

.wrap,
.container {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.wide-wrap {
  width: min(calc(100% - 2rem), var(--wide));
  margin-inline: auto;
}

.text-wrap {
  width: min(calc(100% - 2rem), var(--text));
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 7vw, 7rem) 0;
}

.section-tight {
  padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}

.kicker,
.eyebrow {
  margin: 0 0 0.9rem;
  color: var(--gold);
  font-size: 0.78rem;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.jp-kicker {
  margin: 0 0 1rem;
  color: var(--gold);
  font-size: 0.85rem;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.lead {
  font-size: clamp(1.08rem, 2vw, 1.32rem);
  line-height: 2.05;
  color: var(--ink-soft);
}

.small {
  font-size: 0.92rem;
  color: var(--muted);
}

.divider {
  width: min(calc(100% - 2rem), var(--max));
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 241, 231, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav {
  width: min(calc(100% - 2rem), var(--max));
  min-height: 74px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo,
.site-title {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.logo-mark {
  color: var(--accent-dark);
  font-size: 1.15rem;
}

.logo-sub {
  color: var(--muted);
  font-size: 0.76rem;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.45rem 0.75rem;
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--accent-dark);
  border-color: var(--line);
  background: rgba(255, 250, 241, 0.72);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 8vw, 8rem) 0 clamp(3.5rem, 7vw, 7rem);
}

.hero::after {
  content: "";
  position: absolute;
  right: -12rem;
  bottom: -12rem;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  border: 1px solid rgba(123, 31, 31, 0.14);
  background: radial-gradient(circle, rgba(155, 122, 66, 0.1), transparent 62%);
  pointer-events: none;
}

.hero-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-inner.hero-text-only {
  grid-template-columns: 1fr;
  max-width: var(--text);
}

.hero-text {
  max-width: 800px;
}

.hero h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(2.3rem, 7vw, 6.25rem);
  line-height: 1.08;
  letter-spacing: 0.03em;
  font-weight: 500;
}

.hero h1 .sorry,
.sorry {
  color: var(--accent-dark);
  font-weight: 700;
}

.hero-copy {
  max-width: 720px;
  font-size: clamp(1.05rem, 2vw, 1.26rem);
  line-height: 2.12;
  color: var(--ink-soft);
}

.hero-note {
  margin-top: 2rem;
  padding: 1.4rem 1.5rem;
  border-left: 4px solid var(--accent-dark);
  background: rgba(255, 250, 241, 0.78);
  box-shadow: var(--shadow-soft);
  color: var(--ink-soft);
}

.hero-card {
  padding: clamp(1.5rem, 3vw, 2rem);
  background: rgba(255, 250, 241, 0.84);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1.25;
}

.hero-card p {
  color: var(--ink-soft);
}

.hero-card .stamp {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.55rem 0.75rem;
  border: 1px solid rgba(123, 31, 31, 0.35);
  color: var(--accent-dark);
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

/* New image hero pattern */

.hero-media,
.hero-image-card {
  position: relative;
  isolation: isolate;
}

.hero-media {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 58%, rgba(31, 26, 22, 0.38)),
    linear-gradient(90deg, rgba(31, 26, 22, 0.12), transparent 42%);
}

.hero-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  height: auto;
  object-fit: cover;
  transform: scale(1.002);
}

.hero-media-caption {
  position: absolute;
  z-index: 2;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  margin: 0;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 250, 241, 0.86);
  border: 1px solid rgba(255, 250, 241, 0.55);
  color: var(--ink-soft);
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-size: 0.82rem;
  line-height: 1.55;
  box-shadow: var(--shadow-soft);
}

.hero-media .stamp {
  position: absolute;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: 0.5rem 0.7rem;
  background: rgba(255, 250, 241, 0.88);
  border: 1px solid rgba(31, 26, 22, 0.18);
  color: var(--accent-dark);
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hero-split {
  width: min(calc(100% - 2rem), var(--wide));
}

.hero-split .hero-inner {
  width: 100%;
}

/* Full-bleed editorial image hero option */

.hero-full {
  padding: 0;
  min-height: 72vh;
  display: grid;
  align-items: end;
  background: #18130f;
}

.hero-full::after {
  display: none;
}

.hero-full .hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-full .hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-full .hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 14, 10, 0.76), rgba(20, 14, 10, 0.34) 48%, rgba(20, 14, 10, 0.16)),
    linear-gradient(180deg, transparent 45%, rgba(20, 14, 10, 0.72));
}

.hero-full .hero-inner {
  width: min(calc(100% - 2rem), var(--max));
  padding: clamp(5rem, 10vw, 9rem) 0 clamp(3rem, 6vw, 5rem);
  grid-template-columns: minmax(0, 0.92fr);
  color: #fffaf1;
}

.hero-full h1,
.hero-full .jp-kicker {
  color: #fffaf1;
}

.hero-full .hero-copy,
.hero-full .hero-copy p {
  color: rgba(255, 250, 241, 0.88);
}

.hero-full .hero-note {
  background: rgba(31, 26, 22, 0.54);
  color: rgba(255, 250, 241, 0.9);
  border-left-color: #fffaf1;
}

/* -----------------------------
   Typography sections
----------------------------- */

article {
  width: min(calc(100% - 2rem), var(--text));
  margin-inline: auto;
}

article h2,
.section h2,
.section-title {
  margin: 0 0 1.2rem;
  font-size: clamp(1.8rem, 4.4vw, 3.8rem);
  line-height: 1.22;
  letter-spacing: 0.03em;
  font-weight: 500;
}

article h3,
.section h3 {
  margin: 2.6rem 0 1rem;
  font-size: clamp(1.25rem, 2.4vw, 1.9rem);
  line-height: 1.35;
}

article p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 2.08;
}

blockquote {
  margin: 2.5rem 0;
  padding: 1.6rem 1.8rem;
  background: rgba(255, 250, 241, 0.82);
  border-left: 5px solid var(--accent-dark);
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 2;
}

blockquote p:last-child {
  margin-bottom: 0;
}

/* -----------------------------
   Apology panel
----------------------------- */

.apology-panel {
  width: min(calc(100% - 2rem), 940px);
  margin: clamp(2.5rem, 6vw, 5rem) auto;
  padding: clamp(2rem, 6vw, 4.5rem);
  background: var(--paper-soft);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.apology-panel h2 {
  margin: 0 0 1.5rem;
  color: var(--accent-dark);
  font-size: clamp(2rem, 5vw, 4.6rem);
  line-height: 1.12;
}

.apology-panel p {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 2.15;
}

.signature {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
}

.signature strong {
  display: block;
  font-size: 1.2rem;
  letter-spacing: 0.06em;
}

.signature span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
}

/* -----------------------------
   Cards / grids
----------------------------- */

.grid {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
  display: grid;
  gap: 1.25rem;
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: clamp(1.35rem, 3vw, 2rem);
  background: rgba(255, 250, 241, 0.75);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.card h3 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.35;
}

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

.card a {
  font-weight: 700;
}

/* -----------------------------
   Timeline
----------------------------- */

.timeline {
  width: min(calc(100% - 2rem), 900px);
  margin: 3rem auto 0;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0.3rem;
  bottom: 0.3rem;
  left: 0.55rem;
  width: 1px;
  background: var(--line-strong);
}

.timeline-item {
  position: relative;
  padding-left: 2.4rem;
  padding-bottom: 2rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0.22rem;
  top: 0.45rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--accent-dark);
}

.timeline-year {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: var(--accent-dark);
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.timeline-item h3 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
}

.timeline-item p {
  color: var(--ink-soft);
}

/* -----------------------------
   Domain list / identity chips
----------------------------- */

.domain-cloud {
  width: min(calc(100% - 2rem), 980px);
  margin: 2rem auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.domain-cloud span,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.72);
  color: var(--ink-soft);
  border-radius: 999px;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* -----------------------------
   Book panel
----------------------------- */

.book-panel {
  width: min(calc(100% - 2rem), var(--max));
  margin: clamp(3.5rem, 8vw, 7rem) auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 340px);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(1.5rem, 4vw, 3.2rem);
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.94), rgba(234, 223, 206, 0.88));
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

.book-copy h2 {
  margin: 0 0 1.15rem;
  font-size: clamp(1.7rem, 4.4vw, 3.4rem);
  line-height: 1.18;
  font-weight: 500;
}

.book-copy p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 2.05;
}

.book-cover {
  display: block;
  text-decoration: none;
}

.book-cover img {
  width: 100%;
  height: auto;
  border: 1px solid rgba(31, 26, 22, 0.2);
  box-shadow: 0 26px 70px rgba(31, 26, 22, 0.28);
  background: #ddd;
}

.book-cover:hover img {
  transform: translateY(-3px);
  transition: transform 180ms ease;
}

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

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 0.8rem;
  padding: 0.78rem 1.2rem;
  background: var(--ink);
  color: #fff;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.button:hover,
.btn:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.button.secondary,
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}

.button.secondary:hover,
.btn.secondary:hover {
  background: var(--paper-soft);
  color: var(--accent-dark);
}

/* -----------------------------
   Image / archive blocks
----------------------------- */

.archive-image {
  margin: 2.5rem auto;
  width: min(calc(100% - 2rem), 960px);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.grid .archive-image {
  width: 100%;
  margin: 0;
}

.archive-image img {
  width: 100%;
}

.archive-image figcaption {
  padding: 0.9rem 1rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
}

/* -----------------------------
   Lightbox support
----------------------------- */

.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 1.5rem;
  background: rgba(20, 14, 10, 0.86);
}

.image-lightbox.is-open {
  display: grid;
}

.image-lightbox-img {
  max-width: min(100%, 1200px);
  max-height: 82vh;
  object-fit: contain;
  background: #111;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.image-lightbox-caption {
  max-width: min(100%, 900px);
  margin: 1rem auto 0;
  color: rgba(255, 250, 241, 0.86);
  text-align: center;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-size: 0.92rem;
}

.image-lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 101;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 250, 241, 0.42);
  background: rgba(31, 26, 22, 0.72);
  color: #fffaf1;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

/* -----------------------------
   Reveal / interactions
----------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  display: none;
  min-height: 42px;
  padding: 0.5rem 0.8rem;
  background: rgba(31, 26, 22, 0.88);
  color: #fffaf1;
  border: 1px solid rgba(255, 250, 241, 0.22);
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.back-to-top.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.site-footer {
  margin-top: clamp(3rem, 8vw, 7rem);
  padding: 3rem 0;
  background: #1f1a16;
  color: rgba(255, 250, 241, 0.86);
}

.footer-inner {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 0.8rem;
  color: #fffaf1;
}

.site-footer p {
  color: rgba(255, 250, 241, 0.72);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.footer-links a {
  color: rgba(255, 250, 241, 0.82);
  text-decoration: none;
  border: 1px solid rgba(255, 250, 241, 0.18);
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.footer-links a:hover {
  color: #fff;
  border-color: rgba(255, 250, 241, 0.45);
}

.copyright {
  width: min(calc(100% - 2rem), var(--max));
  margin: 2rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 250, 241, 0.16);
  color: rgba(255, 250, 241, 0.58);
  font-family:
    "Hiragino Sans",
    "Yu Gothic",
    "Noto Sans JP",
    sans-serif;
  font-size: 0.82rem;
}

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

@media (max-width: 1040px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-media {
    max-width: 760px;
  }

  .hero-card {
    max-width: 760px;
  }

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

  .book-panel {
    grid-template-columns: 1fr;
  }

  .book-cover {
    max-width: 300px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 15.5px;
  }

  .site-header {
    position: relative;
  }

  .nav {
    min-height: auto;
    padding: 1rem 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 0.3rem;
  }

  .nav-links a {
    min-height: 34px;
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
  }

  .hero {
    padding-top: 4rem;
  }

  .hero h1 {
    font-size: clamp(2.25rem, 13vw, 4.4rem);
  }

  .hero-media img {
    aspect-ratio: 4 / 3;
  }

  .hero-media-caption {
    position: static;
    border: 0;
    border-top: 1px solid var(--line);
    box-shadow: none;
  }

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

  .apology-panel {
    padding: 1.5rem;
  }

  .book-panel {
    padding: 1.25rem;
  }

  .book-cover {
    max-width: 245px;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 420px) {
  .wrap,
  .container,
  .text-wrap,
  .wide-wrap,
  .hero-inner,
  article,
  .grid,
  .timeline,
  .book-panel,
  .apology-panel,
  .footer-inner,
  .copyright {
    width: min(calc(100% - 1.1rem), var(--max));
  }

  .hero-note,
  .card,
  blockquote {
    padding: 1.15rem;
  }

  .domain-cloud {
    gap: 0.45rem;
  }

  .domain-cloud span,
  .chip {
    font-size: 0.78rem;
  }

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

/* -----------------------------
   Print
----------------------------- */

@media print {
  body {
    background: #fff;
    color: #000;
  }

  body::before,
  .site-header,
  .site-footer,
  .button,
  .btn,
  .back-to-top,
  .hero-media,
  .book-cover {
    display: none !important;
  }

  .hero,
  .section {
    padding: 1rem 0;
  }

  .apology-panel,
  .book-panel,
  .card,
  blockquote {
    box-shadow: none;
    border-color: #999;
  }

  a {
    color: #000;
  }
}

/* =========================================================
   Jmail.co.jp — homepage top hero centering fix
   Add to bottom of site.css
   ========================================================= */

.hero#top,
#top.hero {
  text-align: center;
}

.hero#top .hero-inner,
#top.hero .hero-inner {
  align-items: center;
  justify-items: center;
}

.hero#top .hero-text,
#top.hero .hero-text {
  max-width: 760px;
  margin-inline: auto;
}

.hero#top .hero-copy,
#top.hero .hero-copy {
  max-width: 700px;
  margin-inline: auto;
}

.hero#top .hero-note,
#top.hero .hero-note {
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.hero#top .hero-media,
#top.hero .hero-media {
  width: 100%;
  max-width: 620px;
  margin-inline: auto;
}

.hero#top .hero-media-caption,
#top.hero .hero-media-caption {
  text-align: center;
}

/* Mobile: keep it centered and elegant */
@media (max-width: 720px) {
  .hero#top .hero-note,
  #top.hero .hero-note {
    text-align: left;
  }

  .hero#top .hero-media,
  #top.hero .hero-media {
    max-width: 100%;
  }
}
