/* =========================================================
   MEN'S CLINIC — LUXURY EDITION
   Black × Antique Gold, editorial photography, formal tone.
   ========================================================= */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* ---------- Tokens ---------- */
:root {
  /* Black/charcoal base */
  --ink:        #0A0A0B;   /* near-black */
  --ink-2:      #131316;
  --ink-3:      #1C1C20;
  --line-d:     rgba(255,255,255,.10);
  --line-d2:    rgba(255,255,255,.06);
  --on-d:       #F4EFE3;
  --on-d-mute:  rgba(244,239,227,.62);
  --on-d-faint: rgba(244,239,227,.38);

  /* Light surface */
  --paper:      #F7F4ED;   /* warm off-white */
  --paper-2:    #EFEAE0;
  --paper-3:    #E5DFD2;
  --line-l:     #D9D2BF;
  --line-l2:    #E8E2D2;
  --on-l:       #16161A;
  --on-l-mute:  #5A554B;

  /* Gold accent (antique) */
  --gold:       #C9A658;
  --gold-2:     #B89148;
  --gold-soft:  #E5CF93;
  --gold-deep:  #8C6B2F;

  /* Type */
  --serif:  "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", "ヒラギノ明朝 ProN", serif;
  --sans:   "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Helvetica Neue", Arial, sans-serif;
  --mono:   "JetBrains Mono", "SF Mono", Menlo, monospace;

  /* Layout */
  --max:    1240px;
  --max-narrow: 920px;
  --radius: 2px;
  --radius-lg: 4px;

  /* Easing */
  --e-out: cubic-bezier(.2,.7,.2,1);

  /* THEME (overridable by Tweaks) */
  --bg-1:   var(--ink);
  --bg-2:   var(--ink-2);
  --bg-3:   var(--ink-3);
  --fg:     var(--on-d);
  --fg-mute: var(--on-d-mute);
  --fg-faint: var(--on-d-faint);
  --line:   var(--line-d);
  --line-2: var(--line-d2);
  --accent: var(--gold);
  --accent-2: var(--gold-2);
  --paper-bg: var(--paper);
  --paper-fg: var(--on-l);
  --paper-fg-mute: var(--on-l-mute);
  --paper-line: var(--line-l);

  /* Font family swap */
  --display: var(--serif);
  --body:    var(--sans);
}

/* Theme variants */
html[data-theme="navy"] {
  --bg-1: #0E1B33;
  --bg-2: #142442;
  --bg-3: #1B2C50;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.05);
}
html[data-theme="white"] {
  --bg-1: var(--paper);
  --bg-2: var(--paper-2);
  --bg-3: var(--paper-3);
  --fg: var(--on-l);
  --fg-mute: var(--on-l-mute);
  --fg-faint: #8a8472;
  --line: var(--line-l);
  --line-2: var(--line-l2);
}

/* Font mode */
html[data-font="gothic"] {
  --display: var(--sans);
}

/* Density */
html[data-density="dense"] body {
  font-size: 14px;
}
html[data-density="dense"] section { padding-top: 64px; padding-bottom: 64px; }

/* ---------- Base ---------- */
body {
  font-family: var(--body);
  color: var(--fg);
  background: var(--bg-1);
  line-height: 1.7;
  font-size: 15px;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.35; letter-spacing: .02em; }

