/* ============================================================
   TradeY — marketing site stylesheet
   Black & white minimalist theme.

   Colours, shadows, radii and spacing come from tokens.css via
   var(--name). Do not add raw hex literals here (CLAUDE.md §5.2) —
   add a token first, and give it a body.light-mode override if it
   is theme-dependent.
   ============================================================ */

/* ----------------------------------------
   Imports (must precede all other rules per CSS spec)
   ---------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('tokens.css');

/* ----------------------------------------
   CSS Reset & Base
   ---------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ----------------------------------------
   Custom Scrollbar
   ---------------------------------------- */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-scrollbar);
}

::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* ----------------------------------------
   Selection
   ---------------------------------------- */
::selection {
    background: var(--selection-bg);
    color: var(--selection-color);
}

/* ----------------------------------------
   Navigation (.navbar)
   ---------------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: var(--navbar-bg);
    border-bottom: 1px solid var(--border);
}

.navbar-container {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: var(--navbar-height);
}

.navbar-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 2px;
    color: var(--text);
    text-decoration: none;
}

.navbar-logo-img {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-input);
    display: block;
    flex-shrink: 0;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a.btn-primary {
    color: var(--btn-primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text);
    transition: width 0.3s ease;
}

.nav-links a.btn::after {
    display: none;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text);
    border-radius: var(--radius-xs);
    transition: all 0.3s ease;
}

/* ----------------------------------------
   Nav Dropdowns (.nav-dropdown)
   ---------------------------------------- */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s ease;
}

.nav-dropdown-trigger svg {
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-dropdown-trigger svg,
.nav-dropdown:focus-within .nav-dropdown-trigger svg,
.nav-dropdown.open .nav-dropdown-trigger svg {
    transform: rotate(180deg);
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    min-width: 200px;
    background: var(--navbar-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.5rem 0;
    display: none;
    flex-direction: column;
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-panel,
.nav-dropdown:focus-within .nav-dropdown-panel,
.nav-dropdown.open .nav-dropdown-panel {
    display: flex;
}

.nav-dropdown-panel a {
    padding: 0.6rem 1.25rem;
    white-space: nowrap;
}

.nav-dropdown-panel a::after {
    display: none;
}

.nav-dropdown-panel a:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

/* ----------------------------------------
   Hero Section (.hero)
   ---------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#particles-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, var(--gradient-from) 0%, var(--hero-gradient-to) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

/* ----------------------------------------
   Buttons
   ---------------------------------------- */
.btn {
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    border: 2px solid var(--btn-primary-border);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-btn-primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--btn-secondary-color);
    border: 2px solid var(--btn-secondary-border);
}

.btn-secondary:hover {
    background: var(--btn-secondary-hover-bg);
    color: var(--btn-secondary-hover-color);
}

.btn-small {
    padding: 10px 24px;
    font-size: 0.85rem;
}

.btn:disabled,
.btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ----------------------------------------
   Sections
   ---------------------------------------- */
.section {
    padding: var(--section-pad-y) var(--section-pad-x);
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    width: var(--section-title-underline-w);
    height: var(--section-title-underline-h);
    background: var(--text);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    color: var(--text-muted);
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ----------------------------------------
   Features Grid
   ---------------------------------------- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    transition: all 0.4s ease;
}

.feature-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-circle);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    border-color: var(--border-hover);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ----------------------------------------
   Chart Section
   ---------------------------------------- */
.chart-section {
    padding: 80px 2rem;
}

.chart-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chart-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.chart-toolbar .timeframes {
    display: flex;
    gap: 0.5rem;
}

.chart-toolbar button {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 6px 16px;
    border-radius: var(--radius-chip);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.chart-toolbar button:hover,
.chart-toolbar button.active {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    border-color: var(--btn-primary-border);
}

#candlestick-chart {
    width: 100%;
    height: 450px;
}

/* ----------------------------------------
   Dashboard
   ---------------------------------------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-hover);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-change {
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.stat-change.positive {
    color: var(--color-success);
}

.stat-change.negative {
    color: var(--color-danger);
}

.bot-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: all 0.3s ease;
}

.bot-card:hover {
    border-color: var(--border-hover);
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.bot-status .dot {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-circle);
    display: inline-block;
}

.bot-status .dot.active {
    background: var(--color-success);
}

.bot-status .dot.inactive {
    background: #666;
}

/* ----------------------------------------
   Pricing
   ---------------------------------------- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: start;
}

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.4s ease;
}

.pricing-card:hover {
    border-color: var(--text-muted);
}

.pricing-card.featured {
    border-color: var(--border-hover);
    transform: scale(1.05);
    box-shadow: var(--shadow-card-featured);
}

.pricing-card .badge {
    display: inline-block;
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
    padding: 4px 16px;
    border-radius: var(--radius-chip);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.pricing-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
}

.price span {
    font-size: 1rem;
    color: #888;
    font-weight: 400;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.9rem;
}

.pricing-features li::before {
    content: '\2713  ';
    color: var(--text);
    font-weight: 700;
}

/* ----------------------------------------
   FAQ
   ---------------------------------------- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text);
    padding: 1.5rem 0;
    font-size: 1.1rem;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: #ccc;
}

.faq-question .icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding-bottom: 1.5rem;
}

.faq-item.active .faq-question .icon {
    transform: rotate(45deg);
}

.faq-answer p {
    color: var(--text-dim);
    line-height: 1.8;
}

/* ----------------------------------------
   Forms
   ---------------------------------------- */
.form-container {
    max-width: 500px;
    margin: 0 auto;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    width: 100%;
    max-width: 450px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    color: var(--text);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--border-hover);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.form-link a {
    color: var(--text);
    text-decoration: underline;
}

/* ----------------------------------------
   Blog
   ---------------------------------------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s ease;
}

.blog-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-5px);
}

.blog-card-image {
    height: 200px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-faint);
    font-size: 3rem;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.blog-card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-faint);
    font-size: 0.8rem;
}

/* ----------------------------------------
   Contact
   ---------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.contact-info p {
    color: #888;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-circle);
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    border-color: #fff;
    background: #fff;
    color: #000;
}

/* ----------------------------------------
   Marketplace
   ---------------------------------------- */
.marketplace-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    justify-content: center;
}

