:root {
  --ground: #14100c;
  --ground-raised: #1e170f;
  --ground-card: #221a11;
  --ember: #f0a93a;
  --ember-core: #ffdf9e;
  --ember-dim: #c9873a;
  --bronze: #ab7a45;
  --line: rgba(171, 122, 69, 0.28);
  --ink: #ece3d3;
  --ink-muted: #a89a83;
  --serif: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --sans: "Zen Kaku Gothic New", "Yu Gothic", "YuGothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --measure: 640px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  color: var(--ember-dim);
  margin: 0 0 14px;
  text-transform: uppercase;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  text-wrap: balance;
  letter-spacing: 0.02em;
  margin: 0;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: rgba(20, 16, 12, 0.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  background: #fdf9f0;
  box-shadow: 0 0 10px rgba(240, 169, 58, 0.55);
  flex: none;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-word {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}
.nav-cta {
  font-size: 0.82rem;
  letter-spacing: 0.05em;
  padding: 8px 16px;
  border: 1px solid var(--bronze);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.25s, color 0.25s;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--ember); color: #1a1108; border-color: var(--ember); }

/* ---------- case banner (photo hero variant) ---------- */
.case-banner {
  position: relative;
  height: 48vh;
  min-height: 320px;
  max-height: 520px;
  overflow: hidden;
}
.case-banner > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.case-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 12, 0.1) 0%, rgba(20, 16, 12, 0.55) 62%, rgba(20, 16, 12, 0.94) 100%);
}
.case-back--overlay {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2;
  color: #fff;
  background: rgba(20, 16, 12, 0.45);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 0;
}
.case-back--overlay:hover { background: rgba(20, 16, 12, 0.72); color: var(--ember-core); }
.case-banner-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0 24px 32px;
}
.case-banner-content .wrap { padding: 0; max-width: var(--measure); margin: 0 auto; }
.case-logo {
  width: 56px;
  margin-bottom: 12px;
  filter: invert(1) brightness(1.9);
  opacity: 0.92;
}
.case-number {
  display: inline-block;
  font-family: var(--serif);
  letter-spacing: 0.16em;
  font-size: 0.85rem;
  color: var(--ember-core);
  text-shadow: 0 0 20px rgba(240, 169, 58, 0.6);
  margin-bottom: 10px;
}
.case-banner h1 {
  font-size: clamp(2rem, 7vw, 3.2rem);
  color: #fff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
  margin-bottom: 10px;
}
.case-banner-sub {
  color: rgba(236, 227, 211, 0.85);
  font-size: 0.95rem;
  margin: 0 0 14px;
}
.case-site-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ember-core);
  font-size: 0.88rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 223, 158, 0.4);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}
.case-site-link:hover { color: #fff; border-color: #fff; }

/* ---------- case stats row ---------- */
.case-stat-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 8px 0 0;
}
.case-stat-row .case-stat {
  display: block;
  width: 100%;
  margin-top: 0;
  text-align: center;
}
.case-stat-row .case-stat .num {
  font-size: 1.5rem;
  white-space: nowrap;
}
@media (min-width: 640px) {
  .case-stat-row { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- case gallery ---------- */
.case-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 28px;
}
.case-gallery img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--line);
}
@media (min-width: 640px) {
  .case-gallery { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- case hero ---------- */
.case-hero {
  padding: 72px 0 48px;
  border-bottom: 1px solid var(--line);
}
.case-back {
  display: inline-block;
  margin-bottom: 24px;
  color: var(--ink-muted);
  font-size: 0.85rem;
  text-decoration: none;
}
.case-back:hover { color: var(--ember-core); }
.case-hero .tag {
  display: inline-block;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--ember);
  border: 1px solid var(--ember-dim);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 16px;
}
.case-hero h1 {
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 18px;
}
.case-hero .lead {
  color: var(--ink-muted);
  font-size: 1.02rem;
  max-width: 560px;
}

/* ---------- case body ---------- */
.case-section { padding: 56px 0; }
.case-section + .case-section { border-top: 1px solid var(--line); }
.case-section h2 {
  font-size: clamp(1.3rem, 3.6vw, 1.6rem);
  margin-bottom: 20px;
  color: var(--ink);
}
.case-section p { color: var(--ink-muted); margin: 0 0 16px; }
.case-section p:last-child { margin-bottom: 0; }

.case-stat {
  display: inline-block;
  background: var(--ground-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 28px;
  margin-top: 8px;
}
.case-stat .num {
  display: block;
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--ember-core);
  text-shadow: 0 0 20px rgba(240, 169, 58, 0.4);
}
.case-stat .label {
  display: block;
  margin-top: 4px;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.case-cta {
  text-align: center;
  padding: 64px 0 96px;
}
.case-cta h2 { font-size: clamp(1.4rem, 4vw, 1.9rem); margin-bottom: 16px; }
.case-cta p { color: var(--ink-muted); margin: 0 auto 28px; max-width: 440px; }
.btn-primary {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--ember), var(--ember-dim));
  color: #1a1108;
  box-shadow: 0 8px 24px rgba(240, 169, 58, 0.25);
  transition: transform 0.25s, box-shadow 0.25s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(240, 169, 58, 0.4); }

/* ---------- footer ---------- */
footer {
  padding: 48px 24px 64px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--line);
}
footer .brand { justify-content: center; margin-bottom: 10px; }
footer .tagline { letter-spacing: 0.08em; margin: 6px 0 18px; }

@media (min-width: 780px) {
  .wrap { padding: 0 32px; }
  body { font-size: 17.5px; }
}
