/* ============================================
   HOLDOR — Raw Control Room
   ============================================ */

/* Fonts loaded via <link> in HTML for non-blocking rendering */

:root {
    --bg: #0b0b0f;
    --bg-panel: #101016;
    --text: #e0ddd5;
    --text-muted: #918f88;
    --accent: #e59500;
    --green: #22c55e;
    --rule: #1f1f28;
    --rule-light: #2a2a36;
    --focus: #e59500;
}

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

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 16px;
    padding: 8px 16px;
    background: var(--accent);
    color: var(--bg);
    font-weight: 600;
    font-size: 14px;
    z-index: 200;
    text-decoration: none;
    transition: top 0.2s;
    font-family: 'IBM Plex Mono', monospace;
}

.skip-link:focus {
    top: 0;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---- Base ---- */

body {
    font-family: 'IBM Plex Mono', monospace;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Dot grid background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: radial-gradient(circle, #1f1f28 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: -1;
}

/* Scanline + grain overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.03) 2px,
            rgba(0, 0, 0, 0.03) 4px
        ),
        url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
    opacity: 0.6;
}

main, footer {
    position: relative;
    z-index: 1;
}

header {
    position: relative;
    z-index: 10;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ---- Nav ---- */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(11, 11, 15, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
}

.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 0.08em;
    color: var(--text);
    text-decoration: none;
    text-transform: uppercase;
}

.nav-cta {
    color: var(--accent);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 8px 16px;
    border: 1px solid var(--accent);
    transition: background 0.2s, color 0.2s;
}

.nav-cta:hover {
    background: var(--accent);
    color: var(--bg);
}

/* ---- Scroll Reveal ---- */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Hero ---- */

.hero {
    padding: 160px 32px 80px;
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto auto auto auto auto;
    gap: 0 48px;
    align-items: start;
    min-height: 100vh;
    align-content: center;
}

.hero-badge {
    grid-column: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 24px;
}

.hero-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    grid-column: 1;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(72px, 12vw, 130px);
    font-weight: 400;
    letter-spacing: 0.04em;
    line-height: 0.9;
    text-transform: uppercase;
    margin-bottom: 24px;
    color: var(--text);
}

.hero-name {
    display: block;
    font-size: clamp(100px, 18vw, 200px);
    letter-spacing: 0.06em;
    line-height: 0.85;
    color: var(--accent);
    margin-bottom: 8px;
}

.hero-tagline {
    grid-column: 1;
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 480px;
    margin-bottom: 40px;
}

.hero-tagline strong {
    color: var(--text);
    font-weight: 500;
}

.hero-actions {
    grid-column: 1;
}

.hero-ph {
    grid-column: 1;
    margin-top: 0.5rem;
}

.hero-ph img {
    opacity: 0.85;
    transition: opacity 0.2s;
}

.hero-ph img:hover {
    opacity: 1;
}

/* Hero app preview */
.hero-preview {
    grid-column: 2;
    grid-row: 1 / 6;
    display: flex;
    align-items: center;
}

/* ---- Buttons ---- */

.btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-group--center {
    justify-content: center;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: none;
    transition: background 0.2s, transform 0.1s;
}

.btn:hover {
    background: #cc8400;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-block;
    padding: 14px 28px;
    background: transparent;
    color: var(--accent);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--accent);
    transition: background 0.2s, color 0.2s;
}

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

/* ---- Sections ---- */

section {
    border-top: 1px solid var(--rule);
}

.hero {
    border-top: none;
}

.section-header {
    padding: 80px 0 48px;
    display: flex;
    align-items: baseline;
    gap: 24px;
}

.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1;
    color: var(--text);
}

.section-rule {
    flex: 1;
    height: 1px;
    background: var(--rule);
    align-self: center;
}

.heading-anchor {
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.6em;
    opacity: 0;
    margin-left: 8px;
    transition: opacity 0.2s, color 0.2s;
    vertical-align: middle;
}

.section-title:hover .heading-anchor,
.heading-anchor:focus {
    opacity: 1;
}

.heading-anchor:hover {
    color: var(--accent);
}

/* ---- Problem ---- */

.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--rule);
    margin-bottom: 80px;
    list-style: none;
}

.problem-card {
    background: var(--bg);
    padding: 32px 28px;
    transition: background 0.3s;
}

.problem-card:hover {
    background: var(--bg-panel);
}

.problem-card h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.problem-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ---- Solution / Steps ---- */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    margin-bottom: 80px;
    list-style: none;
    position: relative;
}

