/* ===========================================================
   Xin-Fa Qigong and Dan Dao
   A calm, modern theme — jade, sand & gold.
   =========================================================== */

:root {
  --jade-900: #122e22;
  --jade-800: #1c4233;
  --jade-700: #235741;
  --jade-500: #3c7a5e;
  --jade-300: #8bbfa6;
  --gold:     #c9a24b;
  --gold-dk:  #a9842f;
  --sand:     #f4efe6;
  --sand-2:   #ece4d6;
  --cream:    #fbf8f2;
  --ink:      #243029;
  --ink-soft: #51605a;
  --white:    #ffffff;

  --maxw: 1140px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 4px 18px rgba(18, 46, 34, .06);
  --shadow-md: 0 16px 40px rgba(18, 46, 34, .12);
  --shadow-lg: 0 30px 70px rgba(18, 46, 34, .18);
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font-serif: "Cormorant Garamond", Georgia, serif;
  --font-sans:  "Inter", system-ui, -apple-system, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

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

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

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; line-height: 1.1; color: var(--jade-900); }

h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.01em; }
h3 { font-size: 1.5rem; }

.eyebrow {
  font-family: var(--font-sans);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .74rem;
  font-weight: 600;
  color: var(--gold-dk);
  margin-bottom: .6rem;
}

.section { padding: clamp(64px, 9vw, 120px) 0; }
.section-tint { background: var(--sand); }

.section-head { max-width: 640px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-lead { color: var(--ink-soft); margin-top: 1rem; font-size: 1.08rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-sans); font-weight: 600; font-size: .98rem;
  padding: .85rem 1.6rem; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, color .25s;
  white-space: nowrap;
}
.btn-sm { padding: .55rem 1.15rem; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--jade-700); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--jade-800); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--jade-800); border-color: rgba(35, 87, 65, .35); }
.btn-ghost:hover { border-color: var(--jade-700); background: rgba(35, 87, 65, .06); transform: translateY(-2px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 248, 242, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(18, 46, 34, .07);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: flex; align-items: center; gap: .65rem; }
.brand-mark { font-size: 1.7rem; color: var(--gold-dk); line-height: 1; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; display: block; }
.footer-logo { width: 72px; height: 72px; margin-bottom: .2rem; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-serif); font-size: 1.25rem; color: var(--jade-900); }
.brand-text em { font-style: normal; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a { font-size: .95rem; font-weight: 500; color: var(--ink); position: relative; transition: color .2s; }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
  background: var(--gold); transition: width .3s var(--ease);
}
.nav a:not(.nav-cta):hover { color: var(--jade-800); }
.nav a:not(.nav-cta):hover::after { width: 100%; }
.nav-cta { color: var(--jade-800); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--jade-900); border-radius: 2px; transition: .3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: clamp(560px, 92vh, 820px); display: flex; align-items: center; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(120% 120% at 80% 0%, rgba(201, 162, 75, .22), transparent 55%),
    radial-gradient(130% 130% at 10% 100%, rgba(60, 122, 94, .35), transparent 60%),
    linear-gradient(160deg, var(--jade-900), var(--jade-700) 55%, var(--jade-800));
}
.hero-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.06) 0 1px, transparent 1.5px);
  background-size: 26px 26px; opacity: .5;
}
.hero-bg::after {
  content: "☯"; position: absolute; right: -4%; bottom: -12%;
  font-size: clamp(280px, 42vw, 560px); color: rgba(255,255,255,.05);
  line-height: 1; pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; color: var(--cream); padding: 96px 24px; max-width: 760px; }
.hero .eyebrow { color: var(--gold); }
.hero h1 { color: var(--white); font-size: clamp(2.6rem, 6.5vw, 5rem); font-weight: 500; letter-spacing: -.015em; }
.hero-sub { margin: 1.5rem 0 2.2rem; font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: rgba(251,248,242,.86); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero .btn-ghost { color: var(--cream); border-color: rgba(251,248,242,.4); }
.hero .btn-ghost:hover { background: rgba(251,248,242,.1); border-color: var(--cream); }

.hero-stats { list-style: none; display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 3rem; flex-wrap: wrap; }
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-serif); font-size: 2.4rem; color: var(--gold); line-height: 1; }
.hero-stats span { font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(251,248,242,.72); margin-top: .35rem; }

