/* ============================================================
   Chess Republic — Storybook x Grand Master Hall theme
   Demo build
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght,SOFT,WONK@9..144,300..900,0..100,0..1&family=Outfit:wght@300..800&family=Caveat:wght@500;700&display=swap');

:root {
    --parchment: #f5ebd6;
    --parchment-deep: #ecdfc1;
    --parchment-shadow: #e2d2af;
    --ink: #1b2440;
    --ink-soft: #2a345a;
    --wine: #8b1e3f;
    --wine-deep: #6f1631;
    --gold: #c9a14a;
    --gold-deep: #a8842f;
    --sage: #7d9670;
    --coral: #e07856;
    --cream: #fbf6e9;
    --char: #14171f;

    --shadow-soft: 0 6px 24px rgba(27, 36, 64, 0.08);
    --shadow-card: 0 14px 40px -12px rgba(27, 36, 64, 0.18);
    --shadow-deep: 0 28px 60px -18px rgba(27, 36, 64, 0.32);

    --radius-sm: 8px;
    --radius: 18px;
    --radius-lg: 32px;

    --max: 1240px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Outfit', system-ui, sans-serif;
    background: var(--parchment);
    color: var(--ink);
    line-height: 1.55;
    font-size: 17px;
    overflow-x: hidden;
    background-image:
        radial-gradient(circle at 20% 0%, rgba(201, 161, 74, 0.08), transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(139, 30, 63, 0.06), transparent 55%),
        url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0 0.05  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------------- Typography ---------------- */
h1, h2, h3, h4 {
    font-family: 'Fraunces', 'Times New Roman', serif;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.05;
    letter-spacing: -0.02em;
    font-variation-settings: "SOFT" 30, "WONK" 1;
}

h1 { font-size: clamp(2.6rem, 6.5vw, 5.4rem); }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
h4 { font-size: 1.15rem; letter-spacing: 0; }

.scribble {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    color: var(--wine);
    letter-spacing: 0.02em;
}

.eyebrow {
    font-family: 'Outfit', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gold-deep);
    display: inline-flex;
    align-items: center;
    gap: 14px;
}
.eyebrow::before, .eyebrow::after {
    content: "";
    width: 32px;
    height: 1px;
    background: var(--gold);
}
.eyebrow.left::before, .eyebrow.right::after { display: inline-block; }
.eyebrow.left::after, .eyebrow.right::before { display: none; }

a { color: inherit; }

/* ---------------- Reusable ---------------- */
.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    white-space: nowrap;
}
.btn-primary {
    background: var(--ink);
    color: var(--cream);
    box-shadow: 0 8px 22px -6px rgba(27,36,64,0.55);
}
.btn-primary:hover {
    background: var(--wine);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -8px rgba(139,30,63,0.55);
}
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border: 1.5px solid var(--ink);
}
.btn-ghost:hover {
    background: var(--ink);
    color: var(--cream);
    transform: translateY(-2px);
}
.btn-gold {
    background: var(--gold);
    color: var(--ink);
}
.btn-gold:hover { background: var(--gold-deep); color: var(--cream); transform: translateY(-2px); }

.btn-arrow::after {
    content: "→";
    font-size: 1.1em;
    transition: transform 0.25s ease;
}
.btn:hover .btn-arrow::after { transform: translateX(4px); }

/* ---------------- Header ---------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(245, 235, 214, 0.85);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(27,36,64,0.08);
}
.nav-wrap {
    max-width: var(--max);
    margin: 0 auto;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ink);
}
.brand-mark {
    width: 46px;
    height: 46px;
    background: var(--ink);
    border-radius: 12px;
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.brand-mark::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 50%, rgba(201,161,74,0.4) 50%);
}
.brand-mark svg { position: relative; z-index: 1; }
.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}
.brand-text strong {
    font-family: 'Fraunces', serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}
.brand-text small {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--gold-deep);
    margin-top: 4px;
}

.main-nav {
    display: flex;
    gap: 4px;
    align-items: center;
}
.main-nav a {
    text-decoration: none;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
    position: relative;
}
.main-nav a:hover { background: rgba(27,36,64,0.06); }
.main-nav a.active { color: var(--wine); }
.main-nav a.active::after {
    content: "";
    position: absolute;
    bottom: 4px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--wine);
    border-radius: 1px;
}

.nav-cta { display: flex; gap: 6px; align-items: center; }
.nav-portal-link {
    text-decoration: none;
    padding: 10px 16px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 999px;
    color: var(--ink);
    transition: background 0.2s;
    white-space: nowrap;
}
.nav-portal-link:hover { background: rgba(27,36,64,0.06); }

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: var(--ink);
}
.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--ink);
    margin: 5px 0;
    transition: transform 0.3s ease;
}

/* ---------------- HERO ---------------- */
.hero {
    position: relative;
    padding: 80px 0 60px;
    overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }

