/* ============================================================
   BLOOM NOT BREAK — Design System
   A publishing & mental wellness brand.
   Palette: sage, lavender, beige, cream, ink, white.
   Type: Fraunces (display) + Manrope (body/UI)
   Signature: the "bloom line" — a lotus drawn in one continuous
   stroke that unfurls on load/scroll, echoing the brand mark.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root{
  /* ---- brand tokens ---- */
  --cream:      #FAF6EF;
  --beige:      #EFE6D6;
  --beige-deep: #E1D4BC;
  --sage:       #8A9A7E;
  --sage-deep:  #566249;
  --sage-mist:  #DCE3D4;
  --lavender:       #C3B4DE;
  --lavender-deep:  #7C63A6;
  --lavender-mist:  #EAE3F4;
  --ink:        #24211D;
  --ink-soft:   #4A463F;
  --white:      #FFFFFF;

  --font-display: 'Fraunces', serif;
  --font-body: 'Manrope', sans-serif;

  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 36px;

  --shadow-soft: 0 20px 60px -25px rgba(86, 98, 73, 0.25);
  --shadow-card: 0 10px 30px -12px rgba(36, 33, 29, 0.12);

  --ease: cubic-bezier(.22,1,.36,1);

  --bg: var(--cream);
  --surface: var(--white);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --border: rgba(36,33,29,0.1);
}

[data-theme="dark"]{
  --bg: #201E1A;
  --surface: #2A2822;
  --text: #F2EEE4;
  --text-soft: #C9C3B4;
  --border: rgba(242,238,228,0.12);
  --cream: #201E1A;
  --beige: #2A2822;
  --sage-mist: #33392C;
  --lavender-mist: #322C40;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family: inherit; cursor:pointer; }
input, textarea, select{ font-family: inherit; }

.container{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  margin: 0;
  color: var(--text);
}
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--sage-deep);
  font-weight: 700;
}
[data-theme="dark"] .eyebrow{ color: var(--sage); }
.eyebrow::before{
  content:"";
  width: 18px; height: 1px;
  background: var(--sage-deep);
  display:inline-block;
}
[data-theme="dark"] .eyebrow::before{ background: var(--sage); }

