/* =====================================================================
   v9 — Minimal / figure & ground
   Loaded last on every page. Two jobs:
   1. Corporate: warm paper ground, photos as figure, quieter labels.
   2. ZERO HOUSE: drop the blue field. White ground, blue as the "drawing"
      colour (diagram, numbers, lines), yellow only for inquiry.
   ===================================================================== */
:root {
  --blue: #0073e6;
  --ink: #001627;
  --muted: #50616d;
  --warm: #f7f5f1; /* corporate paper */
  --mist: #f3f6f9; /* ZERO HOUSE field */
  --rule: #e2e6ea;
  --cta: #ebcb3d;
}

/* ---------- shared: a single small label instead of numbered captions ---------- */
.kicker {
  margin: 0 0 18px;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 12px;
  line-height: 1.6;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}
.anchor {
  position: relative;
  top: -100px;
  display: block;
}
.section-heading {
  margin-top: 0;
}

/* ---------- shared: "tap to know more" ---------- */
details.more {
  margin-top: 22px;
  border-top: 1px solid var(--rule);
}
details.more > summary {
  list-style: none;
  cursor: pointer;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--blue);
  padding: 12px 0;
}
details.more > summary::-webkit-details-marker {
  display: none;
}
details.more > summary::after {
  content: "+";
  font-size: 20px;
  line-height: 1;
  transition: transform 0.25s;
}
details.more[open] > summary::after {
  transform: rotate(45deg);
}
details.more > p {
  font-size: 13px;
  line-height: 1.95;
  color: var(--muted);
  margin: 0 0 12px;
}
details.more > p b {
  font-weight: 500;
  color: var(--ink);
}

/* ---------- shared: CTA = yellow, everywhere, nothing else ---------- */
.header-cta[data-cta="inquiry"],
.contact-section .button-primary[data-cta="inquiry"],
.mobile-actionbar > a[data-cta="inquiry"],
.zero-theme .header-cta[data-cta="inquiry"],
.zero-theme .contact-section .button-primary[data-cta="inquiry"],
.zero-theme .mobile-actionbar > a[data-cta="inquiry"] {
  background: var(--cta) !important;
  border-color: var(--cta) !important;
  color: var(--ink) !important;
}
.header-cta[data-cta="inquiry"]:hover,
.contact-section .button-primary[data-cta="inquiry"]:hover,
.mobile-actionbar > a[data-cta="inquiry"]:hover {
  background: #e0bf30 !important;
  border-color: #e0bf30 !important;
}
[data-cta="inquiry"]:focus-visible {
  outline-color: var(--ink) !important;
}

/* =====================================================================
   1. CORPORATE
   ===================================================================== */
.corporate {
  background: #fff;
}
.corporate .hero-title h1 {
  letter-spacing: -0.04em;
}
.corporate .hero-title > p {
  color: var(--muted);
}
.corporate .hero-title .eyebrow {
  color: var(--muted);
  letter-spacing: 0.06em;
}
.corporate .home-hero {
  min-height: 600px;
}
.corporate .home-works {
  padding-top: 110px;
}
.corporate .home-works .section-heading {
  margin-bottom: 48px;
}
.corporate .home-works .section-heading h2,
.corporate .housing .section-heading h2,
.about-head h2 {
  font-size: clamp(28px, 2.8vw, 40px);
  line-height: 1.7;
  letter-spacing: -0.03em;
  margin: 0;
}

/* housing on warm paper */
.corporate .housing {
  background: var(--warm);
}
.corporate .housing .section-heading {
  margin-bottom: 44px;
}
.corporate .home-type {
  background: #fff;
}
.corporate .zero-type {
  background: var(--blue);
}
.corporate .type-caption > span:first-child {
  font-size: 11px;
  letter-spacing: 0.12em;
}

