/* ================================================================
   STC Singularities Portal — Stylesheet
   Gold on dark — matches String Theory Cartoons brand
================================================================ */

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

:root {
    --stc-bg:          #0a0a0b;
    --stc-surface:     #111113;
    --stc-border:      rgba(201,162,39,0.2);
    --stc-border-mid:  rgba(201,162,39,0.4);
    --stc-gold:        #c9a227;
    --stc-gold-bright: #e8b800;
    --stc-cream:       #ffffff;
    --stc-white:       #ffffff;
    --stc-secondary:   #ffffff;
    --stc-muted:       rgba(255,255,255,0.7);
    --stc-dim:         rgba(255,255,255,0.45);
    --stc-serif:       'Cinzel', 'IM Fell English', Georgia, 'Times New Roman', serif;
    --stc-body:        'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

html, body {
    height: 100%;
    background: var(--stc-bg);
    color: var(--stc-white);
    font-family: var(--stc-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* subtle grain texture */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

/* ---- PAGE LAYOUT ---- */
.stc-page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

/* ---- HEADER ---- */
.stc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 36px;
    border-bottom: 0.5px solid var(--stc-border);
    position: relative;
    z-index: 10;
    flex-wrap: wrap;
    gap: 12px;
}

.stc-brand {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-decoration: none;
}

.stc-brand-name {
    font-family: var(--stc-serif);
    font-size: 14px;
    letter-spacing: 0.03em;
    color: var(--stc-gold);
    transition: color 0.2s;
}
.stc-brand:hover .stc-brand-name { color: var(--stc-gold-bright); }

.stc-brand-sub {
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--stc-dim);
    font-style: italic;
}

.stc-nav {
    display: flex;
    gap: 28px;
    align-items: center;
}

.stc-nav a {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--stc-dim);
    text-decoration: none;
    transition: color 0.2s;
    font-family: var(--stc-body);
}
.stc-nav a:hover   { color: var(--stc-muted); }
.stc-nav a.active  {
    color: var(--stc-gold);
    border-bottom: 0.5px solid rgba(211,176,97,0.6);
    padding-bottom: 2px;
}

.stc-issue {
    font-size: 9px;
    letter-spacing: 0.12em;
    color: var(--stc-dim);
    font-style: italic;
    font-family: var(--stc-serif);
}

/* ---- MAIN STAGE ---- */
.stc-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 24px;
    position: relative;
}

/* soft glow behind cartoon */
.stc-main::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 640px;
    height: 480px;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.022) 0%, transparent 68%);
    pointer-events: none;
}

/* ---- PORTAL DESCRIPTOR ---- */
.stc-descriptor {
    text-align: center;
    padding: 0 24px 32px;
    position: relative;
    z-index: 2;
}

.stc-descriptor span {
    font-family: var(--stc-serif);
    font-style: italic;
    font-size: 13px;
    letter-spacing: 0.14em;
    color: var(--stc-muted);
    text-transform: none;
}

/* ---- LOADING / EMPTY STATES ---- */
.stc-loading,
.stc-empty {
    text-align: center;
    padding: 60px 24px;
}

.stc-loading span,
.stc-empty-title {
    font-family: var(--stc-serif);
    font-style: italic;
    font-size: 18px;
    color: var(--stc-gold);
    letter-spacing: 0.04em;
}

.stc-empty-sub {
    font-size: 13px;
    color: var(--stc-dim);
    margin-top: 10px;
    letter-spacing: 0.06em;
}

/* loading pulse */
.stc-loading span {
    animation: stc-pulse 2s ease-in-out infinite;
}
@keyframes stc-pulse {
    0%, 100% { opacity: 0.4; }
    50%       { opacity: 0.9; }
}

/* ---- CAROUSEL ---- */
.stc-carousel {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* slides wrapper */
.stc-slides {
    width: 100%;
    position: relative;
    min-height: 200px;
    touch-action: pan-y;
}

/* each slide */
.stc-slide {
    display: none;
    animation: stc-fade-in 0.45s ease;
}
.stc-slide.active { display: block; }

@keyframes stc-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* the cartoon image itself */
.stc-cartoon-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    /* subtle white border to lift art off dark bg */
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

/* ---- CAPTION ---- */
.stc-caption-area {
    margin-top: 22px;
    text-align: center;
    width: 100%;
}

.stc-cap-number {
    font-size: 9px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--stc-muted);
    margin-bottom: 6px;
}

.stc-cap-title {
    font-family: var(--stc-serif);
    font-style: italic;
    font-size: 18px;
    color: var(--stc-gold);
    line-height: 1.35;
    letter-spacing: 0.02em;
}

.stc-cap-sub {
    font-size: 12px;
    color: var(--stc-dim);
    margin-top: 7px;
    font-style: italic;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.55;
}

/* ---- NAVIGATION CONTROLS ---- */
.stc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.stc-nav-btn {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: transparent;
    border: 2px solid #c9a227;
    text-shadow: none;
}
.stc-nav-btn:hover {
    background: rgba(201,162,39,0.15);
    border-color: #e8b800;
    color: #ffffff;
    transform: translateY(-1px);
}
.stc-nav-btn:active { transform: scale(0.97); }
.stc-nav-btn svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* dots */
.stc-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 200px;
}
.stc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(245,234,214,0.25);
    border: 1.5px solid rgba(245,234,214,0.5);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}
.stc-dot.active {
    background: #f5ead6;
    border-color: #f5ead6;
}
.stc-dot:hover { background: rgba(245,234,214,0.6); }

/* counter */
.stc-counter {
    margin-top: 14px;
    font-size: 9px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(245,234,214,0.5);
    text-align: center;
}

/* ---- FOOTER ---- */
.stc-footer {
    border-top: 0.5px solid var(--stc-border);
    padding: 14px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.stc-footer-hint {
    font-size: 9px;
    letter-spacing: 0.1em;
    color: var(--stc-dim);
    font-style: italic;
}

.stc-footer-actions {
    display: flex;
    gap: 12px;
}

.stc-footer-btn {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #0a0a0b;
    padding: 9px 20px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s ease;
    white-space: nowrap;
    background: transparent;
    border: 2px solid #c9a227;
    color: #ffffff;
}
.stc-footer-btn::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0,0,0,0.4);
    flex-shrink: 0;
}
.stc-footer-btn:hover {
    background: #e8b800;
    border-color: #e8b800;
    transform: translateY(-1px);
}
.stc-footer-btn:active { transform: scale(0.97); }

.stc-footer-copy {
    font-size: 9px;
    color: var(--stc-dim);
    letter-spacing: 0.06em;
    font-style: italic;
}


/* ---- TOAST NOTIFICATION ---- */
.stc-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(12px);
    background: rgba(20,20,22,0.9);
    border: 0.5px solid var(--stc-border-mid);
    color: var(--stc-secondary);
    font-family: var(--stc-serif);
    font-style: italic;
    font-size: 13px;
    letter-spacing: 0.06em;
    padding: 11px 26px;
    border-radius: 30px;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 10000;
    white-space: nowrap;
}
.stc-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
    .stc-header { padding: 14px 18px; }
    .stc-nav    { gap: 16px; }
    .stc-issue  { display: none; }
    .stc-main   { padding: 28px 16px; }
    .stc-footer { padding: 12px 18px; }
    .stc-footer-hint { display: none; }
    .stc-nav-btn { padding: 8px 14px; font-size: 9px; }
    .stc-cap-title { font-size: 16px; }
}

@media (max-width: 400px) {
    .stc-nav { gap: 10px; }
    .stc-nav a { font-size: 9px; letter-spacing: 0.1em; }
}
