/* =========================================================
    Willow Phoenix — single-page index
    Premium, calm, woody (light).
    Dark mode: phoenix/torchlight in willow-shadow.
  ========================================================== */

:root {
  --paper: #f3efe3;
  --paper-2: #fbfaf6;
  --ink: #07110c;
  --muted: rgba(7,17,12,.72);
  --rule: rgba(58,36,24,.16);
  --leaf: #2f8b5f;
  --moss: #1e6d4b;
  --pine: #123126;
  --bark: #3a2418;
  --wicker: #d2c29a;
  --amber: #c9833b;
  --copper: #b05a3c;
  --lead-ink: #543322;
  --shadow-soft: 0 10px 26px rgba(0,0,0,.08);
  --radius: 18px;
  --radius-2: 24px;
  --max: 72rem;
  --sans: "Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  --serif: "Cormorant Garamond",ui-serif,Georgia,"Times New Roman",Times,serif;
  --script: "Caveat",ui-rounded,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(1100px 640px at 18% -12%, rgba(47,139,95,.18), transparent 58%),
    radial-gradient(900px 520px at 92% 2%, rgba(18,49,38,.14), transparent 56%),
    linear-gradient(180deg, var(--paper), var(--paper-2));
  line-height: 1.55;
}

img { max-width: 100%; height: auto; }
a { color: var(--moss); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--leaf); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--amber) 55%, transparent); outline-offset: 3px; }

/* Accessibility */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: .6rem .8rem;
  border-radius: .8rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  z-index: 9999;
  box-shadow: var(--shadow-soft);
}

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

/* Layout */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1.2rem; }
section { padding: 3.2rem 0; }
@media (min-width:900px){
  section { padding: 4.2rem 0; }
  .wrap { padding: 0 1.6rem; }
}

/* Shared surface */
.surface {
  background: rgba(255,255,255,.78);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.05rem;
  position: relative;
  overflow: hidden;
}
.surface::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(201,131,59,.10), rgba(138,90,58,.06) 34%, transparent 62%);
  opacity: .85;
}

/* =========================================================
   Topbar / Nav (single system)
   Desktop: inline pills
   Mobile: row1 brand | theme | hamburger, row2 dropdown nav
========================================================= */

.topbar{
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--paper) 84%, var(--wicker));
  border-bottom: 1px solid rgba(58,36,24,.18);
}

.topbar .inner{
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 0;
  min-width: 0;
}

/* Brand */
.brand{
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  flex: 0 1 auto;
}
.brand .mark{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  overflow: hidden;
  background: transparent;
  flex: 0 0 auto;
}
.brand .mark img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
  box-shadow: none!important;
  filter: none!important;
  border: 0!important;
}

/* IMPORTANT: make ellipsis actually work (spans need block/inline-block) */
.brand .name{
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand .tag{
  display: none;
  color: var(--muted);
  font-size: .82rem;
  margin-top: .1rem;
}
@media (min-width:820px){ .brand .tag{ display:block; } }

/* Desktop nav */
.topnav{
  display: flex;
  gap: .25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}
.topnav a{
  display: inline-flex;
  align-items: center;
  padding: .48rem .68rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
  font-size: .95rem;
}
.topnav a:hover{
  border-color: rgba(58,36,24,.18);
  background: rgba(255,255,255,.55);
}
.topnav a[aria-current="true"]{
  background: rgba(47,139,95,.14);
  border-color: rgba(47,139,95,.32);
}

/* Actions (theme + hamburger) */
.top-actions{
  display: flex;
  align-items: center;
  gap: .55rem;
  flex: 0 0 auto;
}

/* =========================
   Ghost controls (icon-only)
   Transparent hit-area; no border/background (ALL MODES)
========================= */

/* Theme toggle */
.theme-toggle{
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 999px;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  color: var(--amber);
}

/* Hamburger (hidden on desktop) */
.menu-toggle{
  width: 42px;
  height: 42px;
  padding: 0;
  display: none; /* mobile only */
  align-items: center;
  justify-content: center;

  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 999px;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  color: var(--bark);
}

/* Icon styling */
.theme-toggle svg,
.menu-toggle svg{
  width: 22px;
  height: 22px;
  display: block;
}

/* Show only the correct theme icon */
.theme-toggle svg{ display: none; }
html[data-theme="light"] .theme-toggle .ico-sun{ display:block; }
html[data-theme="dark"]  .theme-toggle .ico-moon{ display:block; }

/* Force stroke-only icons (overrides any fill="currentColor" attributes) */
.theme-toggle svg,
.theme-toggle svg *,
.menu-toggle svg,
.menu-toggle svg *{
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Hover: still transparent, just a subtle “alive” cue */
.theme-toggle:hover,
.menu-toggle:hover{
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.10));
}

