/* ============================================================
   DOMAIN SALE — Main Stylesheet
   Dark luxury aesthetic · Cormorant Garamond + Montserrat
   ============================================================ */

:root {
    --bg:          #0a0a0a;
    --bg-2:        #111111;
    --bg-3:        #181818;
    --border:      #2a2a2a;
    --border-light:#333333;
    --gold:        #c9a84c;
    --gold-light:  #e8c97a;
    --gold-dim:    #8a6e2e;
    --text:        #e8e4dc;
    --text-muted:  #888880;
    --text-faint:  #555550;
    --white:       #ffffff;
    --error:       #c94c4c;
    --success:     #4caf7d;
    --radius:      4px;
    --font-serif:  'Cormorant Garamond', Georgia, serif;
    --font-sans:   'Montserrat', sans-serif;
    --max-w:       1200px;
    --narrow-w:    760px;
}

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

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Grain overlay */
.grain {
    position: fixed; inset: 0; pointer-events: none; z-index: 999;
    opacity: .03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 200px 200px;
}

/* ---- Typography ---- */
h1,h2,h3 { font-family: var(--font-serif); font-weight: 300; letter-spacing: 0.02em; line-height: 1.15; }

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }

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

/* ---- Nav ---- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    border-bottom: 1px solid var(--border);
    background: rgba(10,10,10,.92);
    backdrop-filter: blur(12px);
}
.nav {
    display: flex; align-items: center; justify-content: space-between;
    max-width: var(--max-w); margin: 0 auto; padding: .9rem 2rem;
}
.nav-logo {
    font-family: var(--font-sans);
    font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
    color: var(--text-muted);
}
.nav-contact {
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    color: var(--gold); border: 1px solid var(--gold-dim); padding: .4rem 1rem;
    border-radius: var(--radius); transition: all .2s;
}
.nav-contact:hover { background: var(--gold); color: var(--bg); }

/* ---- Hero ---- */
.hero {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; position: relative;
    padding: 7rem 2rem 4rem; text-align: center; overflow: hidden;
}

.hero-bg-lines {
    position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(90deg, var(--border) 1px, transparent 1px),
        linear-gradient(180deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: .35;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black, transparent);
}

.hero::before {
    content: ''; position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 40%, rgba(201,168,76,.06) 0%, transparent 70%);
}

.hero-inner { position: relative; z-index: 1; }

.hero-eyebrow {
    font-size: 10px; letter-spacing: .25em; text-transform: uppercase;
    color: var(--gold); margin-bottom: 1.2rem;
    animation: fadeUp .6s ease both;
}
.hero-domain {
    font-size: clamp(3rem, 9vw, 7.5rem);
    font-weight: 300; color: var(--white);
    letter-spacing: -.01em;
    margin-bottom: 1.2rem;
    animation: fadeUp .6s .1s ease both;
}
.hero-domain span { color: var(--gold); font-style: italic; }
.hero-sub {
    font-size: 15px; color: var(--text-muted); line-height: 1.8;
    max-width: 480px; margin: 0 auto 2.5rem;
    animation: fadeUp .6s .2s ease both;
}
.hero-stats {
    display: flex; align-items: center; justify-content: center; gap: 0;
    border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; margin: 0 auto 2.5rem; max-width: 520px;
    animation: fadeUp .6s .3s ease both;
}
.stat { padding: 1rem 2rem; flex: 1; text-align: center; }
.stat-value { display: block; font-family: var(--font-serif); font-size: 1.4rem; color: var(--white); }
.stat-label { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted); margin-top: .15rem; }
.stat-divider { width: 1px; background: var(--border); align-self: stretch; }

.cta-btn {
    display: inline-block;
    background: var(--gold); color: var(--bg);
    padding: .85rem 2.5rem; font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
    font-weight: 600; border-radius: var(--radius);
    transition: all .2s;
    animation: fadeUp .6s .4s ease both;
}
.cta-btn:hover { background: var(--gold-light); color: var(--bg); transform: translateY(-1px); }

