/* =========================================================
   Miyuu Kawatsu — Portfolio
   和モダン / Japanese-modern design system
   ========================================================= */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: var(--bg);
  line-height: 1.9;
  font-size: 16px;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }

/* ---------- Tokens ---------- */
:root {
  --bg: #f7f4ef;
  --bg-alt: #efe9e0;
  --bg-deep: #efe7db;
  --white: #ffffff;
  --ink: #2a2622;
  --ink-soft: #57504a;
  --muted: #8d857c;
  --sakura: #d68a92;
  --sakura-deep: #c06874;
  --gold: #b39668;
  --line: rgba(42, 38, 34, 0.12);
  --line-soft: rgba(42, 38, 34, 0.07);
  --shadow: 0 24px 60px -30px rgba(70, 45, 40, 0.35);
  --shadow-soft: 0 18px 40px -28px rgba(70, 45, 40, 0.30);

  --font-serif: "Shippori Mincho", "Noto Serif JP", serif;
  --font-sans: "Zen Kaku Gothic New", "Noto Sans JP", -apple-system, sans-serif;
  --font-latin: "Cormorant Garamond", "Shippori Mincho", serif;

  --maxw: 1160px;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --sec-y: clamp(4.5rem, 10vw, 8rem);
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--sec-y); position: relative; }
.section--alt { background: var(--bg-alt); }

/* Section eyebrow + title */
.sec-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.sec-head.center { text-align: center; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-family: var(--font-latin);
  font-size: 1rem;
  letter-spacing: .35em;
  text-transform: uppercase;
  color: var(--sakura-deep);
  font-weight: 600;
  margin: 0 0 1rem;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--sakura);
}
.sec-head.center .eyebrow::after {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--sakura);
}
.sec-title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 4.5vw, 2.9rem);
  line-height: 1.35;
  margin: 0;
  color: var(--ink);
}
.sec-lead {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  /* 最長の1文（約28em）が収まる幅にして折り返しを防ぐ。狭い端末では下のfontが縮小して対応 */
  max-width: 34em;
  /* 画面幅に応じて縮小し、狭い端末でも1文が1行に収まるように（実機のvwに追従） */
  font-size: clamp(0.6rem, 3.0vw, 1.02rem);
  letter-spacing: 0;                 /* 字間ぶんの溢れを防ぎ1行に収める */
}
/* 1文＝1行 */
.sec-lead .s { display: block; }
.sec-head.center .sec-lead { margin-inline: auto; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 84px;
  transition: background .4s ease, height .4s ease, box-shadow .4s ease;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
body.scrolled .site-header {
  height: 66px;
  background: rgba(247, 244, 239, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line-soft);
}

/* While the mobile menu is open, the header must NOT keep any
   backdrop-filter / filter / transform — those turn the header into the
   containing block for the fixed .nav overlay and collapse it into the
   shrunken header box. Neutralize them so the overlay covers the viewport. */
body.nav-open .site-header {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

.brand { display: flex; align-items: baseline; gap: .65rem; line-height: 1; }
.brand__jp {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .12em;
}
.brand__en {
  font-family: var(--font-latin);
  font-size: .8rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav ul { display: flex; align-items: center; gap: clamp(1.2rem, 2.5vw, 2.3rem); }
.nav a {
  position: relative;
  font-size: .92rem;
  letter-spacing: .08em;
  color: var(--ink-soft);
  padding-block: .4rem;
  transition: color .3s ease;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--sakura-deep);
  transition: width .35s ease;
}
.nav a:hover,
.nav a.active { color: var(--ink); }
.nav a:hover::after,
.nav a.active::after { width: 100%; }

.nav__cta {
  margin-left: .6rem;
  padding: .55rem 1.2rem !important;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink) !important;
  transition: background .3s ease, color .3s ease;
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--ink); color: var(--bg) !important; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: none; background: none;
  position: relative;
  z-index: 110;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 10px;
  width: 24px; height: 1.5px;
  background: var(--ink);
  transition: transform .35s ease, opacity .3s ease;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span::after { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-block: 8rem 4rem;
  overflow: hidden;
}
/* Soft ambient glow — reads as light, not an object */
.hero__bg-circle {
  position: absolute;
  top: 50%; right: -2%;
  transform: translateY(-50%);
  width: min(46vw, 600px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%,
    rgba(244, 212, 208, .55),
    rgba(232, 179, 179, .20) 52%,
    transparent 72%);
  filter: blur(8px);
  z-index: 0;
  pointer-events: none;
}
/* 円相（enso）— a quiet, intentional thin ring */
.hero__bg-ring {
  position: absolute;
  top: 50%; right: 7%;
  transform: translateY(-50%);
  width: min(33vw, 400px);
  aspect-ratio: 1;
  border: 1.5px solid var(--sakura);
  border-radius: 50%;
  opacity: .55;
  z-index: 0;
  pointer-events: none;
}
.hero__bg-ring::after {
  content: "";
  position: absolute;
  top: -4px; right: 12%;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--sakura-deep);
  opacity: .7;
}
.hero .container { position: relative; z-index: 2; }
.hero__inner { max-width: 760px; }