/* Connecting line */
.steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 1px;
    background: var(--rule-light);
}

.step {
    padding: 0 28px;
    position: relative;
}

.step-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 20px;
    color: var(--accent);
    border: 1px solid var(--accent);
    margin-bottom: 20px;
    position: relative;
    background: var(--bg);
}

.step h3 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.step p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ---- Hero Screenshot ---- */

.hero-screenshot {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--rule-light);
    box-shadow: 0 0 30px rgba(229, 149, 0, 0.08);
}

/* ---- Features ---- */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--rule);
    margin-bottom: 80px;
    list-style: none;
}

.feature {
    background: var(--bg);
    padding: 28px 32px;
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 0 20px;
    align-items: baseline;
    transition: background 0.3s;
}

.feature:hover {
    background: var(--bg-panel);
}

.feature h3 {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--accent);
    text-transform: uppercase;
}

.feature p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ---- Modes Comparison ---- */

.modes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--rule);
    margin-bottom: 24px;
}

.modes-col {
    background: var(--bg);
    padding: 32px 28px;
}

.modes-col--extended {
    background: var(--bg-panel);
}

.modes-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 24px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--text);
}

.modes-label--extended {
    color: var(--accent);
}

.modes-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.modes-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modes-item {
    font-size: 13px;
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
}

.modes-item::before {
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
}

.modes-item--yes {
    color: var(--text);
}

.modes-item--yes::before {
    content: '\2713';
    color: var(--green);
}

.modes-item--no {
    color: var(--text-muted);
}

.modes-item--no::before {
    content: '\2717';
    color: #ef4444;
}

.modes-note {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-bottom: 80px;
}

/* ---- FAQ ---- */

.faq-list {
    margin-bottom: 80px;
}

.faq-item {
    border-top: 1px solid var(--rule);
    padding: 24px 0;
}

.faq-item:last-child {
    border-bottom: 1px solid var(--rule);
}

.faq-question {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
    color: var(--text);
}

.faq-answer {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.7;
}

.faq-answer code {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    background: rgba(229, 149, 0, 0.08);
    padding: 2px 6px;
}

/* ---- Author ---- */

.author-section {
    padding-bottom: 80px;
}

.author-card {
    display: flex;
    align-items: center;
    gap: 32px;
}

.author-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 2px solid var(--rule-light);
    filter: grayscale(0.3);
    transition: filter 0.3s;
}

.author-photo:hover {
    filter: grayscale(0);
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.author-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 28px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}

.author-roles {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 8px;
}

.author-role-divider {
    margin: 0 6px;
    color: var(--rule-light);
}

.author-roles strong {
    color: var(--accent);
    font-weight: 500;
}

/* ---- Download ---- */

.download-section {
    padding: 100px 0;
    text-align: center;
    position: relative;
    background: var(--bg-panel);
    border-top: 2px solid var(--accent);
}

/* Amber glow at top of download section */
.download-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, rgba(229, 149, 0, 0.06), transparent);
    pointer-events: none;
}

.download-section .section-title {
    text-align: center;
    margin-bottom: 12px;
}

.download-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.download-note {
    margin-top: 20px;
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ---- Footer ---- */

footer {
    border-top: 1px solid var(--rule);
    padding: 32px 0;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 0.02em;
}

footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--accent);
}

.footer-sep {
    margin: 0 8px;
    color: var(--rule-light);
}

.footer-claim {
    margin-top: 12px;
    font-size: 11px;
    opacity: 0.7;
}

/* ---- Comparison ---- */

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 80px;
}

.comparison-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.comparison-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 22px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-align: center;
}

.comparison-label--bad {
    color: #ef4444;
}

.comparison-label--good {
    color: var(--green);
}

/* Mock Desktop */

.mock-desktop {
    border: 1px solid var(--rule-light);
    background: #1a1a24;
    overflow: hidden;
}

.mock-menubar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: #2a2a36;
    font-size: 11px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--rule);
}

.mock-menubar-apple {
    font-size: 13px;
}

.mock-menubar-app {
    font-weight: 600;
    color: var(--text);
    font-size: 11px;
}

.mock-menubar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mock-menubar-holdor {
    font-size: 12px;
    animation: holdor-glow 2s ease-in-out infinite;
}

@keyframes holdor-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.mock-menubar-time {
    font-size: 11px;
}

/* Mock Screen */

.mock-screen {
    position: relative;
    min-height: 220px;
}

