/* ==========================================================================
   Duke Skygawker — site styles
   A night-sky palette: deep indigo, silver starlight, and red-light accents.
   ========================================================================== */

:root {
    --night: #04060e;
    --night-2: #080d1c;
    --night-3: #0e1430;
    --paper: #eef1fb;
    --paper-dim: #c3cbe4;
    --muted: #8b96b8;
    --red: #ff3b47;
    --red-deep: #c1121f;
    --red-soft: #ff7a83;
    --gold: #f2c14e;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.18);
    --card: rgba(16, 22, 45, 0.72);
    --card-hover: rgba(24, 32, 62, 0.9);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    --radius: 18px;
    --radius-sm: 12px;
    --serif: 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --container: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--sans);
    font-weight: 300;
    color: var(--paper);
    line-height: 1.7;
    background:
        radial-gradient(1200px 700px at 80% -10%, rgba(72, 96, 200, 0.22), transparent 60%),
        radial-gradient(900px 600px at 10% 110%, rgba(193, 18, 31, 0.12), transparent 55%),
        linear-gradient(180deg, var(--night) 0%, var(--night-2) 45%, var(--night) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--paper); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--red-soft); }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.01em;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1rem; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.4rem;
}

.eyebrow {
    font-family: var(--sans);
    text-transform: uppercase;
    letter-spacing: 0.34em;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--red-soft);
    margin-bottom: 1rem;
}

.lede { font-size: 1.15rem; color: var(--paper-dim); }

.text-center { text-align: center; }
.muted { color: var(--muted); }

/* ------------------------------- starfield ------------------------------ */
.starfield {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.stars {
    position: absolute;
    inset: -50%;
    background-repeat: repeat;
}
.stars--sm {
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 150px 80px, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 260px 200px, rgba(255,255,255,0.85), transparent),
        radial-gradient(1px 1px at 90px 240px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 340px 120px, rgba(255,255,255,0.75), transparent);
    background-size: 400px 400px;
    animation: twinkle 7s ease-in-out infinite alternate;
}
.stars--md {
    background-image:
        radial-gradient(1.5px 1.5px at 60px 160px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 280px 60px, rgba(255,255,255,0.65), transparent),
        radial-gradient(1.5px 1.5px at 420px 300px, rgba(255,255,255,0.75), transparent),
        radial-gradient(1.5px 1.5px at 200px 360px, rgba(255,255,255,0.5), transparent);
    background-size: 600px 600px;
    animation: twinkle 11s ease-in-out infinite alternate-reverse;
}
.stars--lg {
    background-image:
        radial-gradient(2px 2px at 100px 100px, rgba(255,255,255,0.95), transparent),
        radial-gradient(2px 2px at 700px 400px, rgba(255,255,255,0.8), transparent),
        radial-gradient(2px 2px at 450px 700px, rgba(255,255,255,0.7), transparent);
    background-size: 900px 900px;
    animation: twinkle 15s ease-in-out infinite alternate;
}
@keyframes twinkle {
    from { opacity: 0.55; }
    to { opacity: 1; }
}

/* -------------------------------- header -------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(14px);
    background: rgba(4, 6, 14, 0.72);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 78px;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-mark { color: var(--red); font-size: 1.5rem; line-height: 1; text-shadow: 0 0 18px rgba(255,59,71,0.8); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--serif); font-size: 1.4rem; font-weight: 600; letter-spacing: 0.02em; }
.brand-tag { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.brand:hover { color: var(--paper); }

.site-nav { display: flex; align-items: center; gap: 1.6rem; }
.site-nav a {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--paper-dim);
    position: relative;
    padding: 0.25rem 0;
}
.site-nav a::after {
    content: '';
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 1px;
    background: var(--red);
    transition: width 0.25s ease;
}
.site-nav a:hover { color: var(--paper); }
.site-nav a:hover::after { width: 100%; }
.basket-link { display: inline-flex; align-items: center; gap: 0.4rem; }
.basket-count {
    background: var(--red);
    color: #fff;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}
.nav-admin { color: var(--gold) !important; }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

/* -------------------------------- buttons ------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--sans);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.85rem 1.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.2s ease;
}
.btn--primary {
    background: linear-gradient(135deg, var(--red), var(--red-deep));
    color: #fff;
    box-shadow: 0 12px 30px rgba(193, 18, 31, 0.35);
}
.btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 18px 40px rgba(193, 18, 31, 0.5); }
.btn--ghost { background: transparent; border-color: var(--line-strong); color: var(--paper); }
.btn--ghost:hover { color: #fff; background: rgba(255,255,255,0.06); transform: translateY(-2px); }
.btn--small { padding: 0.55rem 1.1rem; font-size: 0.75rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* --------------------------------- hero --------------------------------- */
.hero {
    position: relative;
    padding: clamp(5rem, 12vw, 9rem) 0 clamp(4rem, 9vw, 7rem);
    text-align: center;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -30%; left: 50%;
    width: 900px; height: 900px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(120, 150, 255, 0.16), transparent 60%);
    pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 850px; margin: 0 auto; }
