/* ============================
   VARS & RESET
   ============================ */
:root {
    /* LIGHT THEME (DEFAULT) */
    --c-bg: #ffffff;
    --c-text: #1a1a1a;
    --c-accent: #6DB1BF; 
    --c-border: #1a1a1a;
    
    /* Footer Colors */
    --c-footer-bg: #1a1a1a;
    --c-footer-text: #ffffff;

    /* Card Colors */
    --c-card-bg: #ffffff;
    --c-card-bg-2: #f5f5f5;
    --c-card-bg-3: #ebebeb;

    --border-w: 2px;
    --f-head: 'Oswald', sans-serif;
    --f-body: 'Inter', sans-serif;
}

/* DARK THEME OVERRIDES */
[data-theme="dark"] {
    --c-bg: #0a0a0a;
    --c-text: #f0f0f0;
    --c-border: #f0f0f0;
    
    /* Footer inverts to light in dark mode for contrast */
    --c-footer-bg: #f0f0f0;
    --c-footer-text: #0a0a0a;

    /* Card Colors Inverted for Dark Mode */
    --c-card-bg: #141414;
    --c-card-bg-2: #1f1f1f;
    --c-card-bg-3: #2a2a2a;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: var(--f-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    border: var(--border-w) solid var(--c-border);
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ============================
   UTILITIES
   ============================ */
.container {
    max-width: 1440px;
    margin: 0 auto;
    border-left: var(--border-w) solid var(--c-border);
    border-right: var(--border-w) solid var(--c-border);
    transition: border-color 0.3s;
}

h1, h2, h3, h4 {
    font-family: var(--f-head);
    text-transform: uppercase;
    line-height: 1.1; 
    font-weight: 700;
}

.display-text {
    font-size: clamp(3rem, 10vw, 8rem);
    margin-bottom: 30px; 
    display: block;   
}

.text-accent { color: var(--c-accent); }

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 18px 40px;
    background: var(--c-text);
    color: var(--c-bg);
    font-family: var(--f-head);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: var(--border-w) solid var(--c-text);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    z-index: 1;
}
.btn:hover {
    background: var(--c-accent);
    color: var(--c-text);
    border-color: var(--c-accent);
    box-shadow: 6px 6px 0px var(--c-border);
    transform: translate(-4px, -4px);
}

.badge {
    display: inline-block;
    border: 1px solid var(--c-text);
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(127, 127, 127, 0.1);
    margin-bottom: 1.5rem; 
}

/* ============================
   THEME TOGGLE
   ============================ */
.theme-toggle {
    background: transparent;
    border: var(--border-w) solid var(--c-text);
    color: var(--c-text);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 20px;
    transition: 0.2s;
}
.theme-toggle:hover {
    background: var(--c-accent);
    box-shadow: 4px 4px 0px var(--c-text);
    transform: translate(-2px, -2px);
}
.icon-sun, .icon-moon {
    width: 24px; height: 24px;
    stroke: currentColor; stroke-width: 2.5; fill: none;
    display: none;
}
body:not([data-theme="dark"]) .icon-moon { display: block; }
body[data-theme="dark"] .icon-sun { display: block; }

/* ============================
   SECTIONS
   ============================ */
.header {
    border-bottom: var(--border-w) solid var(--c-border);
    padding: 20px 0;
    position: sticky; top: 0; background: var(--c-bg); z-index: 100;
    transition: border-color 0.3s, background-color 0.3s;
}
.nav-inner { display: flex; justify-content: space-between; align-items: center; padding: 0 40px; }
.header-actions { display: flex; align-items: center; }
.logo { font-size: 2rem; font-weight: 700; letter-spacing: -1px; font-family: var(--f-head); }
.logo span { color: var(--c-accent); }

