/* ==========================================================
   THEME 1: APPLE CUPERTINO DUAL MODE (DARK & LIGHT) PRO
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* --- DARK MODE PALETTE --- */
:root, html.dark {
    --bg-main: #000000;
    --bg-surface: rgba(255, 255, 255, 0.05);
    --bg-surface-solid: #111113;
    --bg-card: #111113;
    --bg-card-hover: #17171a;
    --bg-input: #000000;
    --bg-nav: rgba(20, 20, 22, 0.85);
    --bg-island: #111113;
    --border-color: rgba(255, 255, 255, 0.12);
    --border-strong: rgba(255, 255, 255, 0.22);
    --accent: #2997ff;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --btn-primary-bg: #ffffff;
    --btn-primary-text: #000000;
    --btn-primary-hover: #e5e5ea;
    --btn-ghost-color: #86868b;
    --gradient-head-end: #86868b;
    --stats-bg: #08080a;
    --shadow-nav: 0 10px 35px rgba(0,0,0,0.7);
    --shadow-card: 0 8px 30px rgba(0,0,0,0.5);
}

/* --- LIGHT MODE PALETTE --- */
html.light {
    --bg-main: #f5f5f7;
    --bg-surface: #ffffff;
    --bg-surface-solid: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #fbfbfd;
    --bg-input: #f5f5f7;
    --bg-nav: rgba(255, 255, 255, 0.85);
    --bg-island: #ffffff;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.14);
    --accent: #0071e3;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --btn-primary-bg: #0071e3;
    --btn-primary-text: #ffffff;
    --btn-primary-hover: #0077ed;
    --btn-ghost-color: #515154;
    --gradient-head-end: #6e6e73;
    --stats-bg: #ebebf0;
    --shadow-nav: 0 10px 35px rgba(0,0,0,0.08);
    --shadow-card: 0 8px 30px rgba(0,0,0,0.04);
}

/* 1. Global Touch Highlight & Outline Reset (Zero Blue Box on Tap) */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}

html, body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent !important;
    transition: background-color 0.25s ease, color 0.25s ease;
}

a, button, input, select, textarea {
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
}
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

a { color: inherit; text-decoration: none; transition: 0.15s ease; }
.ap-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; width: 100%; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-accent { color: var(--accent); }
.text-cyan { color: var(--accent); }
.text-green { color: #10b981; }
.text-purple { color: #a855f7; }

/* 2. Apple Floating Pill Dock Navbar */
.ap-dock-nav-wrap {
    position: sticky;
    top: 16px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    padding: 0 16px;
}
.ap-dock-nav {
    background: var(--bg-nav);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 7px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: var(--shadow-nav);
    transition: background 0.25s ease, border-color 0.25s ease;
}
.ap-logo-link { font-size: 19px; font-weight: 800; color: var(--text-primary); }
.ap-dock-links { display: flex; gap: 20px; }
.ap-dock-item { font-size: 14px; font-weight: 500; color: var(--text-secondary); }
.ap-dock-item:hover, .ap-dock-item.active { color: var(--text-primary); }
.ap-dock-actions { display: flex; align-items: center; gap: 8px; }

.ap-btn-pill {
    padding: 8px 18px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s ease;
}
.ap-btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-text) !important; }
.ap-btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.ap-btn-ghost { background: transparent; color: var(--btn-ghost-color) !important; border: 1px solid var(--border-color); }
.ap-btn-ghost:hover { color: var(--text-primary) !important; border-color: var(--border-strong); }
.ap-btn-block { width: 100%; justify-content: center; padding: 12px 24px; border-radius: 10px; }
.ap-mobile-btn { display: none; background: transparent; border: none; color: var(--text-primary); font-size: 18px; cursor: pointer; }

/* Navbar Theme Toggle Button (Desktop Only) */
.ap-nav-theme-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px;
    transition: 0.15s ease;
}
.ap-nav-theme-btn:hover { color: var(--text-primary); border-color: var(--border-strong); }

/* 3. Hamburger Mobile Menu with Dedicated Theme Switch */
.ap-mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-main);
    z-index: 999;
    padding: 80px 30px;
}
.ap-mobile-menu.active { display: block; }
.ap-mobile-menu a { display: block; font-size: 20px; font-weight: 700; color: var(--text-primary); margin-bottom: 20px; text-align: center; }

