/* The page and illustration share one grid in document coordinates. */
:root {
  --page-grid-size: 24px;
  --page-grid-lines: linear-gradient(to right, rgb(0 86 99 / 0.09) 1px, transparent 1px), linear-gradient(to bottom, rgb(0 86 99 / 0.09) 1px, transparent 1px);
}
body.home-caldera {
  background-color: #ffffff;
  background-image: var(--page-grid-lines);
  background-size: var(--page-grid-size) var(--page-grid-size);
  background-position: 0 0;
  background-blend-mode: normal;
}
.hero--grid-town .hero-abstract-visual { background: #A8E6FA; }
.hero-town-art { display: block; width: 100%; height: 100%; }
.hero--grid-town .hero-abstract-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgb(8 105 132 / 0.13) 1px, transparent 1px), linear-gradient(to bottom, rgb(8 105 132 / 0.13) 1px, transparent 1px);
  background-size: var(--page-grid-size) var(--page-grid-size);
  background-position: var(--town-grid-x, 0px) var(--town-grid-y, 0px);
}
.hero--grid-town .art-clip-defs path { animation: none; }
@media (max-width: 600px) {
  .home-caldera .hero--grid-town .hero-stage--interlock {
    grid-template-rows: auto 312px auto;
    gap: 24px;
    padding: 0;
    min-height: 0;
  }
  .home-caldera .hero--grid-town .hero-abstract-visual {
    position: relative;
    grid-area: 2 / 1;
    inset: auto;
    height: 312px;
    z-index: auto;
    border-radius: 28px;
  }
  .home-caldera .hero--grid-town .hero-heading .hero-region,
  .home-caldera .hero--grid-town .hero-heading .hero-title-line {
    padding: 0;
    background: transparent;
    border-radius: 0;
  }
  .home-caldera .hero--grid-town .hero-heading .hero-region { font-size: 13px; }
  .home-caldera .hero--grid-town .hero-heading .hero-title-ja { font-size: clamp(22px, 6.6vw, 40px); }
  .home-caldera .hero--grid-town .hero-details-copy { padding: 0; background: transparent; }
  .home-caldera .hero--grid-town .hero-details .hero-price-copy { font-size: 13px; }
  .home-caldera .hero--grid-town .hero-details .hero-actions--single .btn { border-color: var(--color-ink); background: transparent; }
  .home-caldera .hero--grid-town .hero-details .hero-actions--single .btn:first-child { border-color: var(--color-primary); background: var(--color-primary); }
}

/* Live copy sits inside the existing interlocking illustration's open area. */
.hero--grid-town .hero-heading .hero-region { font-size: clamp(16px, 1.5vw, 20px); margin-bottom: 12px; }
.hero-subcopy { font-weight: 900; margin-top: 16px; font-size: clamp(15px, 1.4vw, 19px); line-height: 1.6; }
.hero-subcopy > span { display: inline-block; }
@media (min-width: 901px) {
  .hero--grid-town .hero-stage--interlock { grid-template-rows: 300px 120px auto; min-height: 760px; }
  .hero--grid-town .hero-heading .hero-title-ja { font-size: clamp(56px, 6.5vw, 84px); line-height: 1.12; }
}
@media (min-width: 701px) and (max-width: 900px) {
  .hero--grid-town .hero-heading .hero-title-ja { font-size: clamp(50px, 8vw, 72px); }
}
@media (max-width: 700px) {
  .home-caldera .hero--grid-town .hero-heading { text-align: center; }
  .home-caldera .hero--grid-town .hero-heading .hero-region,
  .home-caldera .hero--grid-town .hero-heading .hero-title-line { margin-inline: auto; }
  .home-caldera .hero--grid-town .hero-heading .hero-title-ja { font-size: clamp(32px, 11.8vw, 64px); }
  .hero-subcopy { margin-top: 16px; font-size: 15px; }
}

