/* =========================================================
   Xsilience v2 — black & white edition
   Fonts: Playfair Display (XSILIENCE only) + Montserrat (everything else)
   Colours: black, white, greyscale only
   ========================================================= */
:root {
    --bg: #000000;
    --fg: #ffffff;
    --muted: #b6b6b6;
    --dim: #868686;
    --soft: #0f0f0f;
    --line: #1f1f1f;
    --line-strong: #2e2e2e;
    --max: 1240px;
    --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background: var(--bg);
    color: var(--fg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    font-weight: 400;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: var(--fg); color: var(--bg); }

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 32px;
}

/* =========================================================
   SCROLL PROGRESS BAR
   ========================================================= */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    width: 0;
    background: var(--fg);
    z-index: 100;
    transition: width 0.08s linear;
}

/* =========================================================
   LOGO (Playfair Display block caps)
   ========================================================= */
.logo {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: 26px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--fg);
    display: inline-block;
    line-height: 1;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid transparent;
    z-index: 50;
    transition: background 0.3s var(--ease), border-color 0.3s var(--ease), padding 0.3s var(--ease);
}
.nav.scrolled {
    background: rgba(0, 0, 0, 0.92);
    border-bottom-color: var(--line);
}
.nav-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 22px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: padding 0.3s var(--ease);
}
.nav.scrolled .nav-inner { padding: 16px 32px; }

.nav-links {
    display: flex;
    gap: 36px;
    align-items: center;
    font-size: 13.5px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
}
.nav-links a {
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding: 4px 0;
    transition: color 0.3s var(--ease);
}
.nav-links a span {
    display: inline-block;
    transition: transform 0.4s var(--ease);
}
.nav-links a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--fg);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); }

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--fg);
    margin: 0 auto;
    transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO (editorial, left-aligned, restrained)
   ========================================================= */
.hero {
    position: relative;
    padding: 180px 0 110px;
    overflow: hidden;
    isolation: isolate;
}
.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%);
            mask-image: radial-gradient(ellipse at center, #000 35%, transparent 80%);
    z-index: -1;
}
.hero-content {
    max-width: 900px;
    text-align: left;
}

.eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--muted);
    font-weight: 500;
    margin: 0 0 32px;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: clamp(38px, 6.4vw, 80px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0 0 36px;
    color: var(--fg);
    display: block;
    text-transform: none;
}
.hero-title .line {
    display: block;
    overflow: hidden;
}
.hero-title .accent {
    font-style: italic;
    font-weight: 400;
    color: var(--fg);
    position: relative;
    margin-top: 4px;
}
.hero-title .accent::after {
    content: '';
    display: block;
    width: 64px;
    height: 1px;
    background: var(--fg);
    margin-top: 18px;
    opacity: 0.7;
}

.hero-tag {
    font-size: clamp(15px, 1.3vw, 18px);
    color: var(--muted);
    max-width: 560px;
    margin: 0 0 44px;
    font-weight: 400;
    line-height: 1.7;
}
.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 80px;
}

.hero-meta {
    padding-top: 36px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 720px;
}
.hero-meta > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.hero-meta strong {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--dim);
    font-weight: 500;
}
.hero-meta span {
    font-size: 14px;
    color: var(--fg);
    font-weight: 400;
}

/* =========================================================
   BUTTONS (magnetic + sweep)
   ========================================================= */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 34px;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    cursor: pointer;
    border: 1px solid var(--fg);
    font-family: inherit;
    overflow: hidden;
    background: transparent;
    color: var(--fg);
    transition: color 0.4s var(--ease), transform 0.3s var(--ease);
    z-index: 1;
}
.btn span { position: relative; z-index: 2; }
.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--fg);
    transform: translateY(101%);
    transition: transform 0.5s var(--ease);
    z-index: 1;
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: translateY(0); }
.btn-primary { background: var(--fg); color: var(--bg); }
.btn-primary::before { background: var(--bg); }
.btn-primary:hover { color: var(--fg); }

/* =========================================================
   SECTIONS
   ========================================================= */
.section {
    padding: 140px 0;
    position: relative;
}
.bordered { border-top: 1px solid var(--line); }

.two-col {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 100px;
    align-items: flex-start;
}
.col-label { position: sticky; top: 120px; }
.col-label .num {
    display: block;
    font-size: 12px;
    color: var(--dim);
    margin-bottom: 18px;
    letter-spacing: 0.22em;
    font-weight: 500;
}
.col-label h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 33px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.1;
    color: var(--fg);
}
.col-body .lede {
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.45;
    color: var(--fg);
    margin: 0 0 30px;
    font-weight: 300;
    letter-spacing: 0.005em;
}
.col-body p {
    font-size: 15px;
    color: var(--muted);
    margin: 0 0 18px;
    font-weight: 400;
    line-height: 1.75;
}

