/* Calibre 89 — Patek Philippe Grand Complication */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300&display=swap');

:root {
    --bg: #040810;
    --panel-bg: #f5efe0;
    --gold: #c9a84c;
    --gold-lt: #e0c868;
    --gold-dk: #8b6914;
    --midnight: #0a1a3a;
    --ink: #2a2018;
    --ink-faint: rgba(42, 32, 24, 0.2);
    --hl-color: #ffd700;
    --hl-glow: rgba(255, 215, 0, 0.5);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: var(--panel-bg);
    background-image: radial-gradient(circle at center, rgba(201, 168, 76, 0.03) 0%, transparent 70%);
    font-family: 'Cormorant Garamond', 'EB Garamond', serif;
    color: var(--ink);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

/* ===== ENTRANCE: LUXURY IRIS ===== */
.entrance-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: irisFadeOut 1.8s 5.5s forwards;
}

@keyframes irisFadeOut {
    0% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        pointer-events: none;
    }
}

.iris-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--gold);
}

.iris-ring.ring-1 {
    width: 0;
    height: 0;
    animation: irisExpand 3s 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    border-width: 2px;
    border-color: var(--gold);
    box-shadow: 0 0 30px rgba(201, 168, 76, 0.2);
}

.iris-ring.ring-2 {
    width: 0;
    height: 0;
    animation: irisExpand2 2.5s 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    border-width: 1px;
    border-color: rgba(201, 168, 76, 0.4);
}

.iris-ring.ring-3 {
    width: 0;
    height: 0;
    animation: irisExpand3 2s 1.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    border-width: 1px;
    border-color: rgba(201, 168, 76, 0.2);
}

@keyframes irisExpand {
    0% {
        width: 0;
        height: 0;
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    100% {
        width: 80vmin;
        height: 80vmin;
        opacity: 0.8;
    }
}

@keyframes irisExpand2 {
    0% {
        width: 0;
        height: 0;
        opacity: 0;
    }

    100% {
        width: 60vmin;
        height: 60vmin;
        opacity: 0.4;
    }
}

@keyframes irisExpand3 {
    0% {
        width: 0;
        height: 0;
        opacity: 0;
    }

    100% {
        width: 45vmin;
        height: 45vmin;
        opacity: 0.3;
    }
}

.entrance-logo {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-line {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 12px;
    opacity: 0;
    animation: logoIn 2s 1.5s forwards;
}

.logo-sub {
    font-family: 'Cinzel', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gold-lt);
    letter-spacing: 8px;
    margin-top: 8px;
    opacity: 0;
    animation: logoIn 1.5s 2.5s forwards;
}

.logo-detail {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    font-style: italic;
    color: rgba(201, 168, 76, 0.5);
    letter-spacing: 4px;
    margin-top: 12px;
    opacity: 0;
    animation: logoIn 1.5s 3.5s forwards;
}

@keyframes logoIn {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== MAIN ===== */
.main-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    opacity: 0;
    animation: fadeIn 1.5s 6s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.back-link {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: var(--ink);
    text-decoration: none;
    border: 1px solid var(--ink-faint);
    padding: 5px 12px;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.back-link:hover {
    background: var(--ink);
    color: var(--panel-bg);
}

.watch-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    gap: 0;
}

/* ===== LABEL COLUMNS ===== */
.label-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 215px;
    flex-shrink: 0;
    padding: 10px 6px;
    opacity: 0;
    animation: fadeIn 1s 8s forwards;
    max-height: 92vh;
    overflow-y: auto;
}

.label-column-left {
    align-items: flex-end;
}

.label-column-right {
    align-items: flex-start;
}

.feature-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    background: transparent;
    border: 1px solid var(--ink-faint);
    border-radius: 3px;
    padding: 4px 8px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.76rem;
    color: var(--ink);
    cursor: pointer;
    width: 100%;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    letter-spacing: 0.3px;
    position: relative;
}

.feature-btn:hover,
.feature-btn.active {
    background: rgba(201, 168, 76, 0.08);
    border-color: var(--gold);
    color: var(--gold-dk);
    box-shadow: 0 2px 10px rgba(201, 168, 76, 0.1);
}

.label-column-left .feature-btn:hover {
    transform: translateX(3px);
}

.label-column-right .feature-btn:hover {
    transform: translateX(-3px);
}

.btn-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    flex-shrink: 0;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.feature-btn:hover .btn-dot,
.feature-btn.active .btn-dot {
    opacity: 1;
}

.btn-arrow {
    position: absolute;
    font-size: 0.65rem;
    color: var(--gold);
    opacity: 0;
    transition: opacity 0.3s;
}

.label-column-left .btn-arrow {
    right: -12px;
}