.scroll-hint {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    color: var(--text-faint); font-size: 1.2rem;
    animation: bob 2s infinite ease-in-out;
}

/* ---- About ---- */
.about {
    padding: 6rem 0;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: center; }
.about-text h2 { font-size: 2.5rem; margin-bottom: 1.2rem; color: var(--white); }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-features { display: flex; flex-direction: column; gap: 1.2rem; }
.feature {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1.1rem 1.3rem; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--bg-3);
    transition: border-color .2s;
}
.feature:hover { border-color: var(--gold-dim); }
.feature-icon { color: var(--gold); font-size: 1.1rem; margin-top: .1rem; }
.feature strong { display: block; color: var(--text); font-size: 13px; letter-spacing: .04em; }
.feature span { font-size: 12px; color: var(--text-muted); }

/* ---- Form Section ---- */
.form-section {
    padding: 6rem 0 7rem;
    background: var(--bg);
}
.form-header { text-align: center; margin-bottom: 3rem; }
.form-header h2 { font-size: 2.8rem; color: var(--white); margin-bottom: .8rem; }
.form-header p { color: var(--text-muted); max-width: 500px; margin: 0 auto; }
.deadline-badge {
    display: inline-block; margin-top: 1.2rem;
    background: rgba(201,168,76,.08); border: 1px solid var(--gold-dim);
    color: var(--gold); font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
    padding: .45rem 1.2rem; border-radius: 999px;
}

/* Alerts */
.alert {
    display: flex; align-items: center; gap: .8rem;
    padding: 1rem 1.4rem; border-radius: var(--radius);
    margin-bottom: 2rem; font-size: 14px;
}
.alert--success { background: rgba(76,175,125,.12); border: 1px solid rgba(76,175,125,.3); color: var(--success); }
.alert--error   { background: rgba(201,76,76,.12);  border: 1px solid rgba(201,76,76,.3);  color: var(--error); }
.alert-icon { font-size: 1.1rem; flex-shrink: 0; }

/* Form */
.bid-form {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 6px; padding: 2.5rem;
}
.form-row { display: grid; gap: 1.5rem; }
.form-row--2 { grid-template-columns: 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.5rem; }
.form-group:last-child { margin-bottom: 0; }
.form-group--bid { max-width: 300px; }

label {
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-muted); font-weight: 500;
}
.req { color: var(--gold); }
.optional { color: var(--text-faint); font-style: italic; text-transform: none; letter-spacing: 0; }

input, textarea, select {
    background: var(--bg-3); border: 1px solid var(--border);
    color: var(--text); padding: .75rem 1rem;
    border-radius: var(--radius); font-size: 14px;
    font-family: var(--font-sans);
    transition: border-color .2s, box-shadow .2s;
    width: 100%;
}
input:focus, textarea:focus {
    outline: none; border-color: var(--gold-dim);
    box-shadow: 0 0 0 3px rgba(201,168,76,.08);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
textarea { resize: vertical; min-height: 100px; }

.bid-input-wrap { position: relative; }
.bid-prefix {
    position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
    color: var(--gold); font-size: 15px; pointer-events: none;
}
.bid-input-wrap input { padding-left: 1.8rem; }
.field-hint { font-size: 11px; color: var(--text-faint); margin-top: .25rem; }

.form-footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 2rem; margin-top: 2rem; padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.form-disclaimer { font-size: 11px; color: var(--text-faint); max-width: 360px; }

.submit-btn {
    display: inline-flex; align-items: center; gap: .6rem;
    background: var(--gold); color: var(--bg);
    padding: .85rem 2rem; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
    font-weight: 600; border: none; border-radius: var(--radius);
    cursor: pointer; transition: all .2s; white-space: nowrap;
    font-family: var(--font-sans);
}
.submit-btn:hover { background: var(--gold-light); transform: translateY(-1px); }

/* ---- Process ---- */
.process {
    padding: 6rem 0;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
}
.section-title { font-size: 2.5rem; text-align: center; color: var(--white); margin-bottom: 3.5rem; }
.process-steps {
    display: flex; align-items: flex-start; justify-content: center;
    gap: 1.5rem; flex-wrap: wrap;
}
.step { flex: 1; min-width: 200px; max-width: 260px; text-align: center; }
.step-num {
    font-family: var(--font-serif); font-size: 3rem; color: var(--gold-dim);
    line-height: 1; margin-bottom: .6rem;
}
.step h3 { font-size: 1.3rem; color: var(--white); margin-bottom: .6rem; }
.step p { font-size: 13px; color: var(--text-muted); }
.step-arrow { font-size: 1.5rem; color: var(--text-faint); align-self: center; padding-top: 2rem; }

/* ---- Footer ---- */
.site-footer {
    padding: 2.5rem 0; border-top: 1px solid var(--border);
    text-align: center;
}
.site-footer p { font-size: 12px; color: var(--text-faint); margin-bottom: .3rem; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--gold); }