.scroll-cue {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 1;
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(251,248,242,.35); color: var(--cream); font-size: 1.1rem;
  animation: bob 2s var(--ease) infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(36px, 6vw, 80px); align-items: center; }
.about-media { position: relative; }
.about-photo {
  aspect-ratio: 4/5; border-radius: var(--radius); box-shadow: var(--shadow-md);
  background:
    radial-gradient(90% 70% at 70% 20%, rgba(201,162,75,.4), transparent 60%),
    linear-gradient(155deg, var(--jade-500), var(--jade-800));
  position: relative; overflow: hidden;
}
.about-photo::after {
  content: "☯"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 9rem; color: rgba(255,255,255,.14);
}
.about-badge {
  position: absolute; bottom: -22px; left: -22px; background: var(--white);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-md); padding: 1rem 1.3rem;
  display: flex; align-items: center; gap: .8rem;
}
.about-badge strong { font-size: 1.8rem; color: var(--gold-dk); }
.about-badge span { font-size: .82rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-soft); }

.about-copy p { color: var(--ink-soft); margin-top: 1.1rem; font-size: 1.05rem; }
.about-copy h2 { margin-top: .4rem; }

.ticks { list-style: none; margin-top: 1.6rem; display: grid; gap: .7rem; }
.ticks li { position: relative; padding-left: 1.9rem; color: var(--ink); font-weight: 500; }
.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 0; width: 1.3rem; height: 1.3rem;
  background: var(--jade-700); color: #fff; border-radius: 50%; display: grid; place-items: center;
  font-size: .72rem; font-weight: 700;
}