/* HERO */
.hero {
    display: grid; grid-template-columns: 1fr; min-height: 80vh;
    border-bottom: var(--border-w) solid var(--c-border);
    transition: border-color 0.3s;
}
.hero-content { padding: 60px 40px; display: flex; flex-direction: column; justify-content: center; }
.hero-sub {
    font-size: clamp(1.1rem, 2vw, 1.5rem); max-width: 600px;
    margin-bottom: 40px; margin-top: 10px;
    border-left: 4px solid var(--c-accent); padding-left: 20px;
}

/* MARQUEE */
.marquee-container {
    border-bottom: var(--border-w) solid var(--c-border);
    background: var(--c-text); color: var(--c-bg);
    overflow: hidden; padding: 15px 0;
    font-family: var(--f-head); font-size: 1.5rem; text-transform: uppercase;
    white-space: nowrap; display: flex;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.marquee-track { display: flex; width: max-content; animation: marquee 30s linear infinite; }
.marquee-item { flex-shrink: 0; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* GRID FEATURES */
.grid-features {
    display: grid; grid-template-columns: repeat(2, 1fr);
    border-bottom: var(--border-w) solid var(--c-border);
    transition: border-color 0.3s;
}
.feature-item {
    padding: 60px 40px;
    border-right: var(--border-w) solid var(--c-border);
    border-bottom: var(--border-w) solid var(--c-border);
    position: relative; transition: 0.3s, border-color 0.3s;
}
.feature-item:hover { background: rgba(109, 177, 191, 0.1); }
.feature-item:nth-child(2n) { border-right: none; }
.feature-num {
    font-family: var(--f-head); font-size: 4rem;
    color: var(--c-text); opacity: 0.05;
    position: absolute; top: 20px; right: 20px; line-height: 1;
}
.feature-title { font-size: 1.8rem; margin-bottom: 15px; }

/* CLIENTS */
.clients-grid {
    display: grid; grid-template-columns: 30% 70%;
    border-bottom: var(--border-w) solid var(--c-border);
    transition: border-color 0.3s;
}
.clients-title {
    padding: 60px 40px; background: var(--c-accent);
    border-right: var(--border-w) solid var(--c-border);
    display: flex; align-items: center;
}
.clients-list { display: grid; grid-template-rows: 1fr 1fr; }
.client-type {
    padding: 40px; border-bottom: var(--border-w) solid var(--c-border);
    display: flex; flex-direction: column; justify-content: center;
}
.client-type:last-child { border-bottom: none; }
.big-number { font-size: 3rem; font-family: var(--f-head); font-weight: 700; }

/* CASE STACK */
.cases-section {
    border-bottom: var(--border-w) solid var(--c-border);
    display: grid; grid-template-columns: 1fr 1fr;
    background-image: radial-gradient(var(--c-text) 1px, transparent 1px);
    background-size: 30px 30px; background-color: transparent;
    overflow: hidden; min-height: 600px; transition: border-color 0.3s;
}
.cases-section > div:first-child { border-right: var(--border-w) solid var(--c-border); }
.lc-text-col {
    padding: 80px 40px; background: var(--c-bg);
    display: flex; flex-direction: column; justify-content: center; z-index: 2;
    transition: background-color 0.3s;
}
.lc-stack-col {
    position: relative; padding: 20px; display: flex; align-items: center; justify-content: center;
    background: rgba(127,127,127, 0.05);
}
.cards-wrapper { position: relative; width: 360px; height: 480px; perspective: 1000px; }
.case-card {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--c-card-bg); border: 2px solid var(--c-text); padding: 30px;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: 10px 10px 0px rgba(127,127,127,0.2);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s, background-color 0.3s;
    cursor: pointer; user-select: none;
}
.case-card[data-pos="0"] { z-index: 10; transform: translateX(0) translateY(0) rotate(0deg); opacity: 1; }
.case-card[data-pos="0"]:hover { transform: translateX(-5px) translateY(-5px) rotate(0deg); box-shadow: 15px 15px 0px var(--c-accent); }
.case-card[data-pos="1"] { z-index: 9; transform: translateX(15px) translateY(15px) rotate(3deg); background-color: var(--c-card-bg-2); }
.case-card[data-pos="2"] { z-index: 8; transform: translateX(30px) translateY(30px) rotate(6deg); background-color: var(--c-card-bg-3); opacity: 0.7; }
.case-card[data-pos="3"] { z-index: 11; transform: translateX(150%) rotate(20deg); opacity: 0; pointer-events: none; }
.case-head { border-bottom: 2px solid var(--c-text); padding-bottom: 15px; margin-bottom: 15px; }
.case-tag {
    font-size: 0.8rem; font-weight: 700; color: #1a1a1a;
    background: var(--c-accent); padding: 2px 8px;
    display: inline-block; margin-bottom: 5px; text-transform: uppercase;
}
.case-result { font-family: var(--f-head); font-size: 2.2rem; line-height: 1; margin-top: auto; }
.click-hint {
    position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%);
    font-size: 0.9rem; color: var(--c-text); font-family: monospace;
    opacity: 0.7; animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { opacity:0.7 } 50% { opacity:0.3 }}

