/* =========================================================
   baku.best — Dizayn sistemi v4
   Konsept: "Nar" — açıq, işıqlı, premium.
   İvuar fon, dərin nar-qırmızısı aksent, yüksək-kontrast
   editorial serif başlıqlar. Mobil-öncə qurulub.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,wght@0,400..600;1,400..600&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
    color-scheme: light;

    --bg:           #EDEAE0;
    --surface:      #FFFFFF;
    --surface-2:    #E2DECC;
    --line:         #D6D0BC;
    --line-strong:  #B7AC8C;

    --ink:          #12161D;
    --ink-dim:      #5A6270;
    --ink-faint:    #8A91A0;

    --garnet:       #0F5C48;
    --garnet-dark:  #0A4234;
    --garnet-tint:  #DCEAE3;

    --gold:         #B08A2E;
    --gold-tint:    #F2E7C9;

    --teal:         #1D3A5F;
    --teal-tint:    #E1E7EF;

    --success:      #3F7A4C;
    --danger:       #9C3B32;

    --font-display: 'Bodoni Moda', serif;
    --font-body:    'Work Sans', sans-serif;

    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 999px;
    --shadow-sm: 0 1px 3px rgba(28,22,17,0.09), 0 1px 2px rgba(28,22,17,0.06);
    --shadow-md: 0 8px 24px rgba(28,22,17,0.1), 0 2px 6px rgba(28,22,17,0.07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background:
        radial-gradient(ellipse 900px 420px at 50% -8%, rgba(15,92,72,0.08), transparent 60%),
        radial-gradient(ellipse 700px 380px at 100% 0%, rgba(176,138,46,0.07), transparent 55%),
        var(--bg);
    color: var(--ink);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    font-size: 16px;
    border-top: 3px solid;
    border-image: linear-gradient(90deg, var(--garnet), var(--gold), var(--garnet)) 1;
}

a {
    color: var(--ink);
    text-decoration: underline;
    text-decoration-color: var(--line-strong);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { color: var(--garnet); text-decoration-color: var(--garnet); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    margin: 0 0 .5em;
    color: var(--ink);
    letter-spacing: -0.01em;
}

:focus-visible { outline: 2px solid var(--garnet); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: 440px; margin: 0 auto; padding: 0 20px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--font-body); font-size: 0.74rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--garnet);
    margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 22px; height: 2px; background: var(--gold); display: inline-block; border-radius: 1px; }

/* ---------- Header ---------- */

.site-header {
    border-bottom: 1px solid var(--line);
    padding: 18px 0;
    background: var(--surface);
    position: sticky; top: 0; z-index: 20;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; row-gap: 12px; }

.brand {
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--ink);
    display: flex; align-items: center; gap: 8px;
    text-decoration: none;
}
.brand span { color: var(--garnet); }
.brand-mark { width: 26px; height: 26px; flex-shrink: 0; }
@media (max-width: 640px) { .brand-mark { width: 22px; height: 22px; } }