/* Placeholder for the forthcoming "Why Xsilience Exists" content */
.why-placeholder {
    font-size: 14px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 500;
    padding: 64px 0;
    border: 1px dashed var(--line-strong);
    text-align: center;
}

.section-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 80px;
}
.section-head .num {
    display: block;
    font-size: 12px;
    color: var(--dim);
    margin-bottom: 18px;
    letter-spacing: 0.22em;
    font-weight: 500;
}
.section-head h2 {
    font-weight: 700;
    font-size: clamp(31px, 3.7vw, 46px);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 20px;
    line-height: 1.1;
}
.section-head p {
    font-size: 16px;
    color: var(--muted);
    margin: 0;
    font-weight: 400;
}

/* =========================================================
   CARDS (What We Teach)
   ========================================================= */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    border: 1px solid var(--line);
}
.card {
    background: var(--bg);
    padding: 48px 32px 56px;
    position: relative;
    overflow: hidden;
    border-right: 1px solid var(--line);
    transition: background 0.5s var(--ease);
}
.card:last-child { border-right: 0; }
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--soft);
    transform: translateY(100%);
    transition: transform 0.6s var(--ease);
    z-index: 0;
}
.card:hover::before { transform: translateY(0); }
.card > * { position: relative; z-index: 1; }
.card-num {
    color: var(--muted);
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 18px;
    margin-bottom: 36px;
    transition: color 0.4s var(--ease);
}
.card:hover .card-num { color: var(--fg); }
.card h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 16px;
    color: var(--fg);
}
.card p {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
    color: var(--muted);
    font-weight: 400;
}
.card-line {
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    width: 0;
    background: var(--fg);
    transition: width 0.6s var(--ease);
    z-index: 2;
}
.card:hover .card-line { width: 100%; }

/* =========================================================
   WHO LIST
   ========================================================= */
.who-list {
    list-style: none;
    padding: 0;
    margin: 0 0 48px;
    display: flex;
    flex-direction: column;
}
.who-list li {
    padding: 28px 0;
    border-bottom: 1px solid var(--line);
    position: relative;
    transition: padding-left 0.4s var(--ease);
}
.who-list li:first-child { padding-top: 0; }
.who-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.who-list li::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    width: 16px;
    height: 1px;
    background: var(--fg);
    opacity: 0;
    transition: opacity 0.4s var(--ease), left 0.4s var(--ease);
}
.who-list li:hover { padding-left: 12px; }
.who-list li:hover::before { opacity: 1; left: -16px; }
.who-list h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 10px;
    color: var(--fg);
}
.who-list p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}
.callout {
    margin: 0;
    padding: 32px;
    border: 1px solid var(--fg);
    font-size: 18px;
    color: var(--fg);
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
}
.callout::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
    background: var(--fg);
}
.callout em {
    display: block;
    margin-top: 8px;
    font-style: italic;
    color: var(--muted);
    font-weight: 400;
    font-family: 'Playfair Display', serif;
    text-transform: none;
    letter-spacing: 0;
    font-size: 22px;
}

/* =========================================================
   STATS BAND
   ========================================================= */
.band { background: var(--soft); }
.band-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 80px;
}
.stat { text-align: left; }
.big-num {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(64px, 8vw, 120px);
    line-height: 0.95;
    letter-spacing: -0.01em;
    color: var(--fg);
    margin-bottom: 24px;
}
.big-num.literal { font-feature-settings: "tnum"; }
.stat p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    max-width: 320px;
    font-weight: 400;
    margin: 0;
}

/* =========================================================
   QUOTE
   ========================================================= */
.quote-section { padding: 160px 0; }
.quote {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}
.quote-mark {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 140px;
    line-height: 0.8;
    color: var(--dim);
    margin-bottom: 8px;
}
.quote p {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(26px, 3.4vw, 42px);
    line-height: 1.35;
    color: var(--fg);
    margin: 0 0 36px;
    letter-spacing: 0;
}
.quote-attr {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--muted);
    font-weight: 500;
}

/* =========================================================
   FORM
   ========================================================= */
.form { margin-top: 12px; display: flex; flex-direction: column; gap: 26px; }
.form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 26px;
}
.form label { display: flex; flex-direction: column; gap: 12px; }
.form span {
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
}
.form input,
.form select,
.form textarea {
    font: inherit;
    padding: 16px 0;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    background: transparent;
    color: var(--fg);
    transition: border-color 0.4s var(--ease);
    width: 100%;
    border-radius: 0;
    font-size: 15px;
}
.form select {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 36px;
    cursor: pointer;
}
.form select option { background: var(--bg); color: var(--fg); }
.form textarea { resize: vertical; padding-top: 12px; }
.form input::placeholder,
.form textarea::placeholder { color: var(--dim); }
.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: 0;
    border-bottom-color: var(--fg);
}
.form .btn { align-self: flex-start; margin-top: 12px; }
.form-msg {
    display: none;
    color: var(--fg);
    font-weight: 500;
    margin: 4px 0 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}