p{ color: var(--text-soft); line-height: 1.7; margin: 0; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s, color .3s;
  white-space: nowrap;
}
.btn-primary{
  background: var(--sage-deep);
  color: var(--white);
  box-shadow: 0 0 0 0 rgba(86,98,73,.4);
  position: relative;
}
.btn-primary::after{
  content:"";
  position:absolute; inset:-6px;
  border-radius: 999px;
  border: 1px solid var(--sage);
  opacity:.55;
  animation: breathe 3.6s ease-in-out infinite;
  pointer-events:none;
}
@keyframes breathe{
  0%,100%{ transform: scale(.94); opacity:.35; }
  50%{ transform: scale(1.06); opacity:.7; }
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn-ghost{
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover{ border-color: var(--sage-deep); transform: translateY(-2px); }
.btn-lav{ background: var(--lavender-deep); color:var(--white); }
.btn-lav:hover{ transform: translateY(-2px); box-shadow: 0 16px 40px -18px rgba(124,99,166,.55); }
.btn-sm{ padding: 10px 20px; font-size:.85rem; }
.btn-block{ width:100%; }

/* ---------- header / nav ---------- */
.site-header{
  position: sticky; top:0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav{
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 0;
}
.brand{ display:flex; align-items:center; gap:10px; }
.brand img{ height: 46px; width:auto; mix-blend-mode: multiply; }
[data-theme="dark"] .brand img{ mix-blend-mode: normal; filter: brightness(1.05); background:var(--white); border-radius:10px; padding:2px; }
.nav-links{ display:flex; align-items:center; gap: 30px; }
.nav-links a{
  font-size:.94rem; font-weight:600; color: var(--text-soft);
  position: relative; padding: 4px 0;
}
.nav-links a:hover{ color: var(--sage-deep); }
[data-theme="dark"] .nav-links a:hover{ color: var(--sage); }
.nav-links a.active{ color: var(--text); }
.nav-actions{ display:flex; align-items:center; gap:14px; }
.icon-btn{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  transition: transform .3s var(--ease), background .3s;
}
.icon-btn:hover{ transform: translateY(-2px); background: var(--sage-mist); }
.menu-toggle{ display:none; }

.search-panel{
  position:absolute; top:100%; left:0; right:0;
  background: var(--surface); border-bottom:1px solid var(--border);
  padding: 18px 0; transform: translateY(-8px); opacity:0; pointer-events:none;
  transition: all .3s var(--ease);
}
.search-panel.open{ transform: translateY(0); opacity:1; pointer-events:auto; }
.search-panel .container{ display:flex; gap:12px; }
.search-panel input{
  flex:1; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color:var(--text);
}

@media (max-width: 880px){
  .nav-links{
    position: fixed; inset: 70px 16px auto 16px;
    background: var(--surface); border-radius: var(--radius-md);
    flex-direction:column; align-items:flex-start; gap:4px;
    padding: 14px; box-shadow: var(--shadow-card);
    transform: translateY(-14px) scale(.98); opacity:0; pointer-events:none;
    transition: all .3s var(--ease);
    border: 1px solid var(--border);
  }
  .nav-links.open{ transform: translateY(0) scale(1); opacity:1; pointer-events:auto; }
  .nav-links a{ padding: 10px 12px; width:100%; border-radius: 10px; }
  .nav-links a:hover{ background: var(--sage-mist); }
  .menu-toggle{ display:flex; }
}

/* ---------- hero ---------- */
.hero{
  position: relative;
  padding: 90px 0 110px;
  overflow: hidden;
}
.hero-bg{
  position:absolute; inset:0; z-index:-1;
  background:
    radial-gradient(60% 55% at 18% 15%, var(--sage-mist), transparent 60%),
    radial-gradient(55% 50% at 85% 20%, var(--lavender-mist), transparent 60%),
    var(--bg);
}
.hero-grid{
  display:grid; grid-template-columns: 1.05fr .95fr; gap: 60px; align-items:center;
}
.hero h1{
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  letter-spacing: -0.01em;
}
.hero h1 em{
  font-style: italic; color: var(--sage-deep); font-weight:500;
}
[data-theme="dark"] .hero h1 em{ color: var(--sage); }
.hero p.lede{
  margin-top: 22px; font-size: 1.15rem; max-width: 480px;
}
.hero-ctas{ display:flex; gap:16px; margin-top:34px; flex-wrap:wrap; }
.hero-stats{ display:flex; gap:34px; margin-top: 46px; }
.hero-stat b{ display:block; font-family: var(--font-display); font-size:1.6rem; color:var(--text); }
.hero-stat span{ font-size:.82rem; color: var(--text-soft); }

.bloom-stage{ position:relative; display:flex; align-items:center; justify-content:center; }
.bloom-stage svg{ width: 100%; max-width: 420px; height:auto; }
.bloom-petal{
  stroke: var(--sage-deep);
  fill: none;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
  animation: unfurl 1.8s var(--ease) forwards;
}
.bloom-petal.fill{ fill: color-mix(in srgb, var(--lavender) 32%, transparent); }
@keyframes unfurl{ to{ stroke-dashoffset:0; } }
.bloom-stage .ring{
  position:absolute; width: 300px; height:300px; border-radius:50%;
  border: 1px dashed var(--border);
  animation: spin 60s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ---------- sections ---------- */
section{ padding: 96px 0; }
.section-head{ max-width: 640px; margin-bottom: 52px; }
.section-head h2{ font-size: clamp(1.9rem, 3.6vw, 2.6rem); margin-top:14px; }
.section-head p{ margin-top:16px; font-size:1.05rem; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }

.divider{
  display:flex; align-items:center; justify-content:center; gap:14px;
  color: var(--sage-deep); margin: 6px 0 0;
}
[data-theme="dark"] .divider{ color: var(--sage); }
.divider svg{ width:26px; height:26px; }
.divider::before,.divider::after{ content:""; height:1px; width:60px; background: var(--border); }

/* intro */
.intro{ background: var(--beige); }
.intro-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap: 30px; margin-top: 44px; }
.intro-card{
  background: var(--surface); border-radius: var(--radius-md); padding: 32px;
  border: 1px solid var(--border); transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.intro-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-card); }
.intro-card .ico{ width:44px; height:44px; margin-bottom:18px; color: var(--sage-deep); }
[data-theme="dark"] .intro-card .ico{ color: var(--sage); }
.intro-card h3{ font-size:1.2rem; margin-bottom:10px; }

/* cards grid - books */
.card-scroll{ display:grid; grid-auto-flow:column; grid-auto-columns: minmax(240px, 1fr); gap:26px; overflow-x:auto; padding-bottom:10px; scroll-snap-type:x mandatory; }
.card-scroll::-webkit-scrollbar{ height:6px; }
.card-scroll::-webkit-scrollbar-thumb{ background: var(--sage-mist); border-radius:10px; }
.book-card{
  scroll-snap-align:start;
  background: var(--surface); border-radius: var(--radius-md); overflow:hidden;
  border: 1px solid var(--border); transition: transform .35s var(--ease), box-shadow .35s;
  display:flex; flex-direction:column;
}
.book-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-card); }
.book-cover{
  aspect-ratio: 3/4; position:relative; overflow:hidden;
  transform-origin: left center;
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
  z-index:2;
}
.book-cover svg, .book-cover img{ width:100%; height:100%; display:block; object-fit:cover; }
.book-pages{
  position:absolute; inset:0 0 0 3px;
  background: repeating-linear-gradient(to bottom, #FBF8F1 0 2px, #E7DFCD 2px 3px);
  border-radius: 0 8px 8px 0;
  box-shadow: inset -3px 0 6px rgba(0,0,0,.18);
  z-index:1;
}
.book-card{ position:relative; perspective: 1300px; }
.book-card:hover .book-cover{
  transform: rotateY(-24deg);
  box-shadow: 10px 16px 34px -14px rgba(36,33,29,.4);
}
@media (hover:none){
  .book-card:hover .book-cover{ transform:none; box-shadow:none; }
}
.book-body{ padding:20px; display:flex; flex-direction:column; gap:10px; flex:1; }
.book-body h4{ font-size:1.05rem; }
.book-meta{ display:flex; align-items:center; justify-content:space-between; margin-top:auto; }
.price{ font-weight:800; font-family: var(--font-display); font-size:1.1rem; }

/* services */
.services-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:22px; }
.service-card{
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: 28px 24px; transition: transform .35s var(--ease), border-color .3s, box-shadow .35s;
}
.service-card:hover{ transform: translateY(-6px); border-color: var(--sage); box-shadow: var(--shadow-card); }
.service-num{ font-family: var(--font-display); font-style: italic; color: var(--lavender-deep); font-size:1.6rem; }
[data-theme="dark"] .service-num{ color: var(--lavender); }
.service-card h3{ font-size: 1.08rem; margin: 14px 0 10px; }
.service-card p{ font-size:.92rem; }
.service-card .btn{ margin-top:18px; }