/* Keyboard focus: visible ring, still no fill */
.theme-toggle:focus-visible,
.menu-toggle:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--amber) 65%, transparent);
  outline-offset: 4px;
}

/* -------------------------
   Mobile layout
-------------------------- */
@media (max-width:680px){
  .topbar{ overflow-x: hidden; }

  .topbar .inner{
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    grid-template-areas:
      "brand theme menu"
      "nav   nav   nav";
    align-items: center;
    gap: .45rem .6rem;
    padding: .55rem 0;
    min-width: 0;
  }

  /* Flatten wrapper so nav + buttons become grid items (matches your HTML) */
  .top-actions{ display: contents; }

  .brand{ grid-area: brand; min-width: 0; }
  .brand .mark{ width: 30px; height: 30px; }
  .brand .tag{ display:none; }

  .theme-toggle{ grid-area: theme; justify-self: center; width: 40px; height: 40px; }
  .menu-toggle{ grid-area: menu; justify-self: end; display: inline-flex; width: 40px; height: 40px; }

  /* Nav becomes dropdown panel (closed by default) */
  .topnav{
    grid-area: nav;
    width: 100%;
    min-width: 0;

    display: none;               /* closed */
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: .35rem;

    margin: .15rem 0 0;
    padding: .65rem 0 .2rem;
    border-top: 1px solid rgba(58,36,24,.12);
  }

  .topbar[data-menu="open"] .topnav{ display: flex; }

  .topnav a{
    width: 100%;
    justify-content: flex-start;
    border-radius: 14px;
    padding: .62rem .75rem;
    font-size: .98rem;
    border-color: rgba(58,36,24,.12);
    background: rgba(255,255,255,.55);
  }
}

/* -------------------------
   Dark theme tweaks (controls stay ghost/transparent)
-------------------------- */
html[data-theme="dark"] .topbar{
  background: rgba(7,3,2,.78);
  border-bottom: 1px solid rgba(244,239,225,.12);
}

/* keep theme icon amber in both modes */
html[data-theme="dark"] .theme-toggle{ color: var(--amber); }

/* hamburger icon goes light in dark mode */
html[data-theme="dark"] .menu-toggle{ color: var(--ink); }

@media (max-width:680px){
  html[data-theme="dark"] .topnav{
    border-top-color: rgba(244,239,225,.10);
  }
  html[data-theme="dark"] .topnav a{
    border-color: rgba(244,239,225,.14);
    background: rgba(0,0,0,.22);
    color: var(--ink);
  }
  html[data-theme="dark"] .topnav a:hover{
    border-color: rgba(255,177,74,.24);
    background: rgba(0,0,0,.28);
  }
}

/* =========================================================
   Hero
========================================================= */
.hero { padding-top: 2.2rem; padding-bottom: 2.2rem; }
.hero-center { display: grid; gap: 1.1rem; justify-items: center; text-align: center; }

