/* ============================================================
   GayOne — Dark Editorial Theme
   Charcoal magazine layout with Pride rainbow accents.
   ============================================================ */

:root {
    --bg: #14121a;
    --bg-deep: #0f0d14;
    --surface: #1d1a24;
    --surface-2: #241f2e;
    --text: #f2eef6;
    --muted: #a99fc0;
    --border: #2e2938;
    --border-soft: #272233;
    --rainbow: linear-gradient(90deg, #e40303 0%, #ff8c00 20%, #ffed00 40%, #008026 60%, #004dff 80%, #750787 100%);
    --rose: #f472b6;
    --violet: #a78bfa;
    --gold: #ffd166;
    --radius: 10px;
    --serif: Georgia, "Times New Roman", "Playfair Display", serif;
    --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
    --max: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    background:
        radial-gradient(ellipse 60% 40% at 85% -10%, rgba(167, 139, 250, .10) 0%, transparent 60%),
        radial-gradient(ellipse 50% 35% at 10% 0%, rgba(244, 114, 182, .08) 0%, transparent 55%),
        var(--bg);
    color: var(--text);
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

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

img { max-width: 100%; height: auto; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--violet); color: #14121a; padding: 10px 16px; z-index: 100; font-weight: 700; }
.skip-link:focus { left: 0; }

/* ---------- Masthead ---------- */

.site-header {
    background: rgba(20, 18, 26, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    position: sticky; top: 0; z-index: 50;
}
.header-inner { display: flex; align-items: center; gap: 30px; height: 74px; }
.rainbow-line { height: 3px; background: var(--rainbow); }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand-mark {
    font-family: var(--serif); font-size: 1.6rem; font-weight: 700; font-style: italic;
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 50%;
    background: var(--surface);
    box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 4px var(--violet);
}
.brand-dot {
    background: var(--rainbow);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    font-style: normal;
}
.brand-word {
    font-family: var(--serif); font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; color: var(--text);
}
.main-nav { display: flex; gap: 26px; margin-left: auto; }
.main-nav a {
    color: var(--muted); font-size: .82rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .12em;
}
.main-nav a:hover { color: var(--text); text-decoration: none; }
.header-actions { display: flex; gap: 10px; }

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

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: .88rem;
    border: 1px solid transparent; cursor: pointer; transition: .18s ease;
    line-height: 1.2; text-decoration: none; letter-spacing: .02em;
}
.btn:hover { text-decoration: none; }
.btn-lg { padding: 14px 28px; font-size: .98rem; }
.btn-block { width: 100%; }

.btn-rainbow {
    background: linear-gradient(90deg, #d81b60 0%, #9333ea 50%, #2563eb 100%);
    color: #fff; box-shadow: 0 4px 18px rgba(147, 51, 234, .35);
}
.btn-rainbow:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(147, 51, 234, .5); }

.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }

/* ---------- Cover (hero) ---------- */

.cover { padding: 88px 0 72px; border-bottom: 1px solid var(--border-soft); }
.cover-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.cover-issue {
    display: inline-block; font-size: .74rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .22em; color: var(--muted); border-left: 3px solid var(--rose);
    padding-left: 12px; margin-bottom: 22px;
}
.cover-title {
    font-family: var(--serif); font-size: 3.4rem; line-height: 1.08; font-weight: 700;
    letter-spacing: -.02em; margin: 0 0 20px;
}
.rainbow-text {
    background: var(--rainbow);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cover-lede { color: var(--muted); font-size: 1.14rem; max-width: 520px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.cover-story { display: block; text-decoration: none; }
.cover-story-inner {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 34px;
    position: relative;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cover-story-inner::before {
    content: ""; position: absolute; left: 34px; right: 34px; top: 0; height: 3px;
    background: var(--rainbow); border-radius: 0 0 3px 3px;
}
.cover-story:hover .cover-story-inner { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0, 0, 0, .45); border-color: #3d3550; text-decoration: none; }
.cover-story-kicker {
    font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .2em;
    color: var(--gold);
}
.cover-story-title {
    font-family: var(--serif); font-size: 1.7rem; line-height: 1.2; color: var(--text);
    margin: 14px 0 12px;
}
.cover-story-desc { color: var(--muted); font-size: .95rem; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cover-story-meta { color: var(--violet); font-size: .85rem; display: block; margin-bottom: 14px; }
.cover-story-cta { font-weight: 600; font-size: .92rem; color: var(--rose); }

/* ---------- Section scaffolding ---------- */

.section { padding: 68px 0; }
.section-reading { background: var(--bg-deep); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }

.kicker {
    display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .22em; color: var(--rose); margin-bottom: 10px;
}
.section-head { text-align: center; margin-bottom: 44px; }
.section-title {
    font-family: var(--serif); font-size: 2.3rem; font-weight: 700; letter-spacing: -.02em;
    margin: 0 0 10px;
}
.section-sub { color: var(--muted); max-width: 560px; margin: 0 auto; font-size: 1.02rem; }

/* ---------- Departments grid ---------- */

.dept-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.dept-card {
    position: relative; display: block; padding: 26px 22px 22px;
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius);
    color: var(--text); overflow: hidden; transition: transform .18s ease, border-color .18s ease;
}
.dept-card:hover { text-decoration: none; transform: translateY(-4px); border-color: #453c5e; }
.dept-card::after {
    content: ""; position: absolute; left: 22px; bottom: 0; height: 2px; width: 44px;
    background: var(--rainbow); opacity: 0; transition: opacity .18s ease;
}
.dept-card:hover::after { opacity: 1; }
.dept-num {
    position: absolute; top: 10px; right: 14px;
    font-family: var(--serif); font-size: 2.6rem; font-weight: 700; font-style: italic;
    color: rgba(167, 139, 250, .13); line-height: 1;
}
.dept-icon { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.dept-name { font-family: var(--serif); font-size: 1.18rem; margin: 0 0 6px; letter-spacing: -.01em; }
.dept-tag { color: var(--muted); font-size: .86rem; margin: 0; }

/* ---------- Story list (magazine TOC) ---------- */

.story-list { display: grid; gap: 2px; background: var(--border-soft); border: 1px solid var(--border-soft); border-radius: var(--radius); overflow: hidden; }
.story-row {
    display: grid; grid-template-columns: 64px 1fr 220px; gap: 22px; align-items: center;
    padding: 22px 26px; background: var(--bg); color: var(--text); transition: background .15s ease;
}
.story-row:hover { background: var(--surface); text-decoration: none; }
.story-index {
    font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.5rem;
    color: var(--violet); opacity: .85;
}
.story-title { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 6px; color: var(--text); }
.story-row:hover .story-title { color: var(--rose); }
.story-desc { color: var(--muted); font-size: .88rem; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-meta { display: grid; gap: 4px; font-size: .82rem; color: var(--muted); text-align: right; }
.story-cat { color: var(--gold); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 700; }
.story-rating { color: var(--rose); }

/* ---------- Feature cards ---------- */

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.feature-card {
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius);
    padding: 30px 26px; text-align: center;
}
.feature-glyph { font-size: 1.9rem; display: block; margin-bottom: 12px; }
.feature-card h3 { font-family: var(--serif); font-size: 1.2rem; margin: 0 0 8px; }
.feature-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Category hero + article ---------- */

.cat-hero { padding: 52px 0 8px; }
.cat-title { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 8px; }
.cat-tagline { color: var(--muted); font-size: 1.05rem; margin: 0; }

.breadcrumb { font-size: .85rem; color: var(--muted); margin: 26px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--rose); }

.article {
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px;
    padding: 44px 46px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.article-lede { font-family: var(--serif); font-size: 1.18rem; color: var(--text); }
.article-title { font-family: var(--serif); font-size: 2.4rem; line-height: 1.15; letter-spacing: -.02em; margin: 8px 0 16px; }
.article-heading {
    font-family: var(--serif); font-size: 1.55rem; letter-spacing: -.01em;
    margin: 38px 0 14px; padding-bottom: 10px; border-bottom: 2px solid var(--border-soft);
    position: relative;
}
.article-heading::before {
    content: ""; position: absolute; left: 0; bottom: -2px; width: 52px; height: 2px; background: var(--rainbow);
}
.article p { color: #d8d2e4; margin: 0 0 16px; }
.article ul, .article ol { margin: 0 0 16px; padding-left: 24px; color: #d8d2e4; }
.article li { margin-bottom: 9px; }
.article a { color: var(--rose); }

.guide-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 28px; }
.meta-chip {
    font-size: .78rem; font-weight: 600; padding: 4px 12px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--border); color: var(--muted);
}
.meta-chip:first-child { color: var(--gold); }

/* ---------- Sidebar shelf ---------- */

.shelf {
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: 14px;
    padding: 26px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.shelf-title { font-family: var(--serif); font-size: 1.3rem; margin: 0 0 4px; }
.shelf-sub { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 16px; }
.shelf-list { display: grid; gap: 2px; max-height: 560px; overflow-y: auto; padding-right: 4px; }
.shelf-item { display: block; padding: 12px 10px; border-radius: 8px; border-bottom: 1px solid var(--border-soft); }
.shelf-item:hover { background: var(--surface-2); text-decoration: none; }
.shelf-name { display: block; color: var(--text); font-size: .92rem; font-weight: 600; margin-bottom: 3px; }
.shelf-item:hover .shelf-name { color: var(--rose); }
.shelf-meta { display: block; color: var(--muted); font-size: .78rem; }

/* ---------- Videos ---------- */

.video-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.video-card {
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius);
    overflow: hidden; transition: transform .18s ease, border-color .18s ease;
}
.video-card:hover { transform: translateY(-4px); border-color: #453c5e; }
.video-card img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.video-body { padding: 18px 20px 22px; }
.video-kicker { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); }
.video-body h3 { font-family: var(--serif); font-size: 1.15rem; margin: 8px 0 6px; }
.video-body h3 a { color: var(--text); }
.video-body h3 a:hover { color: var(--rose); text-decoration: none; }
.video-title { color: var(--muted); font-size: .86rem; margin: 0; }

/* ---------- FAQ ---------- */

.faq-item { border-bottom: 1px solid var(--border-soft); padding: 18px 0; }
.faq-item h3 { font-family: var(--serif); font-size: 1.1rem; margin: 0 0 8px; color: var(--text); }
.faq-item h3::before { content: "Q. "; color: var(--rose); }
.faq-item p { color: var(--muted); margin: 0; }

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

.form-card {
    max-width: 460px; margin: 0 auto; background: var(--surface);
    border: 1px solid var(--border); border-radius: 16px; padding: 38px 36px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .45);
}
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 7px; font-size: .86rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.form-group input {
    width: 100%; padding: 13px 15px; border: 1px solid var(--border); border-radius: 10px;
    font-size: .95rem; background: var(--bg-deep); color: var(--text); font-family: inherit;
}
.form-group input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px rgba(167, 139, 250, .18); }
.form-note { text-align: center; color: var(--muted); font-size: .88rem; margin-top: 18px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 18px; font-size: .9rem; }
.alert-error { background: rgba(225, 29, 72, .12); color: #fda4af; border: 1px solid rgba(225, 29, 72, .35); }
.alert-success { background: rgba(74, 222, 128, .1); color: #86efac; border: 1px solid rgba(74, 222, 128, .3); }

/* ---------- Footer ---------- */

.site-footer { background: var(--bg-deep); margin-top: 72px; padding: 60px 0 26px; border-top: 3px solid transparent; border-image: var(--rainbow) 1; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.footer-brand { margin-bottom: 14px; }
.footer-tagline { color: var(--muted); font-size: .92rem; max-width: 300px; }
.footer-title {
    font-family: var(--serif); color: var(--text); font-size: 1.05rem; margin: 0 0 14px;
    padding-bottom: 8px; border-bottom: 2px solid var(--border-soft); display: inline-block;
}
.footer-col a { display: block; color: var(--muted); padding: 4px 0; font-size: .9rem; }
.footer-col a:hover { color: var(--rose); }
.footer-bottom {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
    border-top: 1px solid var(--border-soft); margin-top: 44px; padding-top: 22px;
    color: var(--muted); font-size: .84rem;
}
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--rose); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
    .cover-grid { grid-template-columns: 1fr; gap: 40px; }
    .container[style*="grid-template-columns: 2fr"] { grid-template-columns: 1fr !important; }
    .story-row { grid-template-columns: 48px 1fr; }
    .story-meta { grid-column: 2; text-align: left; display: flex; gap: 14px; flex-wrap: wrap; }
}

@media (max-width: 768px) {
    .grid-3 { grid-template-columns: 1fr; }
    .cover-title { font-size: 2.3rem; }
    .cat-title { font-size: 2rem; }
    .main-nav { display: none; }
    .header-inner { gap: 14px; }
    .article { padding: 28px 22px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}