/* YardCtl — Style
   Inspired by bsdmacao.org, refined for a commercial product.
   Dark theme with orange accent (#ff6b35) and green (#00ff88). */

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-terminal: #1a1a2e;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --accent: #ff6b35;
    --accent-hover: #ff8555;
    --accent-glow: rgba(255, 107, 53, 0.3);
    --green: #00ff88;
    --green-muted: #22c55e;
    --blue: #3b82f6;
    --purple: #a855f7;
    --red: #ef4444;
    --gradient-start: #ff6b35;
    --gradient-end: #ef4444;
    --border: #27272a;
    --border-hover: #3f3f46;
    --mono: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
    --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

.ambient-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(255, 107, 53, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(168, 85, 247, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* ── Header ── */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
}

.logo a {
    color: inherit;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo .yard { color: var(--text-primary); }
.logo .ctl { color: var(--accent); }

.logo-icon {
    font-size: 1.5rem;
}

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

nav a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

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

.nav-cta {
    background: var(--accent) !important;
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-cta:hover {
    background: var(--accent-hover) !important;
    transform: translateY(-1px);
}

/* Mobile hamburger */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: var(--sans);
}

.btn.primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: white;
}
.btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
    color: white;
}

.btn.secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn.secondary:hover {
    background: var(--bg-terminal);
    border-color: var(--accent);
    color: var(--text-primary);
}

.btn.outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}
.btn.outline:hover {
    background: var(--accent);
    color: white;
}

/* ── Hero ── */
.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 520px;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 107, 53, 0.12);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* ── Terminal ── */
.terminal {
    background: var(--bg-terminal);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
}

.terminal-header {
    background: #2a2a3e;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }

.terminal-title {
    margin-left: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: var(--mono);
}

.terminal-body {
    padding: 1.5rem;
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.line { white-space: nowrap; overflow: hidden; }
.prompt { color: var(--green); }
.cmd { color: var(--text-primary); }
.comment { color: var(--text-muted); }
.output {
    color: var(--text-secondary);
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}
.output.success { color: var(--green); }
.output.accent { color: var(--accent); }
.output.json { color: var(--blue); }

@keyframes fadeIn { to { opacity: 1; } }
.d1 { animation-delay: 0.5s; }
.d2 { animation-delay: 0.8s; }
.d3 { animation-delay: 1.1s; }
.d4 { animation-delay: 1.5s; }
.d5 { animation-delay: 1.9s; }
.d6 { animation-delay: 2.3s; }
.d7 { animation-delay: 2.7s; }
.d8 { animation-delay: 3.1s; }
.d9 { animation-delay: 3.5s; }
.d10 { animation-delay: 3.9s; }

/* ── Sections ── */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

section.wide {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

section.wide > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-sub {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

/* ── Feature Grid ── */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

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

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

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

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

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

/* ── Problem / Solution ── */
.problem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.problem-col {
    padding: 2rem;
    border-radius: 12px;
}

.problem-col.before {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.problem-col.after {
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.problem-col h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.problem-col.before h3 { color: var(--red); }
.problem-col.after h3 { color: var(--green); }

.problem-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.problem-col li {
    color: var(--text-secondary);
    padding-left: 1.75rem;
    position: relative;
    line-height: 1.5;
}

.problem-col li::before {
    position: absolute;
    left: 0;
}

.problem-col.before li::before { content: '✗'; color: var(--red); }
.problem-col.after li::before { content: '✓'; color: var(--green); }

/* ── API Example ── */
.api-showcase {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 3rem;
}

.api-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.api-tab {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    font-family: var(--sans);
}

.api-tab:hover { color: var(--text-primary); }
.api-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.api-panel {
    display: none;
    padding: 1.5rem;
}

.api-panel.active { display: block; }

.api-panel pre {
    background: var(--bg-dark);
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.7;
}

.api-panel code { color: var(--green); }
.api-panel .code-comment { color: var(--text-muted); }
.api-panel .code-key { color: var(--blue); }
.api-panel .code-string { color: var(--green); }
.api-panel .code-method { color: var(--accent); }
.api-panel .code-url { color: var(--text-primary); }

/* ── Dashboard Preview ── */
.dashboard-preview {
    margin-top: 3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.dashboard-preview img {
    max-width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.dashboard-placeholder {
    background: var(--bg-terminal);
    border-radius: 8px;
    padding: 4rem 2rem;
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ── Use Cases ── */
.usecase-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.usecase-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
}

.usecase-card h3 {
    color: var(--accent);
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
}

.usecase-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

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

.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card.featured {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.08) 0%, var(--bg-card) 40%);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-tier {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.pricing-card.featured .pricing-tier { color: var(--accent); }

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0.5rem 0;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-muted);
}

.pricing-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pricing-features li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
}

.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green-muted);
}

.pricing-card .btn {
    width: 100%;
    text-align: center;
}

.pricing-note {
    text-align: center;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.pricing-note .crypto {
    color: var(--accent);
    font-weight: 500;
}

/* ── Install ── */
.install-box {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1.25rem;
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
}

.install-box code {
    flex: 1;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--green);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copy-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.25rem;
    transition: transform 0.2s;
}

.copy-btn:hover { transform: scale(1.2); }

/* ── FAQ ── */
.faq-list {
    max-width: 800px;
    margin: 3rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.faq-q {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

.faq-q:hover { color: var(--accent); }

.faq-q::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-muted);
    transition: transform 0.3s;
}

.faq-item.open .faq-q::after {
    transform: rotate(45deg);
}

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-a {
    max-height: 300px;
}

.faq-a-inner {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ── Waitlist ── */
.waitlist-section {
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.06) 0%, transparent 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.waitlist-box {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

.waitlist-form input {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--sans);
    transition: border-color 0.2s;
}

.waitlist-form input:focus {
    outline: none;
    border-color: var(--accent);
}

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

.waitlist-status {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    min-height: 2rem;
}

/* ── Footer ── */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ── Responsive ── */
@media (max-width: 968px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 6rem;
        gap: 3rem;
    }

    .hero-content h1 { font-size: 2.5rem; }
    .hero-tagline { margin: 0 auto 2rem; }
    .hero-buttons { justify-content: center; }

    .hero-terminal { max-width: 100%; overflow-x: auto; }

    .problem-grid { grid-template-columns: 1fr; gap: 2rem; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }

    nav ul.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        padding: 1rem 2rem 2rem;
        border-bottom: 1px solid var(--border);
        gap: 1rem;
    }

    .menu-toggle { display: block; }

    nav ul { display: none; }
    nav ul.open { display: flex; }

    .footer-content { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .hero-content h1 { font-size: 2rem; }
    h2 { font-size: 2rem; }
    .feature-grid { grid-template-columns: 1fr; }
    .usecase-grid { grid-template-columns: 1fr; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .api-tabs { font-size: 0.85rem; }
}