.hero__vertical {
  position: absolute;
  top: 50%; left: max(1.2rem, calc((100vw - var(--maxw)) / 2 - 1.8rem));
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  white-space: nowrap;          /* keep it a single, unbroken column */
  font-family: var(--font-serif);
  font-size: .82rem;
  letter-spacing: .32em;
  color: var(--muted);
  z-index: 2;
  padding-top: 2.2rem;
}
.hero__vertical::before {       /* thin accent stroke above the line */
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 1px; height: 1.6rem;
  background: var(--sakura);
  transform: translateX(-50%);
}
@media (max-width: 1100px) { .hero__vertical { display: none; } }

.hero__eyebrow {
  font-family: var(--font-latin);
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--sakura-deep);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 1.4rem;
}
.hero__name {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(2.9rem, 9vw, 5.4rem);
  line-height: 1.1;
  letter-spacing: .06em;
  margin: 0;
}
.hero__name small {
  display: block;
  font-family: var(--font-latin);
  font-size: clamp(1rem, 3vw, 1.5rem);
  letter-spacing: .3em;
  color: var(--muted);
  font-weight: 500;
  margin-top: .8rem;
  text-transform: uppercase;
}
.hero__role {
  margin: 1.8rem 0 0;
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  font-family: var(--font-serif);
  color: var(--ink);
}
.hero__desc {
  margin: 1.2rem 0 0;
  max-width: 52ch;
  color: var(--ink-soft);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.6rem; }

.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-latin);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
  z-index: 2;
}
.hero__scroll::after {
  content: "";
  width: 1px; height: 46px;
  background: linear-gradient(var(--sakura), transparent);
  animation: scrollLine 2.2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(.4); opacity: .4; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .9rem 1.9rem;
  border-radius: 999px;
  font-size: .92rem;
  letter-spacing: .06em;
  border: 1px solid transparent;
  transition: transform .3s ease, background .3s ease, color .3s ease, border-color .3s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn--primary { background: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--sakura-deep); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--bg); }
.btn__arrow { transition: transform .3s ease; }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* ---------- About ---------- */
.about__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.about__figure { position: relative; }
.about__figure img {
  width: 100%;
  border-radius: 6px;
  position: relative;
  z-index: 2;
  box-shadow: var(--shadow);
}
.about__figure::before {
  content: "";
  position: absolute;
  inset: 22px -22px -22px 22px;
  border: 1px solid var(--sakura);
  border-radius: 6px;
  z-index: 1;
}
.about__figure figcaption {
  position: absolute;
  bottom: -14px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: var(--white);
  padding: .5rem 1.4rem;
  border-radius: 999px;
  font-family: var(--font-latin);
  font-size: .78rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink-soft);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
}

.about__title {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 1.4rem;
}
.about__title .accent { color: var(--sakura-deep); }
.about__text p { margin: 0 0 1.2rem; color: var(--ink-soft); }
.about__text p:last-child { margin-bottom: 0; }

.about__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem 2rem;
  margin: 1.8rem 0;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.about__meta li { display: flex; gap: .7rem; font-size: .95rem; }