/* Logo wrap: ABSOLUTELY no border/shadow/sheens */
.hero-center .logo-wrap {
  width: min(560px, 92vw);
  padding: 0;
  border-radius: var(--radius-2);
  position: relative;
  overflow: hidden;
  background: transparent;
  border: 0!important;
  box-shadow: none!important;
}
.hero-center .logo-wrap::before { display: none!important; }

/* Logo image: no shadow/filter/border */
.hero-center .logo-banner {
  display: block;
  width: 100%;
  height: auto;
  background: transparent!important;
  box-shadow: none!important;
  filter: none!important;
  border: 0!important;
  outline: 0!important;
}

/* Superimposed lead over bottom third */
.lead-super {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 33%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 0;
  padding: 1.1rem 1.25rem;
  font-family: var(--script);
  font-size: 33px;
  font-weight: 600;
  letter-spacing: .2px;
  line-height: 1.05;
  text-align: center;
  color: var(--lead-ink);
  text-shadow: none;
  background: linear-gradient(to top, rgba(243,239,227,.92) 0%, rgba(243,239,227,.72) 55%, rgba(243,239,227,0) 100%);
}
@media (max-width:560px){
  .lead-super { font-size: 22px; padding: .85rem .9rem; min-height: 38%; }
}

/* CTA */
.cta-row {
  margin-top: .55rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .72rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(58,36,24,.18);
  text-decoration: none;
  color: var(--ink);
  background: rgba(255,255,255,.66);
  box-shadow: 0 8px 18px rgba(0,0,0,.07);
  font-weight: 650;
  letter-spacing: .15px;
}
.btn:hover { border-color: rgba(47,139,95,.35); }

.btn.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--leaf) 86%, var(--pine)), color-mix(in srgb, var(--pine) 90%, #000));
  color: #fff;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 14px 30px rgba(0,0,0,.18);
  position: relative;
  overflow: hidden;
}
.btn.primary::after {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: linear-gradient(120deg, transparent 35%, rgba(201,131,59,.22), transparent 65%);
  transform: translateX(-20%);
  opacity: .55;
}
.btn.primary:hover { box-shadow: 0 18px 40px rgba(0,0,0,.22); }
.btn .dot { width: .55rem; height: .55rem; border-radius: 50%; background: currentColor; opacity: .85; }

/* At-a-glance */
.atglance { margin-top: 1.4rem; }
.atglance-inner { max-width: 64rem; margin: 0 auto; text-align: center; padding: .2rem .25rem; }
.atglance-lead { margin: 0 auto 1.1rem; max-width: 70ch; color: var(--muted); font-size: 1.02rem; }
.atglance-cols { display: grid; gap: 1rem; margin: 0 auto 1.05rem; max-width: 70rem; text-align: left; }
@media (min-width:900px){ .atglance-cols { grid-template-columns: repeat(3, 1fr); } }
.atglance-col { padding: .85rem .95rem; border-radius: 16px; background: rgba(255,255,255,.42); border: 1px solid rgba(58,36,24,.10); }
.atglance-col p { margin: 0; color: var(--muted); font-size: .98rem; }
.atglance-signoff { margin: .85rem auto 0; max-width: 78ch; font-family: var(--serif); font-size: 1.08rem; color: color-mix(in srgb, var(--bark) 78%, var(--ink)); }

/* Section headings */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: clamp(1.45rem, 2.2vw, 2rem); letter-spacing: .2px; }
.section-head .kicker { color: var(--muted); font-size: .96rem; max-width: 56ch; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(58,36,24,.22), transparent);
  margin: 1.1rem 0 0;
  position: relative;
}
.divider::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -6px;
  width: 54px;
  height: 12px;
  transform: translateX(-50%);
  background:
    radial-gradient(closest-side, rgba(201,131,59,.34), transparent 65%),
    radial-gradient(closest-side, rgba(138,90,58,.20), transparent 70%);
  filter: blur(.12px);
  opacity: .95;
}