/* ---- Admin ---- */
.admin-body { background: var(--bg); }
.admin-nav {
    background: var(--bg-2); border-bottom: 1px solid var(--border);
    padding: 1rem 2rem; display: flex; align-items: center; justify-content: space-between;
}
.admin-nav-title { font-family: var(--font-serif); font-size: 1.4rem; color: var(--white); }
.admin-nav-links { display: flex; gap: 1.5rem; }
.admin-nav-links a {
    font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-muted);
}
.admin-nav-links a:hover, .admin-nav-links a.active { color: var(--gold); }

.admin-main { max-width: 1300px; margin: 0 auto; padding: 2.5rem 2rem; }

.admin-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.tab-btn {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    padding: .8rem 1.5rem; font-family: var(--font-sans); font-size: 12px;
    letter-spacing: .1em; text-transform: uppercase; border-bottom: 2px solid transparent;
    transition: all .2s; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

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

.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.2rem; margin-bottom: 2.5rem; }
.stat-card {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.4rem 1.6rem;
}
.stat-card .sc-label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: .4rem; }
.stat-card .sc-value { font-family: var(--font-serif); font-size: 2rem; color: var(--white); }

.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    background: var(--bg-3); color: var(--text-muted);
    font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
    padding: .8rem 1rem; text-align: left; white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: .75rem 1rem; border-bottom: 1px solid var(--border);
    color: var(--text); vertical-align: top; max-width: 260px;
    word-break: break-word;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,.02); }

