/* Panah Lovina — stylesheet
   Palette: Lovina's black volcanic sand, the pale green-grey of the dawn sea,
   brass arrowheads, and reef teal. Kain poleng (Balinese black/white check)
   appears only as section dividers. */

:root {
  --sand: #171412;        /* black sand */
  --sand-2: #221d19;
  --sand-3: #332b25;
  --haze: #eceee8;        /* dawn haze */
  --haze-2: #dfe3dc;
  --paper: #fbfbf8;
  --ink: #1b1a18;
  --ink-2: #4a4641;
  --ink-3: #7b756d;
  --brass: #c48b2e;
  --brass-2: #e0a94a;
  --reef: #1f6b6e;
  --reef-2: #2d8a8c;

  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;

  --max: 1180px;
  --gutter: clamp(16px, 4vw, 48px);
  --radius: 4px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--haze);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(17px, 1.05vw + 12px, 19px);
  line-height: 1.55;
  font-optical-sizing: auto;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--reef); text-decoration-thickness: 1px; text-underline-offset: .15em; }
a:hover { color: var(--reef-2); }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--brass); color: var(--sand); padding: .5rem 1rem;
  font-family: var(--font-display); font-weight: 700; z-index: 100;
}
.skip-link:focus { top: 8px; }

/* ---------- Type scale ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -.02em;
  line-height: 1.02;
  margin: 0;
}
h2 { font-size: clamp(2rem, 3.6vw + .5rem, 3.4rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 1vw + .9rem, 1.6rem); font-weight: 650; letter-spacing: -.01em; line-height: 1.15; }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--reef);
  margin: 0 0 .9rem;
}

.lead { font-size: 1.25em; line-height: 1.45; font-weight: 400; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: .95rem;
  letter-spacing: .01em;
  text-decoration: none;
  padding: .85rem 1.4rem;
  border-radius: var(--radius);
  border: 1.5px solid currentColor;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover { transform: translateY(-1px); color: var(--ink); }
.btn-primary { background: var(--brass); border-color: var(--brass); color: var(--sand); }
.btn-primary:hover { background: var(--brass-2); border-color: var(--brass-2); color: var(--sand); }
.btn-ghost { color: var(--haze); border-color: rgba(236, 238, 232, .45); }
.btn-ghost:hover { color: var(--paper); border-color: var(--paper); }
.btn-small { padding: .6rem 1rem; font-size: .88rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .8rem var(--gutter);
  background: color-mix(in srgb, var(--sand) 92%, transparent);
  backdrop-filter: blur(10px);
  color: var(--haze);
  border-bottom: 1px solid rgba(236, 238, 232, .08);
}
.brand { display: flex; align-items: center; gap: .7rem; color: inherit; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-name em { font-style: normal; color: var(--brass-2); }

.nav-list { list-style: none; display: flex; gap: 1.5rem; margin: 0; padding: 0; align-items: center; }
.nav-list a {
  color: var(--haze); text-decoration: none; font-family: var(--font-display);
  font-size: .92rem; font-weight: 500; opacity: .85;
}
.nav-list a:hover { opacity: 1; color: var(--paper); }
.nav-cta {
  border: 1.5px solid var(--brass); padding: .5rem .95rem; border-radius: var(--radius);
  color: var(--brass-2) !important; opacity: 1 !important;
}
.nav-cta:hover { background: var(--brass); color: var(--sand) !important; }

.nav-toggle {
  display: none; background: none; border: 1.5px solid rgba(236, 238, 232, .35);
  border-radius: var(--radius); width: 44px; height: 40px; position: relative; cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; left: 11px; width: 20px; height: 2px; background: var(--haze);
  transition: transform .2s var(--ease), opacity .2s;
}
.nav-toggle-bar { top: 18px; }
.nav-toggle-bar::before { left: 0; top: -6px; }
.nav-toggle-bar::after { left: 0; top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-list {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--sand); border-bottom: 1px solid rgba(236, 238, 232, .1);
    padding: .5rem var(--gutter) 1.2rem;
    display: none;
  }
  .nav-list.is-open { display: flex; }
  .nav-list li { border-top: 1px solid rgba(236, 238, 232, .08); }
  .nav-list a { display: block; padding: .9rem 0; font-size: 1.05rem; }
  .nav-cta { display: inline-block !important; margin-top: .8rem; text-align: center; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--sand);
  color: var(--haze);
  padding: clamp(3.5rem, 8vw, 7rem) 0 0;
  position: relative;
  overflow: hidden;
}
.hero::before {
  /* faint dawn glow on the horizon */
  content: ""; position: absolute; inset: auto 0 0 0; height: 60%;
  background: radial-gradient(60% 50% at 70% 100%, rgba(224, 169, 74, .13), transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  position: relative; z-index: 1;
}
.hero .eyebrow { color: var(--brass-2); }
.hero-title {
  font-size: clamp(2.6rem, 7.2vw, 6.4rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .96;
  max-width: 14ch;
  margin-bottom: 1.4rem;
}
.hero-title .line { display: block; }
.hero-title .line-accent { color: var(--brass-2); font-weight: 400; font-style: italic; font-family: var(--font-body); letter-spacing: -.02em; }
.hero-lede { font-size: clamp(1.1rem, 1.2vw + .7rem, 1.4rem); max-width: 42ch; color: rgba(236, 238, 232, .82); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2.5rem; }

.hero-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.2rem 2rem;
  margin: 0; padding: 1.4rem 0 0; border-top: 1px solid rgba(236, 238, 232, .14);
  max-width: 820px;
}
.hero-facts dt { font-family: var(--font-display); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(236, 238, 232, .55); margin-bottom: .25rem; }
.hero-facts dd { margin: 0; font-size: 1.05rem; }