.label-column-right .btn-arrow {
    left: -12px;
}

.feature-btn:hover .btn-arrow {
    opacity: 1;
}

.btn-status {
    width: 100%;
    font-size: 0.62rem;
    color: var(--gold-dk);
    font-style: italic;
    margin-top: 1px;
    padding-left: 11px;
    line-height: 1.2;
    opacity: 0.75;
}

/* ===== WATCH CENTER ===== */
.watch-center {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.watch-wrapper {
    position: relative;
    width: 58vmin;
    height: 58vmin;
    max-width: 580px;
    max-height: 580px;
}

#watch-svg {
    width: 100%;
    height: 100%;
}

/* ===== SVG TEXT ===== */
.cardinal-label {
    font-family: 'Cinzel', serif;
    font-size: 11px;
    fill: rgba(201, 168, 76, 0.5);
    letter-spacing: 3px;
}

.subdial-title {
    font-family: 'Cinzel', serif;
    font-size: 7px;
    fill: rgba(201, 168, 76, 0.7);
    letter-spacing: 1.5px;
}

.subdial-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 14px;
    fill: var(--gold);
    font-weight: 600;
}

.subdial-small {
    font-family: 'Cormorant Garamond', serif;
    font-size: 9px;
    fill: rgba(201, 168, 76, 0.6);
    font-style: italic;
}

.season-text {
    font-family: 'Cinzel', serif;
    font-size: 9px;
    fill: var(--gold);
    letter-spacing: 2px;
}

.month-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 8px;
    fill: rgba(201, 168, 76, 0.7);
    letter-spacing: 0.5px;
}

.zodiac-text {
    font-family: 'EB Garamond', serif;
    font-size: 14px;
    fill: var(--gold);
}

.sidereal-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 10px;
    fill: rgba(201, 168, 76, 0.6);
    font-weight: 600;
}

/* Star twinkle */
.star {
    transition: opacity 0.5s;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

/* ===== HIGHLIGHT ===== */
.highlightable {
    transition: filter 0.4s, opacity 0.4s;
}

.highlightable.highlighted {
    filter: url(#hl-glow-w) !important;
    opacity: 1 !important;
}

.highlightable.highlighted circle,
.highlightable.highlighted line,
.highlightable.highlighted ellipse,
.highlightable.highlighted path {
    stroke: var(--hl-color) !important;
    stroke-width: 3 !important;
    transition: stroke 0.3s, stroke-width 0.3s;
}

.highlightable.highlighted text {
    fill: var(--hl-color) !important;
}

.highlightable.highlighted rect {
    fill: var(--hl-glow) !important;
}

.dimmed {
    opacity: 0.12 !important;
    transition: opacity 0.4s;
}

/* ===== FEATURE PANEL ===== */
.feature-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(245, 239, 224, 0.97);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s;
    overflow-y: auto;
    padding: 40px 0;
}

.feature-panel.open {
    opacity: 1;
    pointer-events: auto;
}

.close-panel-btn {
    position: fixed;
    top: 18px;
    right: 22px;
    z-index: 201;
    background: transparent;
    border: 1.5px solid var(--ink);
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    color: var(--ink);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.close-panel-btn:hover {
    background: var(--ink);
    color: var(--panel-bg);
}

.feature-panel-inner {
    max-width: 680px;
    width: 90%;
    padding: 35px 25px;
}

.fp-title {
    font-family: 'Cinzel', serif;
    font-size: 1.6rem;
    color: var(--ink);
    letter-spacing: 2px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--ink-faint);
}

.fp-desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--ink);
    text-align: justify;
    margin-bottom: 20px;
}

.fp-demo-section {
    background: rgba(42, 32, 24, 0.03);
    border: 1px solid var(--ink-faint);
    border-radius: 6px;
    padding: 15px 18px;
    margin-bottom: 18px;
}

.fp-demo-title {
    font-family: 'Cinzel', serif;
    font-size: 0.8rem;
    color: var(--gold-dk);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.fp-demo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 160px;
}

.fp-demo svg {
    width: 100%;
    max-width: 460px;
    height: auto;
}

.fp-demo-note {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: rgba(42, 32, 24, 0.55);
    margin-top: 8px;
    text-align: center;
    line-height: 1.5;
    white-space: pre-line;
}

.fp-details {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.92rem;
    color: rgba(42, 32, 24, 0.65);
    line-height: 1.6;
}

.fp-details h3 {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    margin: 15px 0 5px;
    color: var(--ink);
    letter-spacing: 1px;
}

.fp-details ul {
    padding-left: 16px;
    margin-bottom: 6px;
}

.fp-details li {
    margin-bottom: 3px;
}