/* Grids / cards */
.grid { display: grid; gap: 1rem; }
@media (min-width:820px){
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
}
.card { padding: 1.05rem; }
.card h3 { margin: .05rem 0 .45rem 0; font-family: var(--serif); font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

/* Chips */
.meta { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0 0 0; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: .28rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(58,36,24,.14);
  background: rgba(210,194,154,.16);
  color: rgba(18,49,38,.92);
  font-size: .86rem;
  white-space: nowrap;
}

/* Intro image strip: true 3 + 2 */
.intro-gallery {
  width: 100%;
  margin-top: 1.2rem;
  display: grid;
  gap: .9rem;
  justify-items: stretch;
}
.intro-gallery figure {
  margin: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(58,36,24,.12);
  background: rgba(255,255,255,.55);
  box-shadow: 0 14px 32px rgba(0,0,0,.08);
}
.intro-gallery img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  display: block;
  filter: saturate(1.06) contrast(1.05);
  transition: transform .35s ease, filter .35s ease;
}
.intro-gallery figure:hover img { transform: scale(1.03); filter: saturate(1.10) contrast(1.07); }

@media (max-width:619px){
  .intro-gallery { grid-template-columns: 1fr; }
  .intro-gallery img { height: 240px; }
}
@media (min-width:620px) and (max-width:979px){
  .intro-gallery { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .intro-gallery img { height: 240px; }
}
@media (min-width:980px){
  .intro-gallery { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .intro-gallery figure:nth-child(-n+3) { grid-column: span 2; }
  .intro-gallery figure:nth-child(n+4) { grid-column: span 3; }
  .intro-gallery img { height: 260px; }
}

/* Courses schedule list */
.course-list { margin-top: 1.2rem; display: grid; gap: 1rem; }
.course-item { display: grid; gap: .65rem; }
@media (min-width:900px){
  .course-item { grid-template-columns: 14rem 1fr; align-items: start; gap: 1.1rem; }
}
.course-when {
  border-radius: 16px;
  border: 1px solid rgba(58,36,24,.12);
  background: rgba(255,255,255,.42);
  padding: .85rem .95rem;
}
.course-when .date { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; margin: 0; }
.course-when .time { margin: .25rem 0 0 0; color: var(--muted); font-size: .95rem; }
.course-body h3 { margin: .05rem 0 .35rem 0; font-family: var(--serif); font-size: 1.25rem; }
.course-body p { margin: 0; color: var(--muted); }
.course-meta { margin-top: .65rem; display: flex; flex-wrap: wrap; gap: .5rem; }

/* ===== Commissions ===== */
.commissions-stack { display: grid; gap: 1rem; }
.commission-panel { padding: 1.15rem; }
.commission-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}
.commission-title { margin: .05rem 0 .35rem 0; font-family: var(--serif); font-size: 1.35rem; letter-spacing: .2px; }
.commission-blurb { margin: 0; color: var(--muted); max-width: 80ch; }
.commission-links { display: flex; gap: .6rem; flex-wrap: wrap; }

/* =========================================================
   Mini carousel (RESPONSIVE: 1/2/3 per view + page-based)
========================================================= */
.mini-carousel {
  --perView: 1; /* mobile */
  --mc-gap: .65rem;
  --mc-pad: .55rem;
  margin-top: .9rem;
  border-radius: 16px;
  border: 1px solid rgba(58,36,24,.12);
  background: rgba(255,255,255,.55);
  overflow: hidden;
}
@media (min-width:680px){ .mini-carousel { --perView: 2; } }
@media (min-width:980px){ .mini-carousel { --perView: 3; } }

.mini-carousel__viewport{
  overflow: hidden;
  touch-action: pan-y; /* allow vertical scroll; we handle horizontal swipe in JS */
  overscroll-behavior-x: contain;
}
.mini-carousel__track,
.mini-carousel__slide img{
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.mini-carousel__track {
  list-style: none;
  padding: var(--mc-pad);
  margin: 0;
  display: flex;
  gap: var(--mc-gap);
  transform: translateX(0);
  transition: transform .45s ease;
}
.mini-carousel__slide {
  flex: 0 0 calc((100% - (var(--mc-gap) * (var(--perView) - 1))) / var(--perView));
}
.mini-carousel__slide img {
  display: block;
  width: 100%;
  height: clamp(220px, 26vw, 320px);
  object-fit: contain;
  background: rgba(243,239,227,.55);
  border-radius: 14px;
  border: 1px solid rgba(58,36,24,.10);
  box-shadow: none!important;
  filter: none!important;
}

.mini-carousel__controls {
  display: flex;
  gap: .55rem;
  align-items: center;
  justify-content: space-between;
  padding: .75rem .8rem;
  border-top: 1px solid rgba(58,36,24,.12);
  background: rgba(243,239,227,.55);
  flex-wrap: wrap;
}
.mini-carousel__btn { padding: .55rem .85rem; min-width: 44px; }
.mini-carousel__dots {
  display: flex;
  gap: .35rem;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 10rem;
}
.mini-dot {
  width: .6rem;
  height: .6rem;
  border-radius: 999px;
  border: 1px solid rgba(58,36,24,.22);
  background: rgba(255,255,255,.66);
  cursor: pointer;
}
.mini-dot[aria-selected="true"] { background: rgba(47,139,95,.35); border-color: rgba(47,139,95,.55); }

@media (max-width:679px){
  .mini-carousel__controls [data-prev],
  .mini-carousel__controls [data-next],
  .mini-carousel__controls [data-open] { display: none!important; }
  .mini-carousel__dots { min-width: 0; justify-content: center; }
}

/* YouTube embed */
.yt-embed {
  margin-top: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(58,36,24,.12);
  background: rgba(255,255,255,.55);
  overflow: hidden;
}
.yt-embed__frame { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.yt-embed__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-embed__caption {
  padding: .75rem .9rem;
  border-top: 1px solid rgba(58,36,24,.12);
  background: rgba(243,239,227,.55);
  color: var(--muted);
  font-size: .92rem;
}

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
@media (min-width:820px){ .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(58,36,24,.14);
  background: rgba(255,255,255,.72);
  box-shadow: 0 12px 26px rgba(0,0,0,.07);
}
.gallery figure img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
  transition: transform .25s ease, filter .25s ease;
}
.gallery figure:hover img { transform: scale(1.02); filter: saturate(1.08) contrast(1.06); }
@media (min-width:820px){ .gallery figure img { height: 180px; } }
.gallery figcaption { padding: .6rem .7rem; color: var(--muted); font-size: .9rem; }

/* Instagram embed */
.ig-embed { display: flex; justify-content: center; overflow: hidden; }
.ig-embed blockquote { margin: 0!important; }
.ig-embed .instagram-media { max-width: 540px!important; width: 100%!important; min-width: 0!important; }
.ig-fallback { margin-top: .8rem; color: var(--muted); font-size: .95rem; }

/* Contact */
.contact { display: grid; gap: 1rem; align-items: start; }
@media (min-width:900px){ .contact { grid-template-columns: 1.05fr .95fr; gap: 1.5rem; } }
label { display: block; font-weight: 650; margin: .7rem 0 .25rem; }
input, textarea {
  width: 100%;
  font: inherit;
  padding: .72rem .85rem;
  border-radius: 14px;
  border: 1px solid rgba(58,36,24,.18);
  background: rgba(255,255,255,.78);
  outline: none;
}
input:focus, textarea:focus {
  border-color: color-mix(in srgb, var(--leaf) 60%, var(--copper));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 18%, transparent);
}
textarea { min-height: 140px; resize: vertical; }
.small { font-size: .92rem; color: var(--muted); }
.contact-actions { margin-top: .9rem; display: flex; gap: .75rem; flex-wrap: wrap; }

/* Footer */
footer {
  padding: 2.1rem 0 2.6rem;
  border-top: 1px solid rgba(58,36,24,.16);
  background: rgba(255,255,255,.30);
}
footer .foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: .95rem;
}

