/* ==========================================================================
   KAIKU PERSONAL GYM — styles
   Dark-only. Black / charcoal ground, single red accent.
   ========================================================================== */

:root {
  --bg: #0a0a0a;
  --surface: #131313;
  --surface-2: #1c1c1c;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #f3f1ee;
  --muted: #9a9793;
  --red: #e0191f;
  --red-deep: #9e0d12;

  --font-en: "Bebas Neue", "Anton", Impact, sans-serif;
  --font-jp: "Noto Sans JP", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --section-y: clamp(120px, 18vw, 240px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-jp);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.9;
  letter-spacing: 0.02em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}

body.is-menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
p,
dl,
dd,
ul,
figure {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

i {
  font-style: normal;
  color: var(--red);
}

em {
  font-style: normal;
  color: var(--red);
}

:focus-visible {
  outline: 1px solid var(--red);
  outline-offset: 6px;
}

/* ---------- Shared typography ---------- */

.eyebrow {
  font-family: var(--font-en);
  font-size: 15px;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

/* Heading line mask: each .line slides up inside a clipped .mask */
.mask {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}

.line {
  display: block;
}

.section {
  padding: var(--section-y) var(--gutter);
}

.section__head {
  margin-bottom: clamp(56px, 8vw, 120px);
}

.section__title {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: clamp(84px, 13vw, 220px);
  line-height: 0.86;
  letter-spacing: 0.005em;
  margin-top: 20px;
}

/* Japanese headline: same mask system, but a Japanese face with room for ascenders */
.section__title--jp {
  font-family: var(--font-jp);
  font-weight: 500;
  font-size: clamp(56px, 7.5vw, 124px);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.section__lead {
  margin-top: 36px;
  max-width: 32em;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 17px);
}

/* ---------- Buttons ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 1.15em 2.2em;
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.08em;
  overflow: hidden;
  isolation: isolate;
  cursor: pointer;
  transition: color 0.6s var(--ease), border-color 0.6s var(--ease);
  -webkit-tap-highlight-color: transparent;
}

/* Sweep fill that wipes across on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s var(--ease-expo);
}

.btn:hover,
.btn:focus-visible {
  color: var(--bg);
  border-color: var(--text);
}

.btn:hover::before,
.btn:focus-visible::before {
  transform: scaleX(1);
}

.btn__label small {
  display: block;
  font-family: var(--font-en);
  font-size: 12px;
  letter-spacing: 0.25em;
  opacity: 0.7;
}

.btn__arrow {
  font-size: 20px;
  transition: transform 0.6s var(--ease-expo);
}

.btn:hover .btn__arrow {
  transform: translateX(8px);
}

.btn--small {
  padding: 0.7em 1.4em;
  font-size: 13px;
}

.btn--magnetic {
  will-change: transform;
}

.text-link {
  position: relative;
  font-family: var(--font-en);
  font-size: 18px;
  letter-spacing: 0.2em;
  padding-bottom: 6px;
}

.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--text);
  transform-origin: right center;
  transition: transform 0.6s var(--ease-expo);
}

.text-link:hover::after {
  transform: scaleX(0);
}

.text-link:hover::after {
  transform-origin: left center;
}

/* ==========================================================================
   Header / navigation
   ========================================================================== */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  transition: padding 0.5s var(--ease), background-color 0.5s var(--ease);
}

.nav.is-scrolled {
  padding-block: 14px;
  background-color: rgba(10, 10, 10, 0.86);
}

.nav__logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  position: relative;
  z-index: 2;
}

.nav__wordmark {
  font-family: var(--font-en);
  font-size: 34px;
  letter-spacing: 0.06em;
}

.nav__sub {
  margin-top: 4px;
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.4em;
  color: var(--muted);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.6vw, 40px);
  margin-left: auto;
  margin-right: 28px;
}

.nav__links a {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 4px 0;
}

.nav__links span {
  font-family: var(--font-en);
  font-size: 17px;
  letter-spacing: 0.12em;
  transition: color 0.4s var(--ease);
}

.nav__links small {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-expo);
}

.nav__links a:hover span {
  color: var(--red);
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

/* Hamburger (mobile only) */
.menu-btn {
  display: none;
  position: relative;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}

.menu-btn__bar {
  position: absolute;
  left: 8px;
  right: 8px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease-expo);
}

.menu-btn__bar:first-child {
  top: 17px;
}

.menu-btn__bar:last-child {
  top: 25px;
}

.is-menu-open .menu-btn__bar:first-child {
  transform: translateY(4px) rotate(45deg);
}

