/* ============================================================
   drfranken.net — Shared Design System
   Color tokens are intentionally aligned with
   codeContextPacker/style.css for visual consistency.
   ============================================================ */

/* ── Variables ────────────────────────────────────────────── */
:root {
    --bg:            #0f1220;
    --bg-deep:       #090c18;
    --card:          #131724;
    --card-hover:    #171b2d;
    --text:          #e6e8f0;
    --muted:         #7a82a8;
    --accent:        #6b7cff;
    --accent-light:  #8f9dff;
    --accent-dim:    rgba(107, 124, 255, 0.12);
    --accent-glow:   rgba(107, 124, 255, 0.25);
    --amber:         #f59e0b;
    --amber-dim:     rgba(245, 158, 11, 0.12);
    --border:        #1e2238;
    --border-light:  #262a45;
    --success:       #4ade80;

    --radius-sm:     8px;
    --radius-md:     14px;
    --radius-lg:     20px;

    --nav-height:    64px;
    --max-width:     1100px;
    --page-pad:      clamp(20px, 5vw, 60px);

    --font:          -apple-system, BlinkMacSystemFont, "SF Pro Display",
                     "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

img { display: block; max-width: 100%; }

/* ── Background gradient (applied per-page via class) ─────── */
.bg-space {
    background:
        radial-gradient(ellipse 1400px 700px at 10% -10%, #141932 0%, transparent 65%),
        radial-gradient(ellipse 900px 500px at 90% 5%,  #0d1540 0%, transparent 60%),
        var(--bg);
}

/* ── Navigation ───────────────────────────────────────────── */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--page-pad);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background: rgba(9, 12, 24, 0.75);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.nav-logo:hover { text-decoration: none; }

.nav-logo .logo-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent-glow);
}

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

.nav-links a {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    text-decoration: none;
}
.nav-links a:hover { color: var(--text); text-decoration: none; }

.nav-back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.nav-back:hover { color: var(--text); text-decoration: none; }
.nav-back svg { opacity: 0.6; }

/* ── Page container ───────────────────────────────────────── */
.page-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--page-pad);
}

/* ── Section spacing ──────────────────────────────────────── */
section { padding: clamp(60px, 10vh, 120px) 0; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--nav-height);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: ui-monospace, "SF Mono", Menlo, "Courier New", monospace;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: var(--accent);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 24px;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 50%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--muted);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: 40px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 13px 28px;
    box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 6px 32px var(--accent-glow);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
    padding: 13px 24px;
    border: 1px solid var(--border-light);
}
.btn-ghost:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.btn-amber {
    background: var(--amber);
    color: #0f1220;
    padding: 13px 28px;
    box-shadow: 0 4px 24px rgba(245, 158, 11, 0.3);
}
.btn-amber:hover {
    background: #fbbf24;
    box-shadow: 0 6px 32px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

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

/* ── App Store Badge ──────────────────────────────────────── */
.appstore-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 11px 22px;
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.appstore-badge:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    text-decoration: none;
}
.appstore-badge svg { flex-shrink: 0; }

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: linear-gradient(160deg, rgba(255,255,255,0.035) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: border-color 0.2s, transform 0.2s;
}
.card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.card-accent {
    border-color: var(--border-light);
    background: linear-gradient(160deg, var(--accent-dim) 0%, rgba(255,255,255,0) 100%);
}

/* ── App Cards (homepage grid) ────────────────────────────── */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.app-card {
    position: relative;
    background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}
.app-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.app-card-ccp::before {
    background: radial-gradient(400px at 0% 0%, var(--accent-dim), transparent);
}
.app-card-amber::before {
    background: radial-gradient(400px at 0% 0%, var(--amber-dim), transparent);
}
.app-card:hover { transform: translateY(-3px); }
.app-card:hover::before { opacity: 1; }
.app-card-ccp:hover { border-color: rgba(107, 124, 255, 0.4); box-shadow: 0 20px 60px rgba(107,124,255,0.08); }
.app-card-amber:hover { border-color: rgba(245, 158, 11, 0.4); box-shadow: 0 20px 60px rgba(245,158,11,0.08); }

.app-card:hover { text-decoration: none; }

.app-icon {
    width: 60px; height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}
.app-icon-ccp { background: linear-gradient(135deg, #2a3580, #1a2060); border: 1px solid rgba(107,124,255,0.3); }
.app-icon-amber { background: linear-gradient(135deg, #5a3a00, #3d2800); border: 1px solid rgba(245,158,11,0.3); }

.app-card-body { flex: 1; }
.app-card-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.app-card-body p {
    font-size: 0.95rem;
    color: var(--muted);
    line-height: 1.65;
}

.app-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 100px;
}
.tag-ccp { background: var(--accent-dim); color: var(--accent-light); }
.tag-amber { background: var(--amber-dim); color: var(--amber); }
.tag-soon { background: rgba(255,255,255,0.06); color: var(--muted); }

.card-arrow {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--muted);
    transition: all 0.2s;
    flex-shrink: 0;
}
.app-card:hover .card-arrow {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

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

.feature-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 28px;
}

.feature-icon {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.65;
}

/* ── Section header ───────────────────────────────────────── */
.section-header {
    margin-bottom: 48px;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 560px;
    line-height: 1.7;
}

/* ── Divider ──────────────────────────────────────────────── */
.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0;
}

/* ── Legal links block ────────────────────────────────────── */
.legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.legal-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s;
}
.legal-link:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-dim);
    text-decoration: none;
}