.form-msg.show { display: block; animation: fadeUp 0.5s var(--ease); }
.form-msg.error { color: #ff6b6b; }
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =========================================================
   CONTACT GRID
   ========================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
    margin-top: 16px;
}
.contact-grid h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
    margin: 0 0 12px;
    font-weight: 500;
}
.contact-grid p {
    margin: 0;
    color: var(--fg);
    font-size: 15px;
    line-height: 1.7;
    font-weight: 400;
}
.contact-grid a { transition: opacity 0.3s var(--ease); }
.contact-grid a:hover { opacity: 0.6; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
    border-top: 1px solid var(--line);
    padding: 90px 0 36px;
    background: var(--bg);
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.1fr 2fr;
    gap: 80px;
    padding-bottom: 60px;
    border-bottom: 1px solid var(--line);
}
.footer-brand p {
    margin: 22px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
    max-width: 320px;
    font-weight: 400;
}
.footer-contact { margin-top: 16px; }
.footer-contact a {
    color: var(--fg);
    transition: opacity 0.3s var(--ease);
}
.footer-contact a:hover { opacity: 0.6; }
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 40px;
    align-items: flex-start;
    align-content: flex-start;
}
.footer-links a {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    display: inline-block;
    padding-bottom: 2px;
    transition: color 0.3s var(--ease);
}
.footer-links a::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: var(--fg);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.45s var(--ease);
}
.footer-links a:hover { color: var(--fg); }
.footer-links a:hover::after { transform: scaleX(1); }

.footer-base {
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 10px;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-weight: 500;
}

/* =========================================================
   LEGAL PAGES (Privacy / Terms)
   ========================================================= */
.legal-hero {
    padding: 180px 0 64px;
    border-bottom: 1px solid var(--line);
}
.legal-hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--fg);
}
.legal-meta {
    margin: 20px 0 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: var(--dim);
    font-weight: 500;
}
.legal-content {
    padding: 70px 0 130px;
}
.legal-content .legal-inner {
    max-width: 820px;
}
.legal-content .intro {
    font-size: clamp(17px, 1.8vw, 21px);
    line-height: 1.6;
    color: var(--fg);
    font-weight: 300;
    margin: 0 0 48px;
}
.legal-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 19px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--fg);
    margin: 56px 0 18px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}
.legal-content h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.legal-content h3 {
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.02em;
    color: var(--fg);
    margin: 28px 0 10px;
}
.legal-content p {
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--muted);
    margin: 0 0 18px;
    font-weight: 400;
}
.legal-content ul {
    margin: 0 0 18px;
    padding-left: 22px;
}
.legal-content li {
    font-size: 15.5px;
    line-height: 1.85;
    color: var(--muted);
    margin-bottom: 10px;
}
.legal-content a {
    color: var(--fg);
    border-bottom: 1px solid var(--line-strong);
    transition: border-color 0.3s var(--ease);
}
.legal-content a:hover { border-color: var(--fg); }
.legal-content .placeholder {
    color: var(--fg);
    background: var(--soft);
    border: 1px dashed var(--line-strong);
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 0.92em;
}

/* =========================================================
   REVEAL ANIMATIONS
   ========================================================= */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    will-change: opacity, transform;
}
.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
    .nav-links { display: none; }
    .nav-links.open {
        display: flex;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: var(--bg);
        padding: 32px;
        gap: 24px;
        border-bottom: 1px solid var(--line);
    }
    .nav-toggle { display: flex; }
    .hero { padding: 130px 0 60px; min-height: auto; }
    .section { padding: 90px 0; }
    .two-col { grid-template-columns: 1fr; gap: 40px; }
    .col-label { position: static; }
    .cards { grid-template-columns: 1fr 1fr; }
    .card { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .card:nth-child(2n) { border-right: 0; }
    .card:nth-last-child(-n+2) { border-bottom: 0; }
    .band-grid { grid-template-columns: 1fr; gap: 56px; }
    .hero-meta .container { grid-template-columns: 1fr 1fr; gap: 24px; }
    .footer-inner { grid-template-columns: 1fr; gap: 40px; }
    .form .row { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .cards { grid-template-columns: 1fr; }
    .card { border-right: 0 !important; }
    .card:last-child { border-bottom: 0; }
    .hero-meta .container { grid-template-columns: 1fr; }
    .container { padding: 0 22px; }
    .nav-inner { padding: 18px 22px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
    .hero-letter { opacity: 1 !important; transform: none !important; }
}