.is-menu-open .menu-btn__bar:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 140px var(--gutter) clamp(40px, 7vh, 80px);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: -10% 0;
  z-index: -2;
  color: rgba(255, 255, 255, 0.14);
  will-change: transform;
}

.hero__art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(0.45);
}

.hero__axis {
  stroke: var(--red);
  stroke-width: 1.2;
}

.hero__veil {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top, var(--bg) 4%, rgba(10, 10, 10, 0.35) 55%, rgba(10, 10, 10, 0.1) 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero__eyebrow {
  margin-bottom: 18px;
}

.hero__title {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: clamp(76px, 15.5vw, 300px);
  line-height: 0.84;
  letter-spacing: 0.005em;
}

.hero__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px 48px;
  margin-top: clamp(32px, 5vh, 60px);
  padding-top: 28px;
  border-top: 1px solid var(--line);
}

.hero__copy {
  font-size: clamp(15px, 1.3vw, 18px);
  line-height: 1.9;
  color: var(--text);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
}

/* ==========================================================================
   Concept — pillars
   ========================================================================== */

.pillars {
  border-top: 1px solid var(--line);
}

.pillar {
  display: grid;
  grid-template-columns: 90px 1fr minmax(0, 1fr);
  align-items: center;
  gap: 24px clamp(24px, 4vw, 64px);
  padding: clamp(32px, 4vw, 56px) 0;
  border-bottom: 1px solid var(--line);
}

.pillar__index {
  font-family: var(--font-en);
  font-size: 18px;
  color: var(--red);
  align-self: start;
  padding-top: 0.6em;
}

.pillar__word {
  font-family: var(--font-en);
  font-size: clamp(56px, 9vw, 150px);
  line-height: 0.9;
  white-space: nowrap;
}

.pillar__desc {
  color: var(--muted);
  font-size: clamp(14px, 1.1vw, 16px);
  max-width: 26em;
}

/* ==========================================================================
   Program — horizontal scroll (desktop) / stacked (mobile)
   ========================================================================== */

.program {
  position: relative;
  background: var(--surface);
}

.program__pin {
  position: relative;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 0 0 clamp(24px, 6vh, 64px);
}

.program__head {
  padding: 0 var(--gutter);
  margin-bottom: clamp(24px, 5vh, 56px);
}

.program__head .section__title--jp {
  font-size: clamp(44px, 5.6vw, 96px);
}

.program__track {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  padding: 0 var(--gutter);
  width: max-content;
}

.panel {
  position: relative;
  flex: 0 0 auto;
  width: clamp(280px, 34vw, 500px);
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 3vw, 44px);
  border: 1px solid var(--line);
  background: var(--bg);
}

.panel__num {
  font-family: var(--font-en);
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--red);
}

.panel__title {
  margin-top: auto;
  font-family: var(--font-en);
  font-weight: 400;
  font-size: clamp(56px, 6vw, 96px);
  line-height: 0.9;
}

.panel__jp {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 500;
}

.panel__text {
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

/* ==========================================================================
   Facility — masked image reveal
   ========================================================================== */

.facility__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: start;
}

.facility__side {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: clamp(0px, 10vw, 180px);
}

.media {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  color: rgba(255, 255, 255, 0.5);
}

.media--tall {
  aspect-ratio: 4 / 5;
}

.media--wide {
  aspect-ratio: 16 / 10;
}

.media__art {
  position: absolute;
  inset: 0;
}

.media__art svg {
  width: 100%;
  height: 100%;
}

.media__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
}

.media__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.7), transparent 45%);
}

.media__art .accent {
  stroke: var(--red);
}

.media__caption {
  position: absolute;
  left: 20px;
  bottom: 16px;
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.25em;
  color: var(--text);
}

.facility__copy {
  max-width: 30em;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 17px);
}

/* ==========================================================================
   Numbers
   ========================================================================== */

.numbers {
  padding-top: 0;
}

.numbers__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.numbers__item {
  padding: clamp(40px, 6vw, 80px) clamp(16px, 2.4vw, 40px);
}

.numbers__item + .numbers__item {
  border-left: 1px solid var(--line);
}

.numbers__value {
  font-family: var(--font-en);
  font-size: clamp(88px, 13vw, 220px);
  line-height: 0.85;
  font-variant-numeric: tabular-nums;
}

.numbers__value span {
  color: var(--red);
}

.numbers__value small {
  font-size: 0.28em;
  letter-spacing: 0.1em;
  margin-left: 0.1em;
  color: var(--muted);
}

.numbers__label {
  margin-top: 28px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-family: var(--font-en);
  line-height: 1.6;
}

/* ==========================================================================
   Membership
   ========================================================================== */

.membership {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  background: var(--surface);
}

