/* ─────────────────────────────────────────────────────────────────────────
   Kyoto Ladies Open — Design tokens + base styles
   "Poised Luminescence" / Kyoto Blush & Silk
   Ported from mock/styles.css for the WordPress theme.
   ───────────────────────────────────────────────────────────────────────── */

:root {
  /* Palette (overridden per-request by inc/customizer.php based on the
     Customizer palette choice) */
  --surface: #fdf8fa;
  --surface-container: #f5e9ef;
  --surface-container-low: #faf1f5;
  --surface-container-high: #efe0e8;
  --surface-container-lowest: #ffffff;
  --on-surface: #1b1c1c;
  --on-surface-variant: #57414c;
  --outline: #96637c;
  --outline-variant: #eac2d4;

  --primary: #8E1550;
  --kyoto-blush: #C42A6E;
  --miyabi-rose: #E05A9B;
  --sakura-mist: #F9D3E3;
  --nude-silk: #F3BCD3;
  --sumi-ink: #333333;
  --paper-white: #ffffff;

  /* Typography */
  --font-serif: "EB Garamond", "Cormorant Garamond", "Noto Serif JP", serif;
  --font-sans: "Metropolis", "Manrope", "Inter", -apple-system, sans-serif;
  --font-jp: "Shippori Mincho", "Noto Serif JP", "Yu Mincho", serif;
  --font-jp-sans: "Noto Sans JP", "Yu Gothic", sans-serif;

  /* Scale (default — overridable via Customizer) */
  --scale: 1;
  --fs-display: calc(72px * var(--scale));
  --fs-display-sm: calc(56px * var(--scale));
  --fs-headline-lg: calc(40px * var(--scale));
  --fs-headline-md: calc(28px * var(--scale));
  --fs-body-lg: 18px;
  --fs-body: 16px;
  --fs-caption: 14px;
  --fs-label: 11px;

  /* Spacing */
  --gutter: 24px;
  --margin-desktop: 80px;
  --margin-mobile: 24px;
  --section-gap: 120px;

  /* Radius */
  --r-sm: 2px;
  --r: 4px;
  --r-md: 6px;
  --r-lg: 8px;
  --r-xl: 12px;

  /* Side-nav width */
  --nav-w: 240px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; height: auto; display: block; }

/* ─── Type utilities ─────────────────────────────────────────────────────── */

.serif { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.01em; }
.serif-it { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.jp-serif { font-family: var(--font-jp); font-weight: 500; }
.sans { font-family: var(--font-sans); }
.jp-sans { font-family: var(--font-jp-sans); }

.t-display {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: 0.95;
  letter-spacing: -0.025em;
}
.t-headline {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-headline-lg);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.t-subhead {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--fs-headline-md);
  line-height: 1.25;
}
.t-body { font-size: var(--fs-body); line-height: 1.65; color: var(--on-surface); }
.t-body-lg { font-size: var(--fs-body-lg); line-height: 1.55; }
.t-caption { font-size: var(--fs-caption); color: var(--on-surface-variant); }

.eyebrow,
.t-label {
  font-family: var(--font-sans);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */

#app {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}

.main {
  min-width: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--margin-desktop);
  width: 100%;
}

.section {
  padding: clamp(64px, 12vw, 140px) 0;
}

.section-tight { padding: 64px 0; }

.divider {
  height: 1px;
  background: var(--outline-variant);
  opacity: 0.6;
  margin: 0;
}

/* ─── Side nav ───────────────────────────────────────────────────────────── */

.sidenav {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--outline-variant);
  padding: 32px 24px 32px 32px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg,
    rgba(255,255,255,0.65) 0%,
    rgba(244,209,205,0.18) 100%);
  backdrop-filter: blur(12px);
  z-index: 50;
}

.sidenav-logo {
  display: block;
  margin-bottom: 56px;
}
.sidenav-logo .mark {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 36px;
  line-height: 1;
  color: var(--kyoto-blush);
  letter-spacing: -0.02em;
}
.sidenav-logo .sub {
  margin-top: 10px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}
.sidenav-logo .jp {
  margin-top: 4px;
  font-family: var(--font-jp);
  font-size: 13px;
  color: var(--on-surface);
  letter-spacing: 0.1em;
}

.sidenav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex: 1;
}
.sidenav-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 0;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--on-surface);
  cursor: pointer;
  position: relative;
  transition: color .25s ease;
}
.sidenav-item .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 11px;
  color: var(--outline);
  width: 18px;
  flex-shrink: 0;
}
.sidenav-item .jp {
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.sidenav-item .en {
  display: block;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-top: 2px;
}
.sidenav-item .text { flex: 1; }
.sidenav-item:hover { color: var(--kyoto-blush); }
.sidenav-item:hover .num { color: var(--kyoto-blush); }
.sidenav-item.active { color: var(--kyoto-blush); }
.sidenav-item.active .num { color: var(--kyoto-blush); }
.sidenav-item.active::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 50%;
  width: 18px;
  height: 1px;
  background: var(--kyoto-blush);
  transform: translateY(-50%);
}

