/* ════════════════════════════════════════════════════
   home.css - styles for the home page (index.php) only
   ════════════════════════════════════════════════════ */

/* Nav is styled by base.css (shared page chrome). Only the logo-bar below is
   overridden here for the home page's larger, floating logo treatment. */

/* ── LOGO BAR ── */
.logo-bar {
    margin-top: 64px;
    background: #000;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 36px 24px;
    border-bottom: 1px solid rgba(0,180,255,0.18);
    position: relative;
    overflow: hidden;
}
.logo-bar img {
    position: relative;
    width: clamp(300px, 48vw, 600px);
    animation: logoFloat 6s ease-in-out infinite;
}
@keyframes logoFloat {
    0%,100% { transform: translateY(0px); }
    50%      { transform: translateY(-7px); }
}

/* ── HERO ── */
.hero {
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 80px 24px; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: 18%; left: 50%; transform: translateX(-50%);
    width: 900px; height: 420px;
    background: radial-gradient(ellipse, rgba(0,90,255,0.13) 0%, transparent 68%);
    pointer-events: none;
}
.hero::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 18% 55%, rgba(0,100,255,0.06) 0%, transparent 50%),
        radial-gradient(circle at 82% 18%, rgba(0,195,255,0.06) 0%, transparent 42%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 1; max-width: 900px; }

.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px; border-radius: 20px;
    border: 1px solid var(--border); background: var(--primary-dim);
    font-size: 0.78rem; color: var(--primary); margin-bottom: 28px; letter-spacing: 0.05em;
}
.hero-badge .dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--primary); box-shadow: 0 0 8px var(--primary);
    animation: blink 2s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.35} }

.hero h1 { font-size: clamp(2.8rem, 6vw, 5rem); margin-bottom: 20px; letter-spacing: -0.02em; }
.hero h1 span { color: var(--primary); text-shadow: 0 0 44px rgba(0,195,255,0.5); }

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem); color: var(--muted);
    max-width: 580px; margin: 0 auto 48px;
}

.hero-input-wrap {
    display: flex; max-width: 640px; margin: 0 auto 52px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,195,255,0.1);
}
.hero-input {
    flex: 1; background: transparent; border: none; outline: none;
    padding: 16px 20px; font-size: 1rem; color: var(--text);
}
.hero-input::placeholder { color: var(--muted); }
.hero-input-btn {
    padding: 12px 24px; margin: 6px; border-radius: 8px;
    font-size: 0.95rem; font-weight: 700;
    background: var(--primary); color: #000; border: none; cursor: pointer;
    white-space: nowrap; transition: all 0.2s;
}
.hero-input-btn:hover { box-shadow: 0 0 22px rgba(0,195,255,0.55); }
.hero-input-btn:disabled { opacity: 0.6; cursor: default; box-shadow: none; }

/* ── HERO SHORTENING FORM (functional paste-and-go) ── */
.hero-shorten { max-width: 640px; margin: 0 auto 52px; }
.hero-shorten[hidden] { display: none; }
.hero-shorten .hero-input-wrap { margin-bottom: 16px; }

.hero-turnstile { display: flex; justify-content: center; margin-bottom: 14px; }
.hero-turnstile .cf-turnstile { display: inline-block; }

.hero-form-note { font-size: 0.85rem; color: var(--muted); line-height: 1.6; }
.hero-form-note a { color: var(--primary); text-decoration: none; }
.hero-form-note a:hover { text-decoration: underline; }

.hero-error {
    margin-bottom: 14px; padding: 11px 14px; border-radius: 10px; text-align: left;
    font-size: 0.86rem; color: #ffb4b4;
    background: rgba(255,70,70,0.08); border: 1px solid rgba(255,70,70,0.3);
}
.hero-error[hidden] { display: none; }

/* ── HERO RESULT VIEW ──
   Reuses the dashboard completion view markup; these rules mirror the ones in
   dashboard.css (.shorten-done etc.) so the homepage renders it identically
   without loading dashboard.css. Kept in sync deliberately. */
.hero-result { max-width: 560px; margin: 0 auto 52px; text-align: left; }
.hero-result[hidden] { display: none; }
.hero-result .shorten-done {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 26px;
}