.hero h1 { margin-bottom: 1.2rem; }
.hero h1 .accent {
    color: var(--red);
    text-shadow: 0 0 30px rgba(255, 59, 71, 0.6);
    font-style: italic;
}
.hero .lede { max-width: 640px; margin: 0 auto 2.2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-moon {
    position: absolute;
    right: 8%; top: 12%;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #fff8e7, #d9d2be 60%, #6b6656 100%);
    box-shadow: 0 0 60px 12px rgba(255, 248, 231, 0.18);
    opacity: 0.85;
    z-index: 0;
}

/* ------------------------------- sections ------------------------------- */
.section { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section--tight { padding: 2.5rem 0; }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head p { color: var(--paper-dim); }

.rule { height: 1px; border: 0; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); margin: 0; }

/* -------------------------------- cards --------------------------------- */
.grid { display: grid; gap: 1.6rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.8rem;
    backdrop-filter: blur(8px);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--card-hover); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.4rem; }
.card p:last-child { margin-bottom: 0; }

.card-icon { font-size: 1.8rem; margin-bottom: 0.8rem; }

/* event card */
.event-card { display: flex; flex-direction: column; }
.event-date {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 74px; height: 74px;
    border-radius: 14px;
    background: linear-gradient(160deg, rgba(255,59,71,0.18), rgba(120,150,255,0.08));
    border: 1px solid var(--line-strong);
    margin-bottom: 1.1rem;
}
.event-date .month { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--red-soft); }
.event-date .day { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; line-height: 1; }
.event-meta { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.7rem; }
.event-card .event-title { font-size: 1.3rem; }
.event-card .spacer { flex: 1; }
.event-card .card-cta { margin-top: 1.2rem; font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--red-soft); }

/* product card */
.product-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.product-media {
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 40%, rgba(255,59,71,0.22), transparent 65%),
        linear-gradient(160deg, #10162e, #0a0f20);
    font-size: 3rem;
    border-bottom: 1px solid var(--line);
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-body { padding: 1.4rem 1.5rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--red-soft); margin-bottom: 0.5rem; }
.product-name { font-size: 1.25rem; margin-bottom: 0.3rem; }
.product-price { font-family: var(--serif); font-size: 1.4rem; color: var(--gold); margin: 0.6rem 0 1rem; }
.product-body .spacer { flex: 1; }
.badge {
    display: inline-block;
    font-size: 0.65rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold);
    border: 1px solid rgba(242,193,78,0.4);
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
}

/* --------------------------------- hero band ---------------------------- */
.band {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(140deg, rgba(18,24,50,0.9), rgba(8,12,26,0.9));
    padding: clamp(2rem, 5vw, 3.5rem);
    overflow: hidden;
}
.band--red { border-color: rgba(255,59,71,0.3); }
.band--red::after {
    content: '';
    position: absolute;
    right: -80px; top: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,59,71,0.28), transparent 65%);
}

/* --------------------------------- forms -------------------------------- */
form.styled { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--paper-dim); margin-bottom: 0.45rem; }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="search"], textarea, select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(4, 6, 14, 0.7);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    color: var(--paper);
    font-family: var(--sans);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--red-soft);
    box-shadow: 0 0 0 3px rgba(255, 59, 71, 0.15);
}
.field { margin-bottom: 1.1rem; }
.field .errorlist { list-style: none; padding: 0; margin: 0.4rem 0 0; color: var(--red-soft); font-size: 0.82rem; }
.field .helptext { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.3rem; }

/* ---------------------------------- messages ---------------------------- */
.messages { margin-top: 1.2rem; }
.message {
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    background: rgba(16, 22, 45, 0.85);
    margin-bottom: 0.6rem;
    font-size: 0.92rem;
}
.message--success { border-color: rgba(80, 200, 140, 0.5); }
.message--error { border-color: rgba(255, 59, 71, 0.55); }
.message--info { border-color: rgba(120, 150, 255, 0.5); }

