/* ============================================
   Hero Section - Verus Rich Corporation
   "光の扉" (Gate of Light) dark luxury hero
   with staggered reveal and loading animation
   ============================================ */

.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-height));
  background-color: #0a0e1a;
  background-image:
    /* Vignette — darkened edges, eyes drawn to center */
    radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.35) 100%),
    /* Dark zone behind text (readability) */
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.25) 0%, transparent 40%),
    /* Lacquer reflection primary (off-center sheen) */
    radial-gradient(ellipse at 48% 42%, rgba(30, 40, 65, 0.25) 0%, transparent 45%),
    /* Lacquer reflection secondary (subtle lower gleam) */
    radial-gradient(ellipse at 55% 62%, rgba(25, 30, 55, 0.12) 0%, transparent 30%),
    /* Urushi grain noise — micro-texture layer 1 */
    repeating-linear-gradient(37deg, transparent, transparent 2px, rgba(120, 125, 140, 0.02) 2px, rgba(120, 125, 140, 0.02) 3px),
    /* Urushi grain noise — micro-texture layer 2 */
    repeating-linear-gradient(127deg, transparent, transparent 3px, rgba(100, 108, 125, 0.015) 3px, rgba(100, 108, 125, 0.015) 4px),
    /* Urushi grain noise — micro-texture layer 3 */
    repeating-linear-gradient(83deg, transparent, transparent 2px, rgba(110, 115, 130, 0.018) 2px, rgba(110, 115, 130, 0.018) 3px),
    /* Central ambient glow */
    radial-gradient(ellipse at 50% 55%, rgba(201, 169, 110, 0.06) 0%, transparent 50%);
}

/* ---- Background layers ---- */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Background pseudo-elements removed — gradients now in .hero */
.hero__bg::before,
.hero__bg::after {
  display: none;
}

/* Hide bg-image for new dark hero (kept for noscript fallback) */
.hero__bg-image {
  display: none;
}

/* ---- Particle canvas (hero section only) ---- */
.hero__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

/* ---- Warm glow (same as loading overlay) ---- */
.hero__glow {
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background:
    radial-gradient(ellipse, rgba(255, 190, 80, 0.12) 0%, rgba(255, 150, 50, 0.04) 35%, transparent 65%);
  pointer-events: none;
  z-index: 1;
}

/* ---- "光の扉" Gate of Light ---- */
.hero__gate {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 70vh;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}

/* Gate vertical light line */
.hero__gate::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(197, 160, 89, 0.15) 15%,
    rgba(197, 160, 89, 0.4) 50%,
    rgba(197, 160, 89, 0.15) 85%,
    transparent 100%
  );
}

/* Gate horizontal glow spread */
.hero__gate::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 100%;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(197, 160, 89, 0.08) 0%,
    rgba(197, 160, 89, 0.03) 30%,
    transparent 70%
  );
}

