/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark Titanium — the same ground the app's launch splash paints */
    --color-ground: #15171A;
    --color-panel: #1C1F23;
    --color-panel-alt: #202429;
    --color-line: #2C3137;
    --color-text: #E8E9EA;
    --color-text-muted: #9AA0A6;
    /* Accent red and steel are the logo's own values (ic_launcher_lens.xml) */
    --color-accent: #E01E2B;
    --color-accent-soft: #F58085;
    --color-steel: #7E8794;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.25s ease;
    --radius: 10px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-ground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 760px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--color-text-muted);
}

a {
    color: var(--color-accent-soft);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: #fff;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent-soft);
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.125rem;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(21, 23, 26, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    border-bottom-color: var(--color-line);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-text);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

.logo img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

/* The nav uses the compact lockup: the fuller one carries a 6.5px engraved subtitle
   that is a smudge at any width a navbar can afford. */
.logo-lockup {
    display: block;
    width: 176px;
    height: auto;
}

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

.nav-links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: var(--radius);
    background: var(--color-accent);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--color-accent);
    transition: var(--transition);
}

.btn:hover {
    background: #f43541;
    border-color: #f43541;
    color: #fff;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-line);
}

.btn-outline:hover {
    background: var(--color-panel-alt);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

.btn.disabled {
    background: var(--color-panel-alt);
    border-color: var(--color-line);
    color: var(--color-text-muted);
    cursor: default;
    pointer-events: none;
}

/* Hero */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    border-bottom: 1px solid var(--color-line);
    background:
        radial-gradient(900px 380px at 50% -10%, rgba(224, 30, 43, 0.14), transparent 70%),
        var(--color-ground);
}

/* The centred lockup carries its own wordmark, so it wants real width — below about
   520px the ray fan and the engraved caption stop resolving. */
.hero .hero-lockup {
    display: block;
    width: min(620px, 92vw);
    height: auto;
    margin: 0 auto 28px;
}

.hero h1 {
    margin-bottom: 1rem;
}

.hero .tagline {
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    color: var(--color-text-muted);
    max-width: 640px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-note {
    margin-top: 1.75rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-head {
    max-width: 640px;
    margin-bottom: 48px;
}

.alt {
    background: var(--color-panel);
    border-top: 1px solid var(--color-line);
    border-bottom: 1px solid var(--color-line);
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step {
    padding: 28px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-panel);
}

.step .num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--color-accent);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.step p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature {
    padding: 26px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-panel-alt);
    transition: var(--transition);
}

.feature:hover {
    border-color: #3A4149;
    transform: translateY(-2px);
}

.feature p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Compatibility */
.compat-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.compat-item {
    padding: 22px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-ground);
}

.compat-item h3 {
    font-size: 1rem;
}

.compat-item p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.disclaimer {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    padding: 16px 20px;
    border-left: 2px solid var(--color-accent);
    background: var(--color-ground);
    margin-bottom: 0;
}

/* Privacy callout */
.privacy-points {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 28px;
    margin: 0 0 28px;
}

.privacy-points li {
    position: relative;
    padding-left: 26px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.privacy-points li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--color-accent-soft);
    font-weight: 600;
}

/* Article pages (privacy, support) */
.page-header {
    padding: 64px 0 32px;
    border-bottom: 1px solid var(--color-line);
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    margin-bottom: 0.5rem;
}

.page-header .meta {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0;
}

.article {
    padding: 48px 0 80px;
}

.article h2 {
    font-size: 1.5rem;
    margin: 2.5rem 0 0.75rem;
}

.article h3 {
    font-size: 1.125rem;
    margin: 1.75rem 0 0.5rem;
}

.article ul,
.article ol {
    margin: 0 0 1rem 1.25rem;
    color: var(--color-text-muted);
}

.article li {
    margin-bottom: 0.4rem;
}

.article table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.925rem;
}

.article th,
.article td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-line);
    vertical-align: top;
    color: var(--color-text-muted);
}

.article th {
    color: var(--color-text);
    font-weight: 600;
    white-space: nowrap;
}

.table-wrap {
    overflow-x: auto;
}

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

.article code {
    font-family: ui-monospace, SFMono-Regular, 'Cascadia Mono', Consolas, monospace;
    font-size: 0.875em;
    padding: 1px 5px;
    border-radius: 4px;
    background: var(--color-panel-alt);
    color: var(--color-text);
    white-space: nowrap;
}

/* Beta signup form */
.beta-form {
    margin-bottom: 2rem;
}

/* Honeypot. Class rather than an inline style attribute: the site's CSP has no
   'unsafe-inline' in style-src, so an inline style is dropped and the trap field
   renders as a stray visible input. */
.hp {
    display: none !important;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--color-line);
    background: var(--color-panel-alt);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-muted);
}

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

.form-group textarea {
    resize: vertical;
}

.beta-form .btn {
    border: none;
    cursor: pointer;
}

/* Post-submission confirmation */
.form-success {
    padding: 24px 26px;
    margin-bottom: 2rem;
    border: 1px solid var(--color-line);
    border-left: 3px solid var(--color-accent);
    border-radius: var(--radius);
    background: var(--color-panel);
}

.form-success[hidden] {
    display: none;
}

/* The banner is focused on reveal, which would otherwise draw a ring on a non-control. */
.form-success:focus {
    outline: none;
}

.article .form-success h2 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}

.form-success p {
    margin-bottom: 0;
}

.form-success-actions {
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--color-line);
    padding: 48px 0;
    background: var(--color-panel);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-nav {
    display: flex;
    list-style: none;
    gap: 24px;
}

.footer-nav a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

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

.footer-bottom {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--color-line);
    font-size: 0.825rem;
    color: var(--color-text-muted);
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.825rem;
}

/* Responsive */
@media (max-width: 900px) {
    .steps,
    .feature-grid,
    .compat-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    section {
        padding: 56px 0;
    }

    .hero {
        padding: 64px 0 56px;
    }

    /* The lockup is far wider than the old icon-plus-text logo, so below this width the
       navbar stacks instead of squeezing: logo on top, links centred underneath. */
    .nav-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px 20px;
        padding: 12px 20px;
    }

    .logo-lockup {
        width: 150px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 20px;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    .steps,
    .feature-grid,
    .compat-list,
    .privacy-points {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-nav {
        flex-wrap: wrap;
        gap: 16px;
    }
}

@media (max-width: 420px) {
    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 0.8rem;
    }
}
