/* ═══════════════════════════════════════════
   THEME SYSTEM
   ═══════════════════════════════════════════ */
[data-theme="light"] {
    --bg-primary: #faf9f7;
    --bg-alt: #f2f1ed;
    --bg-accent: #edf3f2;
    --text-primary: #18181a;
    --text-secondary: #3d3d3b;
    --text-muted: #8a8a86;
    --text-dim: #aaa9a5;
    --accent: #1a4a4a;
    --accent-light: #a0c5c1;
    --accent-soft: #cee5e2;
    --border: #e6e5e1;
    --border-subtle: #d6d5d0;
    --border-card: #d0cfca;
    --white: #f8f7f5;
    --nav-bg: rgba(250,249,247,0.97);
    --hero-pattern: rgba(26,74,74,0.09);
    --selection-bg: #1a4a4a;
    --selection-text: #f8f7f5;
}

[data-theme="dark"] {
    --bg-primary: #0f1a1a;
    --bg-alt: #131f1f;
    --bg-accent: #162626;
    --text-primary: #e8e6e3;
    --text-secondary: #b0aea9;
    --text-muted: #7a7975;
    --text-dim: #5a5956;
    --accent: #1a4a4a;
    --accent-light: #a0c5c1;
    --accent-soft: #cee5e2;
    --border: #1e2e2e;
    --border-subtle: #2a3a3a;
    --border-card: #2a3a3a;
    --white: #0f1a1a;
    --nav-bg: rgba(15,26,26,0.97);
    --hero-pattern: rgba(74,154,138,0.06);
    --selection-bg: #a0c5c1;
    --selection-text: #0f1a1a;
}

:root {
    --page-gutter: clamp(24px, 5vw, 80px);
    --content-max: 1280px;
    --wide-gutter: max(var(--page-gutter), calc((100vw - var(--content-max)) / 2));
}

/* ═══════════════════════════════════════════
   BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip;
}

::selection { background: var(--selection-bg); color: var(--selection-text); }

a { transition: opacity 0.15s ease; color: inherit; text-decoration: none; }
input:focus, textarea:focus { border-color: var(--accent) !important; outline: none; }
input, textarea { transition: border-color 0.15s ease; }

/* ═══════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════ */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--wide-gutter);
    height: 64px;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.nav__logo {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.nav__logo span { color: var(--accent); font-size: 11px; position: relative; top: -1px; }

.nav__links {
    display: flex;
    align-items: center;
    gap: clamp(18px, 3vw, 40px);
    min-width: 0;
}

.nav-link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    color: #5a5a57;
    text-decoration: none;
}

[data-theme="dark"] .nav-link { color: var(--text-muted); }

.nav-link:hover { color: var(--accent) !important; }

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.hero__pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--hero-pattern) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    pointer-events: none;
}

.hero__inner {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: clamp(48px, 5vw, 80px);
    align-items: center;
    padding: clamp(84px, 8vw, 128px) var(--wide-gutter) clamp(76px, 7vw, 112px);
}

.hero__label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #1a4a4a;
    margin: 0 0 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

[data-theme="dark"] .hero__label {
    color: #4a9a8a;
}

.hero__label-line {
    display: inline-block;
    width: 28px;
    height: 1px;
    background: #1a4a4a;
    flex-shrink: 0;
}

[data-theme="dark"] .hero__label-line {
    background: #4a9a8a;
}

.hero__title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(48px, 4.25vw, 66px);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.07;
    letter-spacing: -0.025em;
    margin: 0;
    text-wrap: pretty;
}

.hero__divider {
    padding-left: 48px;
    border-left: 1px solid var(--border-subtle);
}

.hero__subtitle {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 18px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.72;
    margin: 0 0 48px;
}