/* The track (signature) */
.track { margin: 0; color: var(--haze); }
.track-hero { padding: 2rem 0 0; }
.track svg { width: 100%; height: clamp(120px, 18vw, 220px); }
.track .ring { fill: none; stroke: currentColor; stroke-width: 1.5; }
.track .ring-outer { opacity: .5; }
.track .ring-mid { opacity: .75; }
.track .ring-gold { fill: var(--brass); stroke: none; }
.track .stand { fill: currentColor; opacity: .5; }
.track .arrow { opacity: 0; transform-box: fill-box; transform-origin: right center; }
.track-caption {
  max-width: var(--max); margin: 0 auto; padding: .4rem var(--gutter) 2.2rem;
  font-family: var(--font-display); font-size: .78rem; letter-spacing: .06em; color: rgba(236, 238, 232, .55);
}

@keyframes arrow-fly {
  0%   { opacity: 0; transform: translateX(-420px); }
  12%  { opacity: 1; }
  100% { opacity: 1; transform: translateX(0); }
}
.track.is-live .arrow { animation: arrow-fly .55s var(--ease) forwards; }
.track.is-live .a1 { animation-delay: .5s; }
.track.is-live .a2 { animation-delay: .95s; }
.track.is-live .a3 { animation-delay: 1.4s; }
@media (prefers-reduced-motion: reduce) {
  .track .arrow { opacity: 1; animation: none !important; }
}

/* ---------- Kain poleng divider ---------- */
.poleng {
  height: 14px;
  background:
    repeating-conic-gradient(var(--sand) 0 25%, var(--paper) 0 50%) 0 0 / 28px 28px;
  background-position: 0 -7px;
}

