/*
 * Guardyn landing page component layer.
 *
 * The rules index.html carried in its <style> block until PR-136, plus the ones later pages
 * promoted once a second page needed them. It consumes the tokens in theme.css and defines no
 * colour of its own. Link order on every
 * page is theme.css, then this file, then an optional per-page sheet. A class belongs here
 * once two pages use it; until then it stays in the page that needs it.
 */

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

/* Skip link: first focusable element, visible only while focused */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 200;
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-primary-strong);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-card);
}

.skip-link:focus {
    top: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    background: var(--color-surface-glass);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--color-text);
}

.logo-link img {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
}

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

.nav-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.nav-links .btn-primary,
.nav-links .btn-primary:hover {
    color: var(--color-text-on-primary);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    cursor: pointer;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 0;
}

.hero-logo-img {
    display: block;
    width: 160px;
    height: 160px;
    margin: 0 auto 2rem;
}

.hero-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    padding: 3rem 2rem;
}

.hero-card .stats-grid,
.traction .stats-grid {
    margin-bottom: 0;
}

.hero-logo {
    font-size: 4rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* Sibling pages: a sentence-length h1 where index.html shows the wordmark. */

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.tagline {
    font-size: 1.5rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    font-weight: 300;
}

.description {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.gradient-text {
    color: var(--color-primary-strong);
}

/* Buttons */
.btn {
    font-family: inherit;
    padding: 1rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-text-on-primary);
}

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

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

.btn-secondary:hover {
    background: var(--color-primary-soft);
    transform: translateY(-2px);
}

.cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.cta:last-child {
    margin-bottom: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary-strong);
    box-shadow: var(--shadow-card-lg);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary-strong);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

/* Video Section */
.video-section {
    padding: 4rem 0;
    background: var(--color-surface-glass);
}

.video-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.video-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.video-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 2px solid var(--color-border);
    transition: all 0.3s ease;
}

.video-wrapper:hover {
    box-shadow: var(--shadow-card-lg);
    border-color: var(--color-primary-strong);
    transform: translateY(-5px);
}

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

/* App Screenshot Section */
.app-screenshot-section {
    padding: 5rem 0;
}

.app-screenshot-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.app-screenshot-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.app-screenshot-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.app-screenshot-wrapper {
    position: relative;
    display: inline-block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 2px solid var(--color-border);
    transition: all 0.3s ease;
    max-width: 100%;
}

.app-screenshot-wrapper:hover {
    box-shadow: var(--shadow-card-lg);
    border-color: var(--color-primary-strong);
    transform: translateY(-5px);
}

.app-screenshot-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 1000px;
}

.platform-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.platform-badge:hover {
    border-color: var(--color-primary-strong);
    color: var(--color-text);
}

.platform-badge svg {
    width: 18px;
    height: 18px;
}

/* Features Section */
.section {
    padding: 6rem 0;
}

.section--band {
    background: var(--color-surface-muted);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

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

/* A heading with no subtitle under it needs its own gap before the content. */
.section-title + .features,
.section-title + .stats-grid,
.section-title + .panel,
.section-title + .faq {
    margin-top: 3rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.feature-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* A plain surface without the card hover lift: the transparency panel, the legal TOC, callouts. */
/* Transparency panel: a surface without the card hover lift. */
.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 2rem;
}


.panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}


.panel-text {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.panel .stats-grid {
    margin-bottom: 0;
}


.panel a,
.feature-text a {
    color: var(--color-primary-strong);
}

/* Tech Stack */
.tech-category {
    margin-bottom: 3rem;
}

.tech-category-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--color-primary-strong);
}

.tech-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.tech-badge {
    background: var(--color-surface);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: help;
    position: relative;
}

.tech-badge:hover {
    background: var(--color-primary-soft);
    transform: scale(1.05);
    border-color: var(--color-primary-strong);
}

/* Tech Info Modal */
.tech-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-overlay);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.tech-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.tech-modal-content {
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    padding: 30px;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: var(--shadow-card-lg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tech-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--color-surface-muted);
    border: none;
    color: var(--color-text);
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tech-modal-close:hover {
    background: var(--color-border);
    transform: rotate(90deg);
}

.tech-modal-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary-strong);
    margin-bottom: 15px;
    padding-right: 40px;
}

.tech-modal-category {
    font-size: 14px;
    color: var(--color-primary-strong);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tech-modal-description {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.tech-modal-example {
    background: var(--color-primary-soft);
    border-left: 4px solid var(--color-primary-strong);
    padding: 15px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
}

.tech-modal-example-title {
    font-weight: 600;
    color: var(--color-primary-strong);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tech-modal-example-text {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.tech-modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tech-modal-tag {
    background: var(--color-primary-soft);
    color: var(--color-primary-strong);
    padding: 5px 12px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
}

/* Footer */
footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 3rem 0 2rem;
    margin-top: 6rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--color-primary-strong);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--color-primary-strong);
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Use Cases List */
.use-case-list {
    list-style: none;
    margin-top: 1.5rem;
}

.use-case-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
}

.use-case-list li span {
    font-size: 1.1rem;
    min-width: 24px;
}

/* Beta signup */
.beta-card {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.beta-form {
    margin-top: 2rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-input {
    width: 100%;
    padding: 1rem;
    font: inherit;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-input::placeholder {
    color: var(--color-text-placeholder);
}

.form-input:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-focus);
}

.form-textarea {
    resize: vertical;
}

.form-submit {
    width: 100%;
    justify-content: center;
    font-size: 1.1rem;
}

.form-note {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.beta-social {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.beta-social p {
    margin-bottom: 1rem;
    color: var(--color-text-secondary);
}

.beta-social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.beta-social-links a {
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
}

.beta-social-links a:hover {
    color: var(--color-primary-strong);
}

/* Project status */
.traction {
    padding: 4rem 0;
    background: var(--color-surface-glass);
}

.traction .section-subtitle {
    margin-bottom: 3rem;
    color: var(--color-primary-strong);
}

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

.stat-value--small {
    font-size: 1.8rem;
}

.section-hint {
    font-size: 0.9rem;
    color: var(--color-primary-strong);
}

.footer-bottom p + p {
    margin-top: 0.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero-logo {
        font-size: 3rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }

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

    .tagline {
        font-size: 1.2rem;
    }

    .description {
        font-size: 1rem;
    }

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

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

    .stat-card {
        padding: 1.25rem 0.75rem;
    }

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

    .tech-modal-content {
        padding: 20px;
        margin: 10px;
    }

    .tech-modal-title {
        font-size: 22px;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-card);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: var(--radius-sm);
    }

    .nav-links .btn-primary {
        display: flex;
        justify-content: center;
        margin-top: 0.25rem;
    }

    .hero-card {
        padding: 2rem 1rem;
    }

    .beta-card {
        padding: 2rem 1.25rem;
    }
}