.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.cta-primary {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    background: #1a4a4a;
    color: #f8f7f5;
    padding: 14px 32px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.cta-primary:hover { background: #235c5c !important; }

[data-theme="dark"] .cta-primary {
    background: #2d6a60;
    color: #f8f7f5;
}

[data-theme="dark"] .cta-primary:hover {
    background: #3d8a7a !important;
}

.cta-outline {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1a4a4a;
    border: 1.5px solid #1a4a4a;
    padding: 13px 32px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

[data-theme="dark"] .cta-outline {
    color: #4a9a8a;
    border-color: #4a9a8a;
}

.cta-outline:hover { background: rgba(26,74,74,0.05) !important; }

[data-theme="dark"] .cta-outline:hover { background: rgba(74,154,138,0.1) !important; }

/* ═══════════════════════════════════════════
   SECTION LAYOUT
   ═══════════════════════════════════════════ */
.section {
    border-bottom: 1px solid var(--border);
    padding: clamp(72px, 7vw, 104px) var(--wide-gutter);
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: clamp(56px, 6vw, 96px);
    align-items: start;
}

.section__number {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #1a4a4a;
    letter-spacing: 0.08em;
    display: block;
    margin-bottom: 12px;
}

[data-theme="dark"] .section__number {
    color: #4a9a8a;
}

.section__category {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-dim);
    display: block;
    margin-bottom: 20px;
}

[data-theme="dark"] .section__category { color: var(--text-muted); }

.section__title {
    font-family: 'Playfair Display', serif;
    font-size: 34px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.18;
    margin: 0;
    text-wrap: pretty;
}

.section__right { padding-top: 44px; }

.section__desc {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 17px;
    color: var(--text-secondary);
    line-height: 1.88;
    margin: 0 0 40px;
    max-width: 640px;
}

.section__note {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-top: 22px;
}

/* ═══════════════════════════════════════════
   PRODUCT TILES
   ═══════════════════════════════════════════ */
.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    max-width: 480px;
}

.product-tile {
    border: 1px solid var(--border-card);
    padding: 28px 24px;
    background: var(--bg-primary);
}

.product-tile__dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    margin-bottom: 20px;
}

.product-tile__name {
    font-family: 'IBM Plex Sans', sans-serif;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.product-tile__platform {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    color: var(--text-dim);
    margin: 0 0 20px;
    line-height: 1.6;
}

[data-theme="dark"] .product-tile__platform { color: var(--text-muted); }

.tile-link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 11px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.tile-link:hover { opacity: 0.55; }

/* ═══════════════════════════════════════════
   ADVISORY CALLOUT
   ═══════════════════════════════════════════ */
.callout {
    border-left: 3px solid var(--accent);
    padding: 20px 28px;
    background: rgba(250,249,247,0.72);
    max-width: 580px;
}

[data-theme="dark"] .callout {
    background: rgba(15,26,26,0.5);
}

.callout__label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 10px;
}

.callout__text {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.78;
    margin: 0 0 20px;
}

.text-link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.text-link:hover { opacity: 0.6; }

/* ═══════════════════════════════════════════
   PULLQUOTE
   ═══════════════════════════════════════════ */
.pullquote {
    padding: clamp(64px, 7vw, 92px) var(--wide-gutter);
    background: var(--accent);
    text-align: center;
}

.pullquote__label {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a0c5c1;
    margin: 0 auto 20px;
    opacity: 0.86;
}

.pullquote__text {
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 2vw, 30px);
    font-style: italic;
    color: #cee5e2;
    margin: 0 auto;
    line-height: 1.58;
    max-width: 760px;
    font-weight: 400;
}

/* ═══════════════════════════════════════════
   CONTACT FORM
   ═══════════════════════════════════════════ */
.contact-form {
    display: grid;
    gap: 12px;
    max-width: 480px;
    padding-top: 44px;
    width: 100%;
}

.contact-form input,
.contact-form textarea {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 15px;
    padding: 13px 16px;
    border: 1px solid var(--border-subtle);
    background: var(--white);
    color: var(--text-primary);
    width: 100%;
}

.contact-form--validated input:invalid,
.contact-form--validated textarea:invalid {
    border-color: #b45f4d !important;
}

.contact-form textarea { resize: vertical; }

.contact-form__submit {
    justify-self: start;
    min-width: 172px;
}