/* Floating chess pieces in hero background */
.floating-pieces {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}
.float-piece {
    position: absolute;
    line-height: 1;
    user-select: none;
    will-change: transform;
    color: var(--ink);
    opacity: 0.22;
    filter: drop-shadow(0 4px 8px rgba(27,36,64,0.08));
}
.float-piece.p1  { top: 5%;   left: 2%;   font-size: clamp(5rem, 9vw, 10rem); color: var(--wine);      opacity: 0.28; animation: drift1 22s ease-in-out infinite; }
.float-piece.p2  { top: 14%;  left: 36%;  font-size: clamp(3rem, 5vw, 5.5rem); color: var(--ink);       opacity: 0.20; animation: drift2 18s ease-in-out infinite; }
.float-piece.p3  { bottom: 8%; left: 4%;  font-size: clamp(3.5rem, 5.5vw, 6rem); color: var(--gold-deep); opacity: 0.45; animation: drift3 16s ease-in-out infinite; }
.float-piece.p4  { top: 46%;  left: 40%;  font-size: clamp(4rem, 7vw, 8rem);   color: var(--wine);      opacity: 0.18; animation: drift4 24s ease-in-out infinite; }
.float-piece.p5  { bottom: 14%; right: 36%; font-size: clamp(3.5rem, 5.5vw, 6rem); color: var(--gold-deep); opacity: 0.40; animation: drift5 20s ease-in-out infinite; }
.float-piece.p6  { top: 26%;  right: 34%; font-size: clamp(3rem, 4.5vw, 5rem);  color: var(--ink);       opacity: 0.22; animation: drift6 19s ease-in-out infinite; }
.float-piece.p7  { top: 35%;  left: 18%;  font-size: clamp(2.8rem, 4vw, 4.5rem); color: var(--gold-deep); opacity: 0.32; animation: drift1 26s ease-in-out infinite reverse; }
.float-piece.p8  { bottom: 32%; left: 22%; font-size: clamp(3.2rem, 4.8vw, 5.5rem); color: var(--wine);  opacity: 0.22; animation: drift4 21s ease-in-out infinite reverse; }
.float-piece.p9  { top: 60%;  left: 8%;   font-size: clamp(2.4rem, 3.6vw, 3.8rem); color: var(--ink);    opacity: 0.25; animation: drift2 17s ease-in-out infinite reverse; }
.float-piece.p10 { bottom: 4%; left: 34%; font-size: clamp(2.6rem, 4vw, 4.2rem); color: var(--gold-deep); opacity: 0.38; animation: drift6 23s ease-in-out infinite; }
.float-piece.p11 { top: 8%;   left: 20%;  font-size: clamp(2.2rem, 3.2vw, 3.4rem); color: var(--ink);   opacity: 0.20; animation: drift5 18s ease-in-out infinite reverse; }
.float-piece.p12 { bottom: 38%; left: 1%; font-size: clamp(2.8rem, 4.4vw, 4.8rem); color: var(--wine);  opacity: 0.24; animation: drift3 19s ease-in-out infinite; }

@keyframes drift1 { 0%,100% { transform: translate(0,0) rotate(-8deg); } 50% { transform: translate(20px,-30px) rotate(-2deg); } }
@keyframes drift2 { 0%,100% { transform: translate(0,0) rotate(5deg); }  50% { transform: translate(-25px,25px) rotate(12deg); } }
@keyframes drift3 { 0%,100% { transform: translate(0,0) rotate(-15deg); } 33% { transform: translate(15px,-20px) rotate(-5deg); } 66% { transform: translate(-10px,-10px) rotate(-12deg); } }
@keyframes drift4 { 0%,100% { transform: translate(0,0) rotate(0deg); }  50% { transform: translate(30px,-40px) rotate(8deg); } }
@keyframes drift5 { 0%,100% { transform: translate(0,0) rotate(10deg); } 50% { transform: translate(-20px,30px) rotate(0deg); } }
@keyframes drift6 { 0%,100% { transform: translate(0,0) rotate(-5deg); } 50% { transform: translate(15px,25px) rotate(5deg); } }

@media (prefers-reduced-motion: reduce) {
    .float-piece { animation: none; }
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 60px;
    align-items: center;
}
.hero-eyebrow { margin-bottom: 28px; }
.hero h1 {
    margin-bottom: 24px;
    font-weight: 500;
}
.hero h1 .ital {
    font-style: italic;
    font-weight: 400;
    color: var(--wine);
    position: relative;
    display: inline-block;
}
.hero h1 .ital::after {
    content: "";
    position: absolute;
    left: -2%;
    right: -2%;
    bottom: -6px;
    height: 14px;
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'><path d='M2 8 Q 50 2 100 8 T 198 6' stroke='%23c9a14a' stroke-width='3' fill='none' stroke-linecap='round'/></svg>") no-repeat center / 100% 100%;
}
.hero p.lede {
    font-size: 1.18rem;
    color: var(--ink-soft);
    max-width: 540px;
    margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 44px; }
.hero-trust {
    display: flex;
    gap: 28px;
    align-items: center;
    flex-wrap: wrap;
}
.trust-item {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--gold);
    padding-left: 14px;
}
.trust-item strong {
    font-family: 'Fraunces', serif;
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
}
.trust-item span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-soft);
    margin-top: 6px;
}

