/* ── Amber-Split Design System ─────────────────────────────────────────────── */
:root {
    --espresso:    #1c0f05;
    --mahogany:    #3d1f08;
    --terra:       #c2694f;
    --amber:       #f59e0b;
    --amber-deep:  #d97706;
    --gold-text:   #fbbf24;
    --cream:       #fdf6eb;
    --ivory:       #fef9f3;
    --text-dark:   #451a03;
    --text-mid:    #92400e;
    --text-soft:   #c4a882;
    --hero-bg:     linear-gradient(165deg, #1c0f05 0%, #5c2d0e 40%, #c2694f 75%, #f59e0b 100%);
    --card-shadow: 0 3px 16px rgba(120,53,15,0.1), 0 1px 3px rgba(120,53,15,0.06);
}

/* ── Base ────────────────────────────────────────────────────────────────── */
body { font-family: 'DM Sans', sans-serif; }
h1, h2, h3 { font-family: 'Playfair Display', serif; }

/* ── Nav hamburger: own media query to avoid inline-style vs Tailwind conflict ── */
.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.15);
    cursor: pointer;
    color: rgba(245,230,208,0.8);
    flex-shrink: 0;
}
@media (min-width: 768px) {
    .nav-hamburger { display: none; }
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.as-hero {
    /* direct value — no CSS variable, avoids browser gradient-in-var issues */
    background: linear-gradient(165deg, #1c0f05 0%, #5c2d0e 40%, #c2694f 75%, #f59e0b 100%);
    position: relative;
    overflow: hidden;
}
.as-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.as-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(245,158,11,0.3), transparent);
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.as-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(229,201,154,0.3);
    box-shadow: var(--card-shadow);
}

/* ── Labels ──────────────────────────────────────────────────────────────── */
.as-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #92400e;
    margin-bottom: 0.375rem;
    font-family: 'DM Sans', sans-serif;
}

/* ── Inputs — compound selectors beat Tailwind preflight ────────────────── */
.as-input,
input.as-input,
textarea.as-input,
select.as-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #ffffff;
    border: 1.5px solid rgba(229,201,154,0.5);
    border-radius: 10px;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    font-family: 'DM Sans', sans-serif;
    color: #451a03;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.as-input:focus,
input.as-input:focus,
textarea.as-input:focus,
select.as-input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,0.15);
}
select.as-input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2392400e' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.875rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}
textarea.as-input { resize: vertical; }

/* ── Buttons — compound selectors for reliability ───────────────────────── */
.btn-primary,
a.btn-primary,
button.btn-primary,
input[type="submit"].btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1.25rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #1c0f05;
    font-weight: 700;
    font-family: 'DM Sans', sans-serif;
    border-radius: 25px;
    border: none;
    box-shadow: 0 4px 16px rgba(245,158,11,0.35);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}
.btn-primary:hover,
a.btn-primary:hover,
button.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,0.45); }

.btn-secondary,
a.btn-secondary,
button.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.25rem;
    background: transparent;
    color: #92400e;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    border-radius: 25px;
    border: 1.5px solid rgba(229,201,154,0.45);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
    line-height: 1.4;
    -webkit-appearance: none;
    appearance: none;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.btn-secondary:hover,
a.btn-secondary:hover,
button.btn-secondary:hover { background: rgba(245,158,11,0.07); border-color: rgba(245,158,11,0.3); }

/* ── Tab navigation ──────────────────────────────────────────────────────── */
.as-tab-nav {
    display: flex;
    gap: 2px;
    background: rgba(28,15,5,0.06);
    border-radius: 10px;
    padding: 3px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.as-tab-nav::-webkit-scrollbar { display: none; }
.as-tab,
a.as-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 7px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #92400e;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
    -webkit-appearance: none;
}
.as-tab:hover,
a.as-tab:hover { color: #451a03; background: rgba(245,158,11,0.1); }
.as-tab.active,
a.as-tab.active {
    background: #fff;
    color: #451a03;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(120,53,15,0.12);
}

/* ── Timeline ────────────────────────────────────────────────────────────── */
.timeline-line {
    position: absolute;
    left: 8px;
    top: 0; bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, rgba(245,158,11,0.4), transparent);
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ── Photo grid ──────────────────────────────────────────────────────────── */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 5px;
}
.photo-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(229,201,154,0.3);
    transition: transform 0.15s, box-shadow 0.15s;
    display: block;
}
.photo-grid img:hover { transform: scale(1.03); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

/* ── Drop zone ───────────────────────────────────────────────────────────── */
.drop-zone {
    border: 2px dashed rgba(245,158,11,0.35);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    background: rgba(245,158,11,0.04);
    transition: background 0.2s, border-color 0.2s;
}
.drop-zone.drag-over {
    background: rgba(245,158,11,0.1);
    border-color: #f59e0b;
}

/* ── Markdown ────────────────────────────────────────────────────────────── */
.markdown-body { line-height: 1.75; color: #451a03; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 {
    font-family: 'Playfair Display', serif; font-weight: 700;
    margin: 1.2em 0 0.4em; color: #451a03;
}
.markdown-body h1 { font-size: 1.4rem; }
.markdown-body h2 { font-size: 1.2rem; }
.markdown-body h3 { font-size: 1.05rem; }
.markdown-body p  { margin: 0.6em 0; }
.markdown-body ul, .markdown-body ol { padding-left: 1.5em; margin: 0.6em 0; }
.markdown-body ul { list-style: disc; }
.markdown-body ol { list-style: decimal; }
.markdown-body blockquote {
    border-left: 3px solid rgba(245,158,11,0.4);
    padding-left: 1em; color: #92400e; margin: 0.8em 0;
}
.markdown-body code {
    background: rgba(245,158,11,0.08); padding: 0.1em 0.3em;
    border-radius: 4px; font-size: 0.875em; color: #92400e;
}
.markdown-body pre {
    background: #1c0f05; color: #fef3c7; padding: 1em;
    border-radius: 8px; overflow-x: auto; margin: 0.8em 0;
}
.markdown-body pre code { background: none; padding: 0; color: inherit; }
.markdown-body a { color: #d97706; text-decoration: underline; }
.markdown-body hr { border: none; border-top: 1px solid rgba(229,201,154,0.4); margin: 1.2em 0; }

/* ── Utilities ───────────────────────────────────────────────────────────── */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
[x-cloak] { display: none !important; }