/* community */
.community{ background: var(--lavender-mist); }
.community-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:40px; align-items:center; }
.pill-row{ display:flex; flex-wrap:wrap; gap:12px; margin-top:22px; }
.pill{
  padding:10px 18px; border-radius:999px; background: var(--surface);
  border:1px solid var(--border); font-size:.86rem; font-weight:600; display:flex; align-items:center; gap:8px;
}

/* testimonials */
.testi-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.testi-card{
  background: var(--surface); border-radius: var(--radius-md); padding:28px; border:1px solid var(--border);
  position:relative;
}
.testi-card .quote-mark{ font-family: var(--font-display); font-size:3rem; color: var(--sage-mist); line-height:0; display:block; margin-bottom:8px; }
[data-theme="dark"] .testi-card .quote-mark{ color: var(--sage-deep); }
.testi-person{ display:flex; align-items:center; gap:12px; margin-top:20px; }
.avatar{
  width:42px; height:42px; border-radius:50%; background: linear-gradient(135deg,var(--sage-mist),var(--lavender-mist));
  display:flex; align-items:center; justify-content:center; font-weight:700; color:var(--sage-deep);
}

/* newsletter */
.newsletter{
  background: var(--sage-deep); color: var(--white); border-radius: var(--radius-lg);
  padding: 60px 50px; display:grid; grid-template-columns: 1fr auto; gap:30px; align-items:center;
  position:relative; overflow:hidden;
}
.newsletter h2{ color:var(--white); }
.newsletter p{ color: rgba(255,255,255,.8); margin-top:10px; }
.newsletter form{ display:flex; gap:10px; min-width: 360px; }
.newsletter input{
  flex:1; padding:15px 20px; border-radius:999px; border:1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.12); color:#fff;
}
.newsletter input::placeholder{ color: rgba(255,255,255,.7); }
.newsletter .btn-primary{ background: var(--white); color: var(--sage-deep); }
.newsletter .btn-primary::after{ display:none; }