/* Gate reveal animation */
.hero.is-loaded .hero__gate {
  animation: gateReveal 2.0s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes gateReveal {
  0% {
    opacity: 0;
    height: 0;
  }
  40% {
    opacity: 1;
    height: 70vh;
  }
  100% {
    opacity: 1;
    height: 70vh;
  }
}

/* ---- Overlay (simplified for dark hero) ---- */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Grid lines removed */
.hero__overlay::before {
  display: none;
}

/* Removed radial accent (using gate glow instead) */
.hero__overlay::after {
  display: none;
}

/* ---- Content container ---- */
.hero__content {
  text-align: center;
  color: var(--color-cream);
  padding: 0 var(--container-padding);
  max-width: 1100px;
  position: relative;
  z-index: 2;
}

/* ---- English tagline (display font) ---- */
.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(12px, 1.2vw, 16px);
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: var(--spacing-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
}

.hero__tagline::before,
.hero__tagline::after {
  content: '';
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #F5D740);
  opacity: 0.5;
}

.hero__tagline::after {
  background: linear-gradient(90deg, #F5D740, transparent);
}

/* Hide mobile-only line break on desktop */
.hero__catchcopy-br {
  display: none;
}

/* ---- Main catchcopy (white fill + gold 3D shadow) ---- */
.hero__catchcopy {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4.8vw, 68px);
  font-weight: 900;
  line-height: 1.5;
  margin-bottom: var(--spacing-lg);
  letter-spacing: 0.06em;
  white-space: nowrap;
  /* Japanese proportional metrics — trims extra space around punctuation like 。× */
  font-feature-settings: "palt" 1;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.7);
  paint-order: stroke fill;
  text-shadow:
    /* Black outline reinforcement (8-direction for solid edges) */
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    -2px 0 0 #000,
    2px 0 0 #000,
    0 -2px 0 #000,
    0 2px 0 #000,
    /* Bevel highlight (top-left light source, strengthened) */
    -2px -3px 3px #FFFDF0,
    0 -4px 8px rgba(255, 253, 240, 0.6),
    -1px -1px 1px rgba(255, 253, 240, 0.9),
    /* 3D extrusion depth (gold tones, 6 steps for deeper relief) */
    2px 2px 0 #B08E20,
    3px 3px 0 #9A7A18,
    4px 4px 0 #7A5C10,
    5px 5px 0 #5C4408,
    6px 6px 0 #3E2E04,
    7px 7px 0 #2A1E02,
    /* Deep drop shadow */
    8px 8px 8px rgba(0, 0, 0, 0.75),
    10px 12px 24px rgba(0, 0, 0, 0.6),
    /* Triple gold glow for maximum impact */
    0 0 25px rgba(245, 215, 64, 0.55),
    0 0 50px rgba(245, 215, 64, 0.3),
    0 0 90px rgba(197, 160, 89, 0.2);
  opacity: 0;
  /* Visual recentering: 匠 (1.85em) sits at position 11/15 in the phrase,
     which creates right-heavy visual weight. Shift left to optically balance. */
  transform: translate(-0.7em, 30px);
  will-change: transform, opacity;
}

/* "匠" accent — dramatically large (white fill + enhanced gold shadow) */
.hero__catchcopy-accent {
  font-size: 1.85em;
  -webkit-text-fill-color: #ffffff;
  -webkit-text-stroke: 2px rgba(0, 0, 0, 0.75);
  text-shadow:
    /* Black outline reinforcement */
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    -2px 0 0 #000,
    2px 0 0 #000,
    0 -2px 0 #000,
    0 2px 0 #000,
    0 0 3px #000,
    /* Bevel highlight (stronger) */
    -2px -3px 3px #FFFDF0,
    0 -5px 10px rgba(255, 253, 240, 0.7),
    -1px -2px 2px rgba(255, 253, 240, 0.95),
    /* Deep 3D extrusion (7 steps for dramatic relief) */
    2px 2px 0 #C29A24,
    3px 3px 0 #A8841C,
    4px 4px 0 #8A6E14,
    5px 5px 0 #6C560E,
    6px 6px 0 #4E3E08,
    7px 7px 0 #362A04,
    8px 8px 0 #241C02,
    /* Heavy drop shadow */
    9px 9px 10px rgba(0, 0, 0, 0.8),
    11px 13px 24px rgba(0, 0, 0, 0.6),
    /* Quadruple gold glow */
    0 0 35px rgba(245, 215, 64, 0.65),
    0 0 70px rgba(245, 215, 64, 0.35),
    0 0 110px rgba(197, 160, 89, 0.25);
  margin: 0 -0.02em;
}

/* ---- Gold accent line under catchcopy ---- */
.hero__accent-line {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #1F8A70, transparent);
  margin: 0 auto var(--spacing-xl);
  opacity: 0;
  will-change: opacity;
}

/* ---- Subcopy (mission statement) ---- */
.hero__subcopy {
  font-family: var(--font-serif);
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: var(--font-weight-medium);
  color: rgba(240, 236, 228, 0.85);
  margin-bottom: var(--spacing-2xl);
  line-height: 2;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateY(20px);
  will-change: transform, opacity;
}

/* ---- Buttons ---- */
.hero__buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
  opacity: 0;
  will-change: opacity;
}

/* Gold outline button variant for dark hero */
.hero__buttons .btn--outline-white {
  border-color: rgba(197, 160, 89, 0.4);
  color: var(--color-accent);
}

.hero__buttons .btn--outline-white:hover {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-dark);
}

/* ---- Craftsman photos (semi-transparent, decorative) ---- */
.hero__craftsman {
  position: absolute;
  width: 45%;
  max-width: 560px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
}

/* Top-left: children looking in */
.hero__craftsman--tl {
  top: 0;
  left: 0;
}

