/* ============================================
   AVALON DIGITAL STUDIO — Drone Rate Card
   ============================================ */

:root {
    --bg: #0a0a0a;
    --bg-alt: #111111;
    --surface: #161616;
    --surface-hover: #1d1d1d;
    --text: #ffffff;
    --text-muted: #888888;
    --gold: #d4af37;
    --gold-soft: rgba(212, 175, 55, 0.12);
    --gold-line: rgba(212, 175, 55, 0.22);
    --border: rgba(255, 255, 255, 0.08);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --radius: 6px;
    --transition: 0.25s ease;
}

[data-theme="light"] {
    --bg: #ffffff;
    --bg-alt: #f7f7f7;
    --surface: #f3f3f3;
    --surface-hover: #ececec;
    --text: #0a0a0a;
    --text-muted: #555555;
    --gold: #b8960c;
    --gold-soft: rgba(184, 150, 12, 0.10);
    --gold-line: rgba(184, 150, 12, 0.25);
    --border: rgba(0, 0, 0, 0.10);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-weight: 300;
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    transition: background var(--transition), color var(--transition);
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Atmospheric glow */
body::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(212,175,55,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 40% 40% at 90% 80%, rgba(212,175,55,0.04) 0%, transparent 50%);
    pointer-events: none; z-index: 0;
}

::selection { background: var(--gold); color: var(--bg); }
a { color: inherit; text-decoration: none; }

/* ── NAVBAR ── */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
[data-theme="light"] .navbar { background: rgba(255,255,255,0.85); }

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 500; font-size: 15px; letter-spacing: 0.02em;
}
.logo-img { width: 26px; height: 26px; }

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

.back-link {
    font-size: 13px; color: var(--text-muted);
    transition: color var(--transition);
}
.back-link:hover { color: var(--gold); }

.theme-toggle {
    width: 36px; height: 36px;
    background: none; border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .moon-icon { display: none; }
[data-theme="light"] .theme-toggle .sun-icon { display: none; }
[data-theme="light"] .theme-toggle .moon-icon { display: block; }

/* ── PAGE LAYOUT ── */
.page {
    max-width: 980px;
    margin: 0 auto;
    padding: 64px 24px 80px;
    position: relative; z-index: 1;
}

/* ── HERO ── */
.hero {
    border-bottom: 1px solid var(--border);
    padding-bottom: 40px;
    margin-bottom: 56px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out;
}

.hero-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.25em;
    color: var(--gold);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.05;
}
.hero-title span { color: var(--gold); }

.hero-meta { text-align: right; }
.hero-meta p {
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    line-height: 1.9;
}
.hero-meta .version { color: var(--gold); font-weight: 500; }

/* ── CURRENCY TOGGLE ── */
.currency-bar {
    display: flex; align-items: center; gap: 14px;
    margin-bottom: 56px; flex-wrap: wrap;
}
.currency-label {
    font-family: var(--mono);
    font-size: 10px; letter-spacing: 0.25em;
    color: var(--text-muted); text-transform: uppercase;
}
.toggle-group {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.toggle-btn {
    padding: 7px 20px;
    font-family: var(--mono);
    font-size: 11px; letter-spacing: 0.15em;
    background: none; border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.toggle-btn:hover { color: var(--text); }
.toggle-btn.active {
    background: var(--gold); color: #0a0a0a; font-weight: 500;
}
.rate-note {
    font-family: var(--mono); font-size: 10px;
    color: var(--text-muted); margin-left: auto;
}

/* ── SECTIONS ── */
.section { margin-bottom: 56px; }
.section-header {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 24px;
}
.section-num {
    font-family: var(--mono); font-size: 11px;
    color: var(--gold); letter-spacing: 0.2em;
}
.section-title {
    font-size: 1.4rem; font-weight: 500; letter-spacing: -0.01em;
}
.section-line { flex: 1; height: 1px; background: var(--border); }

/* ── PRICING CARDS ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all var(--transition);
}
.card:hover {
    background: var(--surface-hover);
    border-color: var(--gold-line);
    transform: translateY(-2px);
}
.card.highlight {
    background: var(--gold-soft);
    border-color: var(--gold-line);
}
.card-badge {
    font-family: var(--mono); font-size: 10px;
    letter-spacing: 0.22em; color: var(--gold);
    text-transform: uppercase; margin-bottom: 14px;
}
.card-title {
    font-size: 15px; font-weight: 500; margin-bottom: 6px;
}
.card-desc {
    font-size: 12.5px; color: var(--text-muted);
    line-height: 1.6; margin-bottom: 22px; min-height: 36px;
}
.price-block {
    border-top: 1px solid var(--border);
    padding-top: 16px;
}
.price-main {
    font-size: 28px; font-weight: 500;
    letter-spacing: -0.01em; line-height: 1;
}
.price-main .sym {
    font-size: 14px; color: var(--gold);
    vertical-align: super; margin-right: 2px;
}
.price-sub {
    font-family: var(--mono); font-size: 11px;
    color: var(--text-muted); margin-top: 6px;
}
.price-sub .alt { color: var(--gold); }

/* ── TABLE ── */
.price-table {
    width: 100%; border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.price-table thead tr { border-bottom: 1px solid var(--border); }
.price-table th {
    font-family: var(--mono); font-size: 10px;
    letter-spacing: 0.2em; color: var(--gold);
    text-transform: uppercase;
    padding: 16px 20px; text-align: left; font-weight: 500;
}
.price-table th:last-child, .price-table td:last-child { text-align: right; }
.price-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px; vertical-align: middle;
}
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody tr { transition: background var(--transition); }
.price-table tbody tr:hover { background: var(--surface-hover); }
.td-note {
    font-size: 11.5px; color: var(--text-muted);
    display: block; margin-top: 3px;
}
.td-includes { font-size: 11.5px; color: var(--text-muted); }
.td-price { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.td-price .alt {
    display: block; font-size: 10.5px;
    color: var(--text-muted); margin-top: 3px;
}

/* ── ADD-ONS ── */
.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}
.addon-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex; justify-content: space-between;
    align-items: center; gap: 12px;
    transition: all var(--transition);
}
.addon-row:hover {
    background: var(--surface-hover);
    border-color: var(--gold-line);
}
.addon-name { font-size: 13.5px; }
.addon-sub {
    font-size: 11.5px; color: var(--text-muted);
    display: block; margin-top: 2px;
}
.addon-price {
    font-family: var(--mono); font-size: 12px;
    color: var(--gold); white-space: nowrap; text-align: right;
}
.addon-price .alt {
    display: block; font-size: 10.5px;
    color: var(--text-muted); margin-top: 2px;
}

/* ── TERMS ── */
.terms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}
.term-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex; gap: 16px; align-items: flex-start;
    transition: all var(--transition);
}
.term-item:hover { border-color: var(--gold-line); }
.term-icon {
    flex-shrink: 0;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold);
    display: flex; align-items: center; justify-content: center;
}
.term-icon svg { width: 16px; height: 16px; }
.term-title {
    font-size: 13px; font-weight: 500;
    margin-bottom: 4px; letter-spacing: 0.01em;
}
.term-body {
    font-size: 12px; color: var(--text-muted); line-height: 1.6;
}