/* footer */
footer{ background: var(--ink); color: rgba(255,255,255,.75); padding: 70px 0 26px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap:40px; }
.footer-brand img{ height:44px; mix-blend-mode: normal; background:var(--white); border-radius:10px; padding:4px; margin-bottom:14px; }
.footer-brand p{ color: rgba(255,255,255,.6); max-width:280px; }
footer h4{ color:#fff; font-size:.95rem; margin-bottom:16px; }
footer ul li{ margin-bottom:10px; }
footer a{ color: rgba(255,255,255,.65); font-size:.92rem; }
footer a:hover{ color:#fff; }
.footer-social{ display:flex; gap:10px; margin-top:16px; }
.footer-social a{
  width:38px; height:38px; border-radius:50%; border:1px solid rgba(255,255,255,.2);
  display:flex; align-items:center; justify-content:center;
}
.footer-social a:hover{ background: rgba(255,255,255,.1); }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.12); margin-top:50px; padding-top:24px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:.85rem;
}
.footer-bottom a{ margin-left:18px; }


/* ========== NOTE MODAL ========== */
.note-modal{
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .6s var(--ease), visibility .6s;
}
.note-modal.open{
  opacity: 1; visibility: visible; pointer-events: auto;
}

/* soft blurred backdrop */
.note-backdrop{
  position:absolute; inset:0;
  background: rgba(36,33,29,.35);
  backdrop-filter: blur(10px) saturate(1.1);
  transition: backdrop-filter .6s var(--ease);
}

/* the paper itself */
.note-paper{
  position: relative;
  width: min(92vw, 480px);
  background: #FBF8F1;
  border-radius: 14px;
  box-shadow: 0 30px 80px -20px rgba(36,33,29,.35);
  transform: translateY(30px) scale(.92) rotate(-1.2deg);
  filter: blur(8px);
  opacity: 0;
  transition: transform .9s var(--ease), filter .9s var(--ease), opacity .9s;
  overflow: hidden;
  padding: 10px;
  /* NO aspect-ratio here — let it size to the image */
}
.note-modal.open .note-paper{
  transform: translateY(0) scale(1) rotate(0deg);
  filter: blur(0);
  opacity: 1;
}

/* paper texture + vignette */
.note-paper::before{
  content:"";
  position:absolute; inset:0;
  background-image: 
    radial-gradient(1200px 600px at 10% -20%, rgba(0,0,0,.04), transparent 60%),
    repeating-linear-gradient(0deg, rgba(0,0,0,.02) 0 2px, transparent 2px 3px);
  pointer-events:none;
}
.note-paper::after{
  content:"";
  position:absolute; inset:0;
  box-shadow: inset 0 0 80px rgba(0,0,0,.06);
  pointer-events:none;
}

/* taped corner detail */
.note-tape{
  position:absolute; top:-12px; left:50%; transform: translateX(-50%) rotate(4deg);
  width: 80px; height: 28px;
  background: rgba(255,255,255,.8);
  border: 1px dashed rgba(0,0,0,.06);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,.08);
  z-index:2;
}

/* the image */
.note-img{
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;   /* NOT cover */
  display: block;
  border-radius: 8px;
  mix-blend-mode: multiply;
  filter: contrast(1.02) saturate(.95);
}
[data-theme="dark"] .note-img{
  mix-blend-mode: normal;
  filter: brightness(1.02) contrast(1.05);
}