.sidenav-foot {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidenav-foot .yr {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--on-surface);
}

/* ─── Mobile top-nav ─────────────────────────────────────────────────────── */

.topnav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 60;
  padding: 14px 20px;
  background: rgba(251,249,248,.78);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--outline-variant);
  justify-content: space-between;
  align-items: center;
}
.topnav .brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 22px;
  color: var(--kyoto-blush);
}
.topnav .burger {
  appearance: none;
  border: 1px solid var(--outline-variant);
  background: transparent;
  width: 38px; height: 38px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.topnav .burger svg { width: 18px; height: 18px; }

.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(251,249,248,.96);
  backdrop-filter: blur(30px);
  padding: 80px 32px 32px;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-menu.open { display: flex; }
.mobile-menu .close {
  position: absolute;
  top: 18px; right: 18px;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid var(--outline-variant);
  border-radius: 4px;
  cursor: pointer;
}
.mobile-menu .brandmark {
  margin-bottom: 32px;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 32px;
  color: var(--kyoto-blush);
}
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li {
  padding: 18px 0;
  border-bottom: 1px solid var(--outline-variant);
}
.mobile-menu .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  margin-right: 12px;
  color: var(--kyoto-blush);
}
.mobile-menu .jp {
  font-family: var(--font-jp);
  font-size: 20px;
  display: block;
}
.mobile-menu li.current-menu-item .jp { color: var(--kyoto-blush); }
.mobile-menu .en {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin-top: 4px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  border-radius: var(--r);
  border: 0;
  font-family: var(--font-sans);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
}
.btn-primary {
  background: var(--kyoto-blush);
  color: var(--paper-white);
}
.btn-primary:hover {
  background: var(--primary);
  box-shadow: 0 8px 24px rgba(228,96,100,0.28);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--on-surface);
  border: 1px solid var(--kyoto-blush);
}
.btn-ghost:hover {
  background: var(--kyoto-blush);
  color: var(--paper-white);
}
.btn .arrow { width: 18px; height: 1px; background: currentColor; position: relative; }
.btn .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 6px; height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */

.card {
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r-lg);
  padding: 32px;
  transition: all .3s ease;
}
.card-tint {
  background: linear-gradient(180deg, rgba(244,209,205,0.4) 0%, rgba(239,189,180,0.15) 100%);
  border: 1px solid rgba(255,255,255,0.8);
}
.card:hover {
  box-shadow: 0 12px 36px rgba(228, 96, 100, 0.10);
  border-color: rgba(228, 96, 100, 0.18);
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--r);
  background: var(--nude-silk);
  color: var(--sumi-ink);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.chip-ghost { background: transparent; border: 1px solid var(--outline-variant); color: var(--on-surface-variant); }
.chip-mist { background: var(--sakura-mist); }
.chip-rose { background: var(--miyabi-rose); color: white; }

/* Filter chips (News / Map) — plain links, active state driven by a query var */
.chip-filter {
  background: transparent;
  border: 1px solid var(--outline-variant);
  color: var(--on-surface);
  cursor: pointer;
}
.chip-filter.is-active {
  background: var(--kyoto-blush);
  border-color: var(--kyoto-blush);
  color: #fff;
}

/* ─── Section header ─────────────────────────────────────────────────────── */

.sec-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 32px;
  margin-bottom: 56px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--outline-variant);
}
.sec-head .lhs { display: flex; flex-direction: column; gap: 12px; }
.sec-head .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--kyoto-blush);
  letter-spacing: 0;
}
.sec-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.sec-head .jp {
  font-family: var(--font-jp);
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--on-surface-variant);
}
.sec-head .more {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--kyoto-blush);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.sec-head .more::after {
  content: "→";
}

/* Grid children must allow shrinking so huge serif headlines don't blow out tracks */
.hero-grid > *,
.map-grid > *,
.map-preview-grid > *,
.sponsor-grid > *,
.sponsor-grid-page > *,
.podium-grid > *,
.history-grid > *,
.personal-grid > *,
.form-row > * { min-width: 0; }

/* ─── News row ───────────────────────────────────────────────────────────── */
.news-row {
  display: grid;
  grid-template-columns: 130px 110px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: baseline;
}
.news-meta { display: contents; }
.news-arrow { align-self: center; }

/* ─── Page header ────────────────────────────────────────────────────────── */