.membership__title {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: clamp(72px, 11vw, 190px);
  line-height: 0.86;
  margin-top: -16px;
}

.membership__text {
  max-width: 36em;
  color: var(--muted);
  font-size: clamp(15px, 1.2vw, 17px);
}

/* ==========================================================================
   Access
   ========================================================================== */

.access__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 96px);
  align-items: stretch;
}

.access__map {
  position: relative;
  min-height: 360px;
  border: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.access__map svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.access__map .accent {
  stroke: var(--red);
}

.access__map .pin {
  fill: var(--red);
}

.access__map-label {
  position: absolute;
  left: 20px;
  top: 16px;
  font-family: var(--font-en);
  font-size: 13px;
  letter-spacing: 0.25em;
  color: var(--muted);
}

.access__info {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.access__info > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.access__info dt {
  font-family: var(--font-en);
  font-size: 16px;
  letter-spacing: 0.15em;
  color: var(--red);
  padding-top: 2px;
}

.access__info dd {
  font-size: 15px;
}

/* ==========================================================================
   Contact / form
   ========================================================================== */

.contact {
  padding-bottom: clamp(96px, 12vw, 160px);
}

.contact__title {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: clamp(88px, 14vw, 230px);
  line-height: 0.84;
  margin-bottom: clamp(48px, 7vw, 96px);
}

.form {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 980px;
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.field__label {
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.field__label em {
  color: var(--red);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 0 14px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 16px; /* prevents iOS zoom on focus */
  transition: border-color 0.4s var(--ease);
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.field select option {
  background: var(--surface-2);
  color: var(--text);
}

.field textarea {
  resize: vertical;
  min-height: 110px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--red);
}

.field input:invalid:not(:placeholder-shown) {
  border-bottom-color: var(--red);
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
}

.form__foot .btn {
  cursor: pointer;
  font: inherit;
}

.form__status {
  font-size: 14px;
  color: var(--muted);
}

.form__status.is-error {
  color: var(--red);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
  position: relative;
  padding: clamp(40px, 6vw, 80px) var(--gutter) 32px;
  border-top: 1px solid var(--line);
  overflow: hidden;
}

.footer__mark {
  font-family: var(--font-en);
  font-size: clamp(120px, 34vw, 560px);
  line-height: 0.8;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  color: var(--text);
  margin-bottom: 40px;
}

.footer__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  font-family: var(--font-en);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.footer__row a:hover {
  color: var(--red);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  .nav__links {
    gap: 22px;
    margin-right: 20px;
  }

  .nav__links span {
    font-size: 15px;
  }
}

@media (max-width: 899px) {
  .nav__cta {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  /* Full-screen overlay menu */
  .nav__links {
    position: fixed;
    inset: 0;
    z-index: 1;
    margin: 0;
    padding: 120px var(--gutter) 40px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 26px;
    background: var(--bg);
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.9s var(--ease-expo), visibility 0s linear 0.9s;
  }

  .is-menu-open .nav__links {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path 0.9s var(--ease-expo), visibility 0s;
  }

  .nav__links a {
    flex-direction: row;
    align-items: baseline;
    gap: 14px;
  }

  .nav__links span {
    font-size: clamp(52px, 14vw, 84px);
    line-height: 1;
  }

  .nav__links small {
    font-size: 12px;
  }

  .nav__links a::after {
    display: none;
  }

  .nav__sub {
    display: none;
  }

  .pillar {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .pillar__index {
    padding-top: 0;
  }

  .program__pin {
    height: auto;
    overflow: visible;
    padding: clamp(96px, 16vh, 140px) 0 0;
  }

  .program__track {
    flex-direction: column;
    width: auto;
  }

  .panel {
    width: 100%;
    min-height: 0;
    gap: 0;
  }

  .panel__title {
    margin-top: 40px;
  }

  .facility__grid {
    grid-template-columns: 1fr;
  }

  .facility__side {
    padding-top: 0;
  }

  .numbers__list {
    grid-template-columns: 1fr;
  }

  .numbers__item + .numbers__item {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .access__grid {
    grid-template-columns: 1fr;
  }

  .form__row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .nav__wordmark {
    font-size: 30px;
  }

  .hero {
    padding-top: 120px;
  }

  .hero__foot {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__cta .btn {
    justify-content: space-between;
  }

  .btn {
    justify-content: space-between;
    width: 100%;
  }

  .text-link {
    align-self: center;
  }

  .numbers__item {
    padding-inline: 0;
  }

  .access__info > div {
    grid-template-columns: 96px 1fr;
  }
}

/* ==========================================================================
   Reduced motion: keep everything visible and static
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