/* ── PILL STRIP (gear / tech stack) ── */
.pill-strip {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.pill {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 2px solid var(--gold);
    border-radius: var(--radius);
    padding: 9px 14px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    transition: all var(--transition);
}
.pill:hover { color: var(--text); border-color: var(--gold-line); border-left-color: var(--gold); }

/* ── PORTFOLIO GRID ── */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}
.portfolio-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: all var(--transition);
}
.portfolio-item:hover {
    background: var(--surface-hover);
    border-color: var(--gold-line);
    transform: translateY(-2px);
}
.portfolio-item a { display: block; }
.port-name {
    font-size: 13px; font-weight: 500;
    margin-bottom: 4px; color: var(--text);
}
.portfolio-item a:hover .port-name { color: var(--gold); }
.port-desc {
    font-size: 11px; color: var(--text-muted);
    font-family: var(--mono); letter-spacing: 0.04em;
}

/* ── SOCIAL ROW ── */
.social-row {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-bottom: 40px;
}
.social-pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--mono); font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    transition: all var(--transition);
}
.social-pill:hover { border-color: var(--gold); color: var(--gold); }
.social-pill .plat { color: var(--gold); font-weight: 500; }

/* ── CTA ── */
.cta {
    margin-top: 64px;
    padding: 40px;
    background: var(--surface);
    border: 1px solid var(--gold-line);
    border-radius: var(--radius);
    text-align: center;
}
.cta h3 {
    font-size: 1.6rem; font-weight: 500;
    margin-bottom: 10px; letter-spacing: -0.01em;
}
.cta h3 span { color: var(--gold); }
.cta p { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; }
.btn-primary {
    display: inline-block;
    padding: 12px 32px;
    background: var(--gold);
    color: #0a0a0a;
    font-weight: 500; font-size: 14px;
    letter-spacing: 0.02em;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.25);
}

/* ── FOOTER ── */
.footer {
    margin-top: 64px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: space-between;
    align-items: center; gap: 20px; flex-wrap: wrap;
}
.footer-copy {
    font-family: var(--mono);
    font-size: 10px; color: var(--text-muted);
    letter-spacing: 0.15em;
}
.footer-note {
    font-size: 11.5px; color: var(--text-muted); font-style: italic;
}

/* ── CURRENCY VISIBILITY ── */
[data-currency="ttd"] .when-usd { display: none; }
[data-currency="usd"] .when-ttd { display: none; }

/* ── RESPONSIVE ── */
@media (max-width: 720px) {
    .page { padding: 40px 20px 60px; }
    .hero { flex-direction: column; align-items: flex-start; }
    .hero-meta { text-align: left; }
    .rate-note { display: none; margin-left: 0; }
    .price-table th, .price-table td { padding: 12px 14px; font-size: 12.5px; }
    .price-table th:nth-child(2), .price-table td:nth-child(2) { display: none; }
    .cta { padding: 28px 20px; }
}

/* ── PRINT ── */
@media print {
    body { background: #fff; color: #111; }
    body::before { display: none; }
    .navbar, .currency-bar, .cta, .theme-toggle { display: none !important; }
    .card, .addon-row, .term-item, .price-table {
        background: #f7f7f7 !important;
        border: 1px solid #ddd !important;
    }
    .hero-title, .section-title { color: #111 !important; }
    .hero-eyebrow, .section-num, .card-badge { color: #8a6e2a !important; }
}