/* Hero imagery cluster */
.hero-visual {
    position: relative;
    aspect-ratio: 5/6;
    width: 100%;
}
.hero-frame {
    position: absolute;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-deep);
    border: 6px solid var(--cream);
}
.hero-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-frame.main {
    inset: 4% 6% 22% 0;
    transform: rotate(-2deg);
    z-index: 2;
}
.hero-frame.sub {
    width: 56%;
    aspect-ratio: 4/3;
    right: 0;
    bottom: 4%;
    transform: rotate(4deg);
    z-index: 3;
}
.hero-badge {
    position: absolute;
    z-index: 4;
    background: var(--ink);
    color: var(--cream);
    padding: 18px 22px;
    border-radius: 18px;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1rem;
    line-height: 1.2;
    box-shadow: var(--shadow-card);
    transform: rotate(-6deg);
    max-width: 200px;
}
.hero-badge.tl { top: -2%; left: 30%; }
.hero-badge strong {
    display: block;
    font-style: normal;
    color: var(--gold);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

/* Decorative chess board pattern */
.checker-strip {
    height: 18px;
    background-image:
        linear-gradient(45deg, var(--ink) 25%, transparent 25%),
        linear-gradient(-45deg, var(--ink) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--ink) 75%),
        linear-gradient(-45deg, transparent 75%, var(--ink) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 0 9px, 9px -9px, -9px 0;
    opacity: 0.85;
}

/* ---------------- Animated mini chess board ---------------- */
.board-demo {
    background: linear-gradient(180deg, var(--parchment), var(--parchment-deep));
    overflow: hidden;
}
.board-demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.board-demo-grid .eyebrow { margin-bottom: 22px; }
.board-demo-grid h2 { margin-bottom: 22px; }
.board-demo-grid h2 em { color: var(--wine); font-style: italic; }
.board-demo-grid p { color: var(--ink-soft); margin-bottom: 18px; font-size: 1.05rem; }
.board-demo-grid .pillar-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 26px 0 32px;
}
.board-demo-grid .mini-pillar {
    padding: 14px 16px;
    background: var(--cream);
    border-radius: 12px;
    border: 1px solid rgba(27,36,64,0.08);
}
.board-demo-grid .mini-pillar strong {
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    display: block;
    color: var(--wine);
    line-height: 1;
}
.board-demo-grid .mini-pillar span {
    font-size: 0.8rem;
    color: var(--ink-soft);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 6px;
    display: block;
}

.board-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}
.mini-board {
    width: min(440px, 100%);
    aspect-ratio: 1;
    position: relative;
    background: var(--cream);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-deep);
    border: 10px solid var(--ink);
}
.mb-grid {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(8, 1fr);
}
.sq { transition: background 0.4s ease; }
.sq-light { background: #f5ebd6; }
.sq-dark  { background: #c9a14a; }
.sq.last-move-from { background: rgba(139,30,63,0.25); }
.sq.last-move-to   { background: rgba(139,30,63,0.45); }
.mb-pieces {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.mb-piece {
    position: absolute;
    top: 0; left: 0;
    width: 12.5%;
    height: 12.5%;
    display: grid;
    place-items: center;
    font-size: clamp(1.6rem, 4.4vw, 2.6rem);
    line-height: 1;
    transition: transform 0.7s cubic-bezier(0.34, 1.4, 0.64, 1), opacity 0.35s ease;
    will-change: transform;
}
.mb-piece.white { color: #fbf6e9; text-shadow: 0 0 1px var(--ink), 0 1px 0 rgba(0,0,0,0.45), 0 0 4px rgba(0,0,0,0.2); }
.mb-piece.black { color: var(--ink); text-shadow: 0 1px 0 rgba(255,255,255,0.35); }
.mb-piece.captured { opacity: 0; transform: var(--cap-transform, scale(0.4)) !important; }
.mb-piece.checkmated { animation: mate-pulse 1.1s ease-in-out 3; }

@keyframes mate-pulse {
    0%,100% { filter: drop-shadow(0 0 0 var(--wine)); }
    50%     { filter: drop-shadow(0 0 14px var(--wine)); }
}

.board-status {
    text-align: center;
    background: var(--ink);
    color: var(--cream);
    padding: 14px 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-card);
    max-width: 100%;
}
.board-move-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold);
    white-space: nowrap;
}
.board-move-no {
    font-family: 'Fraunces', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--gold);
    line-height: 1;
}
.board-move-text {
    font-size: 0.9rem;
    color: var(--cream);
    font-style: italic;
    font-family: 'Fraunces', serif;
}

@media (max-width: 880px) {
    .board-demo-grid { grid-template-columns: 1fr; gap: 50px; }
    .board-demo-grid .pillar-row { grid-template-columns: 1fr; }
    .board-stage { order: -1; }
}

/* ---------------- Marquee ---------------- */
.marquee {
    background: var(--ink);
    color: var(--cream);
    padding: 22px 0;
    overflow: hidden;
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
}
.marquee-track {
    display: flex;
    gap: 60px;
    animation: marquee 36s linear infinite;
    white-space: nowrap;
    width: max-content;
}
.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.4rem;
}
.marquee-item::after {
    content: "♚";
    color: var(--gold);
    font-style: normal;
    font-size: 1.1rem;
}
@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* ---------------- Section base ---------------- */
section { position: relative; padding: 110px 0; }
.section-head {
    max-width: 760px;
    margin: 0 auto 64px;
    text-align: center;
}
.section-head .eyebrow { margin-bottom: 22px; }
.section-head h2 { margin-bottom: 18px; }
.section-head p { color: var(--ink-soft); font-size: 1.1rem; }