/* soft drop shadow under the paper */
.note-shadow{
  position:absolute; left:50%; bottom:-20px; transform: translateX(-50%);
  width: 70%; height: 34px;
  background: radial-gradient(60% 50% at 50% 50%, rgba(0,0,0,.25), transparent 70%);
  filter: blur(12px);
  pointer-events:none;
}

/* close button */
.note-close{
  position:absolute; top:10px; right:12px; z-index:3;
  width:34px; height:34px; border-radius:50%;
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.7);
  backdrop-filter: blur(6px);
  font-size:18px; line-height:1;
  display:grid; place-items:center;
  transition: transform .25s, background .25s;
}
.note-close:hover{ transform: scale(1.08); background:#fff; }

/* make the trigger button feel like a seal */
.bloom-note-trigger{
  position:absolute; bottom:-18px; left:50%; transform: translateX(-50%);
  display:inline-flex; align-items:center; gap:10px;
  padding:12px 18px; border-radius:999px;
  background: var(--white); border:1px solid var(--border);
  box-shadow: var(--shadow-card);
  font-weight:700; font-size:.85rem; letter-spacing:.02em;
  transition: transform .35s var(--ease), box-shadow .35s;
}
.bloom-note-trigger:hover{ transform: translateX(-50%) translateY(-3px); box-shadow: 0 18px 40px -16px rgba(36,33,29,.25); }
.bloom-note-trigger svg{ width:18px; height:18px; color: var(--sage-deep); }

@media (max-width: 520px){
  .note-paper{ width: min(94vw, 380px); }
  .note-tape{ width: 64px; height: 22px; }
  .note-shadow{ width: 80%; }
}



/* ========== TIC-TAC-TOE TRANSITION ==========
   Appears after the note modal closes, before returning to the site.
   Reuses design tokens from :root — drop this block anywhere after
   the existing NOTE MODAL section in styles.css. */

.ttt-overlay{
  position: fixed; inset: 0; z-index: 1100; /* above .note-modal (1000) */
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .5s var(--ease), visibility .5s;
  padding: 20px;
}
.ttt-overlay.open{ opacity: 1; visibility: visible; pointer-events: auto; }

.ttt-backdrop{
  position: absolute; inset: 0;
  background: rgba(36,33,29,.4);
  backdrop-filter: blur(12px) saturate(1.1);
}

.ttt-card{
  position: relative;
  width: min(92vw, 420px);
  max-height: 92vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 34px 30px 30px;
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(36,33,29,.35);
  transform: translateY(24px) scale(.94);
  opacity: 0;
  filter: blur(6px);
  transition: transform .6s var(--ease), opacity .6s var(--ease), filter .6s var(--ease);
}
.ttt-overlay.open .ttt-card{
  transform: translateY(0) scale(1);
  opacity: 1;
  filter: blur(0);
}

.ttt-eyebrow{
  font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--sage-deep); font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-bottom: 6px;
}
[data-theme="dark"] .ttt-eyebrow{ color: var(--sage); }
.ttt-eyebrow::before, .ttt-eyebrow::after{ content:""; width:16px; height:1px; background: var(--sage-deep); }
[data-theme="dark"] .ttt-eyebrow::before,
[data-theme="dark"] .ttt-eyebrow::after{ background: var(--sage); }

.ttt-title{ font-family: var(--font-display); font-size: 1.5rem; margin: 0 0 6px; color: var(--text); }
.ttt-sub{ font-size: .9rem; color: var(--text-soft); margin: 0 0 22px; line-height: 1.5; }

.ttt-board{
  display: grid; grid-template-columns: repeat(3,1fr); gap: 10px;
  margin: 0 auto 20px;
  width: min(280px, 100%);
}
.ttt-cell{
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--beige);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.9rem; font-weight: 500;
  cursor: pointer;
  transition: background .25s, transform .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding: 0;
}
.ttt-cell:hover:not(.filled){ background: var(--sage-mist); transform: translateY(-2px); }
.ttt-cell:active:not(.filled){ transform: translateY(0) scale(.97); }
.ttt-cell.x{ color: var(--lavender-deep); }
.ttt-cell.o{ color: var(--sage-deep); }
.ttt-cell.win{ background: var(--sage-mist); }
.ttt-cell.filled{ cursor: default; }