/* Top-right: craftsman at work */
.hero__craftsman--tr {
  top: 0;
  right: 0;
}

/* Bottom-left: team celebration */
.hero__craftsman--bl {
  bottom: 0;
  left: 0;
}

.hero__craftsman-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0.4;
}

/* Top-left: fade down + fade from right */
.hero__craftsman--tl .hero__craftsman-img {
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
                      linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
              linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  mask-composite: intersect;
}

/* Top-right: fade down + fade from left */
.hero__craftsman--tr .hero__craftsman-img {
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
                      linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
              linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  mask-composite: intersect;
}

/* Bottom-left: fade up + fade from right */
.hero__craftsman--bl .hero__craftsman-img {
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
                      linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
              linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  mask-composite: intersect;
}

/* Bottom-right: senior craftsman */
.hero__craftsman--br {
  bottom: 0;
  right: 0;
}

/* Bottom-right: fade up + fade from left */
.hero__craftsman--br .hero__craftsman-img {
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
                      linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
              linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  mask-composite: intersect;
}

/* ---- Hero news ticker (bottom-right) ---- */
.hero__news {
  position: absolute;
  bottom: 40px;
  right: 24px;
  z-index: 3;
  background: rgba(10, 14, 26, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(197, 160, 89, 0.15);
  border-radius: 8px;
  padding: 16px 20px;
  max-width: 340px;
  opacity: 0;
  will-change: opacity;
}

.hero__news-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.hero__news-label {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent-light);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero__news-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero__news-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.hero__news-date {
  font-family: var(--font-english);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: rgba(240, 236, 228, 0.45);
  flex-shrink: 0;
  letter-spacing: 0.05em;
  min-width: 72px;
}

.hero__news-title {
  font-size: 12px;
  color: rgba(240, 236, 228, 0.75);
  line-height: 1.5;
  transition: color var(--transition-fast);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero__news-title:hover {
  color: #F5D740;
}

.hero__news-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(197, 160, 89, 0.6);
  letter-spacing: 0.1em;
  transition: color var(--transition-fast);
}

.hero__news-more:hover {
  color: #F5D740;
}

/* ---- Hero reveal animations (triggered after loading) ---- */
.hero.is-loaded .hero__tagline {
  animation: heroReveal 0.8s ease-out 0.3s forwards;
}

.hero.is-loaded .hero__catchcopy {
  animation: heroRevealCatchcopy 1.0s ease-out 0.6s forwards;
}

.hero.is-loaded .hero__accent-line {
  animation: heroReveal 0.8s ease-out 0.9s forwards;
}

.hero.is-loaded .hero__subcopy {
  animation: heroReveal 0.8s ease-out 1.1s forwards;
}

.hero.is-loaded .hero__buttons {
  animation: heroReveal 0.6s ease-out 1.4s forwards;
}

.hero.is-loaded .hero__craftsman {
  animation: heroReveal 1.5s ease-out 1.0s forwards;
}

.hero.is-loaded .hero__news {
  animation: heroReveal 0.8s ease-out 1.6s forwards;
}

.hero.is-loaded .hero__scroll-down {
  animation: heroRevealScroll 0.8s ease-out 1.8s forwards;
}

@keyframes heroReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroRevealCatchcopy {
  to {
    opacity: 1;
    transform: translate(-0.7em, 0);
  }
}

/* Scroll indicator needs its own keyframe to preserve translateX(-50%) centering */
@keyframes heroRevealScroll {
  to {
    opacity: 1;
    transform: translateX(-50%);
  }
}


/* ---- Scroll Down Indicator ---- */
.hero__scroll-down {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-sm);
  color: rgba(240, 236, 228, 0.4);
  font-family: var(--font-english);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0;
  z-index: 2;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(197, 160, 89, 0.5), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% {
    transform: scaleY(0);
    transform-origin: top;
  }
  50% {
    transform: scaleY(1);
    transform-origin: top;
  }
  51% {
    transform-origin: bottom;
  }
  100% {
    transform: scaleY(0);
    transform-origin: bottom;
  }
}