/* ---------------- Why us cards ---------------- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.why-card {
    background: var(--cream);
    padding: 36px 32px 32px;
    border-radius: var(--radius);
    border: 1px solid rgba(27,36,64,0.07);
    box-shadow: var(--shadow-soft);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.why-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-deep);
}
.why-num {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 4.5rem;
    line-height: 0.9;
    color: var(--gold);
    opacity: 0.85;
    margin-bottom: 18px;
    display: block;
}
.why-card h3 {
    margin-bottom: 12px;
    font-weight: 500;
}
.why-card p { color: var(--ink-soft); font-size: 0.98rem; }

/* ---------------- Programs / Levels ---------------- */
.programs {
    background: var(--ink);
    color: var(--cream);
}
.programs .section-head h2,
.programs .section-head p { color: var(--cream); }
.programs .eyebrow { color: var(--gold); }
.programs .eyebrow::before, .programs .eyebrow::after { background: var(--gold); }

.levels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.level {
    background: var(--ink-soft);
    padding: 30px 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(201,161,74,0.18);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
    min-height: 320px;
    display: flex;
    flex-direction: column;
}
.level:hover {
    transform: translateY(-8px);
    border-color: var(--gold);
}
.level-rank {
    font-family: 'Caveat', cursive;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 12px;
}
.level h3 {
    color: var(--cream);
    font-size: 1.4rem;
    margin-bottom: 14px;
    font-weight: 500;
}
.level p {
    color: rgba(251,246,233,0.7);
    font-size: 0.9rem;
    flex: 1;
}
.level-piece {
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-size: 6rem;
    color: var(--gold);
    opacity: 0.12;
    line-height: 1;
}

/* ---------------- Story / About blurb ---------------- */
.story {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}
.story-images {
    position: relative;
    aspect-ratio: 1/1;
}
.story-images .frame {
    position: absolute;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 6px solid var(--cream);
}
.story-images .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-images .frame.a { inset: 0 30% 30% 0; transform: rotate(-3deg); z-index: 2; }
.story-images .frame.b { width: 65%; aspect-ratio: 4/3; right: 0; bottom: 0; transform: rotate(2deg); z-index: 3; }
.story-quote {
    position: absolute;
    z-index: 4;
    left: 30%;
    bottom: 8%;
    background: var(--gold);
    color: var(--ink);
    padding: 18px 22px;
    border-radius: 14px;
    font-family: 'Caveat', cursive;
    font-size: 1.4rem;
    line-height: 1.1;
    transform: rotate(-4deg);
    max-width: 220px;
    box-shadow: var(--shadow-card);
}

.story-content .eyebrow { margin-bottom: 22px; }
.story-content h2 { margin-bottom: 24px; }
.story-content h2 em { color: var(--wine); font-style: italic; }
.story-content p { color: var(--ink-soft); margin-bottom: 18px; font-size: 1.05rem; }
.story-content .pillars {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin: 32px 0;
}
.pillar {
    padding: 18px;
    border-left: 2px solid var(--gold);
    background: rgba(201,161,74,0.06);
    border-radius: 0 12px 12px 0;
}
.pillar strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 1.05rem;
    margin-bottom: 4px;
}
.pillar span { font-size: 0.88rem; color: var(--ink-soft); }

/* ---------------- Locations ---------------- */
.locations {
    background:
        linear-gradient(180deg, transparent, rgba(27,36,64,0.04));
}
.locations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.loc {
    background: var(--cream);
    padding: 26px 26px 22px;
    border-radius: var(--radius);
    border: 1px solid rgba(27,36,64,0.08);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
}
.loc::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    border: 2px solid var(--gold);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.loc:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.loc:hover::before { opacity: 1; }
.loc-name {
    font-family: 'Fraunces', serif;
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.loc-name span {
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--gold-deep);
    font-weight: 600;
}
.loc-meta {
    color: var(--ink-soft);
    font-size: 0.92rem;
    margin-bottom: 16px;
}
.loc-link {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 600;
    color: var(--wine);
    text-decoration: none;
}

/* ---------------- Google Reviews widget ---------------- */
.google-reviews {
    background:
        radial-gradient(circle at 90% 10%, rgba(201,161,74,0.08), transparent 50%),
        var(--parchment);
}
.gr-head {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 40px;
    align-items: end;
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(27,36,64,0.1);
}
.gr-meta { max-width: 720px; }
.gr-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    flex-wrap: wrap;
}
.gr-google-mark {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--cream);
    border: 1.5px solid rgba(27,36,64,0.1);
    display: grid;
    place-items: center;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.2rem;
    background-image: linear-gradient(135deg, #4285F4 0%, #4285F4 25%, #DB4437 25%, #DB4437 50%, #F4B400 50%, #F4B400 75%, #0F9D58 75%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.gr-rating-num {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1;
}
.gr-stars {
    color: var(--gold);
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    line-height: 1;
}
.gr-stars-sm { font-size: 1rem; }
.gr-meta-text {
    font-size: 0.92rem;
    color: var(--ink-soft);
}
.gr-meta-text strong { color: var(--ink); font-weight: 600; }

.gr-head .btn { white-space: nowrap; }

