/* ==========================================================================
   GriefTypes — Premium Author Website (v2)
   Theme: Light editorial — warm ivory / gentle plum / dusty lavender / gold
   Palette & type taken from the book cover, inverted from dark to light.
   Fonts (same as the book): Josefin Sans · Pinyon Script · Cormorant
   Garamond · Jost · Great Vibes
   ========================================================================== */

:root {
    /* Text — deep aubergine as "ink", never harsh black */
    --ink:        #38294a;
    --ink-soft:   #6b5b7b;
    --ink-faint:  #9d8fab;

    /* Brand accents pulled from the cover purple, lightened */
    --plum:       #6a4a8f;
    --plum-deep:  #4a3260;
    --mauve:      #b9a3d0;
    --blush:      #f0e8f6;
    --gold:       #b98f3e;
    --gold-soft:  #e3c887;

    /* Surfaces */
    --bg:         #faf7f1;   /* warm ivory page */
    --bg-alt:     #f4eef8;   /* lavender wash section */
    --surface:    #ffffff;
    --surface-2:  #fdfaf5;
    --cream:      #f6f0e6;

    --line:       rgba(56, 41, 74, .12);
    --line-soft:  rgba(56, 41, 74, .07);

    /* Book fonts */
    --font-serif:  'Cormorant Garamond', Georgia, serif;
    --font-body:   'Jost', 'Segoe UI', sans-serif;
    --font-cover:  'Josefin Sans', 'Jost', sans-serif;
    --font-script: 'Pinyon Script', 'Great Vibes', cursive;
    --font-script2:'Great Vibes', cursive;

    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;

    --shadow-book:  0 40px 80px -28px rgba(74, 50, 96, .38);
    --shadow-card:  0 24px 50px -24px rgba(74, 50, 96, .22);
    --shadow-hover: 0 34px 64px -24px rgba(74, 50, 96, .32);

    --header-h: 86px;
    --topbar-h: 40px;

    --ease-lux: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.0625rem;
    background: var(--bg);
    color: var(--ink-soft);
    line-height: 1.75;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--gold-soft); color: var(--plum-deep); }

/* Elegant thin scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb { background: var(--mauve); border-radius: 8px; border: 2px solid var(--cream); }
::-webkit-scrollbar-thumb:hover { background: var(--plum); }

.container { width: min(1220px, 92%); margin-inline: auto; }
.section { position: relative; padding: 118px 0; }

/* ---------- Buttons ---------- */
.btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 15px 34px;
    font-family: var(--font-body);
    font-size: .78rem; font-weight: 500;
    letter-spacing: .24em; text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid transparent;
    overflow: hidden;
    transition: transform .45s var(--ease-lux), box-shadow .45s var(--ease-lux), color .35s, background .35s, border-color .35s;
    will-change: transform;
}
.btn::after { /* shine sweep */
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,.45) 50%, transparent 60%);
    transform: translateX(-120%);
    transition: transform .8s var(--ease-lux);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px); }

.btn--plum {
    background: linear-gradient(135deg, var(--plum) 0%, var(--plum-deep) 100%);
    color: #fdf9ff;
    box-shadow: 0 16px 32px -14px rgba(74, 50, 96, .55);
}
.btn--plum:hover { box-shadow: 0 22px 40px -14px rgba(74, 50, 96, .65); }

.btn--outline {
    border-color: rgba(106, 74, 143, .4);
    color: var(--plum-deep);
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(6px);
}
.btn--outline:hover { border-color: var(--plum); background: #fff; box-shadow: var(--shadow-card); }

.btn--gold {
    background: linear-gradient(135deg, #d3a955 0%, var(--gold) 100%);
    color: #fffaf0;
    box-shadow: 0 16px 32px -14px rgba(185, 143, 62, .55);
}
.btn--gold:hover { box-shadow: 0 22px 40px -14px rgba(185, 143, 62, .65); }

.btn--sm { padding: 11px 24px; font-size: .7rem; }
.btn--full { width: 100%; }

.btn__play {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--plum);
    display: inline-flex; align-items: center; justify-content: center;
    flex: none;
}
.btn__play svg { width: 13px; height: 13px; fill: #fff; margin-left: 2px; }

/* ==========================================================================
   PRELOADER
   ========================================================================== */
.preloader {
    position: fixed; inset: 0; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(circle at 50% 30%, rgba(185, 163, 208, .3), transparent 62%),
        var(--bg);
    transition: opacity .7s ease, visibility .7s;
}
.preloader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.preloader__inner { text-align: center; }
.preloader__print { width: 86px; height: 86px; color: var(--plum); margin: 0 auto 20px; animation: printPulse 2.2s ease-in-out infinite; }
@keyframes printPulse { 0%,100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.05); opacity: 1; } }
.preloader__title { display: flex; align-items: baseline; justify-content: center; line-height: 1; }
.preloader__grief { font-family: var(--font-cover); font-weight: 200; font-size: 2.9rem; letter-spacing: .04em; color: var(--plum-deep); }
.preloader__types { font-family: var(--font-script); font-size: 3.3rem; color: var(--plum); margin-left: -6px; }
.preloader__sub {
    display: block; margin-top: 8px;
    font-size: .68rem; letter-spacing: .46em; text-transform: uppercase;
    color: var(--gold); padding-left: .46em;
}
.preloader__bar {
    width: 210px; height: 2px; margin: 30px auto 0;
    background: rgba(56, 41, 74, .12); border-radius: 2px; overflow: hidden;
}
.preloader__bar span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--plum), var(--gold)); border-radius: 2px; }