/* Fade-in on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.is-in { opacity: 1; transform: none; }

/* =========================================================
   Lightbox (dialog)
========================================================= */
.lightbox {
  border: 0;
  padding: 0;
  width: min(980px, 94vw);
  background: rgba(255,255,255,.92);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.28);
}
.lightbox::backdrop { background: rgba(0,0,0,.55); backdrop-filter: blur(2px); }
.lightbox__close {
  position: absolute;
  top: .45rem;
  right: .55rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(58,36,24,.18);
  background: rgba(255,255,255,.72);
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  z-index: 2;
}
.lightbox__figure { margin: 0; }
.lightbox__img {
  display: block;
  width: 100%;
  height: min(72vh, 640px);
  object-fit: contain;
  background: rgba(243,239,227,.6);
}
.lightbox__cap {
  padding: .7rem .9rem;
  color: var(--muted);
  font-size: .95rem;
  border-top: 1px solid rgba(58,36,24,.12);
  background: rgba(243,239,227,.55);
}
.lightbox__controls {
  display: flex;
  gap: .6rem;
  justify-content: center;
  padding: .8rem;
  background: rgba(243,239,227,.45);
  border-top: 1px solid rgba(58,36,24,.12);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  html { scroll-behavior: auto; }
  .intro-gallery img, .gallery figure img { transition: none; }
  .intro-gallery figure:hover img, .gallery figure:hover img { transform: none; }
  .mini-carousel__track { transition: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   Dark theme — Phoenix night overrides
========================================================= */
html[data-theme="dark"] {
  --paper: #120a07;
  --paper-2: #070302;
  --ink: #f4efe1;
  --muted: rgba(244,239,225,.72);
  --rule: rgba(244,239,225,.14);
  --leaf: #46c88a;
  --moss: #2fa56e;
  --pine: #1a0d09;
  --bark: #d6c3a0;
  --amber: #ffb14a;
  --copper: #c05b3c;
  --lead-ink: #f4efe1;
  --shadow-soft: 0 10px 26px rgba(0,0,0,.36);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(900px 560px at 18% -12%, rgba(255,177,74,.12), transparent 60%),
    radial-gradient(720px 460px at 82% 4%,  rgba(192, 91, 60,.10), transparent 58%),
    radial-gradient(980px 620px at 64% 88%, rgba( 70,200,138,.07), transparent 62%),
    linear-gradient(180deg, var(--paper), var(--paper-2));
}

html[data-theme="dark"] a { color: color-mix(in srgb, var(--amber) 75%, var(--ink)); }
html[data-theme="dark"] a:hover { color: color-mix(in srgb, var(--leaf) 60%, var(--ink)); }

html[data-theme="dark"] .surface {
  background: rgba(18,10,7,.62);
  border-color: rgba(244,239,225,.12);
  box-shadow: var(--shadow-soft);
}
html[data-theme="dark"] .surface::before {
  background: linear-gradient(135deg, rgba(255,177,74,.10), rgba(192, 91, 60,.08) 34%, transparent 62%);
  opacity: .9;
}

html[data-theme="dark"] .btn {
  background: rgba(0,0,0,.22);
  border-color: rgba(244,239,225,.14);
  color: var(--ink);
  box-shadow: 0 8px 18px rgba(0,0,0,.26);
}
html[data-theme="dark"] .btn:hover { border-color: rgba(255,177,74,.24); }
html[data-theme="dark"] .btn.primary {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--amber) 70%, #000),
    color-mix(in srgb, var(--copper) 72%, #000));
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 14px 30px rgba(0,0,0,.30);
}
html[data-theme="dark"] .btn.primary::after {
  background: linear-gradient(120deg, transparent 35%, rgba(255,177,74,.22), transparent 65%);
  opacity: .55;
}

html[data-theme="dark"] .chip { border-color: rgba(244,239,225,.14); background: rgba(255,177,74,.10); color: rgba(244,239,225,.86); }

html[data-theme="dark"] .lead-super {
  background: linear-gradient(to top, rgba(7,3,2,.92) 0%, rgba(7,3,2,.70) 55%, rgba(7,3,2,0) 100%);
  text-shadow: 0 1px 0 rgba(0,0,0,.65), 0 0 20px rgba(255,177,74,.10);
}

html[data-theme="dark"] input,
html[data-theme="dark"] textarea {
  background: rgba(0,0,0,.26);
  border-color: rgba(244,239,225,.14);
  color: var(--ink);
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: rgba(244,239,225,.55); }

html[data-theme="dark"] .mini-carousel { background: rgba(0,0,0,.18); border-color: rgba(244,239,225,.12); }
html[data-theme="dark"] .mini-carousel__controls { background: rgba(7,3,2,.45); border-top-color: rgba(244,239,225,.10); }
html[data-theme="dark"] .mini-dot { border-color: rgba(244,239,225,.22); background: rgba(0,0,0,.28); }
html[data-theme="dark"] .mini-dot[aria-selected="true"] { background: rgba(255,177,74,.30); border-color: rgba(255,177,74,.50); }
html[data-theme="dark"] .mini-carousel__slide img,
html[data-theme="dark"] .lightbox__img { background: rgba(0,0,0,.22); border-color: rgba(244,239,225,.10); }

html[data-theme="dark"] .lightbox { background: rgba(18,10,7,.92); box-shadow: 0 18px 60px rgba(0,0,0,.42); }
html[data-theme="dark"] .lightbox__close { background: rgba(0,0,0,.28); border-color: rgba(244,239,225,.14); color: var(--ink); }
html[data-theme="dark"] .lightbox__cap,
html[data-theme="dark"] .lightbox__controls { background: rgba(7,3,2,.55); border-top-color: rgba(244,239,225,.10); }

/* =========================================================
   No-JS fallback: honour OS dark if JS never sets data-theme
========================================================= */
@media (prefers-color-scheme: dark){
  html:not([data-theme]) { color-scheme: dark; }
  html:not([data-theme]) {
    --paper: #120a07;
    --paper-2: #070302;
    --ink: #f4efe1;
    --muted: rgba(244,239,225,.72);
    --rule: rgba(244,239,225,.14);
    --leaf: #46c88a;
    --moss: #2fa56e;
    --pine: #1a0d09;
    --bark: #d6c3a0;
    --amber: #ffb14a;
    --copper: #c05b3c;
    --lead-ink: #f4efe1;
    --shadow-soft: 0 10px 26px rgba(0,0,0,.36);
  }
  html:not([data-theme]) body{
    background:
      radial-gradient(900px 560px at 18% -12%, rgba(255,177,74,.12), transparent 60%),
      radial-gradient(720px 460px at 82% 4%,  rgba(192, 91, 60,.10), transparent 58%),
      radial-gradient(980px 620px at 64% 88%, rgba( 70,200,138,.07), transparent 62%),
      linear-gradient(180deg, var(--paper), var(--paper-2));
  }
}

/* =========================================================
   Form status:
========================================================= */

.form-status{ margin:.75rem 0 0; font-size:.95rem; }
.form-status[data-kind="ok"]{ /* you can style as you like */ }
.form-status[data-kind="error"]{ }
.form-status[data-kind="busy"]{ opacity:.85; }

/* =========================================================
    Course thumbnails
========================================================= */

.course-thumb{
  display:block;
  max-width:420px;   /* adjust */
  width:100%;
  padding:0;
  border:0;
  background:transparent;
  cursor:pointer;
  margin:0 0 .75rem 0;
}

.course-thumb img{
  width:100%;
  height:auto;
  display:block;
  border-radius:14px;
}
