/* ============================================
   RECEPTION
   Cairngorm mist & signal design system
   ============================================ */

:root {
    /* Palette — Scottish mist and heather */
    --deep: #0d0c10;
    --midnight: #151419;
    --dusk: #1e1d25;
    --mist: #f0ede8;
    --ash: #e2ddd6;
    --heather: #b08fc8;
    --heather-dim: #8a6aab;
    --pine: #364233;
    --moss: #526451;
    --stone: #787e88;
    --peat: #7a7468;
    --fog: #b5b2bc;

    /* Typography */
    --font-display: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Lora', 'Georgia', serif;
    --font-signal: 'Space Mono', 'Courier New', monospace;

    /* Spacing */
    --section-pad: clamp(5rem, 12vh, 9rem);
    --container-width: 1140px;
    --gap: clamp(1.5rem, 3vw, 3rem);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: clamp(1rem, 1.05vw, 1.125rem);
    line-height: 1.75;
    color: var(--deep);
    background: var(--mist);
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

/* ---- Container ---- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* ---- Typography ---- */
h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    line-height: 1.2;
}

.section-heading {
    font-size: clamp(1.75rem, 3.5vw, 2.75rem);
    font-weight: 300;
    margin-bottom: 2rem;
    color: var(--deep);
}

.lead {
    font-size: clamp(1.05rem, 1.2vw, 1.2rem);
    line-height: 1.85;
    color: var(--deep);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 0;
    transition: background 0.4s, padding 0.4s, box-shadow 0.4s;
}

.nav.scrolled {
    background: rgba(240, 237, 232, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    box-shadow: 0 1px 0 rgba(13, 12, 16, 0.08);
}

.nav-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 4vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.02em;
    color: var(--mist);
    transition: color 0.4s;
}

.nav.scrolled .nav-title {
    color: var(--deep);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(240, 237, 232, 0.7);
    transition: color 0.3s;
    position: relative;
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav.scrolled .nav-links a {
    color: var(--stone);
}

.nav-links a:hover,
.nav.scrolled .nav-links a:hover {
    color: var(--heather);
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 1.5px;
    background: var(--mist);
    transition: background 0.3s, transform 0.3s;
}

.nav.scrolled .nav-toggle span {
    background: var(--deep);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--mist);
    overflow: hidden;
    /* Cairngorm night sky — cool dark blues to near-black */
    background:
        radial-gradient(ellipse at 25% 75%, rgba(54, 66, 51, 0.45) 0%, transparent 50%),
        radial-gradient(ellipse at 75% 25%, rgba(80, 70, 110, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(10, 9, 15, 0.9) 0%, transparent 60%),
        linear-gradient(175deg,
            #282d3c 0%,
            #21232e 15%,
            #1c1c26 30%,
            #171720 45%,
            #131319 60%,
            #0d0c10 100%
        );
}

.hero-overlay {
    position: absolute;
    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.03'/%3E%3C/svg%3E");
    opacity: 0.45;
    pointer-events: none;
}

.hero-landscape {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.landscape-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
}

.hero-pre {
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--fog);
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeUp 1s 0.3s forwards;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(5.5rem, 15vw, 12rem);
    font-weight: 300;
    font-style: italic;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--mist);
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 1s 0.5s forwards;
}

.hero-rule {
    width: 60px;
    height: 1px;
    background: var(--heather);
    margin: 0 auto 2rem;
    opacity: 0;
    animation: fadeUp 1s 0.7s forwards;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 1.5vw, 1.35rem);
    font-style: italic;
    font-weight: 300;
    color: var(--fog);
    line-height: 1.8;
    max-width: 560px;
    margin: 0 auto 3rem;
    opacity: 0;
    animation: fadeUp 1s 0.9s forwards;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 1s 1.1s forwards;
}

.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--fog);
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 1s 1.5s forwards;
}

.hero-scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--heather), transparent);
    animation: scrollPulse 2s infinite;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 1rem 2.25rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--heather);
    color: var(--deep);
}

.btn-primary:hover {
    background: var(--heather-dim);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(240, 237, 232, 0.3);
    color: var(--mist);
}

.btn-ghost:hover {
    border-color: var(--heather);
    color: var(--heather);
}

/* ============================================
   SECTIONS — SHARED
   ============================================ */
.section {
    padding: var(--section-pad) 0;
}

.section-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: var(--gap);
}

.section-label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.5rem;
}

.label-number {
    font-family: var(--font-display);
    font-size: 0.85rem;
    color: var(--heather);
    letter-spacing: 0.1em;
}

.label-text {
    font-family: var(--font-body);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone);
}

/* ============================================
   THE NOVEL SECTION
   ============================================ */
.section-novel {
    background: var(--mist);
}

.novel-body p {
    margin-bottom: 1.5rem;
    color: var(--deep);
}

.novel-body em {
    font-style: italic;
    color: var(--pine);
}

.novel-comps {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 400;
    color: var(--heather-dim);
    letter-spacing: 0.02em;
    margin-top: 2rem;
}

.novel-details {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--ash);
}

.detail {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--stone);
}

.detail-value {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--deep);
}

/* ============================================
   THE WORLD SECTION
   ============================================ */
.section-world {
    background: var(--ash);
}

.world-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1rem;
}

.world-card {
    background: var(--mist);
    padding: 2.5rem;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s;
}

.world-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--heather), var(--moss));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s;
}

.world-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(13, 12, 16, 0.08);
}

.world-card:hover::before {
    transform: scaleX(1);
}