.done-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.done-check {
    flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-dim); color: var(--primary);
    border: 1px solid var(--primary); font-size: 1rem;
}
.done-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.done-sub { font-size: 0.78rem; color: var(--muted); }

.done-url {
    display: flex; gap: 8px; align-items: center;
    background: var(--bg); border: 1px solid var(--border);
    border-radius: 10px; padding: 10px 12px; margin-bottom: 14px;
}
.done-url-link {
    flex: 1; min-width: 0; color: var(--primary); font-weight: 600;
    font-size: 0.95rem; text-decoration: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.done-url-link:hover { text-decoration: underline; }
.done-url .btn-primary { margin: 0; flex: 0 0 auto; }

.done-details { margin: 0 0 16px; }
.done-detail {
    display: flex; gap: 12px; padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 0.82rem;
}
.done-detail dt { flex: 0 0 100px; color: var(--muted); }
.done-detail dd { margin: 0; flex: 1; min-width: 0; color: var(--text); word-break: break-all; }
.done-dest { color: var(--muted); }

.done-qr { text-align: center; margin-bottom: 18px; }
.done-qr .qr-frame {
    background: #fff; padding: 12px; border-radius: 10px;
    width: 180px; height: 180px; margin: 0 auto 12px;
}
.done-qr .qr-frame svg,
.done-qr .qr-frame img { width: 100%; height: 100%; display: block; }

.an-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.act-btn {
    font-size: 0.8rem; padding: 7px 14px; border-radius: 8px;
    background: var(--primary-dim); border: 1px solid rgba(0,195,255,0.25);
    color: var(--primary); cursor: pointer; text-decoration: none;
}
.act-btn:hover { border-color: var(--primary); }

/* ── CLAIM PROMPT (the crucial next action after a successful anon create) ── */
.claim-prompt {
    margin-top: 4px; padding: 18px; border-radius: 12px;
    background: rgba(0,80,200,0.06); border: 1px solid rgba(0,195,255,0.2);
}
.claim-lead { font-size: 0.95rem; color: var(--text); margin-bottom: 6px; }
.claim-lead strong { color: var(--primary); }
.claim-body { font-size: 0.83rem; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
.claim-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.claim-cta { flex: 1; min-width: 200px; margin: 0; text-align: center; text-decoration: none; }
.claim-actions .btn-ghost { flex: 0 0 auto; }

/* ── RETURNING ANONYMOUS VISITOR: their own links ── */
.anon-links { background: var(--bg2); }
.anon-links-head { text-align: center; }
.anon-links-list {
    max-width: 780px; margin: 40px auto 28px;
    display: flex; flex-direction: column; gap: 10px;
}
.anon-link-row {
    display: flex; align-items: center; gap: 14px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 14px 16px;
}
.anon-link-url {
    flex: 0 0 auto; color: var(--primary); font-weight: 600;
    font-size: 0.92rem; text-decoration: none; white-space: nowrap;
}
.anon-link-url:hover { text-decoration: underline; }
.anon-link-dest {
    flex: 1; min-width: 0; color: var(--muted); font-size: 0.82rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.anon-link-expiry {
    flex: 0 0 auto; font-size: 0.74rem; color: var(--muted);
    background: rgba(255,255,255,0.04); border: 1px solid var(--border);
    border-radius: 20px; padding: 3px 10px; white-space: nowrap;
}
.anon-link-copy { flex: 0 0 auto; padding: 6px 14px; font-size: 0.8rem; }
.anon-links-claim { text-align: center; max-width: 360px; margin: 0 auto; }

.hero-stats { display: flex; justify-content: center; gap: 48px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num {
    font-size: 1.8rem; font-weight: 700;
    color: var(--primary); text-shadow: 0 0 20px rgba(0,195,255,0.4);
}
.stat-label { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

/* ── SHARED SECTION DEFAULTS ── */
section { padding: 100px 0; }

.glow-text  { color: var(--primary); text-shadow: 0 0 24px rgba(0,195,255,0.55); }

.section-tag {
    display: inline-block; font-size: 0.72rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--primary); margin-bottom: 12px;
}
.section-title { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-bottom: 14px; }
.section-sub { font-size: 0.97rem; color: var(--muted); max-width: 540px; margin: 0 auto 60px; }

/* ── FEATURES GRID ── */
.features { background: var(--bg2); }
.features-header { text-align: center; }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 20px;
}

.feature-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 28px;
    transition: all 0.3s; position: relative; overflow: hidden;
}
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.feature-card:hover {
    border-color: rgba(0,195,255,0.3); transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 30px rgba(0,195,255,0.07);
}
.feature-card:hover::before { opacity: 1; }

.feature-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: var(--primary-dim); border: 1px solid rgba(0,195,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; margin-bottom: 18px;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: 9px; color: #fff; }
.feature-card p  { font-size: 0.86rem; color: var(--muted); line-height: 1.75; }

.feature-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag {
    font-size: 0.7rem; padding: 3px 10px; border-radius: 20px;
    background: rgba(0,195,255,0.07); border: 1px solid rgba(0,195,255,0.15);
    color: var(--primary);
}
/* Genuinely unbuilt features are marked planned rather than looking available. */
.tag-soon { background: transparent; border-color: var(--border); color: var(--muted); }
.soon-badge {
    display: inline-block; font-size: 0.6rem; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    background: transparent; border: 1px solid var(--border); color: var(--muted);
    border-radius: 10px; padding: 1px 7px; margin-left: 6px; vertical-align: middle;
}

/* ── CAMPAIGN MANAGER ── */
.campaign { background: var(--bg); }
.campaign-inner {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 64px; align-items: center;
}

.campaign-list { display: flex; flex-direction: column; gap: 18px; margin-top: 28px; }
.campaign-item { display: flex; gap: 16px; align-items: flex-start; }
.campaign-item-icon {
    width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
    background: var(--primary-dim); border: 1px solid rgba(0,195,255,0.2);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; margin-top: 2px;
}
.campaign-item-text h4 { font-size: 0.93rem; color: #fff; margin-bottom: 3px; }
.campaign-item-text p  { font-size: 0.82rem; color: var(--muted); }

/* ── CAMPAIGN MOCK UI PANEL ── */
.campaign-mock {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
}
.mock-header {
    background: rgba(0,195,255,0.04); border-bottom: 1px solid var(--border);
    padding: 13px 18px; display: flex; align-items: center; gap: 8px;
}
.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-title { font-size: 0.76rem; color: var(--muted); margin-left: 8px; }
.mock-body { padding: 20px; }
.mock-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.82rem;
}
.mock-row:last-of-type { border-bottom: none; }
.mock-url { color: var(--primary); }
.mock-hits {
    background: var(--primary-dim); border: 1px solid rgba(0,195,255,0.2);
    border-radius: 4px; padding: 2px 8px; color: var(--primary); font-size: 0.73rem;
}
.mock-bar-wrap {
    margin-top: 16px; padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.04);
}
.mock-bar-label {
    display: flex; justify-content: space-between;
    font-size: 0.74rem; color: var(--muted); margin-bottom: 7px;
}
.mock-bar {
    height: 4px; background: rgba(255,255,255,0.06);
    border-radius: 4px; overflow: hidden; margin-bottom: 5px;
}
.mock-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #0055ff, var(--primary));
    border-radius: 4px;
}

/* ── ANALYTICS ── */
.analytics { background: var(--bg2); }
.analytics-header { text-align: center; }

.analytics-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px;
}