.badge {
    display: inline-block; font-size: 10px; letter-spacing: .06em;
    padding: .2rem .55rem; border-radius: 3px; font-weight: 500;
}
.badge-mobile  { background: rgba(201,168,76,.12); color: var(--gold); }
.badge-desktop { background: rgba(100,150,255,.1);  color: #8ab4f8; }
.badge-tablet  { background: rgba(100,220,150,.1);  color: #6ddb99; }

.bid-amount { font-family: var(--font-serif); font-size: 1.1rem; color: var(--gold); }

.import-box {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem;
    margin-bottom: 2rem;
}
.import-box h3 { font-size: 1.1rem; color: var(--white); margin-bottom: .6rem; }
.import-box p  { font-size: 13px; color: var(--text-muted); margin-bottom: 1rem; }
.import-box textarea { height: 130px; font-family: monospace; font-size: 12px; }
.import-result { margin-top: 1rem; font-size: 13px; }

.btn {
    display: inline-block; padding: .65rem 1.4rem; border-radius: var(--radius);
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    font-weight: 600; cursor: pointer; border: none; font-family: var(--font-sans);
    transition: all .2s;
}
.btn-gold { background: var(--gold); color: var(--bg); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { background: none; border: 1px solid var(--border); color: var(--text-muted); }
.btn-outline:hover { border-color: var(--gold-dim); color: var(--gold); }

.login-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: var(--bg); padding: 2rem;
}
.login-box {
    width: 100%; max-width: 380px;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: 6px; padding: 2.5rem;
}
.login-box h1 { font-size: 1.8rem; color: var(--white); margin-bottom: .5rem; }
.login-box p  { font-size: 13px; color: var(--text-muted); margin-bottom: 2rem; }
.login-box .form-group { margin-bottom: 1.2rem; }
.login-box .submit-btn { width: 100%; justify-content: center; margin-top: .5rem; }

/* Responsive */
@media (max-width: 768px) {
    .about-grid, .form-row--2 { grid-template-columns: 1fr; }
    .form-footer { flex-direction: column; align-items: flex-start; }
    .process-steps { flex-direction: column; align-items: center; }
    .step-arrow { transform: rotate(90deg); padding: 0; }
    .hero-stats { flex-direction: column; border: none; gap: 1px; }
    .stat { border: 1px solid var(--border); border-radius: var(--radius); width: 100%; }
    .stat-divider { display: none; }
    .form-group--bid { max-width: 100%; }
}

/* Animations */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes bob {
    0%,100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(6px); }
}

/* ---- Filter Bar ---- */
.filter-bar {
    display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
    padding: 1rem 0 1.2rem;
}
.filter-input {
    flex: 1; min-width: 220px; max-width: 380px;
    background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text); padding: .55rem 1rem;
    border-radius: var(--radius); font-size: 13px; font-family: var(--font-sans);
    transition: border-color .2s;
    width: auto;
}
.filter-input:focus { outline: none; border-color: var(--gold-dim); }
.filter-select {
    background: var(--bg-2); border: 1px solid var(--border);
    color: var(--text-muted); padding: .55rem .9rem;
    border-radius: var(--radius); font-size: 12px; font-family: var(--font-sans);
    cursor: pointer; transition: border-color .2s;
    width: auto;
}
.filter-select:focus { outline: none; border-color: var(--gold-dim); }
.filter-count {
    font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
    color: var(--text-faint); margin-left: auto;
}
.data-table th[data-sort] { cursor: pointer; user-select: none; }
.data-table th[data-sort]:hover { color: var(--gold); }
.data-table th.sort-asc::after  { content: ' ↑'; color: var(--gold); }
.data-table th.sort-desc::after { content: ' ↓'; color: var(--gold); }
.row-hidden { display: none; }

/* ---- Duplicate detection ---- */
.stat-card--warn .sc-value { color: #e8943a; }
.stat-card--warn .sc-label { color: #e8943a; opacity: .7; }
.row-dupe td { background: rgba(232, 148, 58, .05) !important; }
.row-dupe td:first-child { border-left: 2px solid #e8943a; }
.badge-dupe {
    background: rgba(232,148,58,.15); color: #e8943a;
    font-size: 9px; letter-spacing: .08em; padding: .2rem .5rem;
    border-radius: 3px; margin-left: .4rem; vertical-align: middle;
    text-transform: uppercase;
}

/* ---- Correlation tab ---- */
.visit-pill {
    display: inline-block; background: rgba(201,168,76,.12);
    color: var(--gold); font-size: 12px; font-weight: 600;
    padding: .15rem .55rem; border-radius: 999px;
}
.dwell-badge {
    font-size: 11px; font-weight: 600; padding: .2rem .55rem;
    border-radius: 3px; letter-spacing: .04em;
}
.dwell-fast { background: rgba(76,175,125,.12); color: #4caf7d; }
.dwell-mid  { background: rgba(201,168,76,.12); color: var(--gold); }
.dwell-slow { background: rgba(100,150,255,.1);  color: #8ab4f8; }
.page-tag {
    display: inline-block; background: var(--bg-3); border: 1px solid var(--border);
    font-size: 10px; color: var(--text-muted); padding: .1rem .45rem;
    border-radius: 3px; margin: 1px 2px 1px 0;
}

/* ---- Referrer analytics ---- */
.ref-chart-wrap {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.2rem 1.4rem;
    margin-bottom: .5rem;
}
.ref-bar-bg {
    background: var(--bg-3); border-radius: 2px;
    height: 6px; overflow: hidden;
}
.ref-bar-fill {
    height: 100%; background: var(--gold);
    border-radius: 2px; transition: width .4s ease;
    min-width: 2px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    tabindex: -1;
}