.world-card-icon {
    width: 36px;
    height: 36px;
    color: var(--heather);
    margin-bottom: 1.25rem;
}

.world-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--deep);
}

.world-card p {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--stone);
}

.world-card p em {
    font-style: italic;
    color: var(--peat);
}

/* ============================================
   EXCERPT SECTION
   ============================================ */
.section-excerpt {
    background: var(--mist);
}

.excerpt-block {
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 1.5vw, 1.35rem);
    line-height: 1.9;
    color: var(--deep);
    border-left: 2px solid var(--heather);
    padding-left: 2rem;
    position: relative;
}

.excerpt-block p {
    margin-bottom: 1.5rem;
}

.excerpt-block p:last-child {
    margin-bottom: 0;
}

.excerpt-block em {
    font-style: italic;
    color: var(--pine);
}

.excerpt-fade {
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--mist));
    margin-top: -80px;
    position: relative;
    z-index: 1;
}

.excerpt-note {
    font-size: 0.85rem;
    font-style: italic;
    color: var(--stone);
    text-align: center;
    margin-top: 1rem;
}

/* ============================================
   PRAISE SECTION
   ============================================ */
.section-praise {
    background: var(--midnight);
    color: var(--mist);
}

.section-praise .section-heading {
    color: var(--mist);
}

.section-praise .label-number {
    color: var(--heather);
}

.section-praise .label-text {
    color: var(--stone);
}

.praise-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.praise-quote {
    border-left: 2px solid var(--heather);
    padding-left: 2rem;
}

.praise-quote p {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 1.4vw, 1.3rem);
    font-style: italic;
    font-weight: 300;
    line-height: 1.8;
    color: var(--ash);
    margin-bottom: 1rem;
}

.praise-quote footer {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.praise-name {
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--mist);
    letter-spacing: 0.02em;
}

.praise-role {
    font-family: var(--font-body);
    font-size: 0.8rem;
    color: var(--stone);
    letter-spacing: 0.02em;
}

.praise-role em {
    font-style: italic;
    color: var(--fog);
}

@media (min-width: 901px) {
    .praise-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

/* ============================================
   DIVIDER — TRANSMISSION
   ============================================ */
.divider-landscape {
    position: relative;
    height: 50vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Cairngorm dusk gradient — cooler than Cassagnas */
    background:
        radial-gradient(ellipse at 30% 60%, rgba(82, 100, 81, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 40%, rgba(80, 70, 110, 0.35) 0%, transparent 50%),
        linear-gradient(180deg,
            var(--ash) 0%,
            #6b7490 10%,
            #4a5068 25%,
            #343040 40%,
            #232030 55%,
            #181520 70%,
            #0d0c10 100%
        );
    overflow: hidden;
}

.divider-overlay {
    position: absolute;
    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.8' 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");
    opacity: 0.5;
    pointer-events: none;
}

.divider-inner {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 2rem;
}

.divider-frequency {
    font-family: var(--font-signal);
    font-size: clamp(0.6rem, 1vw, 0.75rem);
    letter-spacing: 0.2em;
    color: var(--heather);
    opacity: 0.65;
    margin-bottom: 1.5rem;
}

.divider-quote {
    font-family: var(--font-display);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-style: italic;
    font-weight: 300;
    color: var(--mist);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   AUTHOR SECTION
   ============================================ */
.section-author {
    background: var(--mist);
}

.author-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

.author-photo-placeholder {
    width: 100%;
    aspect-ratio: 3/4;
    background: var(--ash);
    border: 1px solid #d0ccc8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: var(--stone);
    letter-spacing: 0.05em;
}

.author-bio p {
    margin-bottom: 1.25rem;
    color: var(--deep);
}

.author-bio em {
    color: var(--pine);
    font-style: italic;
}

/* ============================================
   CONTACT / NEWSLETTER
   ============================================ */
.section-contact {
    background: var(--deep);
    color: var(--mist);
    padding: var(--section-pad) 0;
}

.contact-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-heading {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.contact-text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--fog);
    margin-bottom: 2.5rem;
}

.contact-text em {
    color: var(--mist);
    font-style: italic;
}

.form-group {
    display: flex;
    gap: 0;
    max-width: 480px;
    margin: 0 auto;
}

.form-input {
    flex: 1;
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(240, 237, 232, 0.15);
    background: rgba(240, 237, 232, 0.05);
    color: var(--mist);
    outline: none;
    transition: border-color 0.3s;
}

.form-input::placeholder {
    color: var(--stone);
}

.form-input:focus {
    border-color: var(--heather);
}

.form-group .btn-primary {
    white-space: nowrap;
}

.form-note {
    font-size: 0.75rem;
    color: var(--stone);
    margin-top: 1rem;
    letter-spacing: 0.05em;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--deep);
    border-top: 1px solid rgba(240, 237, 232, 0.06);
    padding: 3rem 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.footer-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--mist);
}

.footer-sub {
    font-size: 0.75rem;
    color: var(--stone);
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.8rem;
    color: var(--stone);
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--heather);
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--stone);
}

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

@keyframes scrollPulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .section-grid {
        grid-template-columns: 1fr;
    }

    .section-label {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .world-cards {
        grid-template-columns: 1fr;
    }

    .author-layout {
        grid-template-columns: 1fr;
    }

    .author-photo-placeholder {
        max-width: 250px;
    }

    .novel-details {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}

@media (max-width: 650px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(240, 237, 232, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        color: var(--deep) !important;
        font-size: 0.9rem;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-tagline br {
        display: none;
    }

    .form-group {
        flex-direction: column;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}