.gr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}
.gr-card {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 28px 26px 22px;
    border: 1px solid rgba(27,36,64,0.08);
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}
.gr-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}
.gr-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.gr-source {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(27,36,64,0.1);
    background: #fff;
    display: grid;
    place-items: center;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: #4285F4;
    flex-shrink: 0;
    title: "Posted on Google";
}
.gr-quote {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.0rem;
    line-height: 1.55;
    color: var(--ink);
    flex: 1;
    margin-bottom: 22px;
}
.gr-quote::before {
    content: "“";
    font-size: 2.4rem;
    line-height: 0;
    color: var(--gold);
    margin-right: 4px;
    vertical-align: -16px;
}
.gr-card-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(27,36,64,0.08);
}
.gr-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--cream);
    flex-shrink: 0;
}
.gr-avatar.c0 { background: var(--ink); }
.gr-avatar.c1 { background: var(--wine); }
.gr-avatar.c2 { background: var(--sage); }
.gr-avatar.c3 { background: var(--gold-deep); }
.gr-avatar.c4 { background: var(--coral); }
.gr-name { display: block; font-size: 0.95rem; font-weight: 600; color: var(--ink); line-height: 1.1; }
.gr-meta-row { display: block; font-size: 0.78rem; color: var(--ink-soft); margin-top: 3px; }
.gr-meta-row .dot { color: var(--gold-deep); margin: 0 5px; }

@media (max-width: 720px) {
    .gr-head { grid-template-columns: 1fr; gap: 24px; align-items: start; }
    .gr-head .btn { justify-self: start; }
}

/* ---------------- Testimonials ---------------- */
.testimonials {
    position: relative;
}
.testi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.testi {
    background: var(--cream);
    padding: 32px 30px;
    border-radius: var(--radius);
    border: 1px solid rgba(27,36,64,0.08);
    box-shadow: var(--shadow-soft);
    position: relative;
    display: flex;
    flex-direction: column;
}
.testi::before {
    content: "“";
    font-family: 'Fraunces', serif;
    font-size: 5rem;
    line-height: 1;
    color: var(--gold);
    position: absolute;
    top: 6px;
    left: 18px;
    opacity: 0.5;
}
.testi p {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 1.08rem;
    line-height: 1.55;
    margin-top: 30px;
    margin-bottom: 24px;
    color: var(--ink);
    flex: 1;
}
.testi-by {
    display: flex;
    align-items: center;
    gap: 14px;
    border-top: 1px solid rgba(27,36,64,0.1);
    padding-top: 18px;
}
.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1rem;
}
.testi-by strong { display: block; font-size: 0.95rem; }
.testi-by span { font-size: 0.8rem; color: var(--ink-soft); }

/* ---------------- Tournaments band ---------------- */
.tournaments-band {
    background: var(--wine);
    color: var(--cream);
    position: relative;
    overflow: hidden;
}
.tournaments-band::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='60' height='60'><rect width='30' height='30' fill='rgba(255,255,255,0.04)'/><rect x='30' y='30' width='30' height='30' fill='rgba(255,255,255,0.04)'/></svg>");
    pointer-events: none;
    opacity: 0.6;
}
.tournaments-band .container { position: relative; z-index: 1; }
.tour-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}
.tour-grid h2 { color: var(--cream); margin-bottom: 22px; }
.tour-grid h2 em { color: var(--gold); font-style: italic; }
.tour-grid p { font-size: 1.1rem; opacity: 0.85; margin-bottom: 30px; }
.tour-list {
    background: rgba(0,0,0,0.18);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid rgba(201,161,74,0.3);
}
.tour-row {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-bottom: 1px dashed rgba(201,161,74,0.25);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
    border-radius: 10px;
    position: relative;
}
.tour-row:last-child { border-bottom: none; }
a.tour-row:hover {
    background: rgba(201,161,74,0.08);
    border-bottom-color: var(--gold);
}
a.tour-row::after {
    content: "→";
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) translateX(-6px);
    color: var(--gold);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
a.tour-row:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
a.tour-row:hover .tour-tag { opacity: 0; transition: opacity 0.2s; }
.tour-date {
    font-family: 'Fraunces', serif;
    text-align: center;
    background: var(--gold);
    color: var(--ink);
    padding: 8px;
    border-radius: 10px;
}
.tour-date strong { display: block; font-size: 1.5rem; line-height: 1; }
.tour-date span { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.16em; }
.tour-info strong { display: block; font-family: 'Fraunces', serif; font-size: 1.15rem; margin-bottom: 4px; }
.tour-info span { font-size: 0.88rem; opacity: 0.75; }
.tour-tag {
    background: rgba(201,161,74,0.2);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
}

/* ---------------- Holiday camp ---------------- */
.holiday {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.holiday-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-deep);
    aspect-ratio: 4/3;
    position: relative;
}
.holiday-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.holiday-tag {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--gold);
    color: var(--ink);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 700;
}
.holiday h2 em { color: var(--wine); font-style: italic; }
.holiday-list {
    list-style: none;
    margin: 26px 0 30px;
}
.holiday-list li {
    padding: 14px 0;
    border-bottom: 1px solid rgba(27,36,64,0.1);
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: baseline;
    gap: 14px;
    font-size: 1rem;
}
.holiday-list li::before {
    content: "♟";
    color: var(--gold-deep);
    font-size: 1.1rem;
}

/* ---------------- CTA ---------------- */
.cta-band {
    background: var(--ink);
    color: var(--cream);
    text-align: center;
    padding: 110px 0;
    position: relative;
    overflow: hidden;
}
.cta-band::before, .cta-band::after {
    content: "♚";
    position: absolute;
    font-size: 16rem;
    color: var(--gold);
    opacity: 0.05;
    line-height: 1;
}
.cta-band::before { left: -3%; top: -10%; transform: rotate(-15deg); }
.cta-band::after { right: -3%; bottom: -25%; transform: rotate(15deg); }
.cta-band .container { position: relative; z-index: 1; }
.cta-band .scribble { color: var(--gold); font-size: 1.4rem; margin-bottom: 12px; display: block; }
.cta-band h2 { color: var(--cream); margin-bottom: 22px; }
.cta-band h2 em { color: var(--gold); font-style: italic; }
.cta-band p { font-size: 1.15rem; opacity: 0.8; max-width: 560px; margin: 0 auto 36px; }
.cta-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---------------- Footer ---------------- */
footer {
    background: var(--char);
    color: rgba(251,246,233,0.75);
    padding: 80px 0 30px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}