/* ==========================================================================
   HEADER / NAV
   ========================================================================== */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 900;
    transition: transform .5s var(--ease-lux), box-shadow .5s;
}
.site-header.is-hidden { transform: translateY(-110%); }

.topbar {
    height: var(--topbar-h);
    display: flex; align-items: center;
    background: linear-gradient(90deg, var(--plum-deep), var(--plum) 55%, #8a63ad);
    color: #f4ecfb;
    font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
    transition: height .45s var(--ease-lux), opacity .45s;
}
.topbar em { font-style: normal; color: var(--gold-soft); }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.topbar__item--right { color: #ded0ee; }

.nav-wrap {
    margin-top: 14px;
    height: calc(var(--header-h) - 14px);
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .65);
    border-radius: 999px;
    padding: 0 14px 0 26px;
    box-shadow: 0 16px 40px -22px rgba(74, 50, 96, .3);
    transition: margin-top .45s var(--ease-lux), height .45s var(--ease-lux), background .45s, box-shadow .45s;
}
.site-header.is-scrolled .nav-wrap {
    margin-top: 6px;
    height: 64px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 14px 34px -18px rgba(74, 50, 96, .35);
}
.site-header.is-scrolled .topbar { height: 0; opacity: 0; overflow: hidden; }

.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); flex: none; }
.brand__mark { width: 40px; height: 40px; color: var(--plum); transition: color .35s, transform .6s var(--ease-lux); }
.brand:hover .brand__mark { color: var(--gold); transform: rotate(14deg); }
.brand__text { font-family: var(--font-cover); font-weight: 300; font-size: 1.55rem; letter-spacing: .03em; color: var(--plum-deep); }
.brand__script { font-family: var(--font-script); font-size: 1.85rem; color: var(--plum); margin-left: -3px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav__list { display: flex; align-items: center; gap: 26px; }
.nav__link {
    position: relative;
    font-size: .76rem; font-weight: 400;
    letter-spacing: .14em; text-transform: uppercase;
    color: var(--ink-soft);
    padding: 8px 2px;
    transition: color .3s;
}
.nav__link::after {
    content: '';
    position: absolute; left: 0; bottom: 2px;
    width: 100%; height: 1.5px;
    background: linear-gradient(90deg, var(--plum), var(--gold));
    transform: scaleX(0); transform-origin: right;
    transition: transform .45s var(--ease-lux);
}
.nav__link:hover, .nav__link.is-active { color: var(--plum-deep); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }

/* Hamburger */
.hamburger {
    display: none;
    position: relative; z-index: 1001;
    width: 46px; height: 46px;
    background: transparent; border: none;
    flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.hamburger span {
    display: block; width: 26px; height: 2px;
    background: var(--plum-deep); border-radius: 2px;
    transition: transform .4s var(--ease-lux), opacity .3s;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex; align-items: center;
    padding: calc(var(--header-h) + var(--topbar-h) + 40px) 0 90px;
    overflow: hidden;
}
.hero__wash {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 60% 55% at 82% 30%, rgba(185, 163, 208, .34), transparent 65%),
        radial-gradient(ellipse 45% 40% at 12% 78%, rgba(227, 200, 135, .22), transparent 60%),
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(240, 232, 246, .8), transparent 70%),
        var(--bg);
}
.hero__arcs {
    position: absolute; right: -140px; top: 50%;
    translate: 0 -50%;
    width: min(760px, 75vw); height: min(760px, 75vw);
    color: rgba(106, 74, 143, .16);
    pointer-events: none;
    animation: arcsSpin 90s linear infinite;
}
@keyframes arcsSpin { to { rotate: 360deg; } }

.hero__wrap {
    position: relative; z-index: 2;
    display: grid; grid-template-columns: 1.05fr .95fr;
    align-items: center; gap: 40px;
}

.hero__eyebrow {
    display: flex; align-items: center; gap: 14px;
    font-size: .72rem; letter-spacing: .34em; text-transform: uppercase;
    color: var(--gold); font-weight: 500;
}
.hero__eyebrow-line { width: 46px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); }

.hero__title { margin: 22px 0 26px; line-height: 1; }
.hero__wordmark { display: block; }
.wordmark__grief {
    font-family: var(--font-cover);
    font-weight: 200;
    font-size: clamp(3.6rem, 8.6vw, 7rem);
    letter-spacing: .045em;
    color: var(--plum-deep);
}
.wordmark__types {
    font-family: var(--font-script);
    font-size: clamp(4.2rem, 10vw, 8.2rem);
    color: var(--plum);
    margin-left: -.06em;
    transform: translateY(-.1em) rotate(-2deg);
    display: inline-block;
}
.hero__tagline {
    display: block; margin-top: 14px;
    font-family: var(--font-serif);
    font-style: italic; font-weight: 500;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    letter-spacing: .06em;
    color: var(--ink);
}
.hero__tagline::before { content: ''; display: inline-block; vertical-align: middle; width: 34px; height: 1px; background: var(--gold); margin-right: 14px; }

.hero__lead { max-width: 540px; font-size: 1.12rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }

.hero__stats {
    display: flex; align-items: center; gap: 26px;
    margin-top: 46px;
}
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong {
    font-family: var(--font-serif);
    font-size: 2.15rem; font-weight: 600; line-height: 1;
    color: var(--plum-deep);
}
.hero__stats span { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); margin-top: 6px; }
.hero__stats-div { width: 1px; height: 38px; background: var(--line); flex: none; }

/* Hero book */
.hero__book { display: flex; justify-content: center; }
.hero__book-stage { position: relative; width: min(480px, 90%); transform-style: preserve-3d; }
.hero__book-halo {
    position: absolute; inset: 8% -6% -4% -6%;
    background: radial-gradient(ellipse at 50% 55%, rgba(106, 74, 143, .28), transparent 68%);
    filter: blur(18px);
    transform: translateZ(-60px);
}
.hero__book-img {
    position: relative; z-index: 1;
    width: 100%;
    filter: drop-shadow(0 48px 44px rgba(58, 40, 82, .32));
    animation: bookFloat 7s ease-in-out infinite;
}
@keyframes bookFloat { 0%,100% { translate: 0 0; } 50% { translate: 0 -18px; } }
.hero__book-script {
    position: absolute; z-index: 2;
    left: -8%; bottom: 12%;
    font-family: var(--font-script);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    color: var(--plum);
    line-height: 1.15;
    transform: rotate(-7deg);
    text-shadow: 0 6px 22px rgba(250, 247, 241, .9);
}

.hero__scroll {
    position: absolute; left: 50%; bottom: 26px; translate: -50% 0;
    z-index: 3;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-size: .62rem; letter-spacing: .4em; text-transform: uppercase; color: var(--ink-faint);
    padding-left: .4em;
}
.hero__scroll i {
    width: 1px; height: 44px;
    background: linear-gradient(var(--plum), transparent);
    position: relative; overflow: hidden;
}
.hero__scroll i::after {
    content: ''; position: absolute; inset: 0;
    background: var(--gold);
    animation: scrollDrop 2s var(--ease-lux) infinite;
}
@keyframes scrollDrop { 0% { translate: 0 -100%; } 60%,100% { translate: 0 100%; } }

/* ==========================================================================
   MARQUEE — the twelve prints
   ========================================================================== */
.marquee {
    position: relative; z-index: 4;
    padding: 22px 0;
    background: linear-gradient(90deg, var(--plum-deep), #6a4a8f 50%, var(--plum-deep));
    color: #f2e9fa;
    overflow: hidden;
    box-shadow: 0 20px 40px -22px rgba(74, 50, 96, .6);
}
.marquee::before, .marquee::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 90px; z-index: 2; pointer-events: none;
}
.marquee::before { left: 0; background: linear-gradient(90deg, var(--plum-deep), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--plum-deep), transparent); }
.marquee__track {
    display: flex; align-items: center; gap: 34px;
    width: max-content;
    animation: marqueeMove 36s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marqueeMove { to { translate: -50% 0; } }
.marquee__item {
    font-family: var(--font-script);
    font-size: 1.65rem;
    white-space: nowrap;
    opacity: .95;
}
.marquee__dot { font-size: .7rem; color: var(--gold-soft); }

/* ==========================================================================
   SECTION HEADERS
   ========================================================================== */
.section-head { text-align: center; max-width: 720px; margin: 0 auto 64px; }
.section-head__eyebrow {
    display: inline-block;
    font-size: .7rem; font-weight: 500;
    letter-spacing: .4em; text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}
.section-head__title {
    font-family: var(--font-serif);
    font-weight: 600;
    font-size: clamp(2.1rem, 4.6vw, 3.3rem);
    line-height: 1.14;
    color: var(--ink);
}
.section-head__title em {
    font-style: italic;
    font-family: var(--font-serif);
    color: var(--plum);
}
.section-head__rule {
    display: block; width: 64px; height: 2px; margin: 22px auto 0;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    position: relative;
}
.section-head__rule::after {
    content: '\2747';
    position: absolute; left: 50%; bottom: 9px; translate: -50% 0;
    font-family: var(--font-script);
    font-size: 1.2rem; line-height: 1; color: var(--gold);
}
.section-head__sub { margin-top: 20px; font-size: 1.08rem; }

/* ==========================================================================
   ABOUT THE BOOK
   ========================================================================== */
.about-book { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 40%, var(--bg-alt) 100%); }

.book-feature {
    display: grid; grid-template-columns: .92fr 1.08fr;
    gap: 64px; align-items: start;
}
.book-feature__media { position: sticky; top: 120px; }
.book-feature__frame {
    position: relative;
    background:
        radial-gradient(circle at 50% 20%, rgba(255,255,255,.9), rgba(240,232,246,.55) 70%),
        var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    padding: 44px 34px;
    box-shadow: var(--shadow-card);
}
/* 3D flip book */
.book3d { perspective: 1800px; }
.book3d__inner {
    position: relative;
    width: 100%;
    aspect-ratio: 0.686;
    transform-style: preserve-3d;
    transition: transform 1.1s var(--ease-lux);
    cursor: pointer;
}
.book3d.is-flipped .book3d__inner { transform: rotateY(180deg); }
.book3d__face {
    position: absolute; inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 8px 14px 14px 8px;
    overflow: hidden;
    box-shadow: 0 30px 50px -18px rgba(58, 40, 82, .45);
}
.book3d__face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.book3d__face--back { transform: rotateY(180deg); }
.book3d__face::before { /* spine shading + page-edge light */
    content: '';
    position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.09) 4.5%, transparent 9%),
        linear-gradient(-90deg, rgba(255,255,255,.16), transparent 14%);
}
.book3d__face--back::before {
    background:
        linear-gradient(-90deg, rgba(0,0,0,.3) 0%, rgba(0,0,0,.09) 4.5%, transparent 9%),
        linear-gradient(90deg, rgba(255,255,255,.16), transparent 14%);
}

