/* ==============================
   CSS VARIABLES
============================== */
:root {
    --bg:         #111010;
    --surface:    #1c1b19;
    --surface2:   #252420;
    --border:     #2e2c28;
    --border2:    #3d3a35;
    --copper:     #da7756;
    --copper-dim: #b85f40;
    --copper-glow:#da775630;
    --copper-pale:#da775615;
    --text:       #e8e3db;
    --text-dim:   #8a8680;
    --text-muted: #524f4a;
}

/* ==============================
   RESET & BASE
============================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    line-height: 1.7;
    overflow-x: hidden;
    cursor: none;
}

/* ==============================
   CUSTOM CURSOR
============================== */
#cursor {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--copper);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10002;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, opacity 0.2s ease;
    mix-blend-mode: normal;
}

#cursor-ring {
    position: fixed;
    width: 36px;
    height: 36px;
    border: 1px solid var(--copper);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    opacity: 0.4;
}

body:hover #cursor { opacity: 1; }

/* ==============================
   NOISE TEXTURE OVERLAY
============================== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9990;
    opacity: 0.4;
}

/* ==============================
   SCROLLBAR
============================== */
::-webkit-scrollbar { width: 4px; background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--copper); }

/* ==============================
   NAVIGATION
============================== */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 48px;
    background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-mark {
    width: 28px;
    height: 28px;
    background: var(--copper);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08) rotate(3deg); }
}

.nav-logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
}

.nav-logo-text span { color: var(--copper); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dim);
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s ease;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0;
    width: 0; height: 1px;
    background: var(--copper);
    transition: width 0.3s ease;
}

.nav-links a:hover { color: var(--copper); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    background: var(--copper) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    transition: background 0.2s ease, transform 0.2s ease !important;
}

.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--copper-dim) !important; transform: translateY(-1px) !important; }

/* ==============================
   HERO
============================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 48px 80px;
    position: relative;
    overflow: hidden;
}

/* Radial glow behind hero */
.hero::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 700px; height: 700px;
    background: radial-gradient(circle, var(--copper-pale) 0%, transparent 70%);
    pointer-events: none;
    animation: heroGlow 6s ease-in-out infinite alternate;
}

@keyframes heroGlow {
    from { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    to   { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

/* Grid lines background */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.3;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-eyebrow {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 24px;
    position: relative;
    animation: fadeUp 0.8s ease both;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
    content: '—';
    margin: 0 10px;
    color: var(--text-muted);
}

.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(56px, 8vw, 100px);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -2px;
    color: var(--text);
    position: relative;
    animation: fadeUp 0.8s 0.1s ease both;
}

.hero-title .accent { color: var(--copper); font-style: italic; }

.hero-subtitle {
    max-width: 480px;
    color: var(--text-dim);
    margin: 24px auto 0;
    font-size: 13px;
    line-height: 1.8;
    position: relative;
    animation: fadeUp 0.8s 0.2s ease both;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    position: relative;
    animation: fadeUp 0.8s 0.3s ease both;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--copper);
    color: #fff;
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    background: var(--copper-dim);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--copper-glow);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--text-dim);
    padding: 14px 28px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--border2);
    transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn-secondary:hover {
    color: var(--copper);
    border-color: var(--copper);
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 64px;
    position: relative;
    animation: fadeUp 0.8s 0.4s ease both;
}

.stat {
    text-align: center;
}

.stat-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--copper);
    display: block;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ==============================
   SECTION BASE
============================== */
section {
    padding: 100px 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-label {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--copper);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-label::after {
    content: '';
    flex: 1;
    max-width: 48px;
    height: 1px;
    background: var(--copper);
    opacity: 0.4;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(32px, 4vw, 52px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.section-desc {
    color: var(--text-dim);
    max-width: 480px;
    margin-bottom: 56px;
    font-size: 13px;
}

/* ==============================
   THEMES GRID
============================== */
#themes { border-top: 1px solid var(--border); }

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
}

.theme-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    animation: fadeUp 0.6s ease both;
}

.theme-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px #00000060, 0 0 0 1px var(--copper);
    border-color: var(--copper);
}