.contact-form__submit:disabled {
    cursor: wait;
    opacity: 0.72;
}

.form-status {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.55;
    padding: 14px 16px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-alt);
    color: var(--text-secondary);
    max-width: 480px;
}

.form-status[hidden] { display: none; }

.form-status--sending {
    border-color: var(--border-card);
    color: var(--text-secondary);
}

.form-status--success {
    border-color: rgba(26, 74, 74, 0.42);
    background: var(--bg-accent);
    color: var(--accent);
}

.form-status--error {
    border-color: #b45f4d;
    background: rgba(180, 95, 77, 0.1);
    color: #823b2f;
}

[data-theme="dark"] .form-status--success {
    border-color: rgba(160, 197, 193, 0.34);
    color: var(--accent-light);
}

[data-theme="dark"] .form-status--error {
    border-color: #a76458;
    background: rgba(180, 95, 77, 0.18);
    color: #efc4bd;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
footer {
    padding: 28px var(--wide-gutter);
    background: var(--bg-alt);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer__brand {
    display: flex;
    align-items: center;
    gap: 20px;
}

.footer__logo {
    font-family: 'Playfair Display', serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: -0.015em;
    display: flex;
    align-items: center;
    gap: 7px;
}

.footer__logo span { color: var(--accent); font-size: 9px; }

.footer__sep {
    width: 1px;
    height: 14px;
    background: var(--border-card);
    display: inline-block;
}

.footer__copy {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 12px;
    color: var(--text-dim);
}

[data-theme="dark"] .footer__copy { color: var(--text-muted); }

.footer__links { display: flex; gap: 28px; }

.footer-link {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 13px;
    color: var(--text-dim);
    text-decoration: none;
}

[data-theme="dark"] .footer-link { color: var(--text-muted); }

.footer-link:hover { color: var(--text-primary) !important; }

/* ═══════════════════════════════════════════
   THEME TOGGLE
   ═══════════════════════════════════════════ */
.theme-toggle {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-dim);
    margin-left: 8px;
}

.theme-toggle:hover {
    border-color: var(--border);
    color: var(--text-primary);
}

.theme-toggle svg { width: 14px; height: 14px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 900px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 48px;
        padding-top: 80px;
        padding-bottom: 72px;
    }
    .hero__divider { padding-left: 0; border-left: none; padding-top: 40px; }
    .section {
        grid-template-columns: 1fr;
        gap: 32px;
        padding-top: 64px;
        padding-bottom: 64px;
    }
    .section__right { padding-top: 0; }
    .products-grid { max-width: 100%; }
    footer { flex-direction: column; gap: 16px; }
}

@media (max-width: 760px) {
    .nav { height: 60px; }
    .nav__logo { font-size: 18px; white-space: nowrap; }
    .nav-link:not(:last-of-type) { display: none; }
    .nav__links { gap: 14px; }
    .theme-toggle { margin-left: 0; }
}

@media (max-width: 640px) {
    .hero__inner {
        padding-top: 64px;
        padding-bottom: 60px;
    }
    .hero__label {
        margin-bottom: 24px;
        letter-spacing: 0.16em;
    }
    .hero__title { font-size: clamp(34px, 10vw, 42px); }
    .hero__subtitle { font-size: 17px; margin-bottom: 32px; }
    .hero__divider { padding-top: 32px; }
    .cta-primary,
    .cta-outline {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
    .section {
        padding-top: 56px;
        padding-bottom: 56px;
    }
    .section__title { font-size: clamp(28px, 8vw, 34px); }
    .section__desc { font-size: 16px; line-height: 1.78; margin-bottom: 32px; }
    .pullquote__text { font-size: 20px; }
    .contact-form { padding-top: 16px; max-width: none; }
    .contact-form__submit,
    .form-status {
        width: 100%;
        max-width: none;
    }
    footer {
        align-items: flex-start;
    }
    .footer__brand,
    .footer__links {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 380px) {
    .nav__logo { font-size: 17px; }
    .nav-link { font-size: 12px; }
    .theme-toggle { width: 30px; height: 30px; }
}
