/* styles.css */
:root{
    --bg: #f8fafc;
    --panel: #ffffff;
    --card: #ffffff;
    --card2: #f1f5f9;
    --text: #1e293b;
    --muted: #475569; /* Slightly darker for better contrast (was #64748b) */
    --line: rgba(0,0,0,.08);
    --shadow: 0 10px 25px rgba(0,0,0,.05);

    --primary: #ff8c42;
    --primary2: #e66000; /* Darkened from #f97316 for better contrast (reaches ~4.5:1 on white) */
    --accent: #0ea5e9;

    --radius: 24px;
    --radius2: 16px;

    --container: 1120px;
}

*{ box-sizing: border-box; }
html, body{ height: 100%; scroll-behavior: smooth; }
body{
    margin: 0;
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(1200px 600px at 20% -10%, rgba(255,140,66,.12), transparent 60%),
    radial-gradient(900px 500px at 80% 10%, rgba(14,165,233,.10), transparent 55%),
    var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Accessibility: Skip to content link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--primary2);
    color: white;
    padding: 12px 24px;
    z-index: 2000;
    transition: top 0.2s;
    border-radius: 0 0 12px 0;
    font-weight: 700;
}
.skip-link:focus {
    top: 0;
}

/* Better focus states */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 4px;
}

a{ color: inherit; text-decoration: none; border-radius: 4px; }
a:hover{ text-decoration: underline; }

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

.site-header{
    position: fixed;
    top: 0;
    z-index: 1000;
    margin: 0 auto;
    width: 100%;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

main {
    /* No margin-top to allow hero background to reach the top */
}

.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    padding: 8px 16px;
    background: rgba(255, 140, 66, 0.1);
    color: var(--primary2);
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 140, 66, 0.2);
    position: relative;
    z-index: 10;
}

.back-link:hover {
    background: rgba(255, 140, 66, 0.15);
    transform: translateX(-4px);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 140, 66, 0.1);
}
.header-inner{
    max-width: var(--container);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 16px;
}

.brand{
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
}
.brand-logo{
    width: 38px;
    height: 38px;
    object-fit: contain;
    transition: transform 0.2s ease;
}
.brand:hover .brand-logo{
    transform: scale(1.05) rotate(-2deg);
}
.footer-logo {
    width: 30px;
    height: 30px;
}
.brand-text{ white-space: nowrap; font-size: 1.1em; }

@media (max-width: 480px) {
    .brand-text { display: none; }
}

.nav{
    display: none;
    gap: 24px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
}
.nav a{ padding: 8px 16px; border-radius: 12px; transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.nav a:hover{
    background: rgba(249, 115, 22, 0.08);
    text-decoration: none;
    color: var(--primary2);
    transform: translateY(-1px);
}
.nav a:active{
    transform: translateY(0);
}

.header-cta{ display: none; }

.nav-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.1);
    border-radius: 12px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s ease;
}
.nav-toggle:hover {
    background: rgba(249, 115, 22, 0.12);
}

.hamburger {
    position: relative;
    width: 20px;
    height: 2px;
    background: var(--primary2);
    transition: all 0.2s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--primary2);
    left: 0;
    transition: all 0.2s ease;
}

.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

@media (max-width: 879px) {
    .nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100%;
        background: var(--panel);
        padding: 80px 24px 24px;
        box-shadow: -10px 10px 40px rgba(0,0,0,0.1);
        transform: translateX(120%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 90;
        overflow-y: auto;
        border-left: 1px solid var(--line);
    }

    .nav.is-open {
        transform: translateX(0);
    }

    .nav a {
        font-size: 18px;
        padding: 12px 16px;
        border-radius: 12px;
        margin-bottom: 4px;
    }
}

@media (min-width: 880px){
    .nav{ display: flex; }
    .header-cta{ display: block; }
    .nav-toggle { display: none; }
}

.hero{
    padding: 160px 0 80px; /* Added 80px to top padding to account for fixed header */
    text-align: center;
    background-image: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--line);
}
.hero-container{
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
}
.hero-copy{
    width: 100%;
    max-width: 800px;
}
@media (min-width: 980px){
    .hero{ padding: 200px 0 100px; } /* Increased to maintain spacing with fixed header */
}

h1{
    font-size: clamp(32px, 6vw, 64px);
    line-height: 1.1;
    margin: 0 0 24px;
    letter-spacing: -0.04em;
    font-weight: 800;
    color: #0f172a;
}
.lead{
    margin: 0 auto 32px;
    color: var(--muted);
    font-size: 20px;
    max-width: 65ch;
    line-height: 1.6;
}

