/* ===================================
   Hyrule Cloud — Dark Theme
   Lightweight, Tor-friendly, retro-accented
   =================================== */

:root {
    --bg: #0a0a0f;
    --bg-surface: #12121a;
    --bg-surface-hover: #1a1a28;
    --bg-elevated: #1e1e2e;

    --accent: #00e89d;
    --accent-dim: #00b87a;
    --accent-glow: rgba(0, 232, 157, 0.15);

    --text: #d0d0d8;
    --text-dim: #6a6a7a;
    --text-bright: #f0f0f5;

    --border: #2a2a3a;

    --danger: #ff4455;
    --warning: #ffaa22;
    --ok: #00e89d;

    --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", ui-monospace, monospace;

    --radius: 6px;
    --radius-lg: 10px;
    --container: 960px;
    --transition: 150ms ease;
}

/* --- Reset --- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

/* --- Container --- */

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

/* --- Typography --- */

h1, h2, h3, h4 { color: var(--text-bright); line-height: 1.2; }
h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

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

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--bg-surface);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: var(--accent);
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

/* --- Navigation --- */

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--bg-surface);
}

.site-header nav {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
}

.logo {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.logo:hover { color: var(--accent); }

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

.nav-links a {
    color: var(--text-dim);
    font-size: 0.9rem;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text-bright); }

/* --- Buttons --- */

.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    text-decoration: none;
    font-family: inherit;
    color: var(--text);
    background: transparent;
}

.btn-primary {
    background: var(--accent);
    color: #0a0a0f;
    border-color: var(--accent);
}
.btn-primary:hover {
    background: var(--accent-dim);
    border-color: var(--accent-dim);
    color: #0a0a0f;
}

.btn-outline { border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost { color: var(--text-dim); }
.btn-ghost:hover { color: var(--accent); }

.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.btn-xs {
    padding: 0.2rem 0.6rem;
    font-size: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: var(--bg-surface);
    color: var(--text-dim);
    cursor: pointer;
}
.btn-xs:hover { border-color: var(--accent); color: var(--accent); }

.btn-lg { padding: 0.8rem 2rem; font-size: 1.05rem; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* --- Hero --- */

.hero {
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle scanline overlay on the hero */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 232, 157, 0.015) 2px,
        rgba(0, 232, 157, 0.015) 4px
    );
    pointer-events: none;
}

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

.accent { color: var(--accent); }

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Feature Cards --- */

.features { padding: 4rem 0; }

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: border-color var(--transition);
}
.feature-card:hover { border-color: var(--accent); }

.feature-icon {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* --- Tier / Pricing Cards --- */

.pricing-preview,
.pricing-detail { padding: 4rem 0; }

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

.tier-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all var(--transition);
}
.tier-card:hover {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

.tier-popular { border-color: var(--accent); }

.tier-badge {
    position: absolute;
    top: -0.65rem;
    right: 1rem;
    background: var(--accent);
    color: #0a0a0f;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.6rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tier-name { font-size: 1.1rem; margin-bottom: 0.75rem; }

.tier-price { margin-bottom: 1rem; }
.tier-price .amount {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent);
}

.tier-specs {
    list-style: none;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

.tier-specs li {
    padding: 0.35rem 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}
.tier-specs li:last-child { border-bottom: none; }

.spec-label { color: var(--text-dim); }
.spec-value { font-family: var(--font-mono); color: var(--text-bright); }

.tier-examples {
    margin-bottom: 1rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-dim);
}

.pricing-note {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* --- Feature Table --- */

.features-detail { padding: 4rem 0; }

.feature-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.feature-table th,
.feature-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.feature-table th {
    color: var(--text-dim);
    font-weight: 500;
    width: 30%;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* --- OS Grid --- */

.os-list { padding: 4rem 0; }

.os-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.os-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    position: relative;
}
.os-default { border-color: var(--accent); }

.os-badge {
    font-size: 0.7rem;
    background: var(--accent);
    color: #0a0a0f;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
}

/* --- Order Form --- */

.order-form { padding: 4rem 0; }

fieldset {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

legend {
    font-weight: 600;
    color: var(--text-bright);
    padding: 0 0.5rem;
    font-size: 1rem;
}

.optional {
    font-weight: 400;
    color: var(--text-dim);
    font-size: 0.85rem;
}

/* Radio card grid */

.radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.radio-grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.radio-card { cursor: pointer; }

.radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-surface);
    transition: all var(--transition);
}

.radio-card input:checked + .radio-card-body {
    border-color: var(--accent);
    box-shadow: 0 0 12px var(--accent-glow);
    background: var(--bg-surface-hover);
}
.radio-card:hover .radio-card-body { border-color: var(--accent-dim); }

.radio-card input:focus-visible + .radio-card-body {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.radio-card-title {
    font-weight: 600;
    color: var(--text-bright);
}

.size-specs {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-dim);
}

.size-price {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* Radio stack (vertical) */

.radio-stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.radio-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}
.radio-inline input[type="radio"] { accent-color: var(--accent); }

.tag {
    font-size: 0.7rem;
    background: var(--accent-glow);
    color: var(--accent);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 600;
}

/* Text inputs */

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    transition: border-color var(--transition);
}
input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