::selection { background: var(--gold); color: #000; }

/* ---------- Reusable ---------- */
.eyebrow {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before {
  content: ""; width: 28px; height: 1px; background: currentColor; opacity: .6;
}
.eyebrow.center::before { display: none; }

.section-title {
  font-family: var(--display);
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .04em;
  color: var(--fg);
}
.section-title .alt { color: var(--accent); font-style: normal; }

.section-sub {
  margin-top: 18px;
  font-size: 14px;
  color: var(--fg-mute);
  line-height: 2;
  max-width: 56ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  padding: 16px 28px;
  font-family: var(--body);
  font-size: 13px; font-weight: 600;
  letter-spacing: .12em;
  border-radius: var(--radius);
  transition: transform .25s var(--e-out), background .25s, color .25s, border-color .25s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn .arrow { transition: transform .3s var(--e-out); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-gold {
  background: var(--accent);
  color: #0A0A0B;
  border: 1px solid var(--accent);
}
.btn-gold:hover { background: var(--accent-2); border-color: var(--accent-2); }

.btn-ghost {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-outline-gold {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline-gold:hover { background: var(--accent); color: #0A0A0B; }

.btn-dark {
  background: var(--ink);
  color: var(--on-d);
  border: 1px solid var(--ink);
}
.btn-dark:hover { background: var(--ink-2); }

/* ---------- Header ---------- */
header.site-header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(10,10,11,.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="white"] header.site-header { background: rgba(247,244,237,.85); }

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 28px;
  height: 76px;
  display: flex; align-items: center;
}

.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-mark {
  width: 38px; height: 38px;
  border: 1px solid var(--accent);
  display: grid; place-items: center;
  font-family: var(--display); font-weight: 700;
  color: var(--accent); font-size: 18px;
  letter-spacing: 0;
}
.brand-text { line-height: 1.1; }
.brand-text .en {
  font-family: var(--display);
  font-size: 15px; font-weight: 700;
  color: var(--fg); letter-spacing: .14em;
}
.brand-text .ja {
  font-size: 9.5px;
  color: var(--fg-faint);
  letter-spacing: .25em;
  margin-top: 4px;
}

.site-nav { display: flex; gap: 6px; margin-left: auto; align-items: center; }
.site-nav a {
  font-size: 12.5px; font-weight: 500;
  color: var(--fg-mute); padding: 10px 14px;
  letter-spacing: .08em;
  position: relative;
  transition: color .2s;
}
.site-nav a:hover, .site-nav a.active { color: var(--fg); }
.site-nav a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px;
  height: 1px; background: var(--accent);
}

.header-cta {
  margin-left: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--accent);
  color: #0A0A0B;
  font-size: 12px; font-weight: 700;
  letter-spacing: .1em;
  border-radius: var(--radius);
  transition: background .2s;
}
.header-cta:hover { background: var(--accent-2); }
.header-cta .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: #0A0A0B;
  position: relative;
}
.header-cta .pulse::after {
  content:""; position:absolute; inset:-4px; border-radius:50%;
  border: 1px solid #0A0A0B; opacity: .4;
  animation: pulse 1.8s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(.6); opacity: .8; }
  100% { transform: scale(1.6); opacity: 0; }
}

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; margin-left: auto; }
.hamburger span { width: 24px; height: 1.5px; background: var(--fg); transition: .3s; }

/* Mobile nav */
.mnav {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg-1);
  display: none; flex-direction: column;
  padding: 90px 32px 40px;
}
.mnav.open { display: flex; }
.mnav a {
  font-family: var(--display);
  font-size: 22px; font-weight: 700;
  color: var(--fg);
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.mnav-close {
  position: absolute; top: 24px; right: 24px;
  color: var(--fg); font-size: 30px; line-height: 1;
}

/* ---------- Page hero (sub pages) ---------- */
.page-hero {
  background: var(--bg-1);
  padding: 64px 28px 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: ""; position: absolute; right: -80px; top: -80px;
  width: 320px; height: 320px;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}
.page-hero::after {
  content: ""; position: absolute; right: 60px; top: 60px;
  width: 180px; height: 180px;
  border: 1px solid var(--accent); opacity: .25;
  border-radius: 50%;
  pointer-events: none;
}
.page-hero-inner { max-width: var(--max); margin: 0 auto; position: relative; z-index: 1; }
.crumb {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: var(--fg-faint);
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 20px;
}
.crumb a:hover { color: var(--accent); }
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--fg);
}
.page-hero .en-title {
  display: block;
  font-family: var(--body);
  font-size: 12px; letter-spacing: .35em;
  color: var(--accent); margin-top: 12px;
}