/* FAQ */
.faq-section { background: var(--c-bg); transition: background-color 0.3s; }
.faq-item { border-bottom: var(--border-w) solid var(--c-border); }
.faq-item:last-child { border-bottom: none; }
.faq-item[open] { background: rgba(127,127,127, 0.05); }
.faq-question {
    padding: 30px 40px; font-family: var(--f-head); font-size: 1.4rem; font-weight: 500;
    cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; transition: 0.3s;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { color: var(--c-accent); }
.faq-icon { font-family: monospace; font-size: 2rem; font-weight: 300; transition: 0.3s; }
.faq-item[open] .faq-icon { transform: rotate(45deg); display: inline-block; color: var(--c-accent); }
.faq-answer {
    padding: 0 40px 30px 40px; color: var(--c-text); opacity: 0.8;
    font-size: 1.05rem; max-width: 700px; animation: slideDown 0.3s ease-out;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* FOOTER */
.footer-inverted {
    padding: 80px 40px; text-align: center;
    background-color: var(--c-footer-bg); color: var(--c-footer-text);
    transition: background-color 0.3s, color 0.3s;
}
.footer-inverted .display-text { color: var(--c-footer-text); }
.footer-inverted input {
    background: transparent; border: 2px solid var(--c-footer-text); color: var(--c-footer-text);
}
.footer-inverted input::placeholder { color: inherit; opacity: 0.5; }
.footer-inverted .btn {
    background: var(--c-footer-text); color: var(--c-footer-bg); border-color: var(--c-footer-text);
}
.footer-inverted .btn:hover {
    background: var(--c-accent); color: #1a1a1a; border-color: var(--c-accent);
    box-shadow: 6px 6px 0px var(--c-footer-text);
}

/* Animations */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* ADAPTIVE */
@media (max-width: 900px) {
    .grid-features { grid-template-columns: 1fr; }
    .feature-item { border-right: none; }
    .clients-grid { grid-template-columns: 1fr; }
    .clients-title { border-right: none; border-bottom: var(--border-w) solid var(--c-border); }
    .nav-inner { padding: 0 20px; }
    .hero-content { padding: 40px 20px; }
    .display-text { margin-bottom: 20px; }
    .cases-section { grid-template-columns: 1fr; }
    .cases-section > div:first-child { border-right: none; border-bottom: var(--border-w) solid var(--c-border); }
    .lc-text-col { padding: 40px 20px; }
    .lc-stack-col { padding: 60px 20px; min-height: 600px; }
    .cards-wrapper { width: 100%; max-width: 300px; }
    .faq-grid { grid-template-columns: 1fr !important; }
    .faq-left { border-right: none !important; border-bottom: var(--border-w) solid var(--c-border); padding: 40px 20px !important; }
}