.footer-grid h4 {
    color: var(--cream);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin-bottom: 18px;
}
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { text-decoration: none; opacity: 0.75; transition: opacity 0.2s, color 0.2s; }
.footer-grid a:hover { opacity: 1; color: var(--gold); }
.footer-brand p { margin-top: 18px; opacity: 0.7; font-size: 0.95rem; }
.footer-brand .brand-text strong { color: var(--cream); }
.footer-brand .brand-text small { color: var(--gold); }
.foot-bottom {
    border-top: 1px solid rgba(251,246,233,0.1);
    padding-top: 28px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 0.85rem;
    opacity: 0.65;
}
.foot-bottom a { color: var(--gold); text-decoration: none; }

/* ---------------- Inner page hero ---------------- */
.page-hero {
    padding: 80px 0 40px;
    text-align: center;
}
.page-hero .eyebrow { margin-bottom: 22px; }
.page-hero h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); margin-bottom: 22px; }
.page-hero h1 em { color: var(--wine); font-style: italic; }
.page-hero p {
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: var(--ink-soft);
}

/* Curriculum cards (programs page) */
.curriculum {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}
.curric-row {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 30px;
    align-items: center;
    background: var(--cream);
    padding: 28px 32px;
    border-radius: var(--radius);
    border-left: 6px solid var(--gold);
    box-shadow: var(--shadow-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.curric-row:hover { transform: translateX(6px); box-shadow: var(--shadow-card); }
.curric-row .lvl-name {
    font-family: 'Fraunces', serif;
    font-size: 1.6rem;
    font-weight: 500;
    line-height: 1;
}
.curric-row .lvl-name span {
    display: block;
    font-family: 'Caveat', cursive;
    color: var(--wine);
    font-size: 1.2rem;
    margin-bottom: 4px;
}
.curric-row p { color: var(--ink-soft); font-size: 0.98rem; }
.curric-row .arrow {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--cream);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    transition: background 0.2s;
}
.curric-row:hover .arrow { background: var(--wine); }

/* Contact form (used on multiple pages) */
.form-wrap {
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: 48px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(27,36,64,0.08);
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.form-field { display: flex; flex-direction: column; }
.form-field.full { grid-column: 1 / -1; }
.form-field label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
    background: var(--parchment);
    border: 1.5px solid rgba(27,36,64,0.15);
    border-radius: 12px;
    padding: 14px 18px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    color: var(--ink);
    transition: border-color 0.2s, background 0.2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--ink);
    background: var(--cream);
}
.form-field textarea { min-height: 120px; resize: vertical; }
.form-actions { margin-top: 24px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }

/* ---------------- Reveal animation ---------------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ============================================================
   PARENT PORTAL — Auth & Dashboard
   ============================================================ */

/* ----- Auth pages (signup/signin) — centered card layout ----- */
.auth-page {
    min-height: calc(100vh - 90px);
    padding: 60px 24px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.auth-page::before {
    content: "♚";
    position: absolute;
    bottom: -25%;
    right: -10%;
    font-size: 42rem;
    color: var(--ink);
    opacity: 0.045;
    line-height: 1;
    pointer-events: none;
    transform: rotate(-12deg);
    z-index: 0;
}
.auth-page::after {
    content: "♟";
    position: absolute;
    top: 8%;
    left: -4%;
    font-size: 18rem;
    color: var(--wine);
    opacity: 0.05;
    line-height: 1;
    pointer-events: none;
    transform: rotate(15deg);
    z-index: 0;
}
.auth-grid {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
    align-items: center;
    position: relative;
    z-index: 1;
}
.auth-perks-panel { padding: 8px 0; }
.auth-perks-panel .scribble {
    color: var(--wine);
    font-size: 1.3rem;
    display: block;
    margin-bottom: 10px;
}
.auth-perks-panel h2 {
    font-size: clamp(1.9rem, 3.4vw, 2.6rem);
    line-height: 1.05;
    margin-bottom: 22px;
}
.auth-perks-panel h2 em { color: var(--wine); font-style: italic; }
.auth-perks-panel > p {
    color: var(--ink-soft);
    font-size: 1.02rem;
    margin-bottom: 28px;
    max-width: 420px;
}
.auth-perks {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 0;
    margin: 0;
}
.auth-perks li {
    padding: 14px 16px 14px 46px;
    background: var(--cream);
    border-radius: 12px;
    border: 1px solid rgba(27,36,64,0.07);
    position: relative;
    font-size: 0.95rem;
    color: var(--ink);
    line-height: 1.45;
}
.auth-perks li::before {
    content: "♟";
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gold-deep);
    font-size: 1.3rem;
}