/* A single, masked copy entrance; the illustration and its grid remain stationary. */
.motion-enabled .hero--grid-town .hero-heading .hero-title-line {
  animation: none;
}
.hero--grid-town .hero-title-line { clip-path: inset(0 -.12em -.12em); }
.hero-title-reveal { display: block; }
.town-copy-enter .hero-title-reveal {
  animation: town-title-rise 850ms cubic-bezier(.22,1,.36,1) 180ms both;
}
.town-copy-enter .hero-title-line:nth-child(2) .hero-title-reveal { animation-delay: 340ms; }
.town-copy-enter .hero-subcopy {
  animation: town-subcopy-rise 650ms cubic-bezier(.22,1,.36,1) 620ms both;
}
@keyframes town-title-rise {
  from { transform: translateY(115%); }
  to { transform: translateY(0); }
}
@keyframes town-subcopy-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero--grid-town .hero-actions--single .ui-arrow {
  transition: transform 300ms cubic-bezier(.22,1,.36,1);
}
@media (hover: hover) and (pointer: fine) {
  .hero--grid-town .hero-actions--single .btn:hover .ui-arrow {
    transform: translate(4px,-4px) rotate(-45deg);
  }
}
.hero--grid-town .hero-actions--single .btn:focus-visible .ui-arrow {
  transform: translate(4px,-4px) rotate(-45deg);
}
@media (prefers-reduced-motion: reduce) {
  .town-copy-enter .hero-title-reveal, .town-copy-enter .hero-subcopy { animation: none; }
  .hero--grid-town .town-drift-layer { transform: none; }
  .hero--grid-town .hero-actions--single .btn .ui-arrow {
    transition: none;
    transform: rotate(-45deg);
  }
}