/* ---------- Modules ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 26px; }
.module-card {
  background: var(--white); border-radius: var(--radius); padding: 2rem 1.8rem 1.9rem;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(18,46,34,.05);
  display: flex; flex-direction: column; position: relative; overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.module-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--jade-500));
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.module-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.module-card:hover::before { transform: scaleX(1); }
.module-card.is-featured { border-color: rgba(201,162,75,.5); }

.module-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.module-icon { font-size: 1.9rem; color: var(--gold-dk); line-height: 1; }
.module-tag { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .3rem .65rem; border-radius: 999px; background: var(--sand-2); color: var(--ink-soft); }
.module-tag.tag-foundation { background: rgba(60,122,94,.14); color: var(--jade-700); }
.module-tag.tag-dandao { background: rgba(201,162,75,.18); color: var(--gold-dk); }
.module-tag.tag-popular { background: var(--jade-700); color: #fff; }

.module-card h3 { font-size: 1.45rem; }
.module-level { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--jade-500); margin: .35rem 0 .8rem; }
.module-card p { color: var(--ink-soft); font-size: .96rem; flex-grow: 1; }
.module-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin: 1.2rem 0; font-size: .85rem; color: var(--ink-soft); }
.module-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.module-price { display: flex; align-items: baseline; gap: .35rem; margin-bottom: 1.2rem; }
.module-price b { font-family: var(--font-serif); font-size: 2.2rem; color: var(--jade-900); }
.module-price small { color: var(--ink-soft); font-size: .85rem; }

.fineprint { text-align: center; color: var(--ink-soft); font-size: .9rem; margin-top: 2.4rem; }

/* ---------- Schedule ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-bottom: 2.4rem; }
.chip {
  font-family: var(--font-sans); font-size: .9rem; font-weight: 500;
  padding: .55rem 1.15rem; border-radius: 999px; cursor: pointer;
  background: var(--white); border: 1.5px solid rgba(18,46,34,.12); color: var(--ink);
  transition: all .22s var(--ease);
}
.chip:hover { border-color: var(--jade-500); color: var(--jade-700); }
.chip.is-active { background: var(--jade-700); border-color: var(--jade-700); color: #fff; }

.schedule-list { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; }
.schedule-row {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 1.2rem;
  background: var(--white); border: 1px solid rgba(18,46,34,.06); border-radius: var(--radius-sm);
  padding: 1.1rem 1.4rem; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease);
}
.schedule-row:hover { transform: translateX(4px); }
.sched-date { text-align: center; min-width: 58px; }
.sched-date .d { font-family: var(--font-serif); font-size: 1.6rem; color: var(--jade-800); line-height: 1; }
.sched-date .m { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-dk); font-weight: 700; }
.sched-main strong { display: block; font-size: 1.05rem; color: var(--jade-900); }
.sched-main span { font-size: .88rem; color: var(--ink-soft); }
.sched-city { font-size: .85rem; font-weight: 600; color: var(--jade-700); background: rgba(60,122,94,.1); padding: .35rem .8rem; border-radius: 999px; white-space: nowrap; }
.sched-row-cta { font-weight: 600; font-size: .9rem; color: var(--jade-700); white-space: nowrap; }
.sched-row-cta:hover { color: var(--gold-dk); }
.schedule-empty { text-align: center; color: var(--ink-soft); padding: 2rem; }

/* ---------- Cities ---------- */
.city-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px; }
.city-card {
  background: var(--white); border-radius: var(--radius-sm); padding: 1.6rem 1.4rem;
  box-shadow: var(--shadow-sm); border-left: 4px solid var(--gold);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.city-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.city-card h3 { font-size: 1.25rem; margin-bottom: .3rem; }
.city-card p { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Booking ---------- */
.book-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(36px, 6vw, 72px); align-items: start; }
.book-copy p { color: var(--ink-soft); margin-top: 1rem; }
.book-contact { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid rgba(18,46,34,.1); }
.book-contact p { font-weight: 600; color: var(--ink); margin-bottom: .5rem; }
.book-contact a { display: block; color: var(--jade-700); font-weight: 600; padding: .15rem 0; }
.book-contact a:hover { color: var(--gold-dk); }

.book-form { background: var(--white); border-radius: var(--radius); padding: clamp(1.6rem, 4vw, 2.4rem); box-shadow: var(--shadow-md); border: 1px solid rgba(18,46,34,.05); }
.field { margin-bottom: 1.1rem; display: flex; flex-direction: column; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--jade-900); margin-bottom: .4rem; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font-family: var(--font-sans); font-size: .98rem; color: var(--ink);
  padding: .8rem .9rem; border: 1.5px solid rgba(18,46,34,.15); border-radius: 10px;
  background: var(--cream); transition: border-color .2s, box-shadow .2s; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--jade-500); box-shadow: 0 0 0 3px rgba(60,122,94,.15); background: #fff;
}
.field textarea { resize: vertical; }
.field.has-error input, .field.has-error select { border-color: #c0473b; box-shadow: 0 0 0 3px rgba(192,71,59,.12); }
.error { color: #c0473b; font-size: .8rem; margin-top: .35rem; min-height: 1rem; }
.form-success {
  margin-top: 1rem; background: rgba(60,122,94,.12); color: var(--jade-800);
  padding: .9rem 1rem; border-radius: 10px; font-weight: 600; font-size: .95rem; text-align: center;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--jade-900); color: rgba(251,248,242,.78); padding-top: clamp(56px, 8vw, 88px); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.footer-brand .brand-mark { color: var(--gold); font-size: 2rem; }
.footer-brand strong { display: block; font-family: var(--font-serif); font-size: 1.3rem; color: var(--cream); margin: .4rem 0 .8rem; }
.footer-brand p { font-size: .95rem; max-width: 320px; }
.footer-col h4 { color: var(--cream); font-family: var(--font-sans); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col a { display: block; padding: .3rem 0; font-size: .95rem; transition: color .2s; }
.footer-col a:hover { color: var(--gold); }
.footer-col p { font-size: .9rem; margin-top: .6rem; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding: 22px 0; border-top: 1px solid rgba(251,248,242,.12); font-size: .85rem; }
.footer-bottom .muted { color: rgba(251,248,242,.45); }
.admin-login-link {
  display: inline-flex; align-items: center; gap: .4rem;
  color: rgba(251,248,242,.6); font-weight: 600; transition: color .2s;
}
.admin-login-link:hover { color: var(--gold); }
.admin-login-link span { font-size: .9em; }

.form-error {
  margin-top: 1rem; background: rgba(192,71,59,.1); color: #9b3327;
  padding: .9rem 1rem; border-radius: 10px; font-weight: 600; font-size: .92rem; text-align: center;
}

/* ---------- Auth: nav controls ---------- */
.nav-auth:not([hidden]) { display: inline-flex; }
.account-chip {
  align-items: center; gap: .55rem; background: rgba(60,122,94,.1);
  border: 1px solid rgba(60,122,94,.2); border-radius: 999px; padding: .3rem .35rem .3rem .7rem;
}
.account-dot { color: var(--gold-dk); font-size: 1rem; line-height: 1; }
.account-email { font-size: .82rem; font-weight: 600; color: var(--jade-800); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-signout {
  font-family: var(--font-sans); font-size: .78rem; font-weight: 600; cursor: pointer;
  background: var(--jade-700); color: #fff; border: 0; border-radius: 999px; padding: .35rem .75rem;
  transition: background .2s;
}
.account-signout:hover { background: var(--jade-800); }

/* locked (read-only) email when signed in */
.field.is-locked input { background: var(--sand-2); color: var(--ink-soft); cursor: not-allowed; }

/* ---------- My bookings ---------- */
.my-bookings { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px solid rgba(18,46,34,.1); }
.my-bookings h3 { font-size: 1.2rem; margin-bottom: .9rem; }
.mb-list { list-style: none; display: grid; gap: .7rem; }
.mb-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .8rem;
  background: var(--white); border: 1px solid rgba(18,46,34,.07); border-radius: var(--radius-sm);
  padding: .8rem 1rem; box-shadow: var(--shadow-sm);
}
.mb-main strong { display: block; font-size: .98rem; color: var(--jade-900); }
.mb-main span { font-size: .82rem; color: var(--ink-soft); }
.mb-status { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--jade-700); background: rgba(60,122,94,.12); padding: .25rem .6rem; border-radius: 999px; }
.mb-cancel { font-family: var(--font-sans); font-size: .8rem; font-weight: 600; color: #9b3327; background: rgba(192,71,59,.08); border: 1px solid rgba(192,71,59,.25); border-radius: 999px; padding: .35rem .75rem; cursor: pointer; transition: background .2s; }
.mb-cancel:hover { background: rgba(192,71,59,.16); }
.mb-empty { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Auth modal ---------- */
.auth-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 24px; }
.auth-modal.open { display: flex; }
.modal-overlay { position: absolute; inset: 0; background: rgba(18,46,34,.55); backdrop-filter: blur(3px); animation: fade .25s var(--ease); }
.modal-card {
  position: relative; z-index: 1; width: 100%; max-width: 420px; background: var(--cream);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: clamp(1.8rem, 4vw, 2.5rem);
  animation: pop .3s var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: 0; font-size: 1.7rem; line-height: 1; color: var(--ink-soft); cursor: pointer; transition: color .2s; }
.modal-close:hover { color: var(--jade-900); }
.auth-brand { font-size: .8rem; font-weight: 600; letter-spacing: .04em; color: var(--gold-dk); margin-bottom: .4rem; }
.auth-brand span { color: var(--gold-dk); }
.modal-card h2 { font-size: 1.7rem; margin-bottom: 1.2rem; }
.auth-tabs { display: flex; gap: .3rem; background: var(--sand-2); padding: .3rem; border-radius: 999px; margin-bottom: 1.4rem; }
.auth-tab { flex: 1; font-family: var(--font-sans); font-size: .9rem; font-weight: 600; padding: .55rem; border: 0; border-radius: 999px; background: transparent; color: var(--ink-soft); cursor: pointer; transition: all .2s var(--ease); }
.auth-tab.is-active { background: var(--white); color: var(--jade-800); box-shadow: var(--shadow-sm); }
.auth-error { margin: 0 0 1rem; background: rgba(192,71,59,.1); color: #9b3327; padding: .7rem .9rem; border-radius: 10px; font-size: .86rem; font-weight: 500; }
.auth-switch { text-align: center; margin-top: 1.1rem; font-size: .88rem; color: var(--ink-soft); }
.link-btn { background: none; border: 0; color: var(--jade-700); font-weight: 600; font-size: inherit; font-family: inherit; cursor: pointer; text-decoration: underline; padding: 0; }
.link-btn:hover { color: var(--gold-dk); }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .about-grid, .book-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 380px; margin: 0 auto 1rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--cream); padding: 1rem 24px 1.6rem; gap: .4rem; border-bottom: 1px solid rgba(18,46,34,.08);
    box-shadow: var(--shadow-md); transform: translateY(-130%); transition: transform .35s var(--ease); z-index: 55;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: .7rem .2rem; font-size: 1.05rem; }
  .nav a:not(.nav-cta)::after { display: none; }
  .nav-cta { text-align: center; margin-top: .5rem; }
  .nav-toggle { display: flex; }

  .schedule-row { grid-template-columns: auto 1fr; row-gap: .6rem; }
  .sched-city { grid-column: 2; justify-self: start; }
  .sched-row-cta { grid-column: 1 / -1; justify-self: start; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===========================================================
   Blog (public)
   =========================================================== */
.nav a.is-current { color: var(--jade-800); }
.nav a.is-current::after { width: 100% !important; }

/* Tinted panel that visually boxes the blog listing */
.blog-panel {
  background: var(--sand);
  border: 1px solid rgba(18,46,34,.06);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.4rem, 4vw, 2.6rem);
}
.blog-admin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--jade-900); color: var(--cream);
  border-radius: var(--radius-sm); padding: .8rem 1.1rem; margin-bottom: 1.6rem;
}
.blog-admin-note { font-size: .9rem; font-weight: 500; }
.blog-admin-note span { color: var(--gold); }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.blog-empty { text-align: center; color: var(--ink-soft); padding: 2.5rem 1rem; grid-column: 1 / -1; }