.ap-theme-switch-row {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ap-switch-label { font-size: 15px; font-weight: 600; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.ap-theme-toggle-btn {
    background: var(--bg-surface-solid);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 7px 16px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s ease;
}
html.dark .toggle-icon-light { display: none; }
html.dark .toggle-icon-dark { display: inline-flex; align-items: center; gap: 6px; }
html.light .toggle-icon-dark { display: none; }
html.light .toggle-icon-light { display: inline-flex; align-items: center; gap: 6px; }

/* 4. Hero Section */
.ap-hero-section {
    min-height: calc(100vh - 90px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 0 35px;
}
.ap-dynamic-island {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-island);
    border: 1px solid var(--border-strong);
    border-radius: 9999px;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 600;
    margin-top: -16px; /* Shifted 25% Up */
    margin-bottom: 26px;
    box-shadow: var(--shadow-card);
    color: var(--text-primary);
}
.island-camera { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.ap-keynote-title {
    font-size: 58px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.12;
    color: var(--text-primary);
    margin-top: -8px; /* Shifted 20% Up */
    margin-bottom: 28px; /* +10% Spacing Below */
}
.ap-gradient-text {
    background: linear-gradient(180deg, var(--text-primary) 0%, var(--gradient-head-end) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.ap-keynote-subtitle {
    font-size: 18.5px;
    color: var(--text-secondary);
    max-width: 660px;
    margin: -6px auto 32px; /* Shifted 15% Up */
    line-height: 1.6;
}

/* 5. Glass Capsule Shortener (Zero White Box Glitch) */
.ap-capsule-shortener-wrap { max-width: 700px; margin: 0 auto 24px; width: 100%; }
.shorten-component-wrap { margin: 0; padding: 0; }
.shorten-input-pill {
    background: var(--bg-surface);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-strong);
    border-radius: 9999px;
    padding: 6px 8px 6px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-card);
    transition: 0.15s ease;
}
.shorten-input-pill:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(41, 151, 255, 0.25); }

.shorten-main-input,
.shorten-input-pill input,
input[name="url"],
#url {
    flex: 1;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--text-primary) !important;
    font-size: 17px;
    font-family: inherit;
    -webkit-text-fill-color: var(--text-primary) !important;
}

/* Eliminate Chrome / Android Autofill White Background Glitch */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-main) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

.shorten-submit-btn {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 9999px;
    padding: 12px 28px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.15s ease;
}
.shorten-submit-btn:hover { opacity: 0.9; }

/* Shortened Link Result Card */
.shorten-result-container { margin-top: 14px; }
.shorten-result-container:empty { display: none !important; }
.shorten-success-card {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: var(--shadow-card);
}
.res-flex-row { display: flex; align-items: center; gap: 8px; }
.res-url-input {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--accent);
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    outline: none;
}
.res-copy-btn {
    background: var(--accent);
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: 0.15s ease;
}
.res-copy-btn.copied { background: #10b981; }
.shorten-err-card {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

/* Telemetry Pills Row */
.ap-telemetry-row {
    display: flex;
    justify-content: center;
    gap: 18px; /* +5% Spacing between pills */
    flex-wrap: wrap;
    margin-top: 18px; /* +10% Spacing above pills */
}
.ap-telemetry-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 7px 18px;
    border-radius: 9999px;
    font-size: 14px;
    color: var(--text-secondary);
}
.pill-dot { width: 7px; height: 7px; border-radius: 50%; }
.pill-dot.green { background: #10b981; }
.pill-dot.purple { background: #a855f7; }
.pill-dot.blue { background: var(--accent); }

/* 6. Apple Bento Live Stats Grid */
.ap-stats-bento-section {
    background: var(--stats-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 80px 0;
}
.ap-stats-bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ap-bento-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
    transition: 0.15s ease;
}
.ap-bento-stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.stat-pill-tag { font-size: 12px; font-weight: 700; background: var(--bg-surface); padding: 3px 8px; border-radius: 6px; border: 1px solid var(--border-color); color: var(--text-primary); }
.stat-pulse-light { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stat-pulse-light.cyan { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.stat-pulse-light.purple { background: #a855f7; box-shadow: 0 0 8px #a855f7; }
.stat-pulse-light.green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.stat-big-counter { font-size: 42px; font-weight: 900; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1; margin-bottom: 8px; }
.stat-card-title { font-size: 15px; font-weight: 700; color: var(--text-primary); display: block; margin-bottom: 4px; }
.stat-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0; }

/* 7. Publisher Simulator Bento Card */
.theme-section { padding: 70px 0; }
.ap-sim-header { margin-bottom: 36px; }
.ap-badge-sm { font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 0.08em; }
.ap-section-head { font-size: 34px; font-weight: 800; color: var(--text-primary); margin: 6px 0 8px; letter-spacing: -0.03em; }
.ap-section-sub { font-size: 16px; color: var(--text-secondary); }

.ap-simulator-bento {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    align-items: stretch;
}
.ap-control-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-card);
}
.ap-card-top-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.ap-control-label { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.ap-control-pill { font-size: 14px; font-weight: 700; color: var(--accent); background: var(--bg-surface); border: 1px solid var(--border-color); padding: 3px 10px; border-radius: 9999px; }

.ap-range-wrap { margin-top: 8px; }
.ap-custom-range {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}
.ap-custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: pointer;
}
.ap-range-markers { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-secondary); margin-top: 8px; font-weight: 600; }

.ap-select-wrapper { position: relative; margin-top: 8px; }
.ap-custom-select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}
.ap-custom-select:focus { border-color: var(--accent); }
.select-chevron { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); pointer-events: none; font-size: 12px; }

