/* ---------------------------------------------------------------------
   IAmOrion marketing site — shared styles
--------------------------------------------------------------------- */
:root {
    --bg: #0c0f14;
    --bg-alt: #11151c;
    --card: #161b24;
    --border: #232a36;
    --text: #e7eaf0;
    --text-dim: #97a1b3;
    --accent: #d8a23a;       /* compass gold */
    --accent-2: #4a90c2;     /* night-sky blue */
    --good: #3fb27f;
    --bad: #e2574c;
    --radius: 14px;
}

html { scroll-behavior: smooth; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Kill the default mobile tap-highlight box on every element — it's
   the ugly grey/blue flash you get on tap before any custom :active
   styling has a chance to show. Real press feedback comes from the
   :active rules below instead. */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Disable the long-press "copy/save" callout and text-selection only on
   nav/buttons — NOT globally, so copying message text, codes, folder
   names etc. on mobile still works normally everywhere else. */
.site-nav nav a, .brand, button, .btn, .btn-sm, #navToggle, #scrollTopBtn {
    -webkit-touch-callout: none;
    -webkit-user-select: none; user-select: none;
}
.btn:active, .btn-sm:active, button:active, #navToggle:active, #scrollTopBtn:active {
    transform: scale(0.96);
    filter: brightness(0.92);
}
.site-nav nav a:active, .brand:active {
    opacity: 0.7;
}
.feature-card:active, .shot-card:active, .stat-card:active, .card:active {
    filter: brightness(1.04);
}
a, button, .btn, .btn-sm { transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.55;
}
a { color: var(--accent-2); text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ---------- Nav ---------- */
.site-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(12,15,20,0.9);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 64px; position: relative; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; cursor: pointer; }
.brand:hover { color: var(--text); }
.brand .mark { color: var(--accent); }
.site-nav nav a { color: var(--text-dim); margin-left: 8px; font-size: 0.95rem; padding: 8px 14px; border-radius: 999px; transition: all 0.2s; }
.site-nav nav a:hover { color: var(--text); }
.site-nav nav a.nav-active { background: var(--accent); color: #1a1306; font-weight: 600; }
.nav-cta {
    background: transparent; color: var(--text-dim) !important; padding: 8px 18px;
    border-radius: 999px; font-weight: 600; margin-left: 8px !important; border: 1px solid var(--border);
}
.nav-cta.nav-active { background: var(--accent); color: #1a1306 !important; border-color: var(--accent); }

#scrollTopBtn {
    position: fixed; bottom: 28px; right: 28px; z-index: 60;
    width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border);
    background: var(--card); color: var(--text); font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transform: translateY(10px); pointer-events: none;
    transition: all 0.25s; box-shadow: 0 4px 16px rgba(0,0,0,0.35);
}
#scrollTopBtn.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#scrollTopBtn:hover { background: var(--accent); color: #1a1306; border-color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(circle at 50% -10%, rgba(216,162,58,0.18), transparent 60%);
}
.badge {
    display: inline-block; border: 1px solid var(--accent); color: var(--accent);
    padding: 4px 14px; border-radius: 999px; font-size: 0.78rem; letter-spacing: 0.12em;
    font-weight: 600; margin-bottom: 22px;
}
.hero-image { max-width: 220px; max-height: 140px; margin: 0 auto 24px; object-fit: contain; }
.hero h1 { font-size: 2.6rem; line-height: 1.15; margin: 0 0 18px; max-width: 760px; margin-inline: auto; }
.hero p.lead { color: var(--text-dim); font-size: 1.15rem; max-width: 620px; margin: 0 auto 32px; }
.btn {
    display: inline-block; background: var(--accent); color: #1a1306; font-weight: 700;
    padding: 14px 30px; border-radius: 999px; border: none; cursor: pointer; font-size: 1rem;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
.section-title { font-size: 1.9rem; text-align: center; margin: 0 0 12px; }
.section-sub { color: var(--text-dim); text-align: center; max-width: 620px; margin: 0 auto 48px; }

/* ---------- Feature grid ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px 24px;
}
.feature-card .icon { font-size: 1.9rem; margin-bottom: 14px; }
.feature-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.feature-card p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }

/* ---------- Screenshots ---------- */
.shot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.shot-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.shot-card img { width: 100%; aspect-ratio: 9/16; object-fit: cover; }
.shot-card .cap { padding: 10px 14px; color: var(--text-dim); font-size: 0.85rem; }
.shot-empty { text-align: center; color: var(--text-dim); border: 1px dashed var(--border); border-radius: var(--radius); padding: 48px; }

/* ---------- About ---------- */
.about-box { background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; max-width: 720px; margin: 0 auto; text-align: center; }

/* ---------- Contact ---------- */
.contact-wrap { max-width: 560px; margin: 0 auto; }
.field { margin-bottom: 18px; }
.field label { display: block; margin-bottom: 6px; font-size: 0.9rem; color: var(--text-dim); }
.field input, .field textarea {
    width: 100%; background: var(--card); border: 1px solid var(--border); color: var(--text);
    padding: 12px 14px; border-radius: 10px; font-size: 0.97rem; font-family: inherit;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 120px; }
.form-msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 0.92rem; display: none; }
.form-msg.show { display: block; }
.form-msg.ok { background: rgba(63,178,127,0.15); border: 1px solid var(--good); color: var(--good); }
.form-msg.err { background: rgba(226,87,76,0.15); border: 1px solid var(--bad); color: var(--bad); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 32px 0; text-align: center; color: var(--text-dim); font-size: 0.88rem; }
footer a { color: var(--text-dim); margin: 0 10px; }