.ttt-status{
  min-height: 24px;
  font-weight: 700; font-size: .95rem;
  margin-bottom: 20px;
  color: var(--text);
}
.ttt-status .pulse{ color: var(--sage-deep); }
[data-theme="dark"] .ttt-status .pulse{ color: var(--sage); }

.ttt-actions{ display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ttt-btn{
  padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: .85rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  min-height: 44px; /* touch target */
}
.ttt-btn:hover{ transform: translateY(-2px); }
.ttt-btn.primary{ background: var(--sage-deep); color: #fff; }
.ttt-btn.ghost{ background: transparent; color: var(--text); border-color: var(--border); }

.ttt-skip{
  margin-top: 16px;
  font-size: .78rem;
  color: var(--text-soft);
  text-decoration: underline;
  cursor: pointer;
  background: none; border: none;
  font-family: inherit;
  padding: 8px; /* comfortable tap area even though text is small */
}

.ttt-thinking{ display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--text-soft); }
.ttt-thinking .dot{
  width: 6px; height: 6px; border-radius: 50%; background: var(--sage-deep);
  animation: tttDotPulse 1s infinite ease-in-out;
}
[data-theme="dark"] .ttt-thinking .dot{ background: var(--sage); }
.ttt-thinking .dot:nth-child(2){ animation-delay: .15s; }
.ttt-thinking .dot:nth-child(3){ animation-delay: .3s; }
@keyframes tttDotPulse{ 0%,100%{ opacity:.25; transform:scale(.8);} 50%{ opacity:1; transform:scale(1);} }

/* ---- mobile ---- */
@media (max-width: 520px){
  .ttt-card{
    width: min(94vw, 380px);
    padding: 28px 20px 24px;
    border-radius: var(--radius-md);
  }
  .ttt-title{ font-size: 1.3rem; }
  .ttt-board{ width: min(240px, 100%); gap: 8px; }
  .ttt-cell{ font-size: 1.6rem; border-radius: 12px; }
  .ttt-actions{ flex-direction: column; }
  .ttt-btn{ width: 100%; }
}

/* very short viewports (landscape phones) — keep everything reachable */
@media (max-height: 560px){
  .ttt-overlay{ align-items: flex-start; padding-top: 16px; }
  .ttt-card{ max-height: 96vh; }
  .ttt-sub{ margin-bottom: 14px; }
  .ttt-board{ margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce){
  .ttt-overlay, .ttt-card, .ttt-cell, .ttt-btn, .ttt-thinking .dot{
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
/* page hero (inner pages) */
.page-hero{ padding: 64px 0 50px; text-align:center; background: var(--beige); }
.page-hero .eyebrow{ justify-content:center; }
.page-hero h1{ margin-top:14px; font-size: clamp(2.2rem,4.4vw,3.2rem); }
.page-hero p{ max-width:600px; margin: 16px auto 0; }
.breadcrumbs{ font-size:.85rem; color: var(--text-soft); margin-top:16px; }

/* generic content blocks */
.two-col{ display:grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items:center; }
.value-grid{ display:grid; grid-template-columns: repeat(2,1fr); gap:22px; }
.value-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-md); padding:26px; }
.value-card .ico{ color: var(--lavender-deep); width:32px; height:32px; margin-bottom:12px; }
[data-theme="dark"] .value-card .ico{ color: var(--lavender); }

.timeline{ border-left: 2px solid var(--border); padding-left: 30px; display:flex; flex-direction:column; gap:34px; }
.timeline-item{ position:relative; }
.timeline-item::before{
  content:""; position:absolute; left:-37px; top:4px; width:12px; height:12px; border-radius:50%;
  background: var(--sage-deep);
}
[data-theme="dark"] .timeline-item::before{ background: var(--sage); }
.timeline-item h4{ font-size:1.05rem; }

/* shop filters */
.filter-row{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:36px; }
.filter-chip{
  padding:10px 18px; border-radius:999px; border:1px solid var(--border); background: var(--surface);
  font-size:.86rem; font-weight:600; transition: all .25s;
}
.filter-chip.active, .filter-chip:hover{ background: var(--sage-deep); color:#fff; border-color: var(--sage-deep); }
.shop-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:24px; }

/* events */
.event-card{
  display:grid; grid-template-columns: 110px 1fr auto; gap:24px; align-items:center;
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-md);
  padding: 22px; margin-bottom:18px;
}
.event-date{
  background: var(--sage-mist); border-radius: var(--radius-sm); text-align:center; padding:14px 0;
  font-family: var(--font-display);
}
.event-date b{ display:block; font-size:1.5rem; }
.event-date span{ font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; color: var(--sage-deep); }
[data-theme="dark"] .event-date{ background: var(--sage-mist); }
.tag{ display:inline-block; font-size:.72rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; padding:5px 12px; border-radius:999px; background: var(--lavender-mist); color: var(--lavender-deep); margin-bottom:8px; }
.gallery-grid{ display:grid; grid-template-columns: repeat(4,1fr); gap:16px; }
.gallery-grid div{ aspect-ratio:1; border-radius: var(--radius-sm); background: linear-gradient(135deg,var(--sage-mist),var(--lavender-mist)); overflow:hidden; position:relative; }
.gallery-grid img{ width:100%; height:100%; object-fit:cover; display:block; transition: transform .5s var(--ease); }
.gallery-grid div:hover img{ transform: scale(1.06); }

/* blog */
.blog-grid{ display:grid; grid-template-columns: repeat(3,1fr); gap:26px; }
.blog-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-md); overflow:hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.blog-card:hover{ transform: translateY(-6px); box-shadow: var(--shadow-card); }
.blog-thumb{ aspect-ratio: 16/10; }
.blog-body{ padding:22px; display:flex; flex-direction:column; gap:10px; }
.blog-meta{ font-size:.8rem; color: var(--text-soft); display:flex; gap:10px; align-items:center; }