/* ---- Loading Overlay ---- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background-color: #0a0e1a;
  background-image:
    /* Vignette — darkened edges, eyes drawn to center (漆器の視線誘導) */
    radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.35) 100%),
    /* Dark zone behind text (readability) — reduced spread */
    radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.25) 0%, transparent 40%),
    /* Lacquer reflection primary (漆面の光沢 — off-center sheen) */
    radial-gradient(ellipse at 48% 42%, rgba(30, 40, 65, 0.25) 0%, transparent 45%),
    /* Lacquer reflection secondary (subtle lower gleam) */
    radial-gradient(ellipse at 55% 62%, rgba(25, 30, 55, 0.12) 0%, transparent 30%),
    /* Urushi grain noise — micro-texture layer 1 */
    repeating-linear-gradient(
      37deg,
      transparent,
      transparent 2px,
      rgba(120, 125, 140, 0.02) 2px,
      rgba(120, 125, 140, 0.02) 3px
    ),
    /* Urushi grain noise — micro-texture layer 2 */
    repeating-linear-gradient(
      127deg,
      transparent,
      transparent 3px,
      rgba(100, 108, 125, 0.015) 3px,
      rgba(100, 108, 125, 0.015) 4px
    ),
    /* Urushi grain noise — micro-texture layer 3 */
    repeating-linear-gradient(
      83deg,
      transparent,
      transparent 2px,
      rgba(110, 115, 130, 0.018) 2px,
      rgba(110, 115, 130, 0.018) 3px
    ),
    /* Central ambient glow (金蒔絵の温かみ) */
    radial-gradient(ellipse at 50% 55%, rgba(201, 169, 110, 0.06) 0%, transparent 50%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: opacity, filter;
}


/* Particle canvas layer */
.loading-overlay__particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Warm light source (lens flare glow) */
.loading-overlay__glow {
  position: absolute;
  bottom: 25%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background:
    radial-gradient(ellipse, rgba(255, 190, 80, 0.12) 0%, rgba(255, 150, 50, 0.04) 35%, transparent 65%);
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 1.2s ease-out;
}

.loading-overlay__glow.is-active {
  opacity: 1;
}

/* ---- Loading Overlay Craftsman Photos (four corners) ---- */
.loading-overlay__craftsman {
  position: absolute;
  width: 45%;
  max-width: 560px;
  z-index: 2;
  pointer-events: none;
}

.loading-overlay__craftsman--tl { top: 0; left: 0; }
.loading-overlay__craftsman--tr { top: 0; right: 0; }
.loading-overlay__craftsman--bl { bottom: 0; left: 0; }
.loading-overlay__craftsman--br { bottom: 0; right: 0; }

.loading-overlay__craftsman-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  opacity: 0.4;
}

/* Top-left: fade down + fade from right */
.loading-overlay__craftsman--tl .loading-overlay__craftsman-img {
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
                      linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
              linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  mask-composite: intersect;
}

/* Top-right: fade down + fade from left */
.loading-overlay__craftsman--tr .loading-overlay__craftsman-img {
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
                      linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
              linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  mask-composite: intersect;
}

/* Bottom-left: fade up + fade from right */
.loading-overlay__craftsman--bl .loading-overlay__craftsman-img {
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
                      linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
              linear-gradient(to left, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  mask-composite: intersect;
}

/* Bottom-right: fade up + fade from left */
.loading-overlay__craftsman--br .loading-overlay__craftsman-img {
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
                      linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 50%, transparent 100%),
              linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 30%, rgba(0,0,0,0.6) 100%);
  mask-composite: intersect;
}

/* Content (above particles and glow) */
.loading-overlay__content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
  position: relative;
  z-index: 4;
}

.loading-overlay__logo {
  height: 44px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0;
  animation: loadingLogoIn 0.8s ease-out 0.2s forwards;
  will-change: opacity;
}