/* ---------- Mobile hamburger toggle (hidden on desktop) ---------- */
#navToggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 38px; height: 38px; background: transparent; border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; padding: 0; flex-shrink: 0;
}
#navToggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 0 auto; transition: all 0.2s; }
#navToggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#navToggle.open span:nth-child(2) { opacity: 0; }
#navToggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
    .feature-grid { grid-template-columns: 1fr 1fr; }
    #navToggle { display: flex; }
    .site-nav nav {
        position: absolute; top: 64px; left: 0; right: 0; background: var(--bg);
        border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch;
        padding: 8px 16px 16px; gap: 4px; max-height: 0; overflow: hidden; opacity: 0;
        transition: max-height 0.25s ease, opacity 0.2s ease; display: flex;
    }
    .site-nav nav.open { max-height: 80vh; opacity: 1; overflow-y: auto; }
    .site-nav nav a { margin-left: 0; text-align: center; padding: 12px 14px; }
    .site-nav nav a.nav-cta { margin-top: 6px; }
}
@media (max-width: 560px) {
    .feature-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
}

/* ---------- Admin-specific ---------- */
.admin-body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; margin: 0; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 220px; background: var(--bg-alt); border-right: 1px solid var(--border);
    padding: 24px 16px; flex-shrink: 0;
}
.admin-sidebar .brand { padding: 0 8px 24px; font-size: 1.05rem; }
.admin-sidebar a {
    display: block; padding: 10px 12px; border-radius: 8px; color: var(--text-dim);
    font-size: 0.93rem; margin-bottom: 4px;
}
.admin-sidebar a:hover { background: var(--card); color: var(--text); }
.admin-sidebar a.active { background: var(--accent); color: #1a1306; font-weight: 600; }
.admin-main { flex: 1; padding: 32px 40px; max-width: 1100px; }
.admin-main h1 { margin-top: 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.stat-card .num { font-size: 2rem; font-weight: 700; }
.stat-card .label { color: var(--text-dim); font-size: 0.85rem; }
table.admin-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
table.admin-table th, table.admin-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
table.admin-table th { color: var(--text-dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pill { padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.pill.active { background: rgba(63,178,127,0.18); color: var(--good); }
.pill.inactive { background: rgba(226,87,76,0.18); color: var(--bad); }
.pill.pending { background: rgba(216,162,58,0.18); color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 0.85rem; border-radius: 8px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar button {
    background: var(--bg-alt); border: 1px solid var(--border); color: var(--text);
    padding: 6px 11px; border-radius: 6px; cursor: pointer; font-size: 0.85rem;
}
.toolbar button:hover { background: var(--card); border-color: var(--accent); }
.editable {
    background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px;
    padding: 14px; min-height: 60px; color: var(--text);
}
.editable:focus { outline: none; border-color: var(--accent); }
.admin-input, .admin-textarea, select.admin-input {
    width: 100%; background: var(--bg-alt); border: 1px solid var(--border); color: var(--text);
    padding: 10px 12px; border-radius: 8px; font-family: inherit; font-size: 0.93rem;
}
.admin-textarea { min-height: 90px; resize: vertical; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--text-dim); font-size: 0.85rem; }
.toast {
    position: fixed; bottom: 24px; right: 24px; background: var(--good); color: #08210f;
    padding: 12px 18px; border-radius: 10px; font-weight: 600; opacity: 0; transform: translateY(10px);
    transition: all 0.25s; pointer-events: none; z-index: 999;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: var(--bad); color: #2a0a08; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { width: 360px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px; }
.login-box h1 { font-size: 1.3rem; margin-top: 0; }
.error-box { background: rgba(226,87,76,0.15); border: 1px solid var(--bad); color: var(--bad); padding: 10px 14px; border-radius: 8px; font-size: 0.88rem; margin-bottom: 16px; }
.settings-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .settings-row { grid-template-columns: 1fr; } }

/* ---------- Directory tree (client deployment detail page) ---------- */
.tree-wrap { font-family: 'SF Mono', Consolas, Monaco, monospace; font-size: 0.88rem; }
.tree-list { list-style: none; margin: 4px 0; padding-left: 18px; }
.tree-list > li { margin: 3px 0; }
.tree-list summary { cursor: pointer; color: var(--text); }
.tree-list summary:hover { color: var(--accent); }
.tree-file { color: var(--text-dim); padding-left: 2px; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.detail-stat-row { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 6px; }
.detail-stat-row .item { min-width: 140px; }
.detail-stat-row .item .label { color: var(--text-dim); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.detail-stat-row .item .val { font-size: 1.1rem; font-weight: 600; }
.back-link { display: inline-block; margin-bottom: 16px; color: var(--text-dim); }
.back-link:hover { color: var(--text); }

/* ---------- Line-numbered textarea (e.g. excluded filenames list) ---------- */
.lined-textarea-wrap {
    display: flex; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px;
    overflow: hidden; font-family: 'SF Mono', Consolas, Monaco, monospace; font-size: 0.88rem;
}
.lined-textarea-wrap:focus-within { border-color: var(--accent); }
.lined-textarea-gutter {
    background: var(--bg); color: var(--text-dim); padding: 12px 10px 12px 14px; text-align: right;
    user-select: none; line-height: 1.6; white-space: pre; overflow: hidden; border-right: 1px solid var(--border);
    flex-shrink: 0; min-width: 30px;
}
.lined-textarea-wrap textarea {
    flex: 1; background: transparent; border: none; color: var(--text); padding: 12px 14px;
    font-family: inherit; font-size: inherit; line-height: 1.6; resize: vertical; min-height: 140px; outline: none;
}