/* ── Footer ───────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 40px var(--page-pad);
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

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

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

.footer-links a {
    font-size: 0.875rem;
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

/* ── Highlight span ───────────────────────────────────────── */
.highlight { color: var(--accent); font-weight: 600; }
.highlight-amber { color: var(--amber); font-weight: 600; }

/* ── Language Switcher ────────────────────────────────────── */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 3px;
    flex-shrink: 0;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 5px;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.15s;
    letter-spacing: 0.04em;
    line-height: 1;
}
.lang-btn:hover { color: var(--text); }
.lang-btn.active {
    background: var(--accent-dim);
    color: var(--accent-light);
}

/* ── Nav Logo Image ───────────────────────────────────────── */
.nav-logo-img {
    height: 28px;
    width: auto;
    display: block;
}

/* ── Gallery Carousel ─────────────────────────────────────── */
.gallery-scroll-wrap {
    position: relative;
}

.gallery-arrow {
    position: absolute;
    top: calc(50% - 7px); /* offset for scrollbar */
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(9, 12, 24, 0.88);
    border: 1px solid var(--border-light);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0;
    flex-shrink: 0;
}
.gallery-arrow:hover {
    border-color: var(--amber);
    color: var(--amber);
    background: var(--amber-dim);
}
.gallery-arrow-prev { left: -18px; }
.gallery-arrow-next { right: -18px; }

/* ── Hero Screenshot ──────────────────────────────────────── */
.hero-screenshot {
    margin-top: 56px;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(245, 158, 11, 0.18);
    box-shadow:
        0 0 0 1px rgba(245, 158, 11, 0.08),
        0 32px 80px rgba(0, 0, 0, 0.45),
        0 8px 24px rgba(0, 0, 0, 0.3);
}
.hero-screenshot img {
    width: 100%;
    display: block;
    border-radius: inherit;
}

/* ── Platform Gallery ─────────────────────────────────────── */
.platform-gallery { margin-top: 16px; }

.gallery-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gallery-tab {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--muted);
    padding: 7px 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font);
    transition: all 0.2s;
    letter-spacing: 0.02em;
}
.gallery-tab:hover { border-color: var(--border-light); color: var(--text); }
.gallery-tab.tab-active-amber {
    border-color: var(--amber);
    color: var(--amber);
    background: var(--amber-dim);
}
.gallery-tab.tab-active-accent {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.gallery-panel { display: none; }
.gallery-panel.active { display: block; }

.gallery-scroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.gallery-scroll::-webkit-scrollbar { height: 3px; }
.gallery-scroll::-webkit-scrollbar-track { background: var(--border); border-radius: 2px; }
.gallery-scroll::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

.ss-mac {
    flex-shrink: 0;
    height: 280px;
    width: auto;
    border-radius: 10px;
    border: 1px solid var(--border);
    scroll-snap-align: start;
    display: block;
    transition: border-color 0.2s;
}
.ss-ipad {
    flex-shrink: 0;
    height: 280px;
    width: auto;
    border-radius: 12px;
    border: 1px solid var(--border);
    scroll-snap-align: start;
    display: block;
    transition: border-color 0.2s;
}
.ss-ios {
    flex-shrink: 0;
    height: 520px;
    width: auto;
    object-fit: contain;
    border-radius: 20px;
    border: 1px solid var(--border);
    scroll-snap-align: start;
    display: block;
    transition: border-color 0.2s;
}

@media (max-width: 768px) {
    .ss-ios {
        height: auto;
        width: calc(100vw - 96px);
        max-height: 68vh;
        aspect-ratio: 390 / 844;
    }
}
.ss-mac:hover, .ss-ipad:hover, .ss-ios:hover {
    border-color: var(--border-light);
}

/* ── App Icon ─────────────────────────────────────────────── */
.app-icon-img {
    width: 60px;
    height: 60px;
    border-radius: 13px;
    object-fit: contain;
    flex-shrink: 0;
}

.app-icon-img-lg {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: contain;
    flex-shrink: 0;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
    .site-nav { padding: 0 20px; }
    .nav-links { gap: 20px; }
    .site-footer { flex-direction: column; align-items: flex-start; }
    .hero h1 { letter-spacing: -0.03em; }
    .app-card { padding: 24px; }
}

@media (max-width: 480px) {
    .nav-links li:not(:last-child) { display: none; }
}