/* Cover toggle buttons */
.cover-toggle {
    display: flex; justify-content: center; gap: 6px;
    margin-top: 28px;
    background: var(--blush);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 6px;
}
.cover-toggle__btn {
    border: none; background: transparent;
    font-family: var(--font-body);
    font-size: .72rem; font-weight: 500;
    letter-spacing: .18em; text-transform: uppercase;
    color: var(--plum-deep);
    padding: 11px 22px;
    border-radius: 999px;
    transition: background .4s, color .4s, box-shadow .4s;
}
.cover-toggle__btn:hover { color: var(--plum); background: rgba(255, 255, 255, .6); }
.cover-toggle__btn.is-active {
    background: linear-gradient(135deg, var(--plum), var(--plum-deep));
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(74, 50, 96, .55);
}
.book-feature__badge {
    position: absolute; top: -18px; right: -14px;
    background: linear-gradient(135deg, #d3a955, var(--gold));
    color: #fffdf5;
    font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 12px 26px -10px rgba(185, 143, 62, .6);
}
.book-feature__badge strong { font-family: var(--font-serif); font-size: 1rem; margin-right: 4px; }

.book-feature__lead {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    line-height: 1.55;
    color: var(--ink);
    margin-bottom: 18px;
}
.book-feature__lead strong { font-weight: 700; color: var(--plum-deep); }
.book-feature__text { margin-bottom: 40px; font-size: 1.06rem; }

.book-steps { display: flex; flex-direction: column; margin-bottom: 46px; }
.step {
    position: relative;
    display: grid; grid-template-columns: 56px 1fr; gap: 24px;
    align-items: start;
    padding-bottom: 34px;
}
.step:last-child { padding-bottom: 0; }

.step__marker { display: flex; flex-direction: column; align-items: center; }
.step__badge {
    position: relative; z-index: 2;
    width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center; flex: none;
    background: radial-gradient(circle at 35% 30%, #ffffff, var(--blush));
    border: 1.5px solid rgba(106, 74, 143, .22);
    box-shadow: 0 12px 24px -12px rgba(74, 50, 96, .5);
    transition: transform .55s var(--ease-lux), border-color .4s, box-shadow .4s;
}
.step:hover .step__badge { transform: scale(1.08) rotate(-5deg); border-color: var(--gold); box-shadow: 0 16px 30px -12px rgba(185, 143, 62, .5); }
.step__num {
    font-family: var(--font-serif);
    font-size: 1.55rem; font-weight: 700; line-height: 1;
    background: linear-gradient(180deg, var(--plum), var(--mauve));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step__line {
    position: absolute; z-index: 1;
    top: 56px; bottom: 6px; left: 27px;
    width: 2px; transform: translateX(-50%);
    background: linear-gradient(180deg, var(--mauve), rgba(185, 163, 208, .1));
}

.step__head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.step__icon {
    width: 36px; height: 36px; flex: none;
    display: grid; place-items: center;
    border-radius: 11px;
    background: var(--blush);
    color: var(--plum);
    transition: background .45s, color .45s, transform .45s var(--ease-lux);
}
.step:hover .step__icon { background: var(--plum); color: #fff; transform: translateY(-2px); }
.step__icon svg { width: 19px; height: 19px; }
.step h4 {
    font-family: var(--font-serif);
    font-size: 1.45rem; font-weight: 600; color: var(--ink);
}
.step__body p { font-size: 1.05rem; color: var(--ink-soft); max-width: 48ch; }

/* ==========================================================================
   THE 12 TYPES
   ========================================================================== */
.types {
    position: relative;
    background:
        radial-gradient(ellipse 50% 40% at 90% 100%, rgba(227, 200, 135, .12), transparent 60%),
        var(--bg);
    overflow: hidden;
}
.types__bg { position: absolute; inset: 0; pointer-events: none; }
.types__bg-arcs {
    position: absolute; left: 50%; top: 50%;
    translate: -50% -50%;
    width: min(920px, 120%); height: min(920px, 120%);
    color: rgba(106, 74, 143, .07);
}
.types__grid {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.type-card {
    position: relative;
    background: linear-gradient(165deg, #ffffff 0%, var(--surface-2) 100%);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    padding: 26px 24px 30px;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
    transition: transform .55s var(--ease-lux), box-shadow .55s var(--ease-lux), border-color .4s;
}
.type-card::before { /* soft corner wash */
    content: '';
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(circle at 50% 120%, rgba(185, 163, 208, .22), transparent 58%),
        radial-gradient(circle at 100% 0%, rgba(227, 200, 135, .16), transparent 45%);
    opacity: 0; transition: opacity .55s var(--ease-lux);
}
.type-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); border-color: rgba(106, 74, 143, .26); }
.type-card:hover::before { opacity: 1; }

.type-card__top {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
}
.type-card__index {
    font-family: var(--font-serif);
    font-size: 1.05rem; font-weight: 700;
    letter-spacing: .04em;
    color: var(--gold);
    position: relative; padding-left: 2px;
}
.type-card__index::after {
    content: ''; position: absolute; left: 0; bottom: -5px;
    width: 22px; height: 1.5px;
    background: linear-gradient(90deg, var(--gold), transparent);
    transition: width .5s var(--ease-lux);
}
.type-card:hover .type-card__index::after { width: 100%; }
.type-card__mark {
    width: 34px; height: 34px; flex: none;
    color: var(--mauve);
    opacity: .8;
    transition: color .5s, transform .7s var(--ease-lux), opacity .5s;
}
.type-card:hover .type-card__mark { color: var(--plum); transform: rotate(-14deg) scale(1.08); opacity: 1; }

.type-card__script {
    position: relative;
    display: block;
    font-family: var(--font-script);
    font-size: 2.35rem;
    line-height: 1.2;
    color: var(--plum);
    transition: color .4s;
}
.type-card:hover .type-card__script { color: var(--gold); }
.type-card p {
    position: relative;
    font-size: .95rem; line-height: 1.6;
    margin-top: 10px; color: var(--ink-soft);
}
.type-card__bar {
    position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
    background: linear-gradient(90deg, var(--plum), var(--gold));
    transform: scaleX(0); transform-origin: left;
    transition: transform .6s var(--ease-lux);
}
.type-card:hover .type-card__bar { transform: scaleX(1); }

/* ==========================================================================
   ABOUT THE AUTHOR
   ========================================================================== */
.about-author {
    background:
        radial-gradient(ellipse 55% 45% at 8% 20%, rgba(227, 200, 135, .14), transparent 60%),
        linear-gradient(180deg, var(--bg) 0%, var(--blush) 55%, var(--bg) 100%);
}
.author-feature {
    display: grid; grid-template-columns: .9fr 1.1fr;
    gap: 70px; align-items: center;
}
.author-feature__media { position: relative; }
.author-portrait__ring {
    position: absolute; inset: -22px;
    border: 1px dashed rgba(185, 143, 62, .5);
    border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%;
    animation: ringMorph 14s ease-in-out infinite;
}
@keyframes ringMorph {
    0%,100% { border-radius: 46% 54% 52% 48% / 50% 46% 54% 50%; rotate: 0deg; }
    50% { border-radius: 54% 46% 48% 52% / 46% 54% 50% 50%; rotate: 6deg; }
}
.author-portrait {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-book);
    border: 6px solid #fff;
}
.author-portrait img {
    width: 100%; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: top center;
    transition: transform 1.2s var(--ease-lux);
}
.author-portrait:hover img { transform: scale(1.045); }
.author-portrait__tag {
    position: absolute; left: 18px; right: 18px; bottom: 18px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    display: flex; flex-direction: column;
    box-shadow: 0 14px 30px -14px rgba(74, 50, 96, .35);
}
.author-portrait__tag strong {
    font-family: var(--font-serif);
    font-size: 1.2rem; font-weight: 700; color: var(--ink);
}
.author-portrait__tag span { font-size: .68rem; letter-spacing: .22em; text-transform: uppercase; color: var(--plum); margin-top: 2px; }

.author-feature__lead {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 2.3vw, 1.6rem);
    line-height: 1.5; color: var(--ink);
    margin-bottom: 16px;
}
.author-feature__text { margin-bottom: 30px; font-size: 1.06rem; }
.author-feature__text strong { color: var(--plum-deep); }

.author-quote {
    position: relative;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.25rem, 2.2vw, 1.55rem);
    color: var(--plum-deep);
    line-height: 1.55;
    padding: 26px 30px 26px 62px;
    background: linear-gradient(135deg, rgba(255,255,255,.85), rgba(240,232,246,.6));
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    margin-bottom: 32px;
    box-shadow: var(--shadow-card);
}
.author-quote em { color: var(--gold); }
.author-quote::before {
    content: '\201C';
    position: absolute; left: 20px; top: 8px;
    font-family: var(--font-script);
    font-size: 4.4rem; line-height: 1;
    color: var(--mauve);
}
.author-quote cite {
    display: block; margin-top: 10px;
    font-family: var(--font-body); font-style: normal;
    font-size: .7rem; letter-spacing: .28em; text-transform: uppercase;
    color: var(--ink-faint);
}

.author__values { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.value {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 10px 20px;
    transition: transform .45s var(--ease-lux), box-shadow .45s, border-color .4s;
}
.value:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); border-color: rgba(185, 143, 62, .4); }
.value span { color: var(--gold); font-size: 1.05rem; }
.value h5 {
    font-family: var(--font-body); font-weight: 500;
    font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
    color: var(--ink);
}

