/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #100E0B;
    --panel: #1A160F;
    --ink: #F2EAD8;
    --dim: #9A8C70;
    --line: rgba(242,234,216,0.09);
    --acc: #D9A94E;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    color: var(--ink);
    background-color: var(--bg);
    line-height: 1.9;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
    font-weight: 600;
}

a {
    text-decoration: none;
    color: var(--ink);
    transition: color 0.5s cubic-bezier(0.22,1,0.36,1);
}

a:hover {
    color: var(--acc);
}

/* Background Canvas */
#summon-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* HUD / Corner Elements */
.hud-text {
    position: fixed;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dim);
    z-index: 50;
    pointer-events: none;
}
.hud-top-left { top: 20px; left: 20px; }
.hud-bottom-right { bottom: 20px; right: 20px; }
.hud-bottom-left { 
    bottom: 20px; 
    left: 20px; 
    color: var(--acc); 
    opacity: 0; 
    transition: opacity 0.3s;
}
.hud-bottom-left.show { opacity: 1; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.text-center { text-align: center; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.22,1,0.36,1);
    border: 1px solid var(--line);
    font-family: 'Noto Sans SC', sans-serif;
}

.btn-primary {
    background-color: var(--acc);
    color: #100E0B;
    border-color: var(--acc);
}
.btn-primary:hover {
    background-color: transparent;
    color: var(--acc);
    border-color: rgba(217,169,78,0.5);
}

.btn:not(.btn-primary) {
    background-color: transparent;
    color: var(--ink);
}
.btn:not(.btn-primary):hover {
    border-color: rgba(217,169,78,0.5);
    color: var(--acc);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header */
.header {
    background-color: transparent;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 24px;
    color: var(--acc);
    z-index: 2;
}

.nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
}

.nav a {
    margin: 0 15px;
    font-size: 14px;
    color: var(--dim);
}

.nav a:hover {
    color: var(--acc);
}

.header-btn {
    z-index: 2;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 32px;
    margin-bottom: 50px;
    color: var(--ink);
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s cubic-bezier(0.22,1,0.36,1), transform 0.5s cubic-bezier(0.22,1,0.36,1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Hero Section */
.hero {
    padding: 120px 0;
    background: transparent;
}

.headline {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--acc);
}

.sub-headline {
    font-size: 20px;
    color: var(--dim);
    max-width: 700px;
    margin: 0 auto 40px;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* Cards */
.card {
    background: var(--panel);
    padding: 40px 30px;
    border-radius: 4px;
    border: 1px solid var(--line);
    text-align: center;
    transition: all 0.5s cubic-bezier(0.22,1,0.36,1);
}

.card:hover {
    border-color: rgba(217,169,78,0.5);
}
.card:hover h3, .card:hover .icon {
    color: var(--acc);
}

.card .icon {
    font-size: 32px;
    margin-bottom: 20px;
    transition: color 0.5s;
}

.card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--ink);
    transition: color 0.5s;
}

.card p {
    color: var(--dim);
}

/* Pricing */
.price-card {
    position: relative;
}

.price-card.popular {
    border-color: var(--acc);
}

.badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg);
    color: var(--acc);
    border: 1px solid var(--acc);
    padding: 2px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'IBM Plex Mono', monospace;
    letter-spacing: 0.1em;
}

.price {
    font-size: 36px;
    font-weight: bold;
    margin: 20px 0;
    color: var(--ink);
    font-family: 'Cormorant Garamond', 'Noto Serif SC', serif;
}

.price span {
    font-size: 14px;
    color: var(--dim);
    font-weight: normal;
    font-family: 'Noto Sans SC', sans-serif;
}

.features-list {
    list-style: none;
    margin: 0 0 30px;
    text-align: left;
}

.features-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    color: var(--dim);
    font-size: 14px;
}
.features-list li:last-child {
    border-bottom: none;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    background: var(--panel);
    padding: 20px;
    border-radius: 4px;
    border: 1px solid var(--line);
    transition: border-color 0.5s cubic-bezier(0.22,1,0.36,1);
}

.faq-item:hover {
    border-color: rgba(217,169,78,0.5);
}

.faq-item h4 {
    margin-bottom: 10px;
    color: var(--ink);
}

.faq-item p {
    color: var(--dim);
    font-size: 14px;
}

/* Footer */
.footer {
    background-color: transparent;
    border-top: 1px solid var(--line);
    padding: 40px 0 20px;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--dim);
    margin: 0 15px;
    font-size: 14px;
}

.footer-links a:hover {
    color: var(--acc);
}

.copyright {
    color: var(--dim);
    font-size: 12px;
    font-family: 'IBM Plex Mono', monospace;
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
    }
    
    .nav {
        position: relative;
        left: 0;
        transform: none;
        margin-top: 15px;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav a { margin: 0; }
    
    .header-btn {
        margin-top: 15px;
    }
    .headline { font-size: 32px; }
    .sub-headline { font-size: 16px; }
    .hero { padding: 60px 0; }
    .section { padding: 40px 0; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .btn { padding: 14px 24px; }
}

/* Accessibility & Mobile Layout Fixes */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--acc);
    color: #000;
    padding: 10px 15px;
    z-index: 9999;
    font-weight: bold;
    transition: top 0.3s;
}
.skip-link:focus { top: 0; }

:target { scroll-margin-top: 100px; }

a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 2px dashed var(--acc) !important;
    outline-offset: 4px;
}

body {
    word-break: break-word;
    overflow-wrap: break-word;
}

.nav a, .footer-links a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* Details/Summary FAQ */
details.faq-item {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 15px;
}
details.faq-item summary {
    cursor: pointer;
    font-size: 18px;
    color: var(--ink);
    min-height: 44px;
    display: flex;
    align-items: center;
    list-style: none;
    font-weight: bold;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::before { 
    content: '▶'; 
    margin-right: 12px; 
    font-size: 14px; 
    color: var(--acc);
    transition: transform 0.3s; 
}
details.faq-item[open] summary::before { transform: rotate(90deg); }
details.faq-item p { margin-top: 15px; color: var(--dim); line-height: 1.6; }

/* Pricing Table (Semantic) */
.table-responsive { width: 100%; overflow-x: auto; margin-top: 30px; }
.pricing-table { width: 100%; min-width: 700px; border-collapse: collapse; text-align: center; }
.pricing-table caption { font-size: 24px; color: var(--acc); margin-bottom: 20px; font-weight: bold; }
.pricing-table th, .pricing-table td { border: 1px solid var(--line); padding: 15px; color: var(--ink); }
.pricing-table th { background: rgba(26,22,15, 0.8); color: var(--acc); }
.pricing-table tbody tr:hover { background: rgba(242,234,216, 0.02); }

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    canvas { display: none !important; }
}