.auth-card {
    background: var(--cream);
    border-radius: 24px;
    padding: 44px 40px;
    box-shadow: var(--shadow-deep);
    border: 1px solid rgba(27,36,64,0.08);
    width: 100%;
    max-width: 520px;
    justify-self: center;
}
.auth-card h1 {
    font-size: clamp(1.8rem, 2.6vw, 2.3rem);
    margin-bottom: 8px;
    line-height: 1.1;
}
.auth-card > p {
    color: var(--ink-soft);
    margin-bottom: 26px;
    font-size: 0.98rem;
}
.auth-card .form-grid { gap: 14px; }
.auth-card .form-field input,
.auth-card .form-field select {
    padding: 12px 16px;
    font-size: 0.95rem;
}
.auth-card .form-actions { margin-top: 22px; }
.auth-card .full-btn { width: 100%; justify-content: center; }
.auth-foot {
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--ink-soft);
    text-align: center;
}
.auth-foot a { color: var(--wine); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.demo-fill {
    background: var(--parchment);
    border: 1px dashed var(--gold);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--ink-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.demo-fill button {
    background: var(--gold);
    color: var(--ink);
    border: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.demo-fill button:hover { background: var(--gold-deep); color: var(--cream); }

.error-msg {
    background: rgba(139,30,63,0.08);
    color: var(--wine-deep);
    border-left: 3px solid var(--wine);
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

@media (max-width: 880px) {
    .auth-grid { grid-template-columns: 1fr; gap: 36px; max-width: 520px; }
    .auth-perks-panel { text-align: left; padding: 0; }
    .auth-perks-panel h2 { font-size: 1.7rem; }
    .auth-perks { gap: 10px; }
    .auth-perks li { padding: 12px 14px 12px 42px; font-size: 0.9rem; }
    .auth-card { padding: 32px 24px; border-radius: 18px; }
    .auth-page { padding: 40px 18px 60px; }
}

/* ----- Dashboard layout ----- */
.dash-wrap {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 90px);
    background: var(--parchment);
}
.dash-side {
    background: var(--ink);
    color: var(--cream);
    padding: 36px 28px;
    border-right: 1px solid rgba(201,161,74,0.18);
    position: sticky;
    top: 90px;
    height: calc(100vh - 90px);
    overflow-y: auto;
}
.dash-user {
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(251,246,233,0.1);
    margin-bottom: 24px;
}
.dash-user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--ink);
    display: grid;
    place-items: center;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 14px;
}
.dash-user strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 1.15rem;
    color: var(--cream);
}
.dash-user span {
    display: block;
    font-size: 0.82rem;
    color: rgba(251,246,233,0.6);
    margin-top: 2px;
}
.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.dash-nav a {
    text-decoration: none;
    color: rgba(251,246,233,0.7);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-nav a::before {
    content: "♟";
    color: var(--gold);
    opacity: 0.5;
    font-size: 0.9rem;
}
.dash-nav a:hover { background: rgba(251,246,233,0.06); color: var(--cream); }
.dash-nav a.active {
    background: var(--gold);
    color: var(--ink);
}
.dash-nav a.active::before { color: var(--ink); opacity: 1; }
.dash-nav .group-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: rgba(251,246,233,0.45);
    padding: 18px 14px 6px;
    font-weight: 600;
}

.dash-logout {
    margin-top: 30px;
    padding: 18px 0 0;
    border-top: 1px solid rgba(251,246,233,0.1);
}
.dash-logout a {
    color: rgba(251,246,233,0.5);
    font-size: 0.88rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 600;
}
.dash-logout a:hover { color: var(--gold); }

/* Dashboard main */
.dash-main { padding: 48px; }

.dash-greet { margin-bottom: 36px; }
.dash-greet .scribble { font-size: 1.2rem; display: block; margin-bottom: 4px; }
.dash-greet h1 {
    font-size: clamp(2rem, 3.4vw, 2.8rem);
    margin-bottom: 6px;
}
.dash-greet h1 em { color: var(--wine); font-style: italic; }
.dash-greet p { color: var(--ink-soft); }

/* Kid switcher cards */
.kid-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 36px;
}
.kid-card {
    background: var(--cream);
    padding: 22px 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(27,36,64,0.08);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.kid-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.kid-card.selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,161,74,0.2);
}
.kid-card-top {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}
.kid-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--gold);
    display: grid;
    place-items: center;
    font-family: 'Fraunces', serif;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.kid-card-top strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
}
.kid-card-top span {
    font-size: 0.82rem;
    color: var(--ink-soft);
}
.kid-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding-top: 14px;
    border-top: 1px dashed rgba(27,36,64,0.15);
}
.kid-stat {
    text-align: center;
}
.kid-stat strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
    color: var(--ink);
    line-height: 1;
}
.kid-stat span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--ink-soft);
    margin-top: 4px;
    display: block;
}

/* Dashboard cards */
.dash-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.dash-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}
.dash-card {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid rgba(27,36,64,0.08);
    box-shadow: var(--shadow-soft);
}
.dash-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 22px;
}
.dash-card-head h3 {
    font-size: 1.15rem;
    font-weight: 500;
    margin: 0;
}
.dash-card-head a {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--wine);
    text-decoration: none;
    font-weight: 600;
}

/* ELO chart card */
.elo-current {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 24px;
}
.elo-current strong {
    font-family: 'Fraunces', serif;
    font-size: 3.2rem;
    line-height: 1;
    font-weight: 600;
}
.elo-delta {
    background: rgba(125,150,112,0.18);
    color: var(--sage);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}
.elo-current .label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--ink-soft);
}
.elo-chart {
    width: 100%;
    height: 200px;
}