.blog-card {
  background: var(--white); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(18,46,34,.05);
  display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.blog-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.blog-card-media {
  display: block; aspect-ratio: 16/9; background-size: cover; background-position: center;
  background-color: var(--sand-2);
}
.blog-card-media.is-placeholder {
  display: grid; place-items: center; font-size: 3rem; color: rgba(255,255,255,.5);
  background: linear-gradient(155deg, var(--jade-500), var(--jade-800));
}
.blog-card-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex-grow: 1; }
.blog-card-date { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-dk); font-weight: 600; margin-bottom: .5rem; }
.blog-card h3 { font-size: 1.4rem; line-height: 1.2; margin-bottom: .6rem; }
.blog-card h3 a:hover { color: var(--jade-700); }
.blog-card-excerpt { color: var(--ink-soft); font-size: .96rem; flex-grow: 1; }
.blog-card-cta { margin-top: 1.1rem; font-weight: 600; font-size: .9rem; color: var(--jade-700); }
.blog-card-cta:hover { color: var(--gold-dk); }

/* ---------- Single post ---------- */
.post-container { max-width: 760px; }
.post-eyebrow a { font-size: .85rem; font-weight: 600; color: var(--jade-700); }
.post-eyebrow a:hover { color: var(--gold-dk); }
.post-title { font-size: clamp(2rem, 5vw, 3.2rem); margin: 1rem 0 .6rem; }
.post-meta { color: var(--ink-soft); font-size: .9rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1.6rem; }
.post-cover { aspect-ratio: 16/8; border-radius: var(--radius); background-size: cover; background-position: center; box-shadow: var(--shadow-md); margin-bottom: 2rem; }
.post-foot { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid rgba(18,46,34,.1); }
.post-foot a { font-weight: 600; color: var(--jade-700); }