/* ---------- Sections ---------- */
.section {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--gutter);
}
.section-head { max-width: 760px; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-head h2 { margin-bottom: .8rem; }
.section-lede { font-size: 1.12em; color: var(--ink-2); max-width: 60ch; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* Club */
.club-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.club-facts { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--sand); }
.club-facts li { padding: 1.1rem 0; border-bottom: 1px solid var(--haze-2); display: grid; gap: .25rem; }
.club-facts strong { font-family: var(--font-display); font-weight: 650; font-size: 1.05rem; letter-spacing: -.01em; }
.club-facts span { color: var(--ink-2); font-size: .95em; }
@media (max-width: 860px) { .club-grid { grid-template-columns: 1fr; } }

/* Training path: the track as a vertical rope on mobile, horizontal on desktop */
.path { background: var(--paper); max-width: none; }
.path > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.stages {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 1.6rem;
  position: relative;
}
.stages::before {
  /* the rope */
  content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1.5px; background: var(--sand);
}
.stages::after {
  content: ""; position: absolute; left: 0; right: 0; top: 33px; height: 0;
  border-top: 1.5px dashed var(--ink-3); opacity: .5;
}
.stage { position: relative; padding-top: 4rem; }
.stage-marker {
  position: absolute; top: 0; left: 0; width: 48px; height: 48px;
  display: grid; place-items: center;
}
.stage-marker .ring {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--sand); background: var(--paper);
  display: grid; place-items: center; position: relative;
}
.stage-marker .ring::before {
  content: ""; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--sand); opacity: .6;
}
.stage-marker .ring::after {
  content: ""; position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--brass);
}
.stage h3 { margin-bottom: .3rem; }
.stage-sub { font-family: var(--font-display); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--reef); margin-bottom: .7rem; }
.stage p:last-child { color: var(--ink-2); font-size: .98em; margin: 0; }

@media (max-width: 900px) {
  .stages { grid-template-columns: 1fr; gap: 2.2rem; padding-left: 68px; }
  .stages::before { left: 23px; right: auto; top: 0; bottom: 0; width: 1.5px; height: auto; }
  .stages::after { left: 33px; right: auto; top: 0; bottom: 0; width: 0; border-top: 0; border-left: 1.5px dashed var(--ink-3); }
  .stage { padding-top: 0; }
  .stage-marker { left: -68px; top: -2px; }
}

/* Programs */
.program-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 1.2rem; }
.program {
  background: var(--paper); border: 1px solid var(--haze-2); border-radius: var(--radius);
  padding: 1.6rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .5rem;
  position: relative;
}
.program h3 { margin-bottom: .1rem; }
.program-meta { font-family: var(--font-display); font-size: .8rem; letter-spacing: .03em; color: var(--ink-3); margin: 0; }
.price { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; margin: .5rem 0 .2rem; }
.price span { font-size: .8rem; font-weight: 500; color: var(--ink-3); letter-spacing: .02em; margin-left: .2rem; }
.program > p:not(.price):not(.program-meta):not(.program-tag) { color: var(--ink-2); font-size: .96em; flex: 1; }
.program .btn { align-self: flex-start; margin-top: .4rem; }
.program-featured { background: var(--sand); color: var(--haze); border-color: var(--sand); }
.program-featured .program-meta, .program-featured .price span { color: rgba(236, 238, 232, .6); }
.program-featured > p:not(.price):not(.program-meta):not(.program-tag) { color: rgba(236, 238, 232, .8); }
.program-tag {
  position: absolute; top: -.7rem; left: 1.3rem;
  background: var(--brass); color: var(--sand); font-family: var(--font-display);
  font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  padding: .25rem .6rem; border-radius: 2px; margin: 0;
}

/* Disciplines */
.disciplines { background: var(--paper); max-width: none; }
.disciplines > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.discipline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2.5rem 2rem; }
.discipline-icon { width: 120px; height: 40px; color: var(--sand); fill: var(--brass); margin-bottom: 1rem; }
.discipline h3 { margin-bottom: .5rem; }
.discipline p { color: var(--ink-2); margin: 0; }

