/* Quiet Mirror — a small meditation studio, built from Kaleidoscope Studio
   patterns: the logo, the breathing guide, the lenses, the dividers and the
   button rings are all kaleidoscope glass. Everything else stays dark and still. */
:root {
  --bg: #0d0e1c;
  --bg-2: #13142a;
  --card: #16172f;
  --line: rgba(236, 235, 246, .09);
  --line-2: rgba(236, 235, 246, .18);
  --text: #ecebf6;
  --muted: #a7a6c3;
  --dim: #77769a;
  --glow: #b28cff;
  --display: 'Jost', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --gut: clamp(20px, 4vw, 56px);
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --glass: url(../img/rosettes/twilight-lace.webp);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15.5px/1.65 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 300; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }

/* ---------------------------------------------------------------- kaleidoscope pieces */
/* a lens: a round window onto a Studio pattern */
.lens { display: inline-block; flex: none; border-radius: 50%; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
.lens-sm { width: 30px; height: 30px; }
.lens-lg { width: 88px; height: 88px; transition: transform 1.6s var(--ease); }
.spin { animation: turn 40s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
/* a band: a strip of mirrored glass between sections */
.band { height: 22px; background-size: auto 100%; background-repeat: repeat-x; opacity: .9; }
.band-thin { height: 8px; opacity: .75; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent;
  font: 500 14.5px/1 var(--body); text-decoration: none; white-space: nowrap;
  transition: background .3s, color .3s, box-shadow .3s, transform .3s var(--ease);
}
.btn-sm { height: 40px; padding: 0 18px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-light { background: var(--text); color: var(--bg); }
.btn-light:hover { background: #fff; box-shadow: 0 0 32px -6px rgba(178, 140, 255, .65); }
/* the ring: a fine edge of kaleidoscope glass around a dark button */
.btn-ring { background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--glass) center / 220% border-box; color: var(--text); }
.btn-ring:hover { background: linear-gradient(rgba(13, 14, 28, .78), rgba(13, 14, 28, .78)) padding-box, var(--glass) center / 220% border-box; }
.text-link { font-size: 14.5px; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--line-2); }
.text-link:hover { text-decoration-color: var(--text); }

/* ---------------------------------------------------------------- nav */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  height: 68px; padding: 0 var(--gut);
  background: rgba(13, 14, 28, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 400 19px/1 var(--display); letter-spacing: .02em; }
.links { display: flex; gap: 32px; }
.links a { text-decoration: none; font-size: 14px; color: var(--muted); transition: color .2s; }
.links a:hover { color: var(--text); }

/* ---------------------------------------------------------------- hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(32px, 5vw, 80px);
  max-width: var(--max); margin: 0 auto; padding: clamp(48px, 7vw, 96px) var(--gut) clamp(56px, 7vw, 104px);
}
.eyebrow { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.hero h1 { font-size: clamp(44px, 5.4vw, 76px); line-height: 1.04; letter-spacing: -0.02em; text-wrap: balance; }
.lede { color: var(--muted); font-size: 17px; max-width: 440px; margin: 26px 0 38px; }
.cta-row { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

.breath { display: flex; flex-direction: column; align-items: center; text-align: center; }
.breath-stage { position: relative; width: min(100%, 460px); aspect-ratio: 1; display: grid; place-items: center; }
.glow { position: absolute; inset: 6%; border-radius: 50%; background: var(--glass) center / cover; filter: blur(46px) saturate(1.3); opacity: .45; transform: scale(var(--s, .9)); transition: opacity .6s; }
.breath-lens { position: relative; width: 86%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; transform: scale(var(--s, .9)); box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 30px 80px -30px rgba(0, 0, 0, .8); }
.breath-lens canvas, .breath-fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.breath-fallback { object-fit: cover; animation: turn 60s linear infinite; }
.breath-cue { font: 300 26px/1.2 var(--display); margin-top: 28px; min-height: 1.2em; }
.breath-count { color: var(--dim); font-size: 13.5px; letter-spacing: .06em; margin-top: 6px; font-variant-numeric: tabular-nums; min-height: 1.5em; }
.breath-controls { display: flex; align-items: center; gap: 22px; margin-top: 24px; }
.breath-controls .btn { min-width: 128px; }
.pickers { display: flex; gap: 10px; }
.lens-pick { width: 32px; height: 32px; border: 0; padding: 0; transition: box-shadow .2s, transform .3s var(--ease); }
.lens-pick:hover { transform: rotate(30deg); }
.lens-pick[aria-checked="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--text); }

/* ---------------------------------------------------------------- sections */
.section { max-width: var(--max); margin: 0 auto; padding: clamp(64px, 8vw, 112px) var(--gut); }
.head { max-width: 620px; margin-bottom: clamp(32px, 4vw, 52px); }
.head h2, .visit h2 { font-size: clamp(32px, 3.6vw, 48px); line-height: 1.1; }
.sub { color: var(--muted); margin-top: 16px; }

/* classes */
.classes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.class-card { padding: 28px 24px 30px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 8px; }
.class-card .lens { margin-bottom: 18px; }
.class-card:hover .lens { transform: rotate(60deg); }
.class-card h3 { font-size: 22px; }
.meta { font-size: 13px; color: var(--dim); }
.class-card p:last-child { color: var(--muted); font-size: 14.5px; margin-top: 6px; }

/* schedule */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-radius: 20px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.day { padding: 20px 16px 24px; border-left: 1px solid var(--line); min-width: 0; }
.day:first-child { border-left: 0; }
.day.today { background: var(--bg-2); }
.day h3 { font: 500 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; display: flex; justify-content: space-between; }
.day.today h3 { color: var(--text); }
.day.today h3::after { content: 'Today'; letter-spacing: .06em; text-transform: none; font-weight: 400; color: var(--glow); }
.slot { display: grid; grid-template-columns: 20px 1fr; gap: 4px 10px; align-items: center; padding: 10px 0; }
.slot + .slot { border-top: 1px solid var(--line); }
.slot .lens { width: 20px; height: 20px; grid-row: span 2; align-self: start; margin-top: 2px; }
.slot b { font-weight: 500; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.slot .name { grid-column: 2; font-size: 13px; color: var(--muted); line-height: 1.35; }

/* pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; padding: 32px 28px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; }
/* the chosen plan is framed in kaleidoscope glass */
.plan-featured { border: 1.5px solid transparent; background: linear-gradient(var(--card), var(--card)) padding-box, var(--glass) center / 160% border-box; box-shadow: 0 30px 70px -40px rgba(178, 140, 255, .55); }
.badge { position: absolute; top: 20px; right: 20px; font-size: 12px; color: var(--glow); }
.plan h3 { font-size: 20px; color: var(--muted); }
.price { font: 300 52px/1.1 var(--display); margin-top: 14px; }
.per { color: var(--dim); font-size: 13.5px; }
.plan ul { list-style: none; padding: 22px 0 0; margin: 22px 0 28px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plan li { font-size: 14.5px; color: var(--muted); padding-left: 22px; position: relative; }
.plan li::before { content: ''; position: absolute; left: 0; top: .45em; width: 10px; height: 10px; border-radius: 50%; background: var(--glass) center / cover; }

/* visit + book */
.visit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.visit dl { margin: 36px 0 0; display: flex; flex-direction: column; gap: 22px; }
.visit dl div { display: grid; grid-template-columns: 80px 1fr; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.visit dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); padding-top: 3px; }
.visit dd { margin: 0; color: var(--muted); }
.book { padding: 32px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 16px; }
.book h3 { font-size: 24px; margin-bottom: 4px; }
.book label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.book input, .book select { height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg); font-size: 15px; }
.book input:focus, .book select:focus { outline: none; border-color: transparent; background: linear-gradient(var(--bg), var(--bg)) padding-box, var(--glass) center / 220% border-box; }
.book .btn { margin-top: 8px; }
.small { font-size: 12.5px; color: var(--dim); text-align: center; }
.book-done { align-items: center; text-align: center; padding: 56px 32px; }
.book-done p { color: var(--muted); }

/* footer */
.foot-inner { max-width: var(--max); margin: 0 auto; padding: 36px var(--gut) 44px; display: flex; justify-content: space-between; align-items: center; gap: 16px 40px; flex-wrap: wrap; }
.foot-inner p { color: var(--dim); font-size: 13px; max-width: 520px; }

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

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .classes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .day:nth-child(5) { border-left: 0; }
  .day:nth-child(n+5) { border-top: 1px solid var(--line); }
}
@media (max-width: 820px) {
  .links { display: none; }
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .lede { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .plans { grid-template-columns: 1fr; max-width: 440px; }
  .visit { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .nav { height: 60px; }
  .brand { font-size: 17px; }
  .classes { grid-template-columns: 1fr; }
  .class-card .lens { width: 64px; height: 64px; }
  .week { grid-template-columns: 1fr; }
  .day { border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 64px 1fr; gap: 0 12px; padding: 16px 18px; }
  .day:first-child { border-top: 0; }
  .day h3 { margin: 12px 0 0; flex-direction: column; gap: 6px; }
  .breath-cue { font-size: 22px; }
  .book { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