textarea { resize: vertical; min-height: 80px; }

.field-hint {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.35rem;
}

.duration-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    max-width: 200px;
    margin-top: 0.5rem;
}

.input-suffix {
    color: var(--text-dim);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.duration-shortcuts {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

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

/* --- Order Summary / Price Display --- */

.order-summary {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
}

.price-display {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.price-amount {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.price-detail {
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* --- Review Page --- */

.review { padding: 4rem 0; }

.review-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.review-table th,
.review-table td {
    padding: 0.65rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.review-table th {
    color: var(--text-dim);
    font-weight: 500;
    width: 35%;
    font-size: 0.9rem;
}

.ssh-key {
    font-size: 0.75rem;
    word-break: break-all;
}

/* Price breakdown */

.price-breakdown {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

.price-line {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.price-total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

/* Payment section */

.payment-section {
    text-align: center;
    margin: 2rem 0;
}

.payment-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

.payment-pending { color: var(--warning); }
.payment-ok { color: var(--ok); }
.payment-error { color: var(--danger); }
.payment-warn { color: var(--warning); }

.payment-note {
    color: var(--text-dim);
    font-size: 0.8rem;
    margin-top: 1rem;
}

.notice {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
}
.notice-warn {
    background: rgba(255, 170, 34, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

/* --- Status Page --- */

.status-section { padding: 4rem 0; }

.vm-id-display { margin-top: 0.5rem; }
.vm-id-display code { font-size: 1.1rem; }

.status-box {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.status-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-pending .status-indicator {
    background: var(--warning);
    animation: pulse 1.5s ease-in-out infinite;
}
.status-ok .status-indicator { background: var(--ok); }
.status-error .status-indicator { background: var(--danger); }
.status-warn .status-indicator { background: var(--warning); }

.status-label {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}
.status-ok .status-label { color: var(--ok); }
.status-error .status-label { color: var(--danger); }
.status-warn .status-label { color: var(--warning); }
.status-pending .status-label { color: var(--warning); }

/* Terminal-style status details */

.terminal-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.8;
}
.terminal-block .label {
    color: var(--text-dim);
    display: inline-block;
    min-width: 100px;
}
.terminal-block code {
    background: none;
    padding: 0;
    color: var(--accent);
}

.provision-progress { color: var(--text-dim); }

.progress-bar {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 1rem;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 30%;
    border-radius: 2px;
    animation: progress-indeterminate 2s ease-in-out infinite;
}

.error-details { color: var(--danger); font-size: 0.9rem; }
.warn-details { color: var(--warning); font-size: 0.9rem; }
.loading-msg { color: var(--text-dim); }

/* --- CTA --- */

.cta {
    padding: 4rem 0;
    text-align: center;
}
.cta p {
    color: var(--text-dim);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Footer --- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: auto;
}
.footer-links { margin-top: 0.5rem; }
.footer-links a { color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }

/* --- Page Header --- */

.page-header { padding: 3rem 0 1rem; }
.page-header p { color: var(--text-dim); }

/* --- Animations --- */

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes progress-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}

/* --- Responsive --- */

@media (max-width: 600px) {
    .hero h1 { font-size: 2rem; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.35rem; }

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

    .site-header nav {
        flex-wrap: wrap;
        height: auto;
        padding: 0.75rem 1.5rem;
        gap: 0.5rem;
    }

    .hero { padding: 3rem 0 2rem; }
}

/* --- Subtle scanline overlay (retro touch) --- */

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 0, 0, 0.03) 3px,
        rgba(0, 0, 0, 0.03) 6px
    );
    z-index: 9999;
}