.theme-preview {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

/* Copper UI preview */
.preview-copper {
    background: #1a1915;
    display: flex;
    flex-direction: column;
}

.preview-bar {
    height: 36px;
    background: #242320;
    border-bottom: 1px solid #3a3835;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
}

.preview-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}

.preview-search {
    flex: 1;
    height: 20px;
    background: #1a1915;
    border: 1px solid #3a3835;
    border-radius: 99px;
    margin: 0 8px;
}

.preview-btn {
    width: 48px; height: 20px;
    background: #da7756;
    border-radius: 4px;
}

.preview-body {
    flex: 1;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.preview-card {
    background: #242320;
    border-radius: 6px;
    border: 1px solid #3a3835;
}

.preview-card-thumb {
    height: 50px;
    background: #2e2c29;
    border-radius: 6px 6px 0 0;
}

.preview-card-bar {
    height: 8px;
    background: #3a3835;
    margin: 6px;
    border-radius: 4px;
}

.preview-card-bar.short {
    width: 60%;
    background: #2e2c29;
}

/* Coming soon preview */
.preview-coming {
    background: #111010;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
}

.preview-coming-icon {
    font-size: 32px;
    opacity: 0.3;
}

.preview-coming-text {
    font-size: 11px;
    color: #524f4a;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.theme-info {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.theme-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.theme-desc {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 16px;
    line-height: 1.6;
}

.theme-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    font-size: 10px;
    padding: 3px 10px;
    border: 1px solid var(--border2);
    border-radius: 99px;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tag.active { border-color: var(--copper); color: var(--copper); }

.theme-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theme-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--copper);
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    border: none;
    cursor: none;
}

.download-btn:hover {
    background: var(--copper-dim);
    transform: scale(1.04);
    box-shadow: 0 4px 20px var(--copper-glow);
}

.download-btn.disabled {
    background: var(--surface2);
    color: var(--text-muted);
    cursor: not-allowed;
    pointer-events: none;
}

/* ==============================
   HOW IT WORKS
============================== */
#how { border-top: 1px solid var(--border); }

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.step {
    background: var(--surface);
    padding: 32px;
    position: relative;
    transition: background 0.2s;
}

.step:hover { background: var(--surface2); }

.step-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 64px;
    font-weight: 700;
    color: var(--copper);
    opacity: 0.15;
    position: absolute;
    top: 16px; right: 20px;
    line-height: 1;
}

.step-icon {
    font-size: 24px;
    margin-bottom: 16px;
    display: block;
}

.step-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.step-desc {
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.7;
}

/* ==============================
   CONTACT
============================== */
#contact { border-top: 1px solid var(--border); }

.contact-grid {
    display: block;
    max-width: 480px;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 32px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 12px;
    transition: border-color 0.2s, color 0.2s, transform 0.2s, background 0.2s;
}

.contact-link:hover {
    border-color: var(--copper);
    color: var(--copper);
    background: var(--surface2);
    transform: translateX(4px);
}

.contact-link-icon {
    width: 36px; height: 36px;
    background: var(--surface2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: background 0.2s;
}

.contact-link:hover .contact-link-icon {
    background: var(--copper-glow);
}



/* ==============================
   FOOTER
============================== */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.5px;
}

footer a {
    color: var(--copper);
    text-decoration: none;
}

footer a:hover { text-decoration: underline; }

/* ==============================
   ANIMATIONS
============================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.theme-card:nth-child(1) { animation-delay: 0.1s; }
.theme-card:nth-child(2) { animation-delay: 0.2s; }
.theme-card:nth-child(3) { animation-delay: 0.3s; }

/* ==============================
   TOAST
============================== */
#toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--surface2);
    border: 1px solid var(--copper);
    color: var(--text);
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 12px;
    z-index: 9997;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
}

#toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 768px) {
    nav { padding: 16px 24px; }
    .nav-links { display: none; }
    section { padding: 60px 24px; }
    .hero { padding: 100px 24px 60px; }
    .hero-stats { gap: 24px; }
    .contact-grid { grid-template-columns: 1fr; }
    footer { flex-direction: column; gap: 12px; text-align: center; }
}

/* ==============================
   LIGHTBOX (FINAL)
============================== */

#lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(14px);

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 24px 20px;
    gap: 20px;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;

    overflow-y: auto;
}

#lightbox.open {
    opacity: 1;
    pointer-events: all;
}

/* header */
.lightbox-header {
    position: sticky;
    top: 0;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: min(1100px, 95vw);

    padding: 12px 0;

    background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
    backdrop-filter: blur(10px);
}

/* images stack */
.lightbox-images {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: min(1100px, 92vw);
}

/* image wrap */
.lightbox-img-wrap {
    position: relative;
    width: 100%;
    max-height: 55vh; /* 🔥 tuned */
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: all 0.25s ease;
}

.lightbox-img-wrap:hover {
    border-color: var(--copper);
    transform: scale(1.01);
}

/* glow */
.lightbox-img-wrap::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--copper-pale), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-img-wrap:hover::before {
    opacity: 1;
}

/* image */
.lightbox-img-wrap img {
    width: 100%;
    height: auto;
    max-height: 55vh;
    object-fit: contain;
    display: block;

    filter: blur(20px);
    transform: scale(1.05);
    opacity: 0.6;
    transition: all 0.5s ease;
}

/* loaded state */
.lightbox-img-wrap img.loaded {
    filter: blur(0);
    transform: scale(1);
    opacity: 1;
}

/* placeholder */
.lightbox-img-wrap .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.lightbox-img-wrap .img-placeholder span {
    font-size: 24px;
    color: var(--border2);
}

.lightbox-hint {
    font-size: 11px;
    color: var(--text-muted);
    letter-spacing: 1px;
}

/* ✅ real mobile tweak */
@media (max-width: 600px) {
    .lightbox-img-wrap {
        max-height: 45vh;
    }

    .lightbox-img-wrap img {
        max-height: 45vh;
    }
}

/* ==============================
   ORNAMENT DIVIDER
============================== */
.ornament-divider {
    display: flex;
    align-items: center;
    padding: 0 48px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    height: 48px;
    gap: 0;
}

.ornament-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to var(--dir, right), transparent, var(--border2));
}

.ornament-line:last-child {
    --dir: left;
}

.ornament-center {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 24px;
    flex-shrink: 0;
}

.orn-tag {
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.orn-dot {
    color: var(--copper);
    font-size: 7px;
    opacity: 0.7;
}

.orn-diamond {
    color: var(--copper);
    font-size: 9px;
    opacity: 0.5;
}

.orn-dash {
    color: var(--border2);
    font-size: 10px;
    letter-spacing: -2px;
    opacity: 0.6;
}

/* ==============================
   COPY URL
============================== */
.copy-url {
    color: var(--copper);
    cursor: none;
    border-bottom: 1px dashed var(--copper);
    padding-bottom: 1px;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.copy-url::after {
    content: 'click to copy';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text-muted);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.copy-url:hover::after { opacity: 1; }

/* ==============================
   LIGHTBOX CLOSE BUTTON
============================== */
.lightbox-close {
    position: sticky;
    top: 16px;
    align-self: flex-end;
    background: var(--surface2);
    border: 1px solid var(--border2);
    color: var(--text-dim);
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 14px;
    cursor: none;
    z-index: 2;
    transition: border-color 0.2s, color 0.2s, transform 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -52px; /* overlap without pushing content */
}

.lightbox-close:hover {
    border-color: var(--copper);
    color: var(--copper);
    transform: rotate(90deg);
}