.about__meta .label { color: var(--muted); min-width: 4.5em; }
.about__meta .value { color: var(--ink); font-weight: 500; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  margin-top: clamp(3rem, 7vw, 4.5rem);
}
.stat { text-align: center; position: relative; }
.stat:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15%; right: 0; height: 70%;
  width: 1px; background: var(--line);
}
.stat__num {
  font-family: var(--font-latin);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.stat__num .suffix { color: var(--sakura-deep); font-size: .55em; margin-left: .1em; }
.stat__label {
  margin-top: .7rem;
  font-size: .82rem;
  letter-spacing: .1em;
  color: var(--muted);
}

/* ---------- Skills ---------- */
.skills__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.2rem, 3vw, 1.8rem);
}
.skill-card {
  background: var(--white);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 1.8rem 1.7rem 2rem;
  transition: transform .4s ease, box-shadow .4s ease;
}
.skill-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.skill-card__head {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.skill-card__icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #f6dcda, #ecc3c3);
  color: var(--sakura-deep);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.skill-card__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
}
.skill-card__title small {
  display: block;
  font-family: var(--font-latin);
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: .15rem;
}
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  font-size: .84rem;
  padding: .4rem .85rem;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-soft);
  border: 1px solid transparent;
  transition: all .3s ease;
}
.chip--top {
  background: transparent;
  border-color: var(--sakura);
  color: var(--sakura-deep);
  font-weight: 500;
}
.chip--top::before { content: "★ "; font-size: .7em; vertical-align: 1px; }
.skills__note {
  margin-top: 1.8rem;
  text-align: center;
  font-size: .84rem;
  color: var(--muted);
}
.skills__note .chip--top {
  display: inline;
  padding: 0;
  margin: 0;
  border: 0;
  font-size: inherit;
}
/* 星は残しつつ、後ろの余白だけを最小限に */
.skills__note .chip--top::before { content: "★"; margin-right: .3em; font-size: .82em; }

/* ---------- Experience (timeline) ---------- */
.timeline {
  position: relative;
  max-width: 860px;
  margin-inline: auto;
  padding-left: 0;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px; top: 6px; bottom: 6px;
  width: 1px;
  background: linear-gradient(var(--sakura), var(--line) 90%);
}
.tl-item {
  position: relative;
  padding: 0 0 2.8rem 2.8rem;
}
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: 2px; top: 8px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--sakura-deep);
}
.tl-item--origin::before { background: var(--sakura-deep); }
.tl-date {
  font-family: var(--font-latin);
  font-size: .92rem;
  letter-spacing: .12em;
  color: var(--sakura-deep);
  font-weight: 600;
}
.tl-period { font-size: .78rem; color: var(--muted); margin-left: .6rem; letter-spacing: .05em; }
.tl-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: .4rem 0 .5rem;
}
.tl-role { font-size: .86rem; color: var(--ink-soft); margin: 0 0 .8rem; }
.tl-role .tag {
  display: inline-block;
  font-size: .74rem;
  padding: .1rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-right: .4rem;
  color: var(--muted);
}
.tl-desc { font-size: .95rem; color: var(--ink-soft); margin: 0 0 .9rem; }
.tl-tech { display: flex; flex-wrap: wrap; gap: .4rem; }
.tl-tech span {
  font-size: .78rem;
  padding: .25rem .7rem;
  border-radius: 4px;
  background: var(--bg-alt);
  color: var(--ink-soft);
}
.section--alt .tl-item::before { background: var(--bg-alt); }
.section--alt .tl-item--origin::before { background: var(--sakura-deep); }
.section--alt .tl-tech span { background: var(--white); }

/* ---------- Education & Certifications ---------- */
.edu__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  max-width: 960px;
  margin-inline: auto;
  align-items: start;
}
.edu__subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 1.6rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: .8rem;
}
.edu__subtitle .en {
  font-family: var(--font-latin);
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--sakura-deep);
  font-weight: 600;
}
.edu-item {
  position: relative;
  padding: 0 0 1.7rem 1.3rem;
  border-left: 1px solid var(--line);
}
.edu-item:last-child { padding-bottom: 0; }
.edu-item::before {
  content: "";
  position: absolute;
  left: -5px; top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--bg-alt);
  border: 1.5px solid var(--sakura-deep);
}
.edu-date {
  font-family: var(--font-latin);
  font-size: .88rem;
  letter-spacing: .1em;
  color: var(--sakura-deep);
  font-weight: 600;
}
.edu-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  margin: .3rem 0 .5rem;
  line-height: 1.6;
}
.edu-note {
  font-size: .9rem;
  color: var(--ink-soft);
  margin: 0;
}
.cert__list {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
}
.cert-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.3rem;
}
.cert-item + .cert-item { border-top: 1px solid var(--line-soft); }
.cert-year {
  font-family: var(--font-latin);
  font-size: .85rem;
  letter-spacing: .08em;
  color: var(--muted);
  flex-shrink: 0;
  min-width: 4.5em;
}
.cert-name { font-size: .95rem; font-weight: 500; }
.cert-name::before {
  content: "❀";
  color: var(--sakura);
  font-size: .8em;
  margin-right: .5em;
}