/* community page */
.checkin-card{ background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-md); padding: 30px; }
.wa-banner{
  background: linear-gradient(120deg, #DCE3D4, #EAE3F4);
  border-radius: var(--radius-md); padding: 34px; display:flex; align-items:center; justify-content:space-between; gap:20px; flex-wrap:wrap;
}

/* contact */
.contact-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:50px; }
.form-field{ margin-bottom:18px; }
.form-field label{ display:block; font-size:.85rem; font-weight:700; margin-bottom:8px; }
.form-field input, .form-field textarea{
  width:100%; padding:14px 16px; border-radius: var(--radius-sm); border:1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.contact-info-item{ display:flex; gap:16px; align-items:flex-start; margin-bottom:26px; }
.contact-info-item .ico{ width:40px; height:40px; border-radius:50%; background: var(--sage-mist); display:flex; align-items:center; justify-content:center; color: var(--sage-deep); flex-shrink:0; }
[data-theme="dark"] .contact-info-item .ico{ color: var(--sage); }
.map-frame{ border-radius: var(--radius-md); overflow:hidden; border:1px solid var(--border); }

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

/* utility */
.mt{ margin-top:60px; }
.center{ text-align:center; }
.badge-soft{ background: var(--sage-mist); color: var(--sage-deep); padding:6px 14px; border-radius:999px; font-size:.78rem; font-weight:700; }

@media (max-width: 980px){
  .hero-grid, .two-col, .community-grid, .contact-grid{ grid-template-columns: 1fr; }
  .intro-grid, .value-grid{ grid-template-columns: 1fr 1fr; }
  .services-grid, .testi-grid, .shop-grid, .blog-grid{ grid-template-columns: repeat(2,1fr); }
  .gallery-grid{ grid-template-columns: repeat(2,1fr); }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .newsletter{ grid-template-columns: 1fr; text-align:center; }
  .newsletter form{ min-width:0; }
  .event-card{ grid-template-columns: 80px 1fr; }
  .event-card .btn{ grid-column: 1/-1; }
}
@media (max-width: 620px){
  .intro-grid, .value-grid, .services-grid, .testi-grid, .shop-grid, .blog-grid, .gallery-grid, .footer-grid{ grid-template-columns: 1fr; }
  .hero-stats{ gap:22px; flex-wrap:wrap; }
  section{ padding: 64px 0; }
  .book-card:hover .book-cover{ transform: rotateY(-14deg); }
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