/* ---------- Hero image (sub pages) ---------- */
.hero-image {
  position: relative;
  max-width: var(--max);
  margin: -28px auto 0;
  padding: 0 28px;
}
.hero-image-inner {
  position: relative;
  height: clamp(280px, 38vw, 460px);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(20,18,16,.45);
}
.hero-image-inner img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 1.4s cubic-bezier(.2,.7,.2,1);
}
.hero-image.reveal.in .hero-image-inner img { transform: scale(1); }
.hero-image-inner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,18,16,0) 40%, rgba(20,18,16,.45) 100%);
  pointer-events: none;
}
.hero-image-tag {
  position: absolute;
  left: 48px; bottom: 32px;
  z-index: 2;
  font-family: var(--body);
  color: rgba(255,255,255,.92);
  letter-spacing: .35em;
  font-size: 11px;
  text-transform: uppercase;
}
.hero-image-tag::before {
  content: ""; display: inline-block;
  width: 28px; height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 14px;
}
@media (max-width: 720px) {
  .hero-image { padding: 0 20px; margin-top: -16px; }
  .hero-image-inner { height: 240px; }
  .hero-image-tag { left: 24px; bottom: 20px; font-size: 10px; }
}

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--ink-2);
  color: var(--on-d-mute);
  border-top: 1px solid var(--line-d);
}
.footer-top {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 28px 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
}
.footer-brand .brand { margin-bottom: 20px; }
.footer-desc { font-size: 12.5px; line-height: 1.9; color: var(--on-d-faint); max-width: 30ch; }
.footer-col h4 {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
  font-weight: 600;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--on-d-mute);
  padding: 5px 0;
  transition: color .2s;
}
.footer-col a:hover { color: var(--on-d); }
.footer-bottom {
  border-top: 1px solid var(--line-d);
  padding: 24px 28px;
  text-align: center;
  font-size: 11px;
  color: var(--on-d-faint);
  letter-spacing: .15em;
}