@media (max-width: 760px) {
  .edu__grid { grid-template-columns: 1fr; gap: 3rem; }
}

/* ---------- Works ---------- */
.works__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.2rem, 3vw, 1.8rem);
}
.work {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 4 / 3;
}
.work img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .7s cubic-bezier(.2,.8,.2,1), opacity .5s ease;
  opacity: .92;
}
.work:hover img { transform: scale(1.08); opacity: .55; }
.work__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(30,22,20,.82) 0%, rgba(30,22,20,.15) 55%, transparent 100%);
  color: #fff;
}
.work__cat {
  font-family: var(--font-latin);
  font-size: .72rem;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: #f2c7c7;
  transform: translateY(8px);
  opacity: 0;
  transition: all .4s ease;
}
.work__title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: .3rem 0 0;
  transform: translateY(8px);
  transition: transform .45s ease .05s;
}
.work__tech {
  font-size: .82rem;
  color: rgba(255,255,255,.8);
  margin: .5rem 0 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all .45s ease .05s;
}
.work:hover .work__cat { opacity: 1; transform: translateY(0); }
.work:hover .work__title { transform: translateY(0); }
.work:hover .work__tech { max-height: 3rem; opacity: 1; }

/* ---------- Contact ---------- */
.contact__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
.contact__intro p { color: var(--ink-soft); margin: 0 0 2rem; }
.contact__list li {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
}
.contact__list li:last-child { border-bottom: 1px solid var(--line); }
.contact__list .ic {
  width: 40px; height: 40px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--sakura);
  color: var(--sakura-deep);
}
.contact__list .k { font-size: .78rem; color: var(--muted); letter-spacing: .1em; }
.contact__list .v { font-weight: 500; }

.form { display: grid; gap: 1.2rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: flex; flex-direction: column; gap: .5rem; }
.field label { font-size: .82rem; letter-spacing: .08em; color: var(--ink-soft); }
.field input,
.field textarea {
  font-family: inherit;
  font-size: .95rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .85rem 1rem;
  transition: border-color .3s ease, box-shadow .3s ease;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--sakura);
  box-shadow: 0 0 0 3px rgba(214, 138, 146, .15);
}
.form__actions { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.form__msg { font-size: .9rem; }
.form__msg.loading { color: var(--muted); display: none; }
.form__msg.error { color: #c0392b; display: none; }
.form__msg.sent { color: #2e7d5b; display: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #d9d0c8;
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer__top {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__brand .brand__jp { color: #fff; }
.footer__brand p { margin: 1rem 0 0; color: #b5aaa0; max-width: 34ch; font-size: .92rem; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 1.4rem; }
.footer__nav a { font-size: .9rem; color: #cfc5bb; transition: color .3s; }
.footer__nav a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.8rem;
  font-size: .8rem;
  color: #9a8f85;
}
.footer__bottom .en { font-family: var(--font-latin); letter-spacing: .2em; }

/* ---------- Scroll top ---------- */
.scroll-top {
  position: fixed;
  right: 1.4rem; bottom: 1.4rem;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all .4s ease;
  z-index: 90;
}
body.scrolled .scroll-top { opacity: 1; visibility: visible; transform: translateY(0); }
.scroll-top:hover { background: var(--sakura-deep); }

/* ---------- Reveal animation ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1);
}
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: .1s; }
[data-reveal-delay="2"] { transition-delay: .2s; }
[data-reveal-delay="3"] { transition-delay: .3s; }
[data-reveal-delay="4"] { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .about__grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .about__figure { max-width: 420px; margin-inline: auto; }
  .contact__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1rem; }
  .stat:nth-child(2)::after { display: none; }
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed;
    inset: 0;
    background: var(--bg);            /* fully opaque — no see-through */
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    visibility: hidden;
    transition: none;                 /* closing: snap shut instantly (no lingering panel) */
    z-index: 105;
  }
  body.nav-open .nav {
    transform: translateY(0);
    visibility: visible;
    transition: transform .45s cubic-bezier(.76, 0, .24, 1);  /* opening: slide in only */
  }
  body.nav-open { overflow: hidden; }  /* lock background scroll while open */
  .nav ul { flex-direction: column; gap: 1.8rem; text-align: center; }
  .nav a { font-size: 1.2rem; font-family: var(--font-serif); }
  .nav__cta { margin-left: 0; }
}

@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .footer__top { flex-direction: column; }
  .about__meta { grid-template-columns: 1fr; }
}