/* Schedule */
.table-wrap { overflow-x: auto; border: 1px solid var(--haze-2); border-radius: var(--radius); background: var(--paper); }
table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: .96em; }
th, td { text-align: left; padding: .9rem 1rem; border-bottom: 1px solid var(--haze-2); vertical-align: top; }
thead th { font-family: var(--font-display); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); background: var(--haze); }
tbody th { font-family: var(--font-display); font-weight: 650; white-space: nowrap; }
tbody tr:first-child th, tbody tr:first-child td { background: color-mix(in srgb, var(--brass) 10%, var(--paper)); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.schedule-note { margin-top: 1rem; color: var(--ink-2); font-size: .95em; }

/* Coaches */
.coach-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.coach-portrait {
  aspect-ratio: 4 / 3; border-radius: var(--radius); margin-bottom: 1rem;
  background:
    linear-gradient(160deg, var(--sand-3), var(--sand) 70%);
  display: grid; place-items: end start; padding: 1rem;
}
.coach-portrait span { font-family: var(--font-display); color: var(--brass-2); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.coach h3 { margin-bottom: .4rem; }
.coach p { color: var(--ink-2); margin: 0; }
.coach-note { margin-top: 2rem; font-size: .9em; color: var(--ink-3); font-style: italic; }

/* Visit */
.visit { background: var(--paper); max-width: none; }
.visit > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
address { font-style: normal; line-height: 1.6; margin: 1.4rem 0; padding: 1.2rem 1.3rem; border-left: 3px solid var(--brass); background: var(--haze); }
.visit-tips { margin: 0; padding-left: 1.2rem; color: var(--ink-2); }
.visit-tips li { margin-bottom: .4rem; }
.map iframe { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); filter: saturate(.75) contrast(1.05); }
.map-link { display: inline-block; margin-top: .6rem; font-family: var(--font-display); font-size: .85rem; }
@media (max-width: 860px) { .visit-grid { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { max-width: 820px; border-top: 2px solid var(--sand); }
details { border-bottom: 1px solid var(--haze-2); }
summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.4rem 1.1rem 0; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; letter-spacing: -.01em;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: .4rem; top: 50%; width: 10px; height: 10px;
  border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform .2s var(--ease);
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details p { margin: 0 0 1.2rem; color: var(--ink-2); max-width: 65ch; }

/* Book */
.book { background: var(--sand); color: var(--haze); max-width: none; }
.book-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.book .eyebrow { color: var(--brass-2); }
.book-text h2 { margin-bottom: .8rem; }
.book-text p:last-child { color: rgba(236, 238, 232, .78); }
.book-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.book-form label { display: grid; gap: .35rem; }
.book-form label span { font-family: var(--font-display); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: rgba(236, 238, 232, .7); }
.book-form input, .book-form select, .book-form textarea {
  font: inherit; font-size: 1rem; color: var(--haze);
  background: var(--sand-2); border: 1px solid rgba(236, 238, 232, .18); border-radius: var(--radius);
  padding: .75rem .85rem; width: 100%;
}
.book-form select option { color: var(--ink); background: var(--paper); }
.book-form input:focus, .book-form select:focus, .book-form textarea:focus { border-color: var(--brass-2); outline: none; }
.span-2 { grid-column: 1 / -1; }
.form-note { font-size: .92em; color: rgba(236, 238, 232, .65); margin: 0; }
.form-note a { color: var(--brass-2); }
@media (max-width: 860px) {
  .book-inner { grid-template-columns: 1fr; }
  .book-form { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--sand); color: var(--haze); }
.site-footer .poleng { background-position: 0 -7px; }
.footer-inner {
  max-width: var(--max); margin: 0 auto; padding: 3rem var(--gutter) 2.5rem;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
}
.footer-brand { display: flex; gap: 1rem; align-items: flex-start; }
.footer-brand p { margin: 0; color: rgba(236, 238, 232, .78); line-height: 1.5; }
.footer-brand strong { color: var(--paper); font-family: var(--font-display); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer-links a { color: rgba(236, 238, 232, .78); text-decoration: none; font-family: var(--font-display); font-size: .95rem; }
.footer-links a:hover { color: var(--brass-2); }
.footer-fine { grid-column: 1 / -1; margin: 1rem 0 0; padding-top: 1.4rem; border-top: 1px solid rgba(236, 238, 232, .1); font-size: .85em; color: rgba(236, 238, 232, .5); }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