/* ---------- Rendered Markdown (prose) ---------- */
.prose { color: var(--ink); font-size: 1.06rem; line-height: 1.8; }
.prose > * + * { margin-top: 1.1rem; }
.prose h1, .prose h2, .prose h3 { margin-top: 2rem; margin-bottom: .2rem; }
.prose h2 { font-size: 1.8rem; }
.prose h3 { font-size: 1.35rem; }
.prose p { color: var(--ink-soft); }
.prose a { color: var(--jade-700); text-decoration: underline; }
.prose a:hover { color: var(--gold-dk); }
.prose ul, .prose ol { padding-left: 1.4rem; color: var(--ink-soft); }
.prose li { margin-top: .4rem; }
.prose img { border-radius: var(--radius-sm); margin: 1rem 0; }
.prose blockquote { border-left: 4px solid var(--gold); padding: .4rem 0 .4rem 1.2rem; color: var(--ink-soft); font-style: italic; }
.prose code { background: var(--sand-2); padding: .1rem .4rem; border-radius: 6px; font-size: .9em; }
.prose pre { background: var(--jade-900); color: var(--cream); padding: 1rem 1.2rem; border-radius: var(--radius-sm); overflow-x: auto; }
.prose pre code { background: none; padding: 0; color: inherit; }

/* ===========================================================
   Admin console
   =========================================================== */