/* ==========================================================================
   QUOTE BANNER
   ========================================================================== */
.banner {
    position: relative;
    z-index: 2;
    background:
        radial-gradient(ellipse 60% 90% at 20% 10%, rgba(185, 163, 208, .35), transparent 60%),
        radial-gradient(ellipse 50% 90% at 85% 90%, rgba(227, 200, 135, .25), transparent 60%),
        linear-gradient(135deg, var(--plum-deep), #5c4178 55%, #7a5ba0);
    color: #fff;
    padding: 110px 0;
    overflow: visible;
}
.banner::before, .banner::after {
    content: ''; position: absolute; left: 0; right: 0; height: 46px;
    background: var(--bg);
}
.banner::before { top: 0; border-radius: 0 0 50% 50%; }
.banner::after { bottom: 0; border-radius: 50% 50% 0 0; }
.banner__inner { width: min(880px, 92%); margin-inline: auto; text-align: center; position: relative; z-index: 3; }
.banner__mark {
    display: block;
    font-family: var(--font-script);
    font-size: 5rem; line-height: .6;
    color: var(--gold-soft);
    margin-bottom: 18px;
}
.banner__text {
    font-family: var(--font-serif);
    font-size: clamp(1.9rem, 4.4vw, 3rem);
    font-weight: 500; font-style: italic;
    letter-spacing: .03em;
    line-height: 1.3;
}
.banner__script {
    display: block; margin-top: 18px;
    font-family: var(--font-script);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    color: var(--mauve);
}

/* Floating book mockups — front (left) & back (right) */
.banner__book {
    position: absolute; top: 47%; left: 3.5%;
    translate: 0 -50%;
    width: clamp(170px, 13.5vw, 230px);
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 28px 22px rgba(15, 7, 30, .45));
    rotate: -4deg;
    animation: bookSwayA 7s ease-in-out infinite;
}
.banner__book--right {
    left: auto; right: 4%;
    rotate: 4deg;
    animation: bookSwayB 8.5s ease-in-out infinite;
}
.banner__book img {
    display: block; width: 100%;
    border-radius: 5px 10px 10px 5px;
    transform: perspective(1200px) rotateY(16deg);
}
.banner__book--right img {
    border-radius: 10px 5px 5px 10px;
    transform: perspective(1200px) rotateY(-16deg);
}
.banner__book::after { /* spine shadow on the inner edge */
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(0,0,0,.32), rgba(0,0,0,.08) 5%, transparent 11%);
    transform: perspective(1200px) rotateY(16deg);
    pointer-events: none;
}
.banner__book--right::after {
    background: linear-gradient(-90deg, rgba(0,0,0,.32), rgba(0,0,0,.08) 5%, transparent 11%);
    transform: perspective(1200px) rotateY(-16deg);
}
@keyframes bookSwayA {
    0%,100% { translate: 0 -50%; rotate: -4deg; }
    50% { translate: 0 calc(-50% - 16px); rotate: -2.5deg; }
}
@keyframes bookSwayB {
    0%,100% { translate: 0 -50%; rotate: 4deg; }
    50% { translate: 0 calc(-50% - 20px); rotate: 2.5deg; }
}
@keyframes bookFloatY {
    0%,100% { translate: 0 0; }
    50% { translate: 0 -12px; }
}