/* Projected Revenue Card */
.ap-revenue-glass-card {
    background: var(--bg-card);
    border: 1px solid var(--border-strong);
    border-radius: 18px;
    padding: 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-card);
}
.rev-top-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.rev-chip { font-size: 12px; font-weight: 700; color: #10b981; background: rgba(16, 185, 129, 0.12); padding: 3px 8px; border-radius: 6px; }
.rev-frequency { font-size: 13px; color: var(--text-secondary); }
.rev-stat-label { font-size: 13px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; display: block; margin-bottom: 4px; }
.rev-big-number { font-size: 44px; font-weight: 900; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1; }
.rev-sub-stat-row { display: flex; justify-content: space-between; border-top: 1px solid var(--border-color); padding-top: 14px; margin-top: 20px; }
.sub-lbl { font-size: 12px; color: var(--text-secondary); display: block; margin-bottom: 2px; }
.sub-val { font-size: 15px; color: var(--text-primary); }

/* 8. 9 Product Tiles Grid */
.ap-cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ap-product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 26px 22px;
    box-shadow: var(--shadow-card);
    transition: 0.15s ease;
}
.ap-product-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.card-glass-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.step-chip { font-size: 12px; font-weight: 800; color: var(--text-secondary); font-family: monospace; }
.ap-card-icon { font-size: 22px; color: var(--text-primary); }
.ap-card-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.ap-card-text { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }

/* 9. Clean Contact Us Form */
.theme-contact-wrap { max-width: 620px; margin: 0 auto; }
.contact-form-box { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 16px; padding: 32px; text-align: left; box-shadow: var(--shadow-card); }
.form-duo-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-input-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.form-ctrl {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 11px 14px;
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: 0.15s ease;
}
.form-ctrl:focus { border-color: var(--accent); }
.form-err-msg { color: #ef4444; font-size: 13px; margin-top: 4px; }

/* 10. Testimonials */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.test-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 12px; padding: 22px; text-align: left; box-shadow: var(--shadow-card); }
.test-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 12px; font-style: italic; }
.test-author strong { display: block; font-size: 14px; color: var(--text-primary); }
.test-author span { font-size: 12px; color: var(--text-secondary); }

/* ==========================================================
   MOBILE VIEWPORT OPTIMIZATIONS (<860px & <600px)
   ========================================================== */
@media (max-width: 860px) {
    .ap-dock-links { display: none; }
    .ap-mobile-btn { display: block; }
    /* Hide theme toggle button from header on mobile (Only inside hamburger drawer) */
    .ap-nav-theme-btn { display: none !important; }
    .ap-stats-bento-grid { grid-template-columns: 1fr; }
    .ap-simulator-bento { grid-template-columns: 1fr; }
    .ap-cards-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .form-duo-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .ap-dock-nav-wrap { top: 12px; padding: 0 12px; }
    .ap-container { padding: 0 16px; }
    .ap-hero-section {
        min-height: calc(100svh - 75px);
        min-height: calc(100vh - 75px);
        padding: 20px 0 30px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .ap-dynamic-island { margin-top: -8px; margin-bottom: 18px; font-size: 12.5px; padding: 4px 14px; }
    .ap-keynote-title { font-size: 35px; line-height: 1.15; margin-top: -4px; margin-bottom: 20px; }
    .ap-keynote-subtitle { font-size: 15px; margin: -2px auto 26px; line-height: 1.5; }
    .ap-capsule-shortener-wrap { margin-bottom: 16px; }
    .shorten-input-pill { padding: 5px 6px 5px 16px; gap: 8px; }
    .shorten-main-input { font-size: 15px; }
    .shorten-submit-btn { padding: 9px 20px; font-size: 14px; }
    .ap-telemetry-row { gap: 12px; margin-top: 14px; justify-content: center; }
    .ap-telemetry-pill { padding: 6px 14px; font-size: 12.5px; gap: 6px; }
    .theme-section { padding: 50px 0; }
    .ap-section-head { font-size: 26px; }
    .ap-control-card, .ap-revenue-glass-card { padding: 22px 16px; }
    .rev-big-number { font-size: 34px; }
}