.hero-actions{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 16px 0 32px;
}

.meta{
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 500;
}
.meta li { display: flex; align-items: center; }
.meta .dot{
    width: 8px; height: 8px;
    display: inline-block;
    border-radius: 999px;
    background: var(--primary);
    margin-right: 10px;
    box-shadow: 0 0 0 4px rgba(255, 140, 66, 0.1);
}

.hero-panel{
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    width: 100%;
}
@media (min-width: 768px) {
    .hero-panel {
        grid-template-columns: 1fr 1fr;
    }
}
.panel-card{
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
    padding: 32px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.panel-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.panel-note{
    border-radius: var(--radius2);
    border: 1px solid rgba(14, 165, 233, 0.2);
    background: rgba(14, 165, 233, 0.05);
    color: var(--accent);
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 500;
}

.kpi{
    display: grid;
    gap: 2px;
}
.kpi-title{
    color: var(--muted);
    font-size: 14px;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 600;
}
.kpi-value{
    font-size: 22px;
    font-weight: 800;
    color: var(--primary2);
}
.divider{
    height: 1px;
    background: linear-gradient(to right, var(--line), transparent);
    margin: 20px 0;
}

.feature-list{
    display: grid;
    gap: 16px;
}
.feature-title{
    font-weight: 700;
    color: var(--text);
}
.feature-desc{
    color: var(--muted);
    font-size: 15px;
    margin-top: 4px;
}

.section{
    padding: 40px 0;
}
@media (min-width: 900px) {
    .section { padding: 60px 0; }
}
.section.alt{
    background: #f1f5f9;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section-head{
    margin-bottom: 32px;
}
h2{
    font-size: 32px;
    margin: 0 0 12px;
    letter-spacing: -.02em;
    font-weight: 800;
}
.muted{
    color: var(--muted);
}
.small{
    font-size: 13px;
}

.grid-2{
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.grid-3{
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 900px){
    .grid-2{ grid-template-columns: 1fr 1fr; }
    .grid-3{ grid-template-columns: 1fr 1fr 1fr; }
}

.card{
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: white;
    box-shadow: var(--shadow);
    padding: 24px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
@media (min-width: 900px) {
    .card { padding: 32px; }
}
.card:hover{
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.card h3{
    margin: 0 0 12px;
    font-size: 20px;
    letter-spacing: -.01em;
    font-weight: 700;
}
.os-icon{
    font-size: 32px;
    margin-bottom: 12px;
}

.list{
    margin: 0;
    padding-left: 20px;
    color: var(--text);
}
.list li{ margin: 12px 0; color: var(--muted); line-height: 1.5; }

.callout{
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--radius2);
    border: 1px solid rgba(249, 115, 22, 0.2);
    background: rgba(249, 115, 22, 0.05);
    color: var(--primary2);
    font-size: 15px;
}

.disclaimer{
    margin-top: 24px;
    padding: 20px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fffbeb;
    color: #92400e;
    font-size: 14px;
}

/* Tutorial Section */
.tutorial-meta {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius2);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.tutorial-cta {
    text-align: center;
    max-width: 500px;
}

.tutorial-cta p {
    margin-bottom: 20px;
    color: var(--muted);
}

@media (min-width: 900px) {
    .tutorial-meta {
        margin-top: 60px;
    }
}

.btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: white;
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .01em;
    cursor: pointer;
    user-select: none;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn:hover{
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.btn:active{
    transform: translateY(0);
}

.btn-primary{
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary2));
    color: white;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.25);
}
.btn-primary:hover{
    background: linear-gradient(135deg, #ffa066, #ff8433);
    box-shadow: 0 8px 20px rgba(249, 115, 22, 0.35);
}
.btn-secondary{
    border-color: var(--primary);
    color: var(--primary2);
    background: rgba(255, 140, 66, 0.05);
}
.btn-ghost{
    background: transparent;
    border-color: transparent;
    color: var(--muted);
}
.btn-ghost:hover{
    background: rgba(0,0,0,0.03);
    color: var(--text);
}

.btn-row{
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

code{
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #f1f5f9;
    color: #475569;
}

.site-footer{
    padding: 48px 0;
    border-top: 1px solid var(--line);
    background: #ffffff;
}
.footer-inner{
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    justify-content: space-between;
}
.footer-links{
    display: flex;
    gap: 24px;
    color: var(--muted);
    font-weight: 500;
}
.footer-links a:hover{ color: var(--primary2); }

@media (min-width: 900px){
    .footer-inner{
        flex-direction: row;
        align-items: center;
    }
}