/* about: philosophy + 4 freedoms, all visible on scroll */
.about {
  background: #fff;
  padding-top: 120px;
  padding-bottom: 120px;
}
.about-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8%;
  align-items: end;
}
.about-head .kicker {
  grid-column: 1 / -1;
}
.about-head > p:last-child {
  font-size: 15px;
  line-height: 2.05;
  color: var(--muted);
  margin: 0;
}
.freedom-grid {
  list-style: none;
  padding: 0;
  margin: 64px 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule);
}
.freedom-grid li {
  padding: 34px 28px 10px 0;
  border-right: 1px solid var(--rule);
  margin-right: 28px;
  scroll-margin-top: 120px;
}
.freedom-grid li:last-child {
  border-right: 0;
  margin-right: 0;
}
.freedom-grid svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
  margin-bottom: 22px;
}
.freedom-grid span {
  font:
    11px/1.6 Arial,
    sans-serif;
  letter-spacing: 0.12em;
  color: var(--blue);
}
.freedom-grid h3 {
  font-size: 24px;
  margin: 6px 0 10px;
  letter-spacing: 0.02em;
}
.freedom-grid p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  margin: 0;
}

/* company on warm paper */
.corporate .company-section {
  background: var(--warm);
}
.corporate .company-layout {
  margin-top: 30px;
}
.corporate .company-intro h2 {
  margin-top: 18px;
}
.corporate .company-wordmark {
  font-size: clamp(52px, 5vw, 76px);
}

/* contact: calm white, yellow button is the only colour block */
.contact-section {
  background: #fff;
  border-top: 1px solid var(--rule);
}
.contact-copy h2 {
  font-size: clamp(32px, 3.6vw, 52px) !important;
  letter-spacing: -0.03em;
}
.contact-copy > p:not(.kicker):not(.contact-note) {
  color: var(--muted);
}
.contact-art {
  opacity: 0.1 !important;
}

/* =====================================================================
   2. ZERO HOUSE — white ground, blue as line & number
   ===================================================================== */
.zero-theme {
  --paper: #fff;
  --soft: var(--mist);
  --ink: #001627;
  --line: #d7e0e8;
  --muted: #50616d;
  background: #fff;
  color: var(--ink);
}
.zero-theme .eyebrow,
.zero-theme .section-label span:first-child,
.zero-theme .display-en,
.zero-theme .index-line,
.zero-theme .next-banner > span,
.zero-theme .work-meta > span:first-child,
.zero-theme .site-header nav a span {
  color: var(--blue);
}
.zero-theme .site-header {
  background: rgba(255, 255, 255, 0.94) !important;
  color: var(--ink) !important;
  border-bottom-color: var(--rule) !important;
}
.zero-theme .site-header .service-brand,
.zero-theme .site-footer .service-brand {
  color: var(--blue) !important;
}
.zero-theme .scroll-progress {
  background: var(--blue);
}
.zero-theme .site-header nav {
  background: #fff;
}
.zero-theme .site-header nav .nav-inquiry {
  color: var(--blue) !important;
}
.zero-theme .button-primary {
  background: var(--blue) !important;
  border-color: var(--blue) !important;
  color: #fff !important;
}
.zero-theme .button-primary:hover {
  background: #005fbe !important;
}
.zero-theme .button-outline {
  border-color: var(--blue) !important;
  color: var(--blue) !important;
}
.zero-theme .button-outline:hover {
  background: #edf5ff !important;
}
.zero-theme .work-arrow,
.zero-theme .gallery-link > span {
  background: var(--blue);
  color: #fff;
}
.zero-theme .work-card > p,
.zero-theme .source-note,
.zero-theme .fine-print {
  color: var(--muted) !important;
}
.zero-theme .project-jumps {
  background: rgba(255, 255, 255, 0.96) !important;
  color: var(--ink) !important;
  border-color: var(--rule) !important;
}
.zero-theme .project-jumps a:last-child {
  color: var(--blue) !important;
}
.zero-theme .contact-section {
  background: #fff !important;
  color: var(--ink) !important;
  border-color: var(--rule) !important;
}
.zero-theme .contact-copy .contact-note,
.zero-theme .phone-link > span {
  color: var(--muted) !important;
}
.zero-theme .phone-link > strong {
  color: var(--blue) !important;
}
.zero-theme .phone-link {
  border-color: var(--rule) !important;
}
.zero-theme .contact-art {
  filter: invert(1) sepia(1) saturate(4) hue-rotate(175deg);
  opacity: 0.12 !important;
}
.zero-theme .site-footer {
  background: var(--mist) !important;
  color: var(--ink) !important;
  border-color: var(--rule) !important;
}
.zero-theme .footer-base {
  border-color: var(--rule) !important;
}
.zero-theme .mobile-actionbar {
  background: #fff !important;
  border-color: var(--rule) !important;
}
.zero-theme .mobile-actionbar > a:first-child {
  color: var(--ink) !important;
  border-color: var(--rule) !important;
  background: #fff !important;
}
/* the white line-art becomes blue line-art on a light field */
.zero-theme img[src*="zero-home.webp"] {
  filter: invert(1) sepia(1) saturate(5) hue-rotate(175deg) brightness(0.95);
}