/* ---------- Reservation modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .25s;
}
.modal-backdrop.open { display: flex; opacity: 1; }
.modal {
  width: 100%; max-width: 720px;
  background: var(--ink-2);
  border: 1px solid var(--line-d);
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  max-height: 90vh; overflow-y: auto;
  color: var(--on-d);
  transform: translateY(12px);
  transition: transform .3s var(--e-out);
}
.modal-backdrop.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 18px; right: 22px;
  font-size: 28px; color: var(--on-d-mute);
  line-height: 1;
}
.modal-close:hover { color: var(--gold); }
.modal h3 {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: .04em;
  margin-bottom: 6px;
  color: var(--on-d);
}
.modal .modal-sub {
  font-size: 12px; color: var(--on-d-faint);
  letter-spacing: .15em; text-transform: uppercase;
  margin-bottom: 28px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-head { font-size: 10px; color: var(--on-d-faint); text-align: center; padding: 8px 0; letter-spacing: .15em; }
.cal-day {
  aspect-ratio: 1.1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 13px;
  color: var(--on-d-mute);
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: all .15s;
  position: relative;
}
.cal-day.empty { cursor: default; }
.cal-day.avail { color: var(--on-d); border-color: var(--line-d); }
.cal-day.avail:hover { border-color: var(--gold); color: var(--gold); }
.cal-day.full { color: var(--on-d-faint); cursor: not-allowed; text-decoration: line-through; }
.cal-day.selected { background: var(--gold); color: #0A0A0B; border-color: var(--gold); }
.cal-day .dot { width: 4px; height: 4px; border-radius: 50%; margin-top: 2px; }
.cal-day.avail .dot { background: var(--gold); }
.cal-day.full .dot { background: rgba(255,255,255,.15); }

.cal-head-bar {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.cal-head-bar .month { font-family: var(--serif); font-size: 18px; letter-spacing: .04em; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 32px; height: 32px;
  border: 1px solid var(--line-d);
  color: var(--on-d-mute);
  display: grid; place-items: center;
  border-radius: 2px;
}
.cal-nav button:hover { color: var(--gold); border-color: var(--gold); }

.time-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 24px; }
.time-slot {
  padding: 10px; border: 1px solid var(--line-d);
  font-size: 12px; color: var(--on-d-mute);
  text-align: center; border-radius: 2px;
  transition: all .15s;
}
.time-slot:hover { border-color: var(--gold); color: var(--gold); }
.time-slot.selected { background: var(--gold); color: #0A0A0B; border-color: var(--gold); }
.time-slot.disabled { opacity: .3; pointer-events: none; }

.modal-form-row { margin-top: 20px; }
.modal-form-row label { display: block; font-size: 11px; letter-spacing: .15em; color: var(--on-d-faint); margin-bottom: 8px; text-transform: uppercase; }
.modal-form-row input, .modal-form-row select {
  width: 100%; background: rgba(255,255,255,.04);
  border: 1px solid var(--line-d);
  color: var(--on-d);
  padding: 12px 14px; border-radius: 2px;
  font-family: var(--body); font-size: 14px;
}
.modal-form-row input:focus, .modal-form-row select:focus { outline: none; border-color: var(--gold); }

.modal-cta {
  margin-top: 28px;
  width: 100%;
  background: var(--gold);
  color: #0A0A0B;
  padding: 16px;
  font-weight: 700; font-size: 13px; letter-spacing: .15em;
  border-radius: 2px;
}
.modal-cta:hover { background: var(--gold-2); }
.modal-cta.disabled { opacity: .35; pointer-events: none; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--e-out), transform .9s var(--e-out); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--e-out), transform .8s var(--e-out); }
.reveal-stagger.in > *:nth-child(1) { transition-delay: .05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: .15s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: .25s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: .35s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: .45s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: .55s; }
.reveal-stagger.in > * { opacity: 0; transform: translateY(20px); }
.reveal-stagger.in > * { opacity: 1; transform: translateY(0); }

/* ---------- Tweaks panel ---------- */
.tweaks-toggle {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  background: var(--ink); color: var(--gold);
  border: 1px solid var(--gold);
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px;
  transition: all .2s;
}
.tweaks-toggle:hover { background: var(--gold); color: var(--ink); }
.tweaks-panel {
  position: fixed; bottom: 84px; right: 24px; z-index: 90;
  width: 280px;
  background: var(--ink-2);
  border: 1px solid var(--line-d);
  border-radius: 4px;
  padding: 20px;
  color: var(--on-d);
  display: none;
  font-family: var(--body);
}
.tweaks-panel.open { display: block; }
.tweaks-panel h4 {
  font-family: var(--body);
  font-size: 11px; letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px; font-weight: 600;
}
.tweak-group { margin-bottom: 16px; }
.tweak-group .lbl {
  display: block; font-size: 10.5px;
  color: var(--on-d-faint); margin-bottom: 8px;
  letter-spacing: .15em; text-transform: uppercase;
}
.tweak-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.tweak-row button {
  padding: 8px 6px;
  font-size: 11px;
  background: transparent;
  border: 1px solid var(--line-d);
  color: var(--on-d-mute);
  letter-spacing: .05em;
  transition: all .15s;
}
.tweak-row button.active {
  background: var(--gold); color: #0A0A0B; border-color: var(--gold);
}
.tweak-row button:hover { border-color: var(--gold); color: var(--gold); }
.tweak-row button.active:hover { color: #0A0A0B; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .site-nav, .header-cta { display: none; }
  .hamburger { display: flex; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 700px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; padding: 56px 24px 32px; }
  .header-inner { padding: 0 20px; height: 64px; }
  .page-hero { padding: 48px 20px 40px; }
  .modal { padding: 28px 20px; }
}