.nav-links { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav-links a {
    color: var(--ink-dim); font-size: 0.86rem; font-weight: 500;
    text-decoration: none;
}
.nav-links a:hover { color: var(--garnet); }

@media (max-width: 640px) {
    .site-header { padding: 14px 0; }
    .nav-links { width: 100%; justify-content: space-between; gap: 10px 16px; }
    .nav-links a { font-size: 0.8rem; }
    .brand { font-size: 1.32rem; }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 26px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all .16s ease;
    text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn--primary { background: linear-gradient(135deg, var(--garnet), var(--garnet-dark)); color: #FDFBF4; border-color: var(--gold); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: linear-gradient(135deg, var(--garnet-dark), var(--garnet-dark)); border-color: var(--gold); color: #FDFBF4; }

.btn--outline { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--outline:hover { border-color: var(--garnet); color: var(--garnet); }

.btn--caspian { background: var(--teal); border-color: var(--teal); color: #FFF; }
.btn--caspian:hover { filter: brightness(1.1); color: #FFF; }

.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: rgba(166,57,46,0.08); color: var(--danger); }

.nav-links a.btn--primary, .nav-links a.btn--primary:hover { color: #FFF; }
.nav-links a.btn--outline { color: var(--ink); }
.nav-links a.btn--outline:hover { color: var(--garnet); }

.btn--sm { padding: 9px 16px; font-size: 0.78rem; }
.btn--block { width: 100%; }

/* ---------- Cards ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-top: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-md);
    transition: box-shadow .2s ease, transform .2s ease;
}
.card + .card { margin-top: 16px; }

/* ---------- Forms ---------- */

.form-group { margin-bottom: 18px; }
.form-label {
    display: block; margin-bottom: 7px;
    font-size: 0.76rem; font-weight: 600; color: var(--ink-dim);
    text-transform: uppercase; letter-spacing: 0.06em;
}
.form-input, .form-select, textarea.form-input {
    width: 100%; padding: 12px 14px;
    background: var(--surface);
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color .15s ease;
}
.form-input:focus, .form-select:focus, textarea.form-input:focus {
    outline: none; border-color: var(--garnet);
}
.form-input:-webkit-autofill,
.form-input:-webkit-autofill:hover,
.form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px var(--surface) inset;
    transition: background-color 9999s ease-in-out 0s;
}
.form-hint { font-size: 0.8rem; color: var(--ink-dim); margin-top: 6px; }

/* ---------- Alerts ---------- */

.alert { padding: 13px 17px; border-radius: var(--radius); margin-bottom: 18px; font-size: 0.9rem; border: 1px solid; border-left-width: 3px; }
.alert--error { background: var(--garnet-tint); border-color: var(--danger); color: #6B241C; }
.alert--success { background: #EAF3EC; border-color: var(--success); color: #2C5A36; }
.alert--info { background: var(--teal-tint); border-color: var(--teal); color: #1E4A4C; }

/* ---------- Badges ---------- */

.badge { display: inline-block; padding: 4px 11px; border-radius: var(--radius-full); font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.badge--free { background: var(--teal-tint); color: var(--teal); }
.badge--premium { background: var(--gold-tint); color: var(--gold); }
.badge--active { background: #EAF3EC; color: var(--success); }
.badge--inactive { background: var(--surface-2); color: var(--ink-dim); }
.badge--expired { background: var(--garnet-tint); color: var(--danger); }
.badge--open { background: var(--teal-tint); color: var(--teal); }
.badge--answered { background: #EAF3EC; color: var(--success); }
.badge--closed { background: var(--surface-2); color: var(--ink-dim); }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th { text-align: left; padding: 11px 13px; color: var(--ink-dim); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; border-bottom: 2px solid var(--line); }
.data-table td { padding: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
.data-table a { text-decoration: none; }

/* ---------- Link list (dashboard) — premium, mobile-first ---------- */

.link-list { display: flex; flex-direction: column; }
.link-entry { padding: 18px 0; border-bottom: 1px solid var(--line); }
.link-entry:first-child { padding-top: 2px; }
.link-entry:last-child { border-bottom: none; padding-bottom: 2px; }

.link-entry-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.link-entry-url { font-size: 0.96rem; color: var(--garnet); word-break: break-all; font-weight: 600; text-decoration: none; }
.link-entry-url:hover { color: var(--garnet-dark); }
.link-entry-badges { display: flex; gap: 8px; flex-wrap: wrap; flex-shrink: 0; }

.link-entry-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link-entry-stats { display: flex; gap: 16px; color: var(--ink-dim); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.link-entry-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 480px) {
    .link-entry-url { font-size: 0.88rem; }
    .link-entry-actions { width: 100%; }
    .link-entry-actions .btn { flex: 1; }
}

/* ---------- Stat grid ---------- */

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-box { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: var(--radius-lg); padding: 22px 20px; box-shadow: var(--shadow-sm); }
.stat-box .stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 500; color: var(--garnet); font-style: italic; }
.stat-box .stat-label { font-size: 0.72rem; color: var(--ink-dim); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 5px; }

/* =========================================================
   HERO — açıq, editorial, mobil-öncə
   ========================================================= */

.hero {
    position: relative;
    padding: 64px 0 50px;
    text-align: center;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--line);
}
.hero .container { max-width: 720px; }
.hero .eyebrow { justify-content: center; }
.hero h1 {
    font-size: clamp(2.1rem, 6vw, 3.4rem);
    line-height: 1.12;
    margin-bottom: 0.4em;
    font-weight: 500;
}
.hero h1 .accent { color: var(--garnet); font-style: italic; }
.hero p.lead { font-size: 1.05rem; color: var(--ink-dim); max-width: 480px; margin: 0 auto 30px; line-height: 1.7; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 480px) {
    .hero { padding: 44px 0 36px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
}

.ornament-divider {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin: 36px auto 0; max-width: 200px; opacity: 0.55;
}
.ornament-divider span { width: 6px; height: 6px; background: var(--gold); transform: rotate(45deg); }
.ornament-divider .line { flex: 1; height: 1px; background: var(--line-strong); }

.hero-skyline { margin: 34px auto 0; max-width: 460px; }
.hero-skyline svg { width: 100%; height: auto; display: block; }
.hero-skyline .tower-glow { animation: towerFlicker 5s ease-in-out infinite; transform-origin: center bottom; }
.hero-skyline .tower-glow.t2 { animation-delay: -1.6s; animation-duration: 6.2s; }
.hero-skyline .tower-glow.t3 { animation-delay: -3.1s; animation-duration: 4.5s; }
@keyframes towerFlicker { 0%, 100% { opacity: 0.7; } 50% { opacity: 1; } }
@media (max-width: 480px) { .hero-skyline { max-width: 320px; } }

/* ---------- Dashboard layout ---------- */

.dash-layout { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 32px 0 60px; }
@media (max-width: 780px) { .dash-layout { grid-template-columns: 1fr; gap: 16px; } }
.dash-sidebar { display: flex; flex-direction: column; gap: 2px; }
@media (max-width: 780px) { .dash-sidebar { flex-direction: row; flex-wrap: wrap; gap: 8px; } }
.dash-sidebar a {
    padding: 11px 15px; border-radius: var(--radius); color: var(--ink-dim);
    font-size: 0.88rem; font-weight: 500;
    text-decoration: none;
}
.dash-sidebar a:hover { background: var(--surface-2); color: var(--ink); }
.dash-sidebar a.active { background: var(--garnet-tint); color: var(--garnet); font-weight: 600; }

.page-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }

.text-dim { color: var(--ink-dim); }
.text-small { font-size: 0.85rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.empty-state { text-align: center; padding: 50px 20px; color: var(--ink-dim); }

footer.site-footer {
    border-top: 1px solid var(--line);
    padding: 28px 0;
    margin-top: 60px;
    color: var(--ink-faint);
    font-size: 0.82rem;
    text-align: center;
    background: var(--surface-2);
}
footer.site-footer a { color: var(--ink-dim); font-weight: 500; text-decoration: none; }
footer.site-footer a:hover { color: var(--garnet); }

code, .mono { font-family: 'IBM Plex Mono', monospace; }
code { background: var(--surface-2); padding: 2px 7px; border-radius: 4px; font-size: 0.88em; color: var(--garnet-dark); }

