/* ==========================================================================
   Astra EdTech — v3 design system
   White canvas · charcoal type · orange (#F07F23, sampled from the logo) as accent
   ========================================================================== */

/* Display font for accent words (.serif). Upright only — the file has no italic. */
@font-face {
    font-family: 'Milesdane';
    src: url('/v3/assets/font/Milesdane%20Trial.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg:          #FCFCFA;
    --surface:     #FFFFFF;
    --warm:        #F7F6F2;
    --gray:        #F3F3F1;

    --ink:         #141414;
    --ink-2:       #2E2E2E;
    --muted:       #666666;
    --faint:       #8F8F8C;

    --line:        #EAEAE6;
    --line-2:      #DDDDD7;

    --brand:       #F07F23;   /* logo orange */
    --brand-hover: #E2701A;
    --brand-ink:   #B4570C;   /* orange for text on white (AA) */
    --brand-tint:  #FDF1E7;

    --ok:          #1F8A4C;
    --wa:          #1DA851;

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

    --shadow-sm:   0 1px 2px rgba(20,20,20,.04);
    --shadow:      0 1px 2px rgba(20,20,20,.04), 0 8px 24px -12px rgba(20,20,20,.10);
    --shadow-lg:   0 2px 4px rgba(20,20,20,.03), 0 30px 60px -24px rgba(20,20,20,.18);

    --font:        'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --serif:       'Milesdane', Georgia, 'Times New Roman', serif;
    --mono:        ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

    /* Graph-paper pattern: fine 24px squares + a slightly stronger 120px major grid */
    --grid-minor:  rgba(20,20,20,.032);
    --grid-major:  rgba(20,20,20,.055);
    --grid-image:
        linear-gradient(to right,  var(--grid-major) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-major) 1px, transparent 1px),
        linear-gradient(to right,  var(--grid-minor) 1px, transparent 1px),
        linear-gradient(to bottom, var(--grid-minor) 1px, transparent 1px);
    --grid-size:   120px 120px, 120px 120px, 24px 24px, 24px 24px;

    --wrap:        1200px;
    --gutter:      24px;
    --header-h:    68px;
    --ease:        cubic-bezier(.2,.7,.2,1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
html, body { overflow-x: clip; }
html.is-locked { overflow: hidden; }
body {
    margin: 0;
    background-color: var(--bg);
    background-image: var(--grid-image);
    background-size: var(--grid-size);
    background-position: center top;
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    font-feature-settings: 'cv11', 'ss01', 'ss03';
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.022em; line-height: 1.15; color: var(--ink); }
p { margin: 0; }
::selection { background: var(--brand-tint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--narrow { max-width: 820px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Type ---------- */
.serif { font-family: var(--serif); font-weight: 400; font-style: normal; letter-spacing: -.01em; }
.accent { color: var(--brand-ink); }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px;
    font-size: 13px; font-weight: 500; letter-spacing: .01em;
    color: var(--muted);
}
.eyebrow::before {
    content: ''; width: 6px; height: 6px; border-radius: 2px;
    background: var(--brand); flex-shrink: 0;
}

.h-display {
    font-size: clamp(2.6rem, 6.2vw, 4.75rem);
    line-height: 1.02; letter-spacing: -.04em; font-weight: 600;
}
.h-display .serif { font-size: 1.08em; letter-spacing: -.02em; }
.h-section {
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.06; letter-spacing: -.035em; font-weight: 600;
}
.h-section .serif { font-size: 1.08em; }
.h-page {
    font-size: clamp(2.3rem, 5vw, 3.8rem);
    line-height: 1.04; letter-spacing: -.038em; font-weight: 600;
}
.h-page .serif { font-size: 1.08em; }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.65; color: var(--muted); max-width: 58ch; }
.body-lg { font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); }
.small { font-size: .875rem; color: var(--muted); }

/* ---------- Sections ---------- */
.sec { padding: clamp(80px, 10vw, 136px) 0; position: relative; }
.sec--tight { padding: clamp(56px, 7vw, 88px) 0; }
/* Translucent tints (not solid fills) so the page grid runs through every section.
   rgba(232,228,216,.25) over --bg composites to exactly --warm (#F7F6F2). */
.sec--warm { background-color: rgba(232,228,216,.25); }
.sec--white { background-color: rgba(255,255,255,.55); }
.sec-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.sec-head .eyebrow { margin-bottom: 20px; }
.sec-head .lede { margin-top: 20px; }
.sec-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.sec-head--center .lede { margin-left: auto; margin-right: auto; }
.sec-head--split {
    max-width: none; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end;
}
.sec-head--split .lede { margin-top: 0; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 46px; padding: 0 20px;
    border-radius: 10px; border: 1px solid transparent;
    font-size: 15px; font-weight: 500; letter-spacing: -.005em; line-height: 1;
    cursor: pointer; white-space: nowrap;
    transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.btn i { font-size: 15px; }
.btn .bi-arrow-right, .btn .bi-arrow-up-right { transition: transform .25s var(--ease); }
.btn:hover .bi-arrow-right { transform: translateX(2px); }
.btn:hover .bi-arrow-up-right { transform: translate(1px,-1px); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 1px 2px rgba(180,87,12,.25); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #2a2a2a; }
.btn--ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { border-color: #C9C9C2; background: #fff; }
.btn--sm { height: 38px; padding: 0 14px; font-size: 14px; border-radius: 9px; }
.btn--lg { height: 52px; padding: 0 24px; font-size: 15.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.link-arrow {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 15px; font-weight: 500; color: var(--ink);
    transition: color .2s var(--ease);
}
.link-arrow i { font-size: 14px; transition: transform .25s var(--ease); }
.link-arrow:hover { color: var(--brand-ink); }
.link-arrow:hover i { transform: translateX(3px); }
.link-arrow:hover .bi-arrow-up-right { transform: translate(2px,-2px); }

.btn-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }

/* ---------- Chips / tags ---------- */
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 26px; padding: 0 10px; border-radius: 7px;
    background: var(--gray); color: var(--ink-2);
    font-size: 12.5px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.chip--line { background: var(--surface); border: 1px solid var(--line); }
.chip--brand { background: var(--brand-tint); color: var(--brand-ink); }
.chip--ok { background: #EAF6EF; color: var(--ok); }
.chip--dark { background: var(--ink); color: #fff; }
.chip--dark .bi { font-size: 10px; color: #F59A45; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Cards ---------- */
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.card--hover { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); }
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }

/* ---------- Course card (/classes, homepage, course pages) ---------- */
/* --tc = the course's theme colour (set per card from the DB) */
.ccard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ccard { --tc: var(--brand); position: relative; display: flex; flex-direction: column; overflow: hidden; }
.ccard:hover { border-color: color-mix(in srgb, var(--tc) 35%, var(--line)); box-shadow: 0 1px 2px rgba(20,20,20,.04), 0 18px 36px -18px color-mix(in srgb, var(--tc) 45%, transparent); transform: translateY(-3px); }
.ccard { transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); }
.ccard--feature { border-color: color-mix(in srgb, var(--tc) 55%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tc) 12%, transparent), var(--shadow-sm); }

.ccard-banner {
    position: relative; height: 112px; overflow: hidden;
    display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 20px 16px;
    background-color: var(--warm);
    background-image:
        radial-gradient(color-mix(in srgb, var(--tc) 22%, transparent) 1px, transparent 1.4px),
        linear-gradient(135deg, color-mix(in srgb, var(--tc) 16%, #fff) 0%, color-mix(in srgb, var(--tc) 5%, #fff) 70%);
    background-size: 14px 14px, auto;
    border-bottom: 1px solid color-mix(in srgb, var(--tc) 14%, var(--line));
}
.ccard-mark { position: absolute; right: -18px; top: -26px; width: 150px; height: 150px; opacity: .1; transform: rotate(-12deg); transition: transform .6s var(--ease), opacity .4s; pointer-events: none; }
.ccard:hover .ccard-mark { transform: rotate(-4deg) scale(1.06); opacity: .16; }
.ccard-logo {
    position: relative; width: 60px; height: 60px; border-radius: 16px; flex-shrink: 0;
    display: grid; place-items: center; background: #fff; font-size: 26px; color: var(--tc);
    box-shadow: 0 1px 2px rgba(20,20,20,.06), 0 10px 22px -10px color-mix(in srgb, var(--tc) 60%, transparent);
    transition: transform .4s var(--ease);
}
.ccard-logo img { width: 36px; height: 36px; object-fit: contain; }
.ccard:hover .ccard-logo { transform: translateY(-3px) rotate(-3deg); }
.ccard-stack { position: relative; display: flex; }
.ccard-stack span { width: 32px; height: 32px; border-radius: 50%; background: #fff; display: grid; place-items: center; border: 2px solid color-mix(in srgb, var(--tc) 8%, #fff); box-shadow: 0 2px 6px -2px rgba(20,20,20,.18); margin-left: -8px; transition: transform .3s var(--ease); }
.ccard-stack span:first-child { margin-left: 0; }
.ccard-stack img { width: 17px; height: 17px; object-fit: contain; }
.ccard:hover .ccard-stack span { transform: translateY(-2px); }
.ccard:hover .ccard-stack span:nth-child(2) { transition-delay: .04s; }
.ccard:hover .ccard-stack span:nth-child(3) { transition-delay: .08s; }
.ccard-ribbon { position: absolute; top: 14px; right: 16px; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 550; }
.ccard-ribbon .bi { font-size: 10px; color: #F5B045; }

.ccard-body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.ccard-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.chip--tc { background: color-mix(in srgb, var(--tc) 11%, #fff); color: color-mix(in srgb, var(--tc) 78%, #000); }
.ccard-title { font-size: 1.3rem; letter-spacing: -.025em; line-height: 1.25; margin-top: 14px; }
.ccard-title a { transition: color .2s; }
.ccard:hover .ccard-title a { color: color-mix(in srgb, var(--tc) 80%, #000); }
.ccard-title a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.ccard-title a:focus-visible { outline: none; }
.ccard:has(.ccard-title a:focus-visible) { outline: 2px solid var(--tc); outline-offset: 2px; }
.ccard-desc { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin-top: 8px; flex: 1; }
.ccard-meta { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.ccard-meta li { display: inline-flex; align-items: center; gap: 6px; }
.ccard-meta .bi { color: color-mix(in srgb, var(--tc) 70%, #fff); }
.ccard-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.ccard-price-new { font-size: 1.5rem; font-weight: 600; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; color: var(--ink); }
.ccard-price-old { font-size: 14px; color: var(--faint); text-decoration: line-through; }
.ccard-price .chip { align-self: center; height: 22px; font-size: 12px; }
.ccard-actions { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.ccard-actions .btn { justify-content: center; }
@media (max-width: 1024px) { .ccard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .ccard-grid { grid-template-columns: 1fr; } .ccard-body { padding: 18px 18px 20px; } }
@media (prefers-reduced-motion: reduce) { .ccard, .ccard-mark, .ccard-logo, .ccard-stack span { transition: none; } }

/* ==========================================================================
   Header
   ========================================================================== */
.hdr {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(252,252,250,.82);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.hdr.is-scrolled { border-bottom-color: var(--line); background: rgba(252,252,250,.92); }
.hdr-inner { height: var(--header-h); display: flex; align-items: center; gap: 24px; }
.hdr-logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.hdr-logo img { width: 30px; height: 30px; object-fit: contain; }
.hdr-logo span { font-size: 16px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); }
.hdr-logo span em { font-style: normal; color: var(--muted); font-weight: 500; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: 20px; }
.nav-link {
    display: inline-flex; align-items: center; gap: 4px;
    height: 36px; padding: 0 12px; border-radius: 8px;
    font-size: 14px; font-weight: 450; color: var(--ink-2);
    background: none; border: 0; cursor: pointer;
    transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-link:hover { color: var(--ink); background: rgba(20,20,20,.04); }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--brand); margin-left: 4px; }
.nav-link .bi-chevron-down { font-size: 10px; color: var(--faint); transition: transform .25s var(--ease); }

.nav-drop { position: relative; }
.nav-drop.is-open .bi-chevron-down { transform: rotate(180deg); }
.nav-panel {
    position: absolute; top: calc(100% + 10px); left: -8px; width: 320px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    box-shadow: var(--shadow-lg); padding: 6px;
    opacity: 0; transform: translateY(-4px); pointer-events: none;
    transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.nav-drop.is-open .nav-panel { opacity: 1; transform: none; pointer-events: auto; }
.nav-item { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 10px; transition: background-color .15s; }
.nav-item:hover { background: var(--warm); }
.nav-item-icon {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 15px;
    background: var(--gray); color: var(--ink-2);
}
.nav-item:hover .nav-item-icon { background: var(--brand-tint); color: var(--brand-ink); }
.nav-item-title { font-size: 14px; font-weight: 550; color: var(--ink); line-height: 1.3; }
.nav-item-desc { font-size: 13px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
/* Classes mega panel: courses in two columns + an "all classes" footer */
.nav-panel--wide { width: 600px; display: grid; grid-template-columns: 1fr 1fr; }
.nav-panel--wide .nav-item { padding: 10px 12px; }
.nav-item--course .nav-item-icon { background: color-mix(in srgb, var(--tc) 10%, #fff); color: var(--tc); }
.nav-item--course .nav-item-icon img { width: 18px; height: 18px; object-fit: contain; }
.nav-item--course:hover .nav-item-icon { background: color-mix(in srgb, var(--tc) 18%, #fff); color: var(--tc); }
.nav-item-price { font-size: 12.5px; color: var(--brand-ink); font-weight: 550; margin-top: 3px; display: block; }
.nav-panel-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding: 12px 14px; border-radius: 10px; background: var(--warm); font-size: 13.5px; color: var(--muted); }
.nav-panel-foot a { color: var(--ink); font-weight: 550; display: inline-flex; align-items: center; gap: 6px; }
.nav-panel-foot a:hover { color: var(--brand-ink); }

.hdr-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.hdr-wa { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 0 10px; height: 38px; border-radius: 9px; transition: color .2s, background-color .2s; }
.hdr-wa i { color: var(--wa); font-size: 15px; }
.hdr-wa:hover { color: var(--ink); background: rgba(20,20,20,.04); }

.burger {
    display: none; width: 40px; height: 40px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface);
    align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.burger span { position: relative; display: block; width: 16px; height: 1.5px; background: var(--ink); transition: background-color .2s; }
.burger span::before, .burger span::after { content: ''; position: absolute; left: 0; width: 16px; height: 1.5px; background: var(--ink); transition: transform .3s var(--ease); }
.burger span::before { top: -5px; }
.burger span::after  { top: 5px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] span::after  { transform: translateY(-5px) rotate(-45deg); }

/* Mobile sheet */
.msheet {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 999;
    background: var(--bg); overflow-y: auto; overscroll-behavior: contain;
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility 0s linear .25s;
}
.msheet.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s var(--ease), transform .25s var(--ease); }
.msheet-inner { padding: 8px var(--gutter) 32px; max-width: 560px; margin: 0 auto; }
.msheet-label { font-size: 12px; font-weight: 500; color: var(--faint); letter-spacing: .04em; text-transform: uppercase; margin: 22px 4px 8px; }
.msheet-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.msheet-link { position: relative; display: flex; align-items: center; gap: 14px; padding: 12px 14px; color: var(--ink); transition: background-color .15s; -webkit-tap-highlight-color: transparent; }
.msheet-link + .msheet-link::before { content: ''; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--line); }
.msheet-link:active { background: var(--warm); }
.msheet-ic {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 17px;
    background: var(--gray); color: var(--ink-2);
    transition: background-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.msheet-link:active .msheet-ic, .msheet-link:hover .msheet-ic { background: var(--brand-tint); color: var(--brand-ink); }
.msheet-link:active .msheet-ic { transform: scale(.94); }
.msheet-ic--wa { background: #E8F7EE; color: var(--wa); }
.msheet-txt { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; letter-spacing: -.012em; line-height: 1.3; }
.msheet-txt small { display: block; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-top: 2px; }
.msheet-chev { font-size: 13px; color: var(--faint); transition: transform .2s var(--ease); }
.msheet-link:hover .msheet-chev { transform: translateX(2px); }

.msheet-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.msheet-quick a {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
    font-size: 13px; font-weight: 500; color: var(--ink-2); box-shadow: var(--shadow-sm);
    transition: transform .15s var(--ease), border-color .2s; -webkit-tap-highlight-color: transparent;
}
.msheet-quick a:active { transform: scale(.97); border-color: var(--line-2); }
.msheet-addr { display: flex; gap: 8px; align-items: flex-start; margin: 16px 4px 22px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.msheet-addr i { color: var(--brand); margin-top: 2px; }
.msheet-addr a { color: var(--ink-2); font-weight: 500; white-space: nowrap; }

/* Staggered entrance when the sheet opens */
.msheet .msheet-item, .msheet .msheet-link { opacity: 0; transform: translateY(8px); }
.msheet.is-open .msheet-item, .msheet.is-open .msheet-link {
    opacity: 1; transform: none;
    transition: opacity .4s var(--ease), transform .4s var(--ease);
    transition-delay: calc(var(--i, 0) * 30ms + 60ms);
}

@media (max-width: 1080px) {
    .nav { display: none; }
    /* WhatsApp becomes a compact icon button beside the menu button */
    .hdr-wa { width: 40px; height: 40px; padding: 0; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
    .hdr-wa span { display: none; }
    .hdr-wa i { font-size: 18px; }
    .burger { display: inline-flex; }
}
@media (max-width: 420px) {
    .hdr-actions .btn--primary { display: none; }
}

/* ==========================================================================
   Modals
   ========================================================================== */
.modal {
    position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px;
    opacity: 0; visibility: hidden; transition: opacity .25s var(--ease), visibility 0s linear .25s;
}
.modal.is-open { opacity: 1; visibility: visible; transition: opacity .25s var(--ease); }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20,20,20,.36); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-dialog {
    position: relative; width: min(480px, 100%); max-height: calc(100vh - 32px); overflow-y: auto;
    background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
    box-shadow: var(--shadow-lg); padding: 32px 28px 28px;
    transform: translateY(8px) scale(.985); transition: transform .3s var(--ease);
}
.modal.is-open .modal-dialog { transform: none; }
.modal-close {
    position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 9px;
    border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center;
    transition: background-color .2s, color .2s;
}
.modal-close:hover { background: var(--gray); color: var(--ink); }
.modal-title { font-size: 1.4rem; letter-spacing: -.025em; }
.modal-sub { font-size: .95rem; color: var(--muted); margin: 6px 0 24px; }
.modal-actions { display: grid; gap: 10px; }
@media (min-width: 520px) { .modal-actions { grid-template-columns: 1fr 1fr; } }

/* ---------- Create-website modal ---------- */
.modal-dialog--wide { width: min(620px, 100%); }
.ws-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ws-opt { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.ws-opt:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.ws-opt-head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.ws-opt-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand-tint); color: var(--brand-ink); display: grid; place-items: center; font-size: 17px; }
.ws-opt h3 { font-size: 1.05rem; letter-spacing: -.018em; margin-top: 16px; }
.ws-opt p { font-size: 14px; line-height: 1.6; color: var(--muted); margin-top: 6px; flex: 1; }
.ws-opt p strong { color: var(--ink-2); font-weight: 500; word-break: break-word; }
.ws-opt-actions { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 18px; }
.ws-opt-actions .btn { height: 42px; font-size: 14px; }
.ws-opt-actions .link-arrow { justify-content: center; font-size: 14px; }
@media (max-width: 560px) {
    .ws-options { grid-template-columns: 1fr; }
    .modal-dialog--wide { padding: 28px 18px 20px; }
}

/* Notification-style corner badges on buttons */
.btn.has-badge { position: relative; overflow: visible; }
.n-badge {
    position: absolute; top: -10px; right: -8px; z-index: 1;
    display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 999px;
    background: #D92D20; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .01em; line-height: 1; white-space: nowrap;
    border: 2px solid var(--bg); box-shadow: 0 4px 10px -3px rgba(217,45,32,.55);
    animation: n-badge-pop .5s cubic-bezier(.3,1.6,.5,1) .6s both, n-badge-pulse 2.4s ease-in-out 1.4s infinite;
}
.n-badge i { font-size: 10px; }
.n-badge--free { background: #16A34A; box-shadow: 0 4px 10px -3px rgba(22,163,74,.55); }
.n-badge-sep { opacity: .7; margin: 0 1px; }
@keyframes n-badge-pop   { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes n-badge-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .n-badge { animation: none; } }
.n-badge-sep { opacity: .7; margin: 0 1px; }
@media (max-width: 640px) { .n-badge { right: 10px; } }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--ink-2); }
.field label .req { color: var(--brand-ink); }
.field label .opt { color: var(--faint); font-weight: 400; }
.input, .select, .textarea {
    width: 100%; height: 46px; padding: 0 14px;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-2); border-radius: 10px;
    font: inherit; font-size: 15px; outline: none;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
    -webkit-appearance: none; appearance: none;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.select { cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%23666'%3E%3Cpath d='M1.6 5.2a.75.75 0 0 1 1.06 0L8 10.54l5.34-5.34a.75.75 0 1 1 1.06 1.06l-5.87 5.87a.75.75 0 0 1-1.06 0L1.6 6.26a.75.75 0 0 1 0-1.06z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.input::placeholder, .textarea::placeholder { color: #A8A8A4; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(240,127,35,.14); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   Footer
   ========================================================================== */
.ftr { background-color: rgba(255,255,255,.6); border-top: 1px solid var(--line); }
.ftr-top { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr .8fr 1.2fr; gap: 40px; padding: 72px 0 56px; }
.ftr-brand p { font-size: 14.5px; color: var(--muted); line-height: 1.7; max-width: 300px; margin: 18px 0 22px; }
.ftr-loc { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); }
.ftr-loc i { color: var(--brand-ink); }
.ftr-socials { display: flex; gap: 6px; margin-top: 22px; }
.ftr-social {
    width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line);
    display: grid; place-items: center; color: var(--muted); font-size: 15px;
    transition: color .2s, border-color .2s, background-color .2s;
}
.ftr-social:hover { color: var(--ink); border-color: var(--line-2); background: var(--warm); }
.ftr-title { font-size: 13px; font-weight: 500; color: var(--faint); margin: 0 0 16px; letter-spacing: .01em; }
.ftr-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ftr-links a { font-size: 14.5px; color: var(--ink-2); transition: color .2s; }
.ftr-links a:hover { color: var(--brand-ink); }
.ftr-contact { display: flex; flex-direction: column; gap: 12px; font-size: 14.5px; color: var(--ink-2); }
.ftr-contact a, .ftr-contact div { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.ftr-contact a:hover { color: var(--brand-ink); }
.ftr-contact i { color: var(--faint); font-size: 14px; margin-top: 3px; }
.ftr-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 24px 0 32px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--faint); }
.ftr-bottom a:hover { color: var(--ink); }
.ftr-wordmark {
    font-size: clamp(3rem, 14.5vw, 13.5rem); font-weight: 600; letter-spacing: -.02em; line-height: .8; white-space: nowrap;
    color: var(--warm); user-select: none; text-align: center; padding-bottom: 8px; overflow: hidden;
    -webkit-text-stroke: 2px var(--line); paint-order: stroke fill; /* fill covers the inner half of the stroke, hiding overlapping glyph contours */
}
@media (max-width: 900px) {
    .ftr-top { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
    .ftr-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
    .ftr-top { grid-template-columns: 1fr; padding: 56px 0 40px; }
}

/* ==========================================================================
   Page hero (inner pages)
   ========================================================================== */
.phero { padding: clamp(64px, 9vw, 112px) 0 clamp(48px, 6vw, 72px); }
.phero .eyebrow { margin-bottom: 22px; }
.phero .lede { margin-top: 22px; }
.phero--center { text-align: center; }
.phero--center .lede { margin-left: auto; margin-right: auto; }
.phero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.phero--center .phero-meta { justify-content: center; }

.crumbs { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--faint); margin-bottom: 28px; }
.crumbs a { color: var(--muted); transition: color .2s; }
.crumbs a:hover { color: var(--ink); }

/* ==========================================================================
   Motion
   ========================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="fade"] { transform: none; }
.js [data-reveal="rise"] { transform: translateY(32px); transition-duration: 1.1s; }
[data-delay="1"] { transition-delay: .08s !important; }
[data-delay="2"] { transition-delay: .16s !important; }
[data-delay="3"] { transition-delay: .24s !important; }
[data-delay="4"] { transition-delay: .32s !important; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
    .js [data-reveal] { opacity: 1; transform: none; }
}

/* SweetAlert2 — match the light theme */
.swal2-popup { border-radius: 16px !important; font-family: var(--font) !important; }
.swal2-title { color: var(--ink) !important; font-weight: 600 !important; letter-spacing: -.02em; }
.swal2-html-container { color: var(--muted) !important; }
.swal2-styled.swal2-confirm { border-radius: 10px !important; font-weight: 500 !important; }

@media (max-width: 640px) {
    :root { --gutter: 20px; --header-h: 62px; }
    .sec-head--split { grid-template-columns: 1fr; gap: 20px; }
    .btn { height: 48px; }
}