/* ==========================================================================
   PRAISE / TESTIMONIALS
   ========================================================================== */
.praise { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%); }
.praise__rating {
    display: flex; align-items: center; justify-content: center; gap: 18px;
    margin: -26px auto 54px;
    width: max-content;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    padding: 12px 30px 12px 16px;
    box-shadow: var(--shadow-card);
}
.praise__score {
    font-family: var(--font-serif);
    font-size: 2rem; font-weight: 700; line-height: 1;
    background: linear-gradient(135deg, var(--plum), var(--gold));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.praise__meta { display: flex; flex-direction: column; gap: 2px; }
.praise__stars { color: var(--gold); letter-spacing: .18em; font-size: .9rem; }
.praise__label { font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); }

.praise__grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.praise-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    padding: 40px 30px 28px;
    transition: transform .55s var(--ease-lux), box-shadow .55s var(--ease-lux);
}
.praise-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.praise-card--featured {
    background: linear-gradient(160deg, #fffdf8, var(--blush));
    border-color: rgba(185, 143, 62, .3);
}
.praise-card__quote {
    position: absolute; top: 10px; right: 24px;
    font-family: var(--font-script);
    font-size: 4.6rem; line-height: 1;
    color: rgba(185, 163, 208, .35);
}
.praise-card__stars { color: var(--gold); letter-spacing: .2em; font-size: .82rem; margin-bottom: 14px; }
.praise-card blockquote {
    font-family: var(--font-serif);
    font-size: 1.06rem; line-height: 1.6; color: var(--ink);
    margin-bottom: 22px;
}
.praise-card blockquote em { color: var(--plum); }
.praise-card figcaption { display: flex; align-items: center; gap: 12px; }
.praise-card__avatar {
    width: 44px; height: 44px; flex: none;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, hsl(var(--hue, 262) 40% 78%), hsl(var(--hue, 262) 35% 60%));
    color: #fff;
    font-size: .78rem; font-weight: 500; letter-spacing: .08em;
    box-shadow: inset 0 0 0 3px rgba(255,255,255,.5);
}
.praise-card figcaption span:last-child { display: flex; flex-direction: column; line-height: 1.35; }
.praise-card figcaption strong { font-size: .92rem; font-weight: 600; color: var(--ink); }
.praise-card figcaption em { font-style: normal; font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { background: var(--bg-alt); }
.contact-card {
    display: grid; grid-template-columns: .85fr 1.15fr;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-book);
}
.contact-card__aside {
    position: relative;
    background:
        radial-gradient(ellipse 70% 50% at 80% 10%, rgba(185, 163, 208, .4), transparent 60%),
        linear-gradient(160deg, var(--plum-deep), #6a4a8f 70%, #7d5aa3);
    color: #f5eefb;
    padding: 54px 44px;
    display: flex; flex-direction: column;
}
.contact-card__aside h3 {
    font-family: var(--font-serif);
    font-size: 1.7rem; font-weight: 600;
    margin-bottom: 12px;
}
.contact-card__aside > p { font-size: 1rem; color: #e4d8ef; margin-bottom: 32px; }
.contact-card__aside strong { color: #fff; }

.contact__list { display: flex; flex-direction: column; gap: 22px; }
.contact__list li { display: flex; gap: 16px; align-items: flex-start; }
.contact__list li div { display: flex; flex-direction: column; line-height: 1.5; font-size: 1rem; }
.contact__list li strong {
    font-size: .66rem; font-weight: 500;
    letter-spacing: .28em; text-transform: uppercase;
    color: var(--gold-soft);
    margin-bottom: 2px;
}
.contact__list a:hover { color: var(--gold-soft); }
.contact__icon {
    width: 44px; height: 44px; flex: none;
    display: grid; place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    color: var(--gold-soft);
}
.contact__icon svg { width: 20px; height: 20px; }
.contact-card__script {
    margin-top: auto; padding-top: 36px;
    font-family: var(--font-script);
    font-size: 1.7rem;
    color: var(--mauve);
}

.contact-card__form { padding: 54px 48px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { margin-bottom: 20px; }
.form-field label {
    display: block;
    font-size: .68rem; font-weight: 500;
    letter-spacing: .24em; text-transform: uppercase;
    color: var(--plum-deep);
    margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    font-family: var(--font-body);
    font-size: .95rem; font-weight: 300;
    color: var(--ink);
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    transition: border-color .35s, box-shadow .35s, background .35s;
    appearance: none;
}
.form-field textarea { resize: vertical; min-height: 120px; }
.form-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236a4a8f' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    cursor: pointer;
}
.form-field input::placeholder, .form-field textarea::placeholder { color: var(--ink-faint); }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: none;
    border-color: var(--plum);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(106, 74, 143, .12);
}
.form-note { margin-top: 16px; font-size: .88rem; text-align: center; min-height: 1.4em; }
.form-note.is-success { color: #3f7d4f; }
.form-note.is-error { color: #b0434d; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    position: relative;
    background: linear-gradient(180deg, #45305c 0%, #3d2a52 45%, var(--plum-deep) 100%);
    color: #e6dbf0;
    overflow: hidden;
}
.site-footer__top { background: var(--bg-alt); line-height: 0; margin-bottom: -1px; }
.site-footer__top svg { display: block; width: 100%; height: 88px; }
.site-footer__mark {
    position: absolute; right: -140px; top: 30px;
    width: 480px; height: 480px;
    color: rgba(185, 163, 208, .09);
    pointer-events: none;
    animation: arcsSpin 120s linear infinite;
}

.footer-grid {
    position: relative; z-index: 1;
    display: grid; grid-template-columns: 1.6fr .8fr 1fr;
    gap: 56px;
    padding: 46px 0 64px;
}
.brand--footer { gap: 14px; }
.brand--footer .brand__mark { width: 46px; height: 46px; color: var(--mauve); }
.footer-col--brand .brand__text { color: #fff; font-size: 1.9rem; }
.footer-col--brand .brand__script { color: var(--mauve); font-size: 2.2rem; }
.footer-col--brand p { font-size: .98rem; color: #cbbcd9; margin-top: 18px; max-width: 400px; }

.footer-col--cta p { margin-bottom: 18px; }
.footer-col__script {
    display: block; margin-top: 22px;
    font-family: var(--font-script);
    font-size: 1.6rem; color: var(--mauve);
}

.footer__social { display: flex; gap: 12px; margin-top: 24px; }
.footer__social a {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    color: #e6dbf0;
    transition: transform .4s var(--ease-lux), background .4s, color .4s, border-color .4s;
}
.footer__social a:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
    transform: translateY(-4px);
}
.footer__social svg { width: 17px; height: 17px; }

.footer-col h4 {
    font-family: var(--font-serif);
    font-size: 1.15rem; font-weight: 600; color: #fff;
    margin-bottom: 18px;
    letter-spacing: .04em;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a {
    font-size: .8rem; letter-spacing: .14em; text-transform: uppercase;
    color: #cbbcd9;
    transition: color .3s, padding-left .3s;
}
.footer-col ul a:hover { color: var(--gold-soft); padding-left: 6px; }
.footer-col > p { font-size: .96rem; color: #cbbcd9; margin-bottom: 18px; }

.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding: 22px 0; }
.footer-bottom__inner {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    font-size: .76rem; color: #b3a2c4;
}
.footer-bottom__script { font-family: var(--font-script); font-size: 1.25rem; color: var(--mauve); }

/* Back to top */
.to-top {
    position: fixed; right: 26px; bottom: 26px; z-index: 800;
    width: 50px; height: 50px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(106, 74, 143, .25);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(8px);
    color: var(--plum-deep);
    box-shadow: var(--shadow-card);
    opacity: 0; visibility: hidden; transform: translateY(16px);
    transition: opacity .4s, visibility .4s, transform .4s var(--ease-lux), background .4s, color .4s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--plum); color: #fff; transform: translateY(-4px); }
.to-top svg { width: 20px; height: 20px; }

/* ==========================================================================
   REVEAL ANIMATION BASE (GSAP enhances; fallback for no-JS)
   ========================================================================== */
.js-anim [data-reveal] { opacity: 0; }
.js-anim [data-hero] { opacity: 0; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
    .types__grid { grid-template-columns: repeat(3, 1fr); }
    .nav__list { gap: 16px; }
    .nav { gap: 18px; }
    .banner__book { width: 160px; }
}

@media (max-width: 940px) {
    .section { padding: 90px 0; }
    .topbar { display: none; }
    /* Stack: front cover on top, quote in middle, back cover below */
    .banner {
        display: flex; flex-direction: column; align-items: center; gap: 30px;
        padding: 84px 0;
    }
    .banner__book {
        position: relative; top: auto; left: auto;
        translate: 0 0;
        width: 150px;
        filter: drop-shadow(0 18px 14px rgba(15, 7, 30, .35));
        rotate: -3deg;
        animation: bookFloatY 6.5s ease-in-out infinite;
        order: 1;
    }
    .banner__inner { order: 2; }
    .banner__book--right {
        left: auto; right: auto;
        rotate: 3deg;
        animation: bookFloatY 6.5s ease-in-out -3.25s infinite;
        order: 3;
    }

    /* IMPORTANT: backdrop-filter on the pill creates a containing block for
       fixed-position descendants — the mobile .nav overlay gets trapped
       inside .nav-wrap. Remove the blur on mobile so it covers the viewport. */
    .nav-wrap {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background: rgba(255, 255, 255, .95);
    }

    .hamburger { display: flex; }
    .nav {
        position: fixed; inset: 0;
        z-index: 1000;
        flex-direction: column; justify-content: center; gap: 36px;
        overflow-y: auto;
        padding: 120px 24px 48px;
        background:
            radial-gradient(circle at 50% 30%, rgba(185, 163, 208, .25), transparent 60%),
            var(--bg);
        opacity: 0; visibility: hidden;
        transition: opacity .5s var(--ease-lux), visibility .5s;
    }
    .nav.is-open { opacity: 1; visibility: visible; }
    .nav__list { flex-direction: column; gap: 26px; }
    .nav__link { font-size: 1rem; letter-spacing: .2em; }
    .nav__cta { transform: scale(1.08); }
    .hamburger { position: relative; }

    .hero { min-height: auto; padding-top: calc(var(--header-h) + 60px); padding-bottom: 110px; }
    .hero__wrap { grid-template-columns: 1fr; gap: 60px; }
    .hero__content { text-align: center; }
    .hero__eyebrow { justify-content: center; }
    .hero__eyebrow-line { display: none; }
    .hero__lead { margin-inline: auto; }
    .hero__actions { justify-content: center; }
    .hero__stats { justify-content: center; }
    .hero__book { order: -1; }
    .hero__book-stage { width: min(400px, 86%); }
    .hero__arcs { right: auto; left: 50%; translate: -50% -50%; opacity: .5; }
    .hero__scroll { display: none; }

    .book-feature { grid-template-columns: 1fr; gap: 48px; }
    .book-feature__media { position: static; max-width: 520px; margin-inline: auto; }

    .author-feature { grid-template-columns: 1fr; gap: 56px; }
    .author-feature__media { max-width: 460px; margin-inline: auto; }

    .praise__grid { grid-template-columns: 1fr 1fr; }

    .contact-card { grid-template-columns: 1fr; }
    .contact-card__aside { padding: 44px 36px; }
    .contact-card__form { padding: 44px 36px; }

    .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer-col--brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
    .container { width: 90%; }
    .section { padding: 72px 0; }
    .section-head { margin-bottom: 46px; }

    .nav-wrap { padding: 0 8px 0 16px; }
    .brand__text { font-size: 1.3rem; }
    .brand__script { font-size: 1.55rem; }
    .brand__mark { width: 34px; height: 34px; }

    .wordmark__grief { font-size: clamp(2.9rem, 14vw, 4rem); }
    .wordmark__types { font-size: clamp(3.4rem, 16vw, 4.6rem); }
    .hero__lead { font-size: 1.02rem; }
    .hero__actions .btn { width: 100%; }
    .hero__stats { gap: 16px; }
    .hero__stats strong { font-size: 1.6rem; }
    .hero__book-script { left: 2%; bottom: 4%; font-size: 1.4rem; }

    .marquee__item { font-size: 1.3rem; }

    .banner { padding: 70px 0; gap: 24px; }
    .banner__book { width: 118px; }

    .types__grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .type-card { padding: 22px 14px 18px; }
    .type-card__script { font-size: 1.7rem; }
    .type-card p { font-size: .88rem; }

        .step { grid-template-columns: 46px 1fr; gap: 16px; padding-bottom: 28px; }
        .step__badge { width: 46px; height: 46px; }
        .step__num { font-size: 1.3rem; }
        .step__line { left: 22px; top: 46px; }
        .step__icon { width: 32px; height: 32px; }
        .step h4 { font-size: 1.25rem; }

    .praise__grid { grid-template-columns: 1fr; }
    .praise__rating { flex-direction: row; margin-inline: auto; padding: 10px 22px; }

    .form-row { grid-template-columns: 1fr; gap: 0; }
    .contact-card__aside, .contact-card__form { padding: 36px 24px; }
    .contact-card__script { font-size: 1.4rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 34px; padding: 30px 0 44px; }
    .footer-bottom__inner { flex-direction: column; text-align: center; gap: 8px; }

    .to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* Mobile viewport safety */
@media (max-width: 480px) {
    .types__grid { grid-template-columns: 1fr; }
    .hero { padding-top: calc(var(--header-h) + 30px); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    html { scroll-behavior: auto; }
    .marquee__track { animation: none; flex-wrap: wrap; width: 100%; justify-content: center; }
    .hero__arcs { animation: none; }
}
