/* Immersive Theme
   Full-screen, image-dominant, cinematic. Minimal chrome.
   Fonts: Playfair Display (elegant display serif) + Source Sans 3 */

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: immersive-out 0.3s ease; }
::view-transition-new(root) { animation: immersive-in 0.4s ease; }
@keyframes immersive-out { to { opacity: 0; transform: scale(0.98); } }
@keyframes immersive-in { from { opacity: 0; transform: scale(1.02); } }

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

:root {
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', system-ui, sans-serif;
    --bg: #111;
    --text: #ccc;
    --text-heading: #f5f0e8;
    --text-muted: #777;
    --accent: #e8d5b5;
    --border: #222;
}

html { font-size: 100%; }

body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: #f0e4d0; }

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

/* === Floating Header === */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2.5rem;
    pointer-events: none;
}

.site-header > * { pointer-events: auto; }

.site-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-heading);
    transition: opacity 0.3s;
}

.site-title:hover { opacity: 0.7; }

/* Hamburger */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 24px;
    position: relative;
    z-index: 300;
}

.menu-toggle .bar {
    display: block;
    width: 100%;
    height: 1.5px;
    background: var(--text-heading);
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, top 0.3s ease;
}

.menu-toggle .bar:first-child { top: 6px; }
.menu-toggle .bar:last-child { top: 16px; }

.menu-toggle.is-active .bar:first-child {
    top: 11px;
    transform: rotate(45deg);
}

.menu-toggle.is-active .bar:last-child {
    top: 11px;
    transform: rotate(-45deg);
}

/* === Fullscreen Nav Overlay === */
.fullscreen-nav {
    position: fixed;
    inset: 0;
    z-index: 150;
    background: rgba(8, 8, 8, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.fullscreen-nav.is-open {
    opacity: 1;
    visibility: visible;
}

.nav-inner {
    text-align: center;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--text-muted);
    transition: color 0.2s, letter-spacing 0.3s ease;
    letter-spacing: 0.02em;
}

.nav-links a:hover {
    color: var(--text-heading);
    letter-spacing: 0.08em;
}

.nav-social {
    margin-top: 3rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
}

.nav-social a {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nav-social a:hover { color: var(--accent); }

/* === Hero (Full-screen) === */
.hero-fullscreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
}

.hero-text {
    position: absolute;
    top: 58%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 2;
    mix-blend-mode: difference;
    pointer-events: none;
    max-width: 500px;
    width: 90%;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 400;
    color: #fff;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.1;
}

.hero-text .tagline {
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fff;
    margin-top: 1rem;
}

.hero-image {
    max-width: 550px;
}

.hero-image img {
    width: 100%;
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.6);
}

/* === Page Content === */
.page-content {
    max-width: 680px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.page-content h1 {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    font-weight: 400;
    color: var(--text-heading);
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

/* Entry content */
.entry-content p { margin-bottom: 1.6rem; }

.entry-content h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-heading);
    margin: 2.5rem 0 1rem;
}

.entry-content a {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(232, 213, 181, 0.3);
}

.entry-content a:hover {
    text-decoration-color: var(--accent);
}

.entry-content img {
    margin: 2.5rem 0;
    cursor: zoom-in;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.entry-content img:hover {
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.6);
    transform: scale(1.01);
}

.entry-content video {
    max-width: 560px;
    width: 100%;
    height: auto;
    display: block;
    margin: 2rem 0;
}

.entry-content em { font-style: italic; }
.entry-content strong { font-weight: 400; color: var(--text-heading); }

/* Child page listing */
.child-pages {
    list-style: none;
    margin: 2rem 0;
}

.child-pages li {
    border-bottom: 1px solid var(--border);
}

.child-pages a {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 1rem 0;
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s, padding-left 0.3s ease;
}

.child-pages a:hover {
    color: var(--accent);
    padding-left: 0.8rem;
}

.page-number {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--text-muted);
    min-width: 1.5rem;
}

/* Scroll-reveal */
.entry-content img,
.entry-content video,
.child-pages li {
    animation: immersive-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
}

@keyframes immersive-reveal {
    from { opacity: 0; transform: translateY(25px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* === Responsive === */
@media (max-width: 768px) {
    .site-header { padding: 1rem 1.5rem; }

    .hero-text h1 { font-size: 2.2rem; }
    .hero-text .tagline { font-size: 0.8rem; }

    .nav-links a { font-size: 1.6rem; }

    .page-content {
        padding-top: 5rem;
    }

    .page-content h1 { font-size: 1.8rem; }
}