.marketplace-filters select {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: var(--radius-input);
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
}

.marketplace-filters select:focus {
    border-color: var(--border-hover);
    outline: none;
}

.strategy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all 0.4s ease;
}

.strategy-card:hover {
    border-color: var(--border-hover);
}

.strategy-card .risk-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-chip);
    font-size: 0.75rem;
    font-weight: 600;
}

.risk-badge.low {
    background: var(--color-status-tile);
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.risk-badge.medium {
    background: var(--color-status-tile);
    color: var(--color-warning);
    border: 1px solid var(--color-warning);
}

.risk-badge.high {
    background: var(--color-status-tile);
    color: var(--color-danger);
    border: 1px solid var(--color-danger);
}

/* ----------------------------------------
   Timeline
   ---------------------------------------- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-bottom: 3rem;
    width: 50%;
}

.timeline-item:nth-child(even) {
    align-self: flex-end;
    justify-content: flex-start;
    margin-left: 50%;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    max-width: 350px;
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ----------------------------------------
   Profile
   ---------------------------------------- */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #222;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-circle);
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.profile-info h2 {
    margin-bottom: 0.3rem;
}

.profile-info p {
    color: var(--text-muted);
}

/* ----------------------------------------
   Performance Metrics
   ---------------------------------------- */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ----------------------------------------
   API Docs
   ---------------------------------------- */
.api-docs-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.api-sidebar {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: sticky;
    top: 90px;
    height: fit-content;
}

.api-sidebar a {
    display: block;
    padding: 0.5rem 0;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.api-sidebar a:hover {
    color: var(--text);
}

.api-endpoint {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.api-method {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 0.5rem;
}

.api-method.get {
    background: var(--color-success-tile);
    color: var(--color-success);
}

.api-method.post {
    background: var(--color-info-tile);
    color: var(--color-info);
}

code,
pre {
    background: var(--code-bg);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

pre {
    padding: 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-input);
    margin: 1rem 0;
}

/* ----------------------------------------
   Error Page
   ---------------------------------------- */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.error-page h1 {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1rem;
    background: linear-gradient(180deg, var(--gradient-from) 0%, var(--error-gradient-to) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.error-page p {
    color: var(--text-muted);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* ----------------------------------------
   Footer
   ---------------------------------------- */
.footer {
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
    padding: 60px 2rem 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    max-width: var(--container-max);
    margin: 0 auto 3rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.3rem 0;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-col a:hover {
    color: var(--text);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 0.85rem;
    max-width: var(--container-max);
    margin: 0 auto;
}

.footer-bottom .footer-beta-note {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

/* ----------------------------------------
   Beta 0 notice (src/components/Beta0Notice.astro)
   ---------------------------------------- */
.beta0-notice {
    max-width: 820px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--color-warning);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    text-align: left;
}

.beta0-notice h2 {
    font-size: 1.05rem;
    margin: 0 0 0.5rem 0;
    color: var(--text);
}

.beta0-notice ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.beta0-notice p {
    margin: 0.75rem 0 0 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   Keyframe Animations
   ============================================================ */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ============================================================
   Scroll Animations
   ============================================================ */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* ============================================================
   Utility Classes
   ============================================================ */
.text-center {
    text-align: center;
}

.text-gray {
    color: var(--text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 3rem; }

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ============================================================
   Responsive — Tablet (max-width: 1024px)
   ============================================================ */
@media (max-width: 1024px) {
    .features-grid,
    .pricing-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .api-docs-container {
        grid-template-columns: 1fr;
    }

    .api-sidebar {
        position: static;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   Responsive — Mobile (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        background: var(--bg);
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
    }

    /* Dropdowns collapse flat inside the mobile hamburger menu. */
    .nav-links.active .nav-dropdown {
        width: 100%;
    }

    .nav-links.active .nav-dropdown-trigger {
        display: none;
    }

    .nav-links.active .nav-dropdown-panel {
        position: static;
        display: flex;
        background: transparent;
        border: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        padding: 0;
        gap: 1.5rem;
        min-width: 0;
    }

    .nav-links.active .nav-dropdown-panel a {
        padding: 0;
    }

    .nav-links.active .nav-dropdown-panel a:hover {
        background: transparent;
    }

    .hero-content h1 {
        font-size: clamp(2rem, 6vw, 3rem);
    }

    .section {
        padding: var(--section-pad-y-tablet) var(--section-pad-x-tablet);
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid,
    .pricing-grid,
    .blog-grid,
    .dashboard-grid,
    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: none;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Timeline single column */
    .timeline::before {
        left: 20px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding-left: 50px;
        justify-content: flex-start;
    }

    .timeline-content {
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Responsive — Small Mobile (max-width: 480px)
   ============================================================ */
@media (max-width: 480px) {
    .navbar-container {
        padding: 0 1rem;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .section {
        padding: var(--section-pad-y-mobile) var(--section-pad-x-mobile);
    }

    .section-title {
        font-size: 1.6rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2.5rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.85rem;
    }

    .pricing-card {
        padding: 2rem 1.5rem;
    }

    .price {
        font-size: 2.2rem;
    }

    .auth-box {
        padding: 2rem 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .error-page h1 {
        font-size: 5rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .metric-value {
        font-size: 2rem;
    }

    .chart-toolbar {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* ============================================================
   Theme Toggle Button
   ============================================================ */
.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text);
    width: 38px;
    height: 38px;
    border-radius: var(--radius-circle);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--border-hover);
    transform: scale(1.1);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    position: absolute;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(180deg) scale(0);
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

body.light-mode .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0) scale(1);
}

body.light-mode .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(-180deg) scale(0);
}

body.light-mode .hero-content h1 {
    background: linear-gradient(180deg, var(--gradient-from) 0%, var(--hero-gradient-to) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .error-page h1 {
    background: linear-gradient(180deg, var(--gradient-from) 0%, var(--error-gradient-to) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}