/* ---- Typewriter text ---- */
.loading-overlay__typewriter {
  font-family: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', 'YuMincho', serif;
  font-size: clamp(28px, 7vw, 72px);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #E8D080;
  min-height: 1.6em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  max-width: 100%;
  padding: 0 var(--spacing-md);
  position: relative;
  opacity: 0;
  transition: opacity 0.4s ease-out;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.loading-overlay__typewriter.is-typing,
.loading-overlay__typewriter.is-done {
  opacity: 1;
}

/* Individual character spans — white fill + gold 3D shadow (matches hero catchcopy) */
/* Line break marker — hidden on desktop, triggers flex line wrap on mobile */
.tw-break {
  display: none;
}

.tw-char {
  display: inline-block;
  background: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  -webkit-text-stroke: 1px rgba(0, 0, 0, 0.6);
  paint-order: stroke fill;
  text-shadow:
    /* Black outline reinforcement */
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    /* Bevel highlight (top-left light source) */
    -2px -2px 2px #FFFDF0,
    0 -3px 5px rgba(255, 253, 240, 0.45),
    /* 3D extrusion depth (gold tones) */
    2px 2px 0 #9A7A18,
    3px 3px 0 #7A5C10,
    4px 4px 0 #5C4408,
    5px 5px 0 #3E2E04,
    /* Deep drop shadow */
    6px 6px 6px rgba(0, 0, 0, 0.7),
    6px 8px 16px rgba(0, 0, 0, 0.5),
    /* Gold glow */
    0 0 20px rgba(197, 160, 89, 0.4);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* 「匠」 — visual center, dramatically large */
.tw-char--xl {
  font-size: 1.8em;
  background: none;
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.65);
  text-shadow:
    /* Black outline reinforcement */
    -1px -1px 0 #000,
    1px -1px 0 #000,
    -1px 1px 0 #000,
    1px 1px 0 #000,
    0 0 2px #000,
    /* Bevel highlight */
    -2px -3px 3px #FFFDF0,
    0 -4px 8px rgba(255, 253, 240, 0.55),
    /* Deep 3D extrusion (gold tones) */
    2px 2px 0 #B08E20,
    3px 3px 0 #8A6E14,
    4px 4px 0 #6A520C,
    5px 5px 0 #4E3A06,
    6px 6px 0 #362802,
    /* Heavy drop shadow */
    7px 7px 8px rgba(0, 0, 0, 0.7),
    8px 10px 20px rgba(0, 0, 0, 0.5),
    /* Double gold glow */
    0 0 30px rgba(197, 160, 89, 0.5),
    0 0 60px rgba(197, 160, 89, 0.2);
  margin: 0 -0.02em;
}

/* 「AI」— secondary emphasis (size only, inherits .tw-char styling) */
.tw-char--lg {
  font-size: 1.3em;
}

/* Blinking cursor */
.loading-overlay__typewriter.is-typing::after {
  content: '';
  display: inline-block;
  width: 3px;
  height: 0.7em;
  background-color: #F5D860;
  margin-left: 4px;
  vertical-align: middle;
  animation: cursorBlink 0.7s step-end infinite;
}

/* Hide cursor after typing completes */
.loading-overlay__typewriter.is-done::after {
  animation: none;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

@keyframes cursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Decorative line (appears below text on completion) */
.loading-overlay__line {
  width: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #1F8A70, transparent);
  margin-top: 8px;
  transition: width 0.6s ease-out, opacity 0.6s ease-out;
  opacity: 0;
}

.loading-overlay__line.is-visible {
  width: 80px;
  opacity: 1;
}

@keyframes loadingLogoIn {
  to {
    opacity: 1;
  }
}

/* ---- Exit animation ---- */
.loading-overlay.is-hidden {
  animation: loadingBlurFade 1.0s ease-in forwards;
}

@keyframes loadingBlurFade {
  to {
    opacity: 0;
    filter: blur(20px);
  }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .hero__gate {
    opacity: 1;
    will-change: auto;
  }

  .hero__tagline,
  .hero__accent-line,
  .hero__subcopy,
  .hero__buttons,
  .hero__scroll-down,
  .hero__craftsman,
  .hero__news {
    opacity: 1;
    transform: none;
    animation: none;
    will-change: auto;
  }

  .hero__catchcopy {
    opacity: 1;
    transform: translateX(-0.7em);
    animation: none;
    will-change: auto;
  }

  .hero.is-loaded .hero__gate,
  .hero.is-loaded .hero__tagline,
  .hero.is-loaded .hero__catchcopy,
  .hero.is-loaded .hero__accent-line,
  .hero.is-loaded .hero__subcopy,
  .hero.is-loaded .hero__buttons,
  .hero.is-loaded .hero__craftsman,
  .hero.is-loaded .hero__news,
  .hero.is-loaded .hero__scroll-down {
    animation: none;
  }

  .hero__scroll-line {
    animation: none;
  }

  .hero__particles {
    display: none;
  }

  .loading-overlay {
    display: none;
  }

  .loading-overlay__logo {
    animation: none;
  }
}