.page-head {
  padding: clamp(80px, 14vw, 160px) 0 clamp(48px, 8vw, 80px);
  border-bottom: 1px solid var(--outline-variant);
}
.page-head .num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--kyoto-blush);
  margin-bottom: 24px;
}
.page-head h1 {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(48px, 8vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.page-head .jp {
  font-family: var(--font-jp);
  font-size: 16px;
  letter-spacing: 0.22em;
  color: var(--on-surface-variant);
  display: block;
  margin-bottom: 24px;
}
.page-head .lede {
  max-width: 640px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--on-surface);
  margin-top: 32px;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */

.footer {
  margin-top: auto;
  padding: 80px 0 32px;
  border-top: 1px solid var(--outline-variant);
  background: linear-gradient(180deg, transparent 0%, rgba(244,209,205,0.18) 100%);
}
.footer .grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer h4 {
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul li { font-size: 13px; cursor: pointer; }
.footer ul li:hover { color: var(--kyoto-blush); }
.footer .brand .name {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 30px;
  color: var(--kyoto-blush);
  display: block;
  margin-bottom: 8px;
}
.footer .brand .jp {
  font-family: var(--font-jp);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--on-surface);
}
.footer .brand .blurb {
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--on-surface-variant);
  line-height: 1.7;
  max-width: 280px;
}
.footer .bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--outline-variant);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

/* ─── Image placeholders (replaces the mock's <image-slot>) ─────────────── */
.ph-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sakura-mist);
  border: 1px solid rgba(196,42,110,0.18);
  border-radius: var(--r);
  color: var(--on-surface-variant);
  font-family: var(--font-sans);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow: hidden;
  width: 100%;
}
.ph-box img { width: 100%; height: 100%; object-fit: cover; }
.ph-box.shape-circle { border-radius: 50%; }

/* ─── Contact form ───────────────────────────────────────────────────────── */
.form-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  display: block;
  margin-bottom: 4px;
}
.form-field {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--outline-variant);
  background: transparent;
  padding: 14px 0;
  font-family: var(--font-jp-sans);
  font-size: 16px;
  outline: none;
  color: var(--on-surface);
  transition: border-color .25s ease;
}
.form-field:focus { border-color: var(--kyoto-blush); }
textarea.form-field { min-height: 140px; resize: vertical; line-height: 1.7; padding: 16px 0; }
.form-error { color: var(--primary); font-size: 12px; margin-top: 6px; font-family: var(--font-jp-sans); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.form-agreement { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.form-agreement input { margin-top: 4px; accent-color: var(--kyoto-blush); }
.form-actions { display: flex; gap: 16px; margin-top: 8px; }

/* ─── Image slots (legacy selector kept harmless) ────────────────────────── */
image-slot {
  --is-bg: var(--sakura-mist);
  --is-border: rgba(196,42,110,0.18);
  --is-fg: var(--on-surface-variant);
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root {
    --margin-desktop: 24px;
    --section-gap: 80px;
  }
  #app {
    grid-template-columns: 1fr;
  }
  .sidenav { display: none; }
  .topnav { display: flex; }
  .container { padding: 0 var(--margin-mobile); }
  .footer .grid { grid-template-columns: 1fr; gap: 40px; }
  .footer .brand { padding-bottom: 24px; border-bottom: 1px solid var(--outline-variant); }
  .footer .brand .blurb { max-width: none; }
  .footer h4 { margin-bottom: 12px; }
  .footer .bottom { flex-direction: column; gap: 12px; align-items: flex-start; text-align: left; }
  .sec-head { grid-template-columns: 1fr; gap: 12px; }
  .hero-grid { grid-template-columns: 1fr !important; gap: 32px !important; }
  .map-grid,
  .map-preview-grid,
  .sponsor-grid,
  .sponsor-grid-page,
  .podium-grid,
  .form-row,
  .history-grid,
  .personal-grid { grid-template-columns: 1fr !important; }
  .hero-h1 { font-size: clamp(48px, 14vw, 88px) !important; }

  /* News row stacks: meta line on top, body below, arrow at corner */
  .news-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "meta arrow"
      "body body";
    gap: 12px 16px;
  }
  .news-meta {
    display: flex;
    grid-area: meta;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .news-body { grid-area: body; }
  .news-arrow { grid-area: arrow; align-self: start; }
  .news-date { font-size: 16px !important; }
}
@media (min-width: 1025px) and (max-width: 1200px) {
  .history-grid { grid-template-columns: repeat(3, 1fr) !important; }
  .personal-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ─── Subtle ornaments ───────────────────────────────────────────────────── */

.kanji-bg {
  position: absolute;
  font-family: var(--font-jp);
  font-weight: 300;
  color: var(--sakura-mist);
  pointer-events: none;
  user-select: none;
  z-index: 0;
  opacity: 0.55;
}

.line-accent {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: var(--kyoto-blush);
  vertical-align: middle;
  margin-right: 16px;
}

.glass-stripe {
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.2));
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: var(--r-lg);
}

/* Animate-in */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .6s ease both; }
