html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Theme tokens */
:root {
    --brand: #6f8f8a;        /* sage */
    --brand-2: #a0b9a8;      /* light sage */
    --accent: #c59fc9;       /* lavender */
    --accent-2: #f3d7ff;     /* light lavender */
    --ink: #20302d;          /* deep green-grey */
    --ink-soft: #4a5a56;
    --bg: #f7fbfa;           /* soft off-white */
    --muted: #eaf2f0;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(32,48,45,0.07);
    /* Background watermark config */
    --bg-image: url('/img/background.png');
    --bg-opacity: 0.12; /* lower = less visible */
    --section-surface-alpha: 0.78; /* tweak 0.70–0.88 to taste */
}

/* Base */
html, body {
    height: 100%;
    background: var(--bg);
    color: var(--ink);
}
html { scroll-behavior: smooth; }

/* Sticky header */
.km-header {
    position: sticky;
    top: 0;
    z-index: 1020; /* above content, below offcanvas if any */
}
.km-navbar {
    background: linear-gradient(180deg, var(--white), #ffffffcc);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--muted);
}

/* Fixed centered watermark background (grayscale, less visible) */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--bg-image);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain; /* as big as possible without cropping */
    /* Remain static while scrolling */
    will-change: transform;
    z-index: 0;
    filter: grayscale(100%) contrast(95%) brightness(1.05);
    opacity: var(--bg-opacity);
    pointer-events: none;
}

/* Ensure foreground content sits above */
.km-main, .hero, .styles-wrapper, .container, header, footer {
    position: relative;
    z-index: 1;
}

/* If you also use the floral left border via body::before, keep it below content */
body::before { z-index: 0; }

/* Respect reduced motion (optional) */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* Accessibility */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header / brand */
.km-navbar {
    background: linear-gradient(180deg, var(--white), #ffffffcc);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid var(--muted);
}
.brand-logo {
    width: 42px; height: 42px; object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.08));
}
.brand-text { display: inline-flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 700; letter-spacing: .5px; color: var(--ink); }
.brand-slogan { color: var(--ink-soft); font-size: .8rem; }

/* Hero */
.hero {
    padding: 5rem 0 2rem;
    background: radial-gradient(1000px 400px at 50% 0%, var(--accent-2), transparent 60%);
}
.hero .lead { color: var(--ink-soft); }
.hero .btn { box-shadow: var(--shadow); }

/* Left floral border (CSS inline SVG) */
body::before {
    content: "";
    position: fixed; inset: 0 auto 0 0;
    width: 84px; z-index: 0; pointer-events: none;
    background:
      url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='84' height='1200' viewBox='0 0 84 1200'>\
<defs>\
<linearGradient id='g' x1='0' y1='0' x2='0' y2='1'>\
<stop offset='0%' stop-color='%23a0b9a8'/>\
<stop offset='100%' stop-color='%236f8f8a'/>\
</linearGradient>\
</defs>\
<rect width='84' height='1200' fill='%23f7fbfa'/>\
<path d='M42 0 C30 120, 56 240, 36 360 C16 480, 60 600, 32 720 C8 840, 48 960, 28 1080' fill='none' stroke='%236f8f8a' stroke-width='2'/>\
<g fill='%23c59fc9'>\
<circle cx='30' cy='110' r='6'/>\
<circle cx='52' cy='210' r='5'/>\
<circle cx='26' cy='330' r='7'/>\
<circle cx='54' cy='470' r='6'/>\
<circle cx='22' cy='590' r='5'/>\
<circle cx='50' cy='730' r='7'/>\
<circle cx='24' cy='870' r='6'/>\
<circle cx='48' cy='1010' r='5'/>\
</g>\
<g fill='%23a0b9a8' opacity='.65'>\
<circle cx='20' cy='160' r='3'/>\
<circle cx='60' cy='260' r='3'/>\
<circle cx='18' cy='400' r='3'/>\
<circle cx='62' cy='540' r='3'/>\
<circle cx='16' cy='680' r='3'/>\
<circle cx='58' cy='820' r='3'/>\
<circle cx='14' cy='960' r='3'/>\
</g>\
</svg>") no-repeat left top / 84px auto;
    box-shadow: inset -20px 0 30px -20px rgba(0,0,0,.07);
}

/* Main / scroll snapping for sections */
.styles-wrapper > section {
    scroll-snap-align: start;
    min-height: 80vh;
    display: flex; align-items: center;
    padding: 4rem 0;
    transition: background 600ms ease, transform 600ms ease, opacity 600ms ease;
    opacity: .92;
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
}
.styles-wrapper .container { max-width: 900px; }
.yoga-section h2 { font-weight: 700; margin-bottom: .5rem; }
.yoga-section p { color: var(--ink-soft); }

/* Distinct backgrounds per section */
.theme-vinyasa { background: linear-gradient(135deg, #e8fff6, #fff, transparent 85%); }
.theme-hatha { background: linear-gradient(135deg, #f1f6ff, #fff, transparent 85%); }
.theme-yin { background: linear-gradient(135deg, #fff2fb, #fff, transparent 85%); }
.theme-gentle { background: linear-gradient(135deg, #fffbe9, #fff, transparent 85%); }
.theme-restorative { background: linear-gradient(135deg, #eefcf7, #fff, transparent 85%); }

/* In-view transitions */
.yoga-section { transform: translateY(12px); opacity: .0; }
.yoga-section.in-view { transform: translateY(0); opacity: 1; }

/* Styles quick nav */
.styles-nav .nav-link { color: var(--ink-soft); border-radius: 999px; }
.styles-nav .nav-link:hover { background: var(--muted); color: var(--ink); }

/* Butterflies */
.butterfly {
    position: fixed;
    left: -50px;
    font-size: 20px;
    will-change: transform, opacity;
    animation: fly linear forwards;
    pointer-events: none;
    filter: drop-shadow(0 2px 2px rgba(0,0,0,.1));
    z-index: 10;
}
@keyframes fly {
    0% { transform: translate3d(-60px, var(--y, 50vh), 0) rotate(0deg) scale(var(--s,1)); opacity: 0; }
    5% { opacity: 1; }
    50% { transform: translate3d(50vw, calc(var(--y, 50vh) - 60px), 0) rotate(10deg) scale(var(--s,1)); }
    100% { transform: translate3d(110vw, calc(var(--y, 50vh) - 20px), 0) rotate(-10deg) scale(var(--s,1)); opacity: 0; }
}

/* Footer */
.km-footer {
    border-top: 1px solid var(--muted);
    background: #ffffffc9;
    backdrop-filter: blur(6px);
    padding: 1rem 0;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .yoga-section, .yoga-section.in-view { transition: none !important; transform: none !important; opacity: 1 !important; }
    .butterfly { display: none !important; }
}

/* Layering */
.km-main, .hero, .styles-wrapper { position: relative; z-index: 1; }