/* Text-led MV: one clear promise, supporting copy and two direct paths. */
.home-caldera .hero--without-art {
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 112px);
  padding: 0;
}
.home-caldera .hero--without-art .hero-stage--interlock {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding-block: clamp(4.5rem, 11vh, 8.5rem) clamp(3.5rem, 8vh, 6rem);
}
.home-caldera .hero--without-art .hero-heading {
  position: relative;
  width: 100%;
  max-width: none;
  padding: 0;
  text-align: center;
}
.home-caldera .hero--without-art .hero-seo-title {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  margin: 0 0 clamp(1rem, 1.8vw, 1.5rem);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(1.125rem, 1.45vw, 1.375rem);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: .02em;
  color: var(--color-ink);
}
.home-caldera .hero--without-art .hero-seo-title::before {
  width: 1.75rem;
  height: 2px;
  content: '';
  background: var(--color-accent);
}
.home-caldera .hero--without-art .hero-seo-title-copy > span { display: inline; }
.home-caldera .hero--without-art .hero-heading .hero-title-ja {
  margin: 0;
  font-family: 'Anton', sans-serif;
  font-size: clamp(5rem, 15vw, 12.25rem);
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.025em;
  color: var(--color-primary);
  white-space: nowrap;
}
.home-caldera .hero--without-art .hero-title-line {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  background: transparent;
}
.home-caldera .hero--without-art .hero-title-word { display: inline; }
.home-caldera .hero--without-art .hero-message {
  margin-top: clamp(2.5rem, 4vw, 4rem);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(1.5rem, 2.45vw, 2.5rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -.045em;
  color: var(--color-accent);
}
.home-caldera .hero--without-art .hero-subcopy {
  margin-top: clamp(1rem, 1.5vw, 1.375rem);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: clamp(1.125rem, 1.45vw, 1.375rem);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: -.025em;
  color: var(--color-ink);
}
.home-caldera .hero--without-art .hero-subcopy > span { display: inline-block; }
.home-caldera .hero--without-art .hero-actions--single {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  width: min(100%, 38rem);
  margin: clamp(2.75rem, 4.2vw, 3.75rem) auto 0;
}
.home-caldera .hero--without-art .hero-actions--single .btn {
  position: relative;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 3.75rem;
  padding: 1rem 3rem;
  text-align: center;
}
.home-caldera .hero--without-art .hero-actions--single .btn:first-child {
  color: var(--color-on-primary);
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.home-caldera .hero--without-art .hero-actions--single .btn-label {
  display: block;
  width: 100%;
  text-align: center;
}
.home-caldera .hero--without-art .hero-actions--single .ui-arrow {
  position: absolute;
  top: 50%;
  right: 1.25rem;
  margin-top: -.5rem;
}
.home-caldera .hero--without-art .hero-scroll-cue {
  position: relative;
  inset: auto;
  flex: 0 0 4.5rem;
  height: 4.5rem;
  margin: -2.75rem auto 0;
  transform: none;
}
.home-caldera .hero--without-art .hero-scroll-cue__track { top: 1.25rem; }

/* Retain the established copy-rise entrance after removing the illustration script. */
.motion-enabled .hero--without-art .hero-heading .hero-title-line {
  animation: hero-title-enter 850ms cubic-bezier(.22,1,.36,1) 180ms both;
}
.motion-enabled .hero--without-art .hero-message {
  animation: town-subcopy-rise 650ms cubic-bezier(.22,1,.36,1) 440ms both;
}
.motion-enabled .hero--without-art .hero-subcopy {
  animation: town-subcopy-rise 650ms cubic-bezier(.22,1,.36,1) 560ms both;
}
.motion-enabled .hero--without-art .hero-actions--single {
  animation: town-subcopy-rise 650ms cubic-bezier(.22,1,.36,1) 680ms both;
}

@media (min-width: 901px) and (max-height: 850px) {
  .home-caldera .hero--without-art .hero-stage--interlock {
    padding-block: clamp(2rem, 6vh, 3.25rem) clamp(3rem, 6vh, 4.25rem);
  }
  .home-caldera .hero--without-art .hero-heading .hero-title-ja {
    font-size: clamp(4.5rem, 11vw, 10rem);
  }
  .home-caldera .hero--without-art .hero-message { margin-top: clamp(1.75rem, 4vh, 2.5rem); }
  .home-caldera .hero--without-art .hero-actions--single { margin-top: clamp(2rem, 4.5vh, 2.75rem); }
}

@media (max-width: 900px) {
  .home-caldera .hero--without-art {
    min-height: calc(100svh - 104px);
    padding-bottom: 0;
  }
  .home-caldera .hero--without-art .hero-stage--interlock {
    min-height: 0;
    padding: clamp(3.5rem, 10vh, 6rem) 0 clamp(3rem, 8vh, 4.5rem);
  }
  .home-caldera .hero--without-art .hero-heading .hero-title-ja {
    width: min(100%, 8.6ch);
    margin-inline: auto;
    font-size: clamp(4.25rem, 14vw, 7rem);
    line-height: .96;
    white-space: normal;
    text-wrap: balance;
  }
  .home-caldera .hero--without-art .hero-message {
    margin-top: clamp(2.25rem, 6vw, 3rem);
    font-size: clamp(1.25rem, 3.8vw, 1.75rem);
  }
  .home-caldera .hero--without-art .hero-subcopy {
    font-size: clamp(1.125rem, 1.45vw, 1.375rem);
  }
}

@media (max-width: 600px) {
  .home-caldera .home-works-ideas { margin-top: -1.5rem; }
  .home-caldera .hero--without-art {
    min-height: calc(100svh - 100px);
  }
  .home-caldera .hero--without-art .hero-stage--interlock {
    display: flex;
    min-height: 0;
    padding: clamp(.75rem, 2vh, 1rem) 0 clamp(5.5rem, 12vh, 6.5rem);
  }
  .home-caldera .hero--without-art .hero-heading {
    isolation: auto;
    width: 100%;
  }
  .home-caldera .hero--without-art .hero-seo-title {
    display: flex;
    gap: .625rem;
    margin-bottom: 1rem;
    font-size: clamp(.875rem, 4vw, 1rem);
    line-height: 1.55;
    text-align: left;
    text-wrap: balance;
  }
  .home-caldera .hero--without-art .hero-seo-title::before {
    flex: 0 0 1.25rem;
    width: 1.25rem;
  }
  .home-caldera .hero--without-art .hero-seo-title-copy > span { display: block; }
  .home-caldera .hero--without-art .hero-heading .hero-title-ja {
    width: 100%;
    margin: 0;
    font-size: clamp(4.75rem, 23.5vw, 6.75rem);
    line-height: .95;
    text-align: left;
  }
  .home-caldera .hero--without-art .hero-title-word { display: block; }
  .home-caldera .hero--without-art .hero-title-line {
    width: 100%;
    max-width: none;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }
  .home-caldera .hero--without-art .hero-message {
    margin-top: clamp(2rem, 8vw, 2.75rem);
    font-size: clamp(1.125rem, 5.2vw, 1.375rem);
    letter-spacing: -.055em;
    text-align: left;
    white-space: nowrap;
  }
  .home-caldera .hero--without-art .hero-subcopy {
    width: min(100%, 21rem);
    margin: clamp(.875rem, 4vw, 1.25rem) auto 0 0;
    font-size: clamp(.875rem, 4vw, 1rem);
    line-height: 1.7;
    text-align: left;
  }
  .home-caldera .hero--without-art .hero-actions--single {
    gap: .5rem;
    width: 100%;
    margin-top: clamp(2.25rem, 9vw, 3rem);
  }
  .home-caldera .hero--without-art .hero-actions--single .btn {
    min-height: 3.25rem;
    padding: .875rem 2rem .875rem .75rem;
    font-size: clamp(.6875rem, 3.2vw, .8125rem);
  }
  .home-caldera .hero--without-art .hero-actions--single .ui-arrow { right: .875rem; }
  .home-caldera .hero--without-art .hero-scroll-cue {
    position: absolute;
    left: 50%;
    bottom: calc(max(.75rem, env(safe-area-inset-bottom)) + 3.25rem);
    flex-basis: auto;
    height: 4rem;
    margin: 0;
    transform: translateX(-50%);
  }
  .home-caldera .hero--without-art .hero-scroll-cue__track { top: 1rem; }
}

@media (max-width: 600px) and (max-height: 720px) {
  .home-caldera .hero--without-art .hero-stage--interlock {
    align-items: flex-start;
    padding: .5rem 0 5.5rem;
  }
  .home-caldera .hero--without-art .hero-heading .hero-title-ja {
    font-size: clamp(3.75rem, 19.5vw, 4.75rem);
  }
  .home-caldera .hero--without-art .hero-message { margin-top: 1rem; }
  .home-caldera .hero--without-art .hero-subcopy {
    margin-top: .5rem;
    line-height: 1.5;
  }
  .home-caldera .hero--without-art .hero-actions--single { margin-top: 1.25rem; }
  .home-caldera .hero--without-art .hero-actions--single .btn { min-height: 3rem; }
  .home-caldera .hero--without-art .hero-scroll-cue {
    bottom: 2rem;
    height: 2.25rem;
  }
  .home-caldera .hero--without-art .hero-scroll-cue__track {
    top: 0;
    transform: scaleY(.72);
    transform-origin: top;
  }
}

@media (max-width: 359px) and (max-height: 720px) {
  .home-caldera .hero--without-art .hero-heading .hero-title-ja {
    font-size: clamp(3.5rem, 18.5vw, 4rem);
  }
  .home-caldera .hero--without-art .hero-message { margin-top: .75rem; }
  .home-caldera .hero--without-art .hero-actions--single { margin-top: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .motion-enabled .hero--without-art .hero-heading .hero-title-line,
  .motion-enabled .hero--without-art .hero-message,
  .motion-enabled .hero--without-art .hero-subcopy,
  .motion-enabled .hero--without-art .hero-actions--single { animation: none; }
}
