/* ── Base ─────────────────────────────────────────── */
:root {
  --orange: #F58426;
  --blue: #006BB6;
  --black: #0f0f0f;
  --cream: #EEE8DA;
  --glow: 0 0 1px rgba(245,132,38,0.9), 0 0 9px rgba(245,132,38,0.45);
}
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--black); }
a { color: inherit; }
a:hover { color: var(--blue); }
.splash a { color: #fff; }
.splash a:hover { color: var(--orange); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ── Motion ───────────────────────────────────────── */
/* Lines that rise into place when the page loads */
.rise { display: block; overflow: hidden; }
.rise > span { display: block; transform: translateY(105%); animation: rise 0.9s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rise { to { transform: translateY(0); } }

.fade-in { opacity: 0; animation: fade 1s .45s ease forwards; }
@keyframes fade { to { opacity: 1; } }

/* Things that slide up as you scroll to them (needs JS; without it they just show) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-stagger > * { opacity: 0; transform: translateY(18px) scale(.9); transition: opacity .5s ease, transform .5s cubic-bezier(.2,.8,.2,1); }
.js .reveal-stagger.is-in > * { opacity: 1; transform: none; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: .06s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: .12s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: .18s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: .24s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: .30s; }
.reveal-stagger.is-in > *:nth-child(7) { transition-delay: .36s; }
.reveal-stagger.is-in > *:nth-child(8) { transition-delay: .42s; }
.reveal-stagger.is-in > *:nth-child(9) { transition-delay: .48s; }

/* Stars spin a fifth of a turn on hover */
.star { transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.star:hover, a:hover .star { transform: rotate(72deg) scale(1.12); }

/* Slow turning star (splash + orange section) */
.spin-slow { animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Buttons lift a little */
.btn { transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--blue); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* Slow drift on the splash photo */
.drift { animation: drift 24s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02); } to { transform: scale(1.08); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise > span, .fade-in { transform: none; opacity: 1; }
  .js .reveal, .js .reveal-stagger > * { opacity: 1; transform: none; }
}

/* ── Open times ───────────────────────────────────── */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 860px) { .week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.day { border-top: 2px solid var(--orange); padding-top: 10px; min-width: 0; }
.day h3 { margin: 0 0 10px; font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 900; font-size: 14px; letter-spacing: 1.5px; color: var(--orange); }
.day ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.day li { font-family: 'Space Mono', monospace; font-size: 14px; color: #fff; border: 1px solid #3a3a3a; padding: 6px 8px; }
.day .closed { font-family: 'Space Mono', monospace; font-size: 14px; color: #777; }

/* ── Booking form ─────────────────────────────────── */
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
@media (max-width: 760px) { .form { grid-template-columns: minmax(0, 1fr); } }
.form .full { grid-column: 1 / -1; }
.form label, .form legend { display: block; margin: 0 0 8px; padding: 0; font-family: 'Archivo', sans-serif; font-stretch: 112%; font-weight: 800; font-size: 13px; letter-spacing: 1.5px; color: var(--orange); }
.form .hint { font-family: 'Space Mono', monospace; font-weight: 400; letter-spacing: 0; color: #9a9a9a; font-size: 12px; margin-left: 6px; }
.form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form input[type=text], .form input[type=email], .form input[type=tel], .form select, .form textarea {
  width: 100%; box-sizing: border-box; min-height: 50px; padding: 12px 14px;
  background: #161616; color: #fff; border: 2px solid #3a3a3a; border-radius: 0;
  font-family: 'Inter Tight', sans-serif; font-size: 17px;
}
.form textarea { min-height: 120px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--orange); }
.form [aria-invalid="true"] { border-color: #ff6b6b; }
.field-error { margin: 8px 0 0; color: #ff8a8a; font-family: 'Space Mono', monospace; font-size: 13px; }

/* Pill-style choices (radio buttons and checkboxes) */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; box-sizing: border-box;
  border: 2px solid #3a3a3a; color: #fff; font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 15px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease; }
.pill span:hover { border-color: var(--orange); }
.pill input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--black); }
.pill input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.pill.mono span { font-family: 'Space Mono', monospace; font-weight: 400; font-size: 14px; min-height: 40px; padding: 0 12px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.submit { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; padding: 0 30px;
  background: var(--orange); color: var(--black); border: 2px solid var(--blue); cursor: pointer;
  font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 800; font-size: 15px; letter-spacing: 1.5px; }

.form-alert { border: 2px solid #ff6b6b; color: #ffd0d0; padding: 14px 16px; font-family: 'Space Mono', monospace; font-size: 14px; margin: 0 0 24px; }

/* pill labels shouldn't pick up the orange field-label style */
.form .pill { display: inline-block; margin: 0; padding: 0; font: inherit; letter-spacing: normal; color: inherit; }
.form [hidden] { display: none !important; }

/* ── Opening section: sized to fit one screen ───────
   Type and photo scale with the screen's height as well as its width,
   so the photo and "PRIVATE LESSONS" show without scrolling. */
.hero {
  --hdr: 80px;                                             /* header height */
  --hero-pad: clamp(16px, 3svh, 40px);
  --h1: clamp(72px, min(13vw, 24svh), 190px);              /* MUAY / THAI */
  --pl: clamp(44px, min(7.4vw, 13.1svh), 140px);               /* PRIVATE LESSONS */
  --sub: clamp(14px, min(1.1vw, 2.1svh), 18px);           /* gym details */
}
/* Photo on the left, headline + copy on the right */
.hero-grid {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "photo title" "photo copy";
  column-gap: clamp(24px, 4vw, 64px); padding-bottom: 28px;
}
.hero-title { grid-area: title; }
.hero-thai { padding-left: 0.62em; }                       /* stagger THAI under MUAY */
.hero-copy { grid-area: copy; align-self: end; }
.hero-photo {
  grid-area: photo; min-width: 0;
  width: min(600px, 44vw, calc((100svh - var(--hdr) - var(--hero-pad) - 28px) / 1.103));
}
.hero-star svg { width: min(120px, 9svh); height: min(120px, 9svh); }
/* Star sits up beside PRIVATE LESSONS instead of taking its own row */
.hero-star { position: absolute; top: 0; right: 0; margin: 0 !important; }

/* ── Rates (blue section) ── */
.rates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 28px 40px; margin-top: 44px; }
.rate-card { min-width: 0; border-top: 2px solid #F58426; padding-top: 16px; }
.rate-title { margin: 0 0 6px; font-family: "Space Mono", ui-monospace, monospace; font-size: 13px; font-weight: 700; letter-spacing: 1px; color: #ffffff; }
.rate-list { list-style: none; margin: 0; padding: 0; }
.rate-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.28); }
.rate-name { font-weight: 600; font-size: clamp(20px, 1.7vw, 24px); letter-spacing: -0.03em; line-height: 1.15; }
.rate-name small { display: block; margin-top: 3px; font-family: "Space Mono", ui-monospace, monospace; font-size: 12px; font-weight: 400; letter-spacing: 0.5px; opacity: 0.85; }
.rate-price { flex: none; font-weight: 800; font-size: clamp(30px, 3vw, 44px); letter-spacing: -0.05em; line-height: 1; }
.rate-note { margin: 12px 0 0; font-size: 15px; line-height: 1.4; opacity: 0.9; }
.rate-policies { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px 40px; margin-top: 52px; }
.rate-policy-label { margin: 0 0 6px; padding-top: 10px; border-top: 2px solid #F58426; font-family: "Space Mono", ui-monospace, monospace; font-size: 12px; font-weight: 700; letter-spacing: 1px; color: #ffffff; }
.rate-policy-text { margin: 0; font-size: 15px; line-height: 1.45; }

/* ── Splash: name sits ~60% down, but the gap above it shrinks on short screens ── */
.splash-top { flex: 0 1 max(66px, calc(60svh - 13vw)); align-items: flex-start !important; }

/* ── Splash on phones: everything fits the visible screen ── */
@media (max-width: 700px) {
  .splash { min-height: 0 !important; }
  /* zoom the photo, lift it and slide it so you stand to the right of the name */
  .splash .drift { height: 140% !important; top: -30% !important; object-position: 7% 50% !important; }
  .splash-top { flex: none; padding: 14px 20px 0 !important; }
  .splash-spacer { display: none; }
  .splash-title { margin-top: auto; padding: 0 20px !important; }
  .splash-title p { font-size: 13px !important; margin-top: 0 !important; }
  .splash-title h1 { font-size: min(17vw, 9.5svh) !important; }
  .splash-cta { padding: min(18px, 2.5svh) 20px min(18px, 2.5svh) !important; }
  .splash-cta > div { gap: min(16px, 2.2svh) !important; }
  .splash-cta p { font-size: min(15px, 2.2svh) !important; }
  .splash-strip { padding: 10px 20px calc(12px + env(safe-area-inset-bottom)) !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 4px 16px !important; font-size: 11px !important; }
}

/* ── Phones ───────────────────────────────────────── */
.mobile-book { display: none; }

@media (max-width: 700px) {
  .wrap { padding-left: 20px !important; padding-right: 20px !important; }

  /* Slim header that stays at the top: name + Book button */
  .site-header { position: sticky; top: 0; z-index: 50; }
  .site-header nav { flex-wrap: nowrap !important; gap: 10px !important; padding-top: 10px !important; padding-bottom: 10px !important; }
  .site-header nav > div { flex-wrap: nowrap !important; gap: 0 !important; }
  .site-header nav > a:first-child { font-size: 17px !important; white-space: nowrap; }
  .site-header .nav-link { display: none; }
  .site-header nav .btn { min-height: 40px !important; padding: 0 10px !important; font-size: 11px !important; letter-spacing: 0.5px; white-space: nowrap; }

  /* Orange section: less overlap between THAI and the photo, smaller star */
  .hero { --hdr: 66px; --hero-pad: 16px; --h1: min(23vw, 13svh); --pl: min(14vw, 8svh); --sub: 14px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "photo" "copy"; row-gap: 10px; padding-bottom: 20px; }
  .hero-photo {
    width: min(100%, calc((100svh - var(--hdr) - var(--hero-pad) - var(--h1) * 1.6 - 10px - 10px - var(--pl) * 1.64 - 26px) / 1.103));
  }
  .hero-star { margin: -64px 0 0 !important; position: relative; z-index: 3; }
  .hero-star svg { width: 60px; height: 60px; }

  /* Cream section: photo full width */
  .fig-col { flex: 1 1 100% !important; }

  /* Booking form: bigger tap targets */
  .pill span { min-height: 46px; }
  .form input[type=text], .form input[type=email], .form input[type=tel], .form select, .form textarea { font-size: 16px; }
  .submit { width: 100%; }

  /* "Book" bar that follows you down the page */
  .mobile-book {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; min-height: 54px;
    background: var(--orange); color: var(--black); border: 2px solid var(--blue); text-decoration: none;
    font-family: 'Archivo', sans-serif; font-stretch: 125%; font-weight: 800; font-size: 14px; letter-spacing: 1.5px;
    transform: translateY(140%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-book.show { transform: none; }
  .mobile-book:hover { color: var(--black); }
  footer { padding-bottom: 80px; }
}

/* ── Open times are selectable ────────────────────── */
.day li { padding: 0; border: 0; }
.slot { position: relative; display: block; }
.slot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot span { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; box-sizing: border-box;
  padding: 0 10px; border: 1px solid #3a3a3a; color: #fff; font-family: 'Space Mono', monospace; font-size: 14px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease; }
.slot span::after { content: "+"; color: #777; font-size: 16px; }
.slot span:hover { border-color: var(--orange); }
.slot input:checked + span { background: var(--orange); border-color: var(--orange); color: var(--black); }
.slot input:checked + span::after { content: "✓"; color: var(--black); }
.slot input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.slot-count { margin: 14px 0 0; min-height: 1.4em; font-family: 'Space Mono', monospace; font-size: 13px; color: var(--orange); }