.admin-body { background: var(--sand); }
.admin-main { padding: clamp(28px, 6vw, 56px) 24px 80px; min-height: 70vh; }
.admin-state { animation: fade .3s var(--ease); }
.admin-card {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: clamp(1.8rem, 4vw, 2.6rem); max-width: 440px; margin: 6vh auto 0;
}
.admin-card.center { text-align: center; }
.admin-card h1 { font-size: 1.8rem; margin-bottom: .6rem; }
.admin-card .muted-copy { color: var(--ink-soft); margin-bottom: 1.4rem; }
.admin-card.center p { color: var(--ink-soft); margin-bottom: 1.4rem; }
.admin-login form { margin-top: .4rem; }

.muted-copy { color: var(--ink-soft); }
.form-note { font-size: .88rem; font-weight: 500; margin-top: .2rem; padding: .6rem .8rem; border-radius: 8px; }
.form-note.is-error { background: rgba(192,71,59,.1); color: #9b3327; }
.form-note.is-ok { background: rgba(60,122,94,.12); color: var(--jade-800); }

.admin-topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.8rem; }
.admin-topbar h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.admin-topbar-actions { display: flex; gap: .6rem; }

.post-list { list-style: none; display: grid; gap: 12px; margin-bottom: 2rem; }
.admin-empty { color: var(--ink-soft); padding: 1.5rem; text-align: center; background: var(--white); border-radius: var(--radius-sm); }
.post-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 1rem;
  background: var(--white); border: 1px solid rgba(18,46,34,.06); border-radius: var(--radius-sm);
  padding: .9rem 1.2rem; box-shadow: var(--shadow-sm);
}
.post-row-main strong { display: block; font-size: 1.02rem; color: var(--jade-900); }
.post-row-main span { font-size: .8rem; color: var(--ink-soft); }
.status-badge { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: .25rem .6rem; border-radius: 999px; }
.status-draft { background: var(--sand-2); color: var(--ink-soft); }
.status-published { background: rgba(60,122,94,.14); color: var(--jade-700); }

.editor { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: clamp(1.4rem, 3vw, 2.2rem); }
.editor > h2 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.8rem; align-items: start; }
.editor-preview { position: sticky; top: 90px; }
.preview-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; color: var(--gold-dk); font-weight: 700; margin-bottom: .8rem; }
.editor-preview .prose { background: var(--cream); border: 1px solid rgba(18,46,34,.08); border-radius: var(--radius-sm); padding: 1.2rem 1.4rem; min-height: 200px; max-height: 70vh; overflow-y: auto; }
.editor-actions { display: flex; align-items: center; gap: .8rem; margin-top: 1rem; }
.btn-delete { margin-left: auto; background: none; border: 0; color: #9b3327; font-family: var(--font-sans); font-weight: 600; font-size: .9rem; cursor: pointer; }
.btn-delete:hover { text-decoration: underline; }

@media (max-width: 760px) {
  .editor-grid { grid-template-columns: 1fr; }
  .editor-preview { position: static; }
  .post-row { grid-template-columns: 1fr auto; }
  .post-row .btn { grid-column: 1 / -1; justify-self: start; }
}