.analytics-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 24px;
}
.analytics-card h4 {
    font-size: 0.72rem; color: var(--muted); text-transform: uppercase;
    letter-spacing: 0.1em; margin-bottom: 20px;
}

.chart-wrap { height: 120px; }
.chart-bars { display: flex; align-items: flex-end; gap: 5px; height: 100%; }
.chart-bar {
    flex: 1; border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, var(--primary), rgba(0,80,200,0.3));
    opacity: 0.75; transition: opacity 0.2s;
}
.chart-bar:hover { opacity: 1; }

.heatmap { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.hm-cell { aspect-ratio: 1; border-radius: 3px; }

.ref-list { display: flex; flex-direction: column; gap: 11px; }
.ref-item { font-size: 0.81rem; }
.ref-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.ref-pct { color: var(--primary); font-size: 0.76rem; }
.ref-bar-bg { height: 3px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.ref-bar-fill { height: 100%; background: var(--primary); border-radius: 3px; }

/* ── OTHER FEATURES ── */
.other-features { background: var(--bg); }
.other-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.other-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 16px; padding: 36px 28px; text-align: center;
    transition: all 0.3s;
}
.other-card:hover {
    border-color: rgba(0,195,255,0.28); transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.other-icon { font-size: 2.2rem; margin-bottom: 16px; display: block; }
.other-card h3 { font-size: 1.08rem; color: #fff; margin-bottom: 10px; }
.other-card p  { font-size: 0.84rem; color: var(--muted); line-height: 1.75; }

/* ── API SECTION ── */
.api-section { background: var(--bg2); }
.api-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }

.code-block {
    background: #010109; border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
}
.code-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 18px; background: rgba(0,195,255,0.04); border-bottom: 1px solid var(--border);
}
.code-lang { font-size: 0.74rem; color: var(--primary); font-family: monospace; }
.code-body {
    padding: 22px 20px; font-family: 'Courier New', monospace;
    font-size: 0.8rem; line-height: 1.85; color: #9ac8e0; overflow-x: auto;
}
.code-kw  { color: var(--primary); }
.code-str { color: #a8ff78; }
.code-key { color: #f7c59f; }
.code-cmt { color: #334455; }

/* ── CTA ── */
.cta-section { background: var(--bg); padding: 120px 24px; text-align: center; }
.cta-inner { max-width: 640px; margin: 0 auto; }
.cta-box {
    padding: 72px 52px; border-radius: 24px;
    background: rgba(0,80,200,0.04); border: 1px solid rgba(0,195,255,0.14);
    box-shadow: 0 0 90px rgba(0,90,200,0.1);
}
.cta-box h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: 14px; }
.cta-box p  { color: var(--muted); margin-bottom: 32px; }

/* Footer is styled by base.css (shared page chrome, centred layout). */

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .analytics-grid { grid-template-columns: 1fr; }
    .other-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-links { display: none; }
    .campaign-inner, .api-inner { grid-template-columns: 1fr; }
    .hero-stats { gap: 24px; }
    .other-grid { grid-template-columns: 1fr; }
    .anon-link-row { flex-wrap: wrap; }
    .anon-link-dest { flex-basis: 100%; order: 3; white-space: normal; }
}
/* Phone portrait: match the dashboard's <=560px standard. Body carries
   overflow-x:hidden, so anything wider than the viewport is clipped rather than
   scrollable -- every rule here keeps the shortening UI within width and gives
   the controls full-width tap targets. */
@media (max-width: 560px) {
    /* Above-the-fold budget on a phone is tight (nav + logo-bar already sit above
       the hero), so the first screen is deliberately: one line saying what this
       is, then the form, then the button. The decorative badge and the longer
       marketing sub-line are dropped here -- the sub-line and everything else
       still read on desktop and when scrolling. Verified with a headless render
       at 360/375/390px phone widths. */
    .hero { padding: 22px 18px 40px; }
    .hero-badge { display: none; }
    .hero h1 { font-size: clamp(1.9rem, 8vw, 2.4rem); margin-bottom: 12px; }
    .hero-sub { display: none; }
    .hero-input-wrap {
        flex-direction: column; background: transparent;
        border: none; overflow: visible;
    }
    .hero-input-wrap:focus-within { box-shadow: none; }
    .hero-input {
        background: rgba(255,255,255,0.04); border: 1px solid var(--border);
        border-radius: 10px; margin-bottom: 10px; padding: 14px 16px; width: 100%;
    }
    .hero-input-btn { margin: 0; width: 100%; padding: 14px; }

    .hero-result .shorten-done { padding: 20px; }
    .done-url { flex-direction: column; align-items: stretch; }
    .done-url .btn-primary { width: 100%; }
    .done-detail dt { flex-basis: 90px; }

    .claim-actions { flex-direction: column; align-items: stretch; }
    .claim-cta, .claim-actions .btn-ghost { width: 100%; min-width: 0; }
}