/* ---------- ZERO HOUSE hero: photo is the figure ---------- */
.zh-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  grid-template-areas: "copy photo" "facts photo" "note note";
  gap: 0 6%;
  padding: 40px var(--gutter) 0;
  align-items: start;
}
.zh-copy {
  grid-area: copy;
  padding-top: 40px;
}
.zh-copy h1 {
  font-size: clamp(40px, 4.6vw, 68px);
  line-height: 1.5;
  letter-spacing: -0.045em;
  font-weight: 400;
  margin: 22px 0 22px;
}
.zh-copy > p {
  font-size: 15px;
  line-height: 2;
  color: var(--muted);
  margin: 0;
}
.zh-copy .hero-actions {
  margin-top: 30px;
}
.zh-photo {
  grid-area: photo;
  position: relative;
  display: block;
  border-radius: 4px 4px 4px 72px;
  overflow: hidden;
  height: clamp(460px, 44vw, 660px);
  background: var(--mist);
}
.zh-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
  transition: transform 0.8s cubic-bezier(0.2, 0.65, 0.3, 1);
}
.zh-photo:hover img {
  transform: scale(1.025);
}
.zh-photo-tag {
  position: absolute;
  right: 18px;
  bottom: 18px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-size: 12px;
  padding: 12px 16px;
  border-radius: 99px;
}
.zh-facts {
  grid-area: facts;
  align-self: end;
  margin: 40px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--rule);
}
.zh-facts > div {
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.zh-facts > div:last-child {
  grid-column: 1 / -1;
}
.zh-facts dt {
  font-size: 12px;
  color: var(--muted);
}
.zh-facts dd {
  margin: 4px 0 0;
  font-size: 30px;
  letter-spacing: -0.03em;
  color: var(--blue);
  line-height: 1.4;
}
.zh-facts dd small {
  font-size: 13px;
  margin-left: 8px;
  color: var(--muted);
  letter-spacing: 0;
}
.zh-facts > div:last-child dd {
  font-size: 44px;
}
.zh-note {
  grid-area: note;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin: 26px 0 0;
  padding: 0 0 26px;
  border-bottom: 1px solid var(--rule);
  line-height: 1.8;
}
.zh-note a {
  color: var(--blue);
  white-space: nowrap;
}

/* ---------- ZERO HOUSE sections on light field ---------- */
.zero-theme .living-lab {
  background: var(--mist);
  color: var(--ink);
  padding-top: 110px;
}
.zero-theme .use-tabs {
  background: #fff;
  border-bottom-color: var(--rule);
}
.zero-theme .use-tabs > button {
  color: var(--muted);
}
.zero-theme .use-tabs > button[aria-selected="true"] {
  color: var(--blue);
  background: #fff;
  box-shadow: inset 0 -3px 0 var(--blue);
}
.zero-theme .life-diagram .floor-fill {
  fill: #fff;
}
.zero-theme .life-diagram[data-mode="rent"] .lower {
  fill: var(--blue);
}
.zero-theme .life-diagram[data-mode="together"] .lower {
  fill: #d6e9f9;
}
.zero-theme .life-diagram[data-mode="later"] .lower {
  fill: #eef4fa;
}
.zero-theme .use-tag {
  background: #fff;
}
.zero-theme .service-case-teaser {
  background: #fff;
  color: var(--ink);
  padding-top: 110px;
  padding-bottom: 60px;
}
.teaser-image.is-plan {
  background: var(--mist);
  padding: 28px;
  border-radius: 4px;
}
.teaser-image.is-plan img {
  aspect-ratio: auto !important;
  object-fit: contain !important;
  mix-blend-mode: multiply;
}
.zero-theme .cost-section {
  background: #fff;
  color: var(--ink);
}
.zero-theme .cost-example,
.zero-theme .cost-breakdown,
.zero-theme .cost-breakdown .subtotal,
.zero-theme .cost-equation,
.zero-theme .tax-example {
  border-color: var(--rule) !important;
}
.zero-theme .cost-number,
.zero-theme .cost-equation strong,
.zero-theme .tax-example strong {
  color: var(--blue);
}
.cost-short {
  font-size: 13px !important;
  line-height: 1.95 !important;
  color: var(--muted);
  margin: 0;
}
.zero-theme .cost-conditions {
  margin-top: 26px;
}
.zero-theme .support-section {
  background: var(--mist);
  color: var(--ink);
  padding-top: 110px;
}
.zero-theme .support-main,
.zero-theme .support-lines article {
  border-color: var(--rule) !important;
}
.zero-theme .support-main strong {
  color: var(--blue);
}
.zero-theme .support-main p,
.zero-theme .support-lines p,
.zero-theme .note {
  color: var(--muted);
}
.zero-theme .questions {
  background: #fff;
  color: var(--ink);
  padding-top: 110px;
}
.zero-theme .questions details {
  border-color: var(--rule) !important;
}
.zero-theme .questions details > p {
  color: var(--muted);
}
.zero-theme .questions summary::after {
  color: var(--blue);
}

/* ---------- ZERO HOUSE sub-pages: same light field ---------- */
.zero-theme main > section {
  color: var(--ink);
}
.zero-theme .project-cover,
.zero-theme .plan-paper {
  background: var(--mist);
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1100px) {
  .freedom-grid {
    grid-template-columns: 1fr 1fr;
  }
  .freedom-grid li:nth-child(2) {
    border-right: 0;
    margin-right: 0;
  }
  .freedom-grid li:nth-child(n + 3) {
    border-top: 1px solid var(--rule);
  }
}
@media (max-width: 900px) {
  .about-head {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .zh-hero {
    grid-template-columns: 1fr;
    grid-template-areas: "copy" "photo" "facts" "note";
    padding-top: 20px;
  }
  .zh-copy {
    padding-top: 10px;
    padding-bottom: 28px;
  }
  .zh-photo {
    height: 62vw;
    border-bottom-left-radius: 48px;
  }
  .zh-facts {
    margin-top: 6px;
  }
}
@media (max-width: 600px) {
  .kicker {
    font-size: 12px;
    margin-bottom: 14px;
  }
  .corporate .home-works {
    padding-top: 64px;
  }
  .corporate .home-works .section-heading h2,
  .corporate .housing .section-heading h2,
  .about-head h2 {
    font-size: 26px;
  }
  .about {
    padding-top: 72px;
    padding-bottom: 72px;
  }
  .about-head > p:last-child {
    font-size: 14px;
  }
  .freedom-grid {
    margin-top: 36px;
  }
  .freedom-grid li {
    padding: 24px 14px 20px 0;
    margin-right: 14px;
  }
  .freedom-grid svg {
    width: 34px;
    height: 34px;
    margin-bottom: 14px;
  }
  .freedom-grid h3 {
    font-size: 20px;
  }
  .freedom-grid p {
    font-size: 12px;
    line-height: 1.85;
  }
  .contact-copy h2 {
    font-size: 30px !important;
  }
  .zh-hero {
    padding: 14px var(--gutter) 0;
  }
  .zh-copy h1 {
    font-size: clamp(34px, 10vw, 44px);
    margin: 16px 0;
  }
  .zh-copy > p {
    font-size: 13px;
  }
  .zh-copy > p br {
    display: none;
  }
  .zh-copy .hero-actions {
    margin-top: 22px;
  }
  .zh-photo {
    height: 74vw;
    margin: 0 calc(var(--gutter) * -1) 0 0;
    border-radius: 3px 0 0 44px;
  }
  .zh-facts dd {
    font-size: 24px;
  }
  .zh-facts > div:last-child dd {
    font-size: 36px;
  }
  .zh-note {
    font-size: 11px;
    flex-direction: column;
    gap: 8px;
  }
  .zero-theme .living-lab,
  .zero-theme .service-case-teaser,
  .zero-theme .support-section,
  .zero-theme .questions {
    padding-top: 64px;
  }
  .teaser-image.is-plan {
    padding: 16px;
  }
}
@media (max-width: 360px) {
  .freedom-grid {
    grid-template-columns: 1fr;
  }
  .freedom-grid li {
    border-right: 0 !important;
    margin-right: 0 !important;
    border-top: 1px solid var(--rule);
  }
  .freedom-grid li:first-child {
    border-top: 0;
  }
}

/* ---------- v9.1 ZERO HOUSE 住居費シミュレーション ---------- */
.sim {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.sim-inputs {
  padding: 36px 7% 36px 0;
  display: grid;
  gap: 26px;
  align-content: start;
}
.sim-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 10px 16px;
}
.sim-field label {
  font-size: 14px;
  color: var(--muted);
}
.sim-field output {
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.sim-field input[type="range"] {
  grid-column: 1 / -1;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 28px;
  background: transparent;
  margin: 0;
  cursor: pointer;
}
.sim-field input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue) var(--p, 50%), var(--rule) var(--p, 50%));
}
.sim-field input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--rule);
}
.sim-field input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--blue);
}
.sim-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -10px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
  box-shadow: 0 2px 6px rgba(0, 22, 39, 0.15);
}
.sim-field input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--blue);
}
.sim-field input[type="range"]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
  border-radius: 4px;
}
.sim-reset {
  justify-self: start;
  background: none;
  border: 0;
  padding: 4px 0;
  font: inherit;
  font-size: 13px;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.sim-result {
  border-left: 1px solid var(--rule);
  padding: 36px 0 36px 8%;
}
.sim-label {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}
.sim-number {
  margin: 4px 0 18px;
  font-size: clamp(56px, 6.4vw, 96px);
  line-height: 1.3;
  font-weight: 350;
  letter-spacing: -0.04em;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.sim-number small {
  font-size: 17px;
  letter-spacing: 0;
  margin-left: 10px;
  color: var(--ink);
}
.sim-bar {
  display: flex;
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--rule);
}
.sim-bar span {
  display: block;
  height: 100%;
  transition: width 0.35s ease;
}
.sim-bar-rent { background: var(--blue); }
.sim-bar-self { background: #c9d3dc; }
.sim-legend {
  list-style: none;
  padding: 0;
  margin: 12px 0 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  font-size: 13px;
  color: var(--muted);
}
.sim-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  margin-right: 6px;
  vertical-align: -1px;
}
.sim-legend .is-rent { background: var(--blue); }
.sim-legend .is-self { background: #c9d3dc; }
.sim-legend strong { color: var(--ink); font-weight: 500; }
.sim-points {
  margin: 0;
  border-top: 1px solid var(--rule);
}
.sim-points > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.sim-points dd {
  margin: 0;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.sim-note {
  margin: 18px 0 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.sim-note strong { color: var(--blue); font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
  .sim-bar span { transition: none; }
}
@media (max-width: 900px) {
  .sim { grid-template-columns: 1fr; }
  .sim-inputs { padding: 28px 0; }
  .sim-result {
    border-left: 0;
    border-top: 1px solid var(--rule);
    padding: 28px 0 32px;
    order: -1;
  }
}
.sim-compare {
  margin: 0 0 22px;
  padding: 16px 18px;
  background: var(--mist);
  border-radius: 6px;
  font-size: 15px;
  line-height: 1.8;
}
.sim-compare s {
  color: var(--muted);
  text-decoration-thickness: 1.5px;
}
.sim-compare strong {
  color: var(--blue);
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