.mock-terminal {
    height: 100%;
}

.mock-terminal-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: #22222e;
    border-bottom: 1px solid var(--rule);
}

.mock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.mock-dot--red { background: #ef4444; }
.mock-dot--yellow { background: #eab308; }
.mock-dot--green { background: var(--green); }

.mock-terminal-title {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: 4px;
}

.mock-terminal-body {
    padding: 10px 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    line-height: 1.8;
}

.mock-line {
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.mock-line--error {
    color: #ef4444;
    font-weight: 600;
}

.mock-line--success {
    color: var(--green);
    font-weight: 600;
}

.mock-cursor {
    animation: cursor-blink 1s step-end infinite;
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Animation: typing lines appear one by one */

.mock-line--typing,
.mock-line--progress {
    opacity: 0;
    animation: line-appear 10s infinite;
}

/* Results: hidden initially, appear after lock cycle */

.mock-result {
    opacity: 0;
}

.mock-result--bad {
    animation: result-bad 10s infinite;
}

.mock-result--good {
    animation: result-good 10s infinite;
}

/* Lock Overlay */

.mock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
}

.mock-lock-icon {
    font-size: 28px;
}

.mock-lock-text {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.mock-overlay--without {
    animation: overlay-lock 10s infinite;
}

.mock-overlay--with {
    background: rgba(0, 0, 0, 0.85);
    animation: overlay-lock 10s infinite;
}

/*
 * Animation timeline (10s loop):
 *
 * 0-30%   (0-3s)   : Terminal typing, AI working
 * 30-35%  (3-3.5s) : Lock screen fades in
 * 35-60%  (3.5-6s) : Locked / sleeping
 * 60-65%  (6-6.5s) : Unlock / wake
 * 65-90%  (6.5-9s) : Result visible
 * 90-100% (9-10s)  : Reset pause
 */

@keyframes overlay-lock {
    0%, 28%    { opacity: 0; }
    35%        { opacity: 1; }
    62%        { opacity: 1; }
    68%        { opacity: 0; }
    100%       { opacity: 0; }
}

/* Typing line: visible during working phase, hidden after */
@keyframes line-appear {
    0%, 5%     { opacity: 0; }
    10%        { opacity: 1; }
    28%        { opacity: 1; }
    35%        { opacity: 0; }
    100%       { opacity: 0; }
}

/* Bad result: appears after unlock */
@keyframes result-bad {
    0%, 65%    { opacity: 0; }
    70%        { opacity: 1; }
    90%        { opacity: 1; }
    95%        { opacity: 0; }
    100%       { opacity: 0; }
}

/* Good result: appears after unlock */
@keyframes result-good {
    0%, 65%    { opacity: 0; }
    70%        { opacity: 1; }
    90%        { opacity: 1; }
    95%        { opacity: 0; }
    100%       { opacity: 0; }
}

/* ============================================
   Responsive — Tablet
   ============================================ */

@media (max-width: 768px) {
    .author-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 140px 24px 60px;
        min-height: auto;
    }

    .hero-preview {
        grid-column: 1;
        grid-row: auto;
        max-width: 340px;
        margin-top: 32px;
    }

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

    .steps {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .steps::before {
        display: none;
    }

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

    .feature {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .section-header {
        flex-wrap: wrap;
        padding: 60px 0 36px;
    }

    .section-rule {
        display: none;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

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

}

/* ============================================
   Responsive — Mobile
   ============================================ */

@media (max-width: 480px) {
    .hero {
        padding: 120px 16px 48px;
    }

    .hero h1 {
        font-size: 56px;
    }

    .hero-name {
        font-size: 80px;
    }

    .container {
        padding: 0 16px;
    }

    .nav-inner {
        padding: 14px 16px;
    }

    .btn, .btn-secondary {
        padding: 14px 24px;
        font-size: 12px;
        width: 100%;
        text-align: center;
    }

    .btn-group {
        flex-direction: column;
    }

    .nav-cta {
        padding: 6px 10px;
        font-size: 12px;
    }

    .problem-card {
        padding: 24px 20px;
    }

    .step {
        padding: 0 16px;
    }

    .feature {
        padding: 20px;
    }

    .download-section {
        padding: 60px 0;
    }

    .hero-preview {
        display: none;
    }

    .mock-terminal-body {
        font-size: 9px;
        padding: 8px 10px;
    }

    .mock-screen {
        min-height: 180px;
    }

    .comparison-label {
        font-size: 18px;
    }
}