/* --------------------------------- tables -------------------------------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.9rem 0.75rem; border-bottom: 1px solid var(--line); text-align: left; }
.table th { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); font-weight: 500; }
.table td.qty-cell { width: 130px; }

/* --------------------------------- calendar ------------------------------ */
.calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; flex-wrap: wrap; }
.calendar-title { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0; }
.calendar-nav { display: flex; gap: 0.6rem; }
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}
.calendar .weekday {
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
    padding-bottom: 0.5rem;
}
.calendar .day {
    min-height: 104px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.55rem;
    background: rgba(10, 15, 32, 0.55);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.calendar .day:hover { border-color: var(--line-strong); background: rgba(18, 24, 50, 0.8); }
.calendar .day--muted { opacity: 0.32; }
.calendar .day--today { border-color: var(--red); box-shadow: 0 0 0 1px rgba(255,59,71,0.4) inset; }
.calendar .day-num { font-family: var(--serif); font-size: 1.05rem; color: var(--paper-dim); }
.calendar .day--today .day-num { color: var(--red-soft); font-weight: 700; }
.calendar .day-event {
    display: block;
    font-size: 0.72rem;
    line-height: 1.3;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    background: rgba(255, 59, 71, 0.14);
    border-left: 2px solid var(--red);
    color: var(--paper);
}
.calendar .day-event:hover { background: rgba(255, 59, 71, 0.26); }

/* ---------------------------------- footer ------------------------------- */
.site-footer {
    margin-top: 4rem;
    border-top: 1px solid var(--line);
    background: rgba(4, 6, 14, 0.7);
    padding-top: 3.5rem;
}
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; padding-bottom: 2.5rem; }
.footer-quote { font-family: var(--serif); font-size: 1.25rem; color: var(--paper); max-width: 380px; }
.footer-sub { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.footer-links { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-links h4 { font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--paper-dim); font-family: var(--sans); margin-bottom: 0.5rem; }
.footer-links a { font-size: 0.9rem; color: var(--muted); }
.footer-links a:hover { color: var(--red-soft); }
.footer-bottom { border-top: 1px solid var(--line); padding: 1.4rem 1.4rem; text-align: center; color: var(--muted); font-size: 0.8rem; }
.footer-bottom p { margin: 0; }

/* --------------------------------- helpers ------------------------------- */
.stack-sm > * + * { margin-top: 0.6rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.price-row { display: flex; align-items: baseline; gap: 1rem; justify-content: space-between; }
.summary { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 1.6rem; }
.summary .row { display: flex; justify-content: space-between; padding: 0.4rem 0; }
.summary .row.total { border-top: 1px solid var(--line-strong); margin-top: 0.6rem; padding-top: 0.9rem; font-family: var(--serif); font-size: 1.35rem; }
.pill-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.pill {
    font-size: 0.78rem;
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: var(--paper-dim);
}
.pill:hover { color: #fff; border-color: var(--red-soft); }
.pill--active { background: rgba(255,59,71,0.16); border-color: var(--red); color: #fff; }

.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.5rem; align-items: start; }
.prose { color: var(--paper-dim); }
.prose h3 { color: var(--paper); margin-top: 1.6rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4rem; }

.qty-form { display: flex; gap: 0.6rem; align-items: flex-end; }
.qty-form input { width: 80px; }
.qty-form label { margin-bottom: 0.35rem; }

.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--muted); }

/* ------------------------------- responsive ------------------------------ */
@media (max-width: 900px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
    .hero-moon { display: none; }
}
@media (max-width: 720px) {
    .nav-toggle-label {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px; height: 20px;
        cursor: pointer;
    }
    .nav-toggle-label span, .nav-toggle-label::before, .nav-toggle-label::after {
        content: '';
        display: block;
        height: 2px;
        width: 100%;
        background: var(--paper);
        border-radius: 2px;
        transition: transform 0.25s ease, opacity 0.25s ease;
    }
    .site-nav {
        position: absolute;
        top: 78px; left: 0; right: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem 1.4rem 2rem;
        background: rgba(4, 6, 14, 0.97);
        border-bottom: 1px solid var(--line);
        transform: translateY(-110%);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .nav-toggle:checked ~ .site-nav { transform: translateY(0); opacity: 1; pointer-events: auto; }
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; }
    .calendar .day { min-height: 74px; }
    .calendar .day-event { font-size: 0.62rem; }
}