/* Class / event lists */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.timeline-row {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 12px;
    background: var(--parchment);
    transition: background 0.2s;
}
.timeline-row:hover { background: var(--parchment-deep); }
.timeline-date {
    text-align: center;
    background: var(--ink);
    color: var(--cream);
    padding: 8px 6px;
    border-radius: 8px;
}
.timeline-date strong {
    display: block;
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
    line-height: 1;
}
.timeline-date span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold);
}
.timeline-info strong { display: block; font-size: 0.98rem; }
.timeline-info span { font-size: 0.82rem; color: var(--ink-soft); }
.timeline-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    background: rgba(201,161,74,0.18);
    color: var(--gold-deep);
}
.timeline-tag.win { background: rgba(125,150,112,0.18); color: var(--sage); }
.timeline-tag.loss { background: rgba(139,30,63,0.12); color: var(--wine); }
.timeline-tag.draw { background: rgba(27,36,64,0.08); color: var(--ink-soft); }

/* Lesson progress */
.lesson-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.lesson-item { display: flex; flex-direction: column; gap: 6px; }
.lesson-item-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
}
.lesson-item-head strong { font-weight: 500; }
.lesson-item-head span { color: var(--ink-soft); font-size: 0.82rem; }
.bar {
    height: 8px;
    border-radius: 999px;
    background: rgba(27,36,64,0.08);
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--gold), var(--wine));
    border-radius: 999px;
}

/* Billing */
.bill-summary {
    display: flex;
    gap: 24px;
    align-items: center;
    margin-bottom: 22px;
    padding: 18px;
    background: var(--ink);
    color: var(--cream);
    border-radius: 12px;
}
.bill-summary .amt {
    font-family: 'Fraunces', serif;
    font-size: 2rem;
    line-height: 1;
    color: var(--gold);
}
.bill-summary .meta strong { display: block; font-size: 0.95rem; color: var(--cream); }
.bill-summary .meta span { font-size: 0.82rem; color: rgba(251,246,233,0.6); }
.bill-summary .pay-btn {
    margin-left: auto;
    background: var(--gold);
    color: var(--ink);
    border: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    cursor: pointer;
}
.invoice {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(27,36,64,0.12);
    font-size: 0.92rem;
    align-items: center;
}
.invoice:last-child { border-bottom: none; }
.invoice .desc strong { display: block; }
.invoice .desc span { font-size: 0.78rem; color: var(--ink-soft); }
.invoice .stat-paid {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--sage);
    font-weight: 600;
}
.invoice .stat-due {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--wine);
    font-weight: 600;
}

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.quick-action {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    background: var(--parchment);
    border-radius: 12px;
    border: 1px solid rgba(27,36,64,0.08);
    text-decoration: none;
    color: var(--ink);
    transition: all 0.2s;
}
.quick-action:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    background: var(--cream);
}
.quick-action strong { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 500; }
.quick-action span { font-size: 0.82rem; color: var(--ink-soft); }

/* Coach notes */
.note-item {
    padding: 14px 0;
    border-bottom: 1px dashed rgba(27,36,64,0.12);
}
.note-item:last-child { border-bottom: none; }
.note-item .note-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-bottom: 6px;
}
.note-item .note-meta strong { color: var(--ink); font-weight: 600; }
.note-item p {
    font-family: 'Fraunces', serif;
    font-style: italic;
    font-size: 0.96rem;
    line-height: 1.5;
    color: var(--ink);
}

/* Responsive dashboard */
@media (max-width: 980px) {
    .dash-wrap { grid-template-columns: 1fr; }
    .dash-side {
        position: relative;
        top: 0;
        height: auto;
        padding: 28px;
    }
    .dash-nav {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 6px;
    }
    .dash-nav .group-label { display: none; }
    .dash-logout { display: none; }
    .dash-main { padding: 32px 24px; }
    .dash-grid, .dash-grid-3 { grid-template-columns: 1fr; }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-side { padding: 50px 32px; }
    .auth-form-wrap { padding: 50px 32px; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
    .hero-grid { gap: 40px; }
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .levels { grid-template-columns: repeat(2, 1fr); }
    .testi-grid { grid-template-columns: repeat(2, 1fr); }
    .locations-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

@media (max-width: 820px) {
    .nav-toggle { display: block; }
    .main-nav, .nav-cta {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cream);
        padding: 24px;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        border-top: 1px solid rgba(27,36,64,0.08);
        box-shadow: var(--shadow-card);
    }
    .nav-open .main-nav,
    .nav-open .nav-cta { display: flex; }
    .nav-open .nav-cta { padding-top: 0; }

    .hero { padding: 50px 0 40px; }
    .hero-grid { grid-template-columns: 1fr; gap: 50px; }
    .story { grid-template-columns: 1fr; gap: 60px; }
    .tour-grid { grid-template-columns: 1fr; gap: 40px; }
    .holiday { grid-template-columns: 1fr; gap: 40px; }
    section { padding: 80px 0; }

    .curric-row { grid-template-columns: 1fr; gap: 14px; text-align: left; }
    .curric-row .arrow { justify-self: start; }

    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .why-grid, .levels, .testi-grid, .locations-grid, .form-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-actions, .cta-actions { flex-direction: column; align-items: stretch; }
    .btn { justify-content: center; }
    .form-wrap { padding: 28px; }
    .marquee-item { font-size: 1.1rem; }
}
