:root {
    --bg-obsidian: #0b0b0a;
    --bg-char: #141411;
    --bg-warm: #f2ede4;
    --bg-card: #fbf8f3;
    --accent-rust: #be3a2f;
    --accent-earth: #8f231c;
    --text-ink: #1f1b17;
    --text-muted: #6f6357;
    --text-light: #f7f1e8;
    --line-soft: rgba(255, 255, 255, 0.18);
    --line-dark: rgba(31, 27, 23, 0.16);
    --max-width: 1180px;
    --radius-lg: 26px;
    --radius-md: 16px;
    --shadow-soft: 0 18px 46px rgba(0, 0, 0, 0.14);
    --shadow-strong: 0 30px 70px rgba(0, 0, 0, 0.35);
    --measure: 62ch;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", sans-serif;
    background: var(--bg-char);
    color: var(--text-muted);
    line-height: 1.68;
    overflow-x: hidden;
    text-rendering: optimizeLegibility;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at 12% 12%, rgba(190, 58, 47, 0.18), transparent 42%),
        radial-gradient(circle at 86% 86%, rgba(143, 35, 28, 0.2), transparent 46%),
        linear-gradient(180deg, #141310, #0c0c0b);
}

body.is-nav-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

h1,
h2,
h3,
h4,
.page-title {
    margin: 0 0 1rem;
    color: var(--text-ink);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-weight: 600;
    line-height: 1.14;
    letter-spacing: 0.01em;
}

h1,
.page-title {
    font-size: clamp(2.5rem, 5.1vw, 4.6rem);
}

h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
    font-size: clamp(1.5rem, 2.7vw, 2.15rem);
}

h4 {
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
}

p {
    margin: 0 0 1.1rem;
    font-size: clamp(1rem, 0.35vw + 0.96rem, 1.08rem);
}

strong {
    color: var(--text-ink);
}

.shell {
    width: min(calc(100% - 2.25rem), var(--max-width));
    margin: 0 auto;
}

.shell--narrow {
    width: min(calc(100% - 2.25rem), 860px);
}

.center-text {
    text-align: center;
}

.section {
    padding: clamp(3.5rem, 7.5vw, 6.8rem) 0;
}

.page-transition {
    --overlay-show-transform: translateY(0);
    --overlay-hide-transform: translateY(-102%);
    --overlay-show-opacity: 1;
    --overlay-hide-opacity: 1;
    --overlay-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --overlay-duration: 640ms;
    position: fixed;
    inset: 0;
    z-index: 90;
    pointer-events: none;
    transform: var(--overlay-show-transform);
    opacity: var(--overlay-show-opacity);
    background:
        linear-gradient(150deg, rgba(190, 58, 47, 0.35), rgba(14, 11, 10, 0.98)),
        radial-gradient(circle at 18% 20%, rgba(247, 241, 232, 0.12), transparent 35%);
    transition:
        transform var(--overlay-duration) var(--overlay-ease),
        opacity var(--overlay-duration) var(--overlay-ease);
}

body.is-preload .page-transition,
body.is-transitioning .page-transition {
    transform: var(--overlay-show-transform);
    opacity: var(--overlay-show-opacity);
    pointer-events: auto;
}

body:not(.is-preload):not(.is-transitioning) .page-transition {
    transform: var(--overlay-hide-transform);
    opacity: var(--overlay-hide-opacity);
}

body.transition-film .page-transition {
    background:
        linear-gradient(150deg, rgba(190, 58, 47, 0.38), rgba(14, 11, 10, 0.98)),
        radial-gradient(circle at 20% 18%, rgba(247, 241, 232, 0.14), transparent 34%),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.03) 0 2px,
            rgba(0, 0, 0, 0.03) 2px 4px
        );
}

body.transition-fade .page-transition {
    --overlay-show-transform: translateY(0);
    --overlay-hide-transform: translateY(0);
    --overlay-show-opacity: 1;
    --overlay-hide-opacity: 0;
    --overlay-duration: 420ms;
    background:
        linear-gradient(145deg, rgba(16, 13, 11, 0.94), rgba(10, 9, 8, 0.9));
}

body.transition-slide .page-transition {
    --overlay-show-transform: translateX(0);
    --overlay-hide-transform: translateX(102%);
    --overlay-show-opacity: 1;
    --overlay-hide-opacity: 1;
    --overlay-duration: 560ms;
    background:
        linear-gradient(120deg, rgba(190, 58, 47, 0.26), rgba(10, 9, 8, 0.98)),
        radial-gradient(circle at 78% 30%, rgba(247, 241, 232, 0.1), transparent 38%);
}

.section--warm {
    background: var(--bg-warm);
}

.section--paper {
    background: var(--bg-card);
}

.section--dark {
    background: linear-gradient(160deg, #13110f, #090908);
    color: rgba(247, 241, 232, 0.78);
}

.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: var(--text-light);
}

.eyebrow {
    margin: 0 0 1rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.75rem;
    font-weight: 700;
    color: #9d2a20;
}

.subheading {
    margin: 0 0 1.8rem;
    color: var(--text-muted);
    font-size: 1.08rem;
}

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    transition: background-color 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
    border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
    background: rgba(11, 11, 10, 0.92);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.site-header__inner {
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.brand {
    text-decoration: none;
    color: var(--text-light);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.2rem, 2.2vw, 1.56rem);
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.site-nav a {
    position: relative;
    text-decoration: none;
    color: rgba(247, 241, 232, 0.9);
    font-size: 0.93rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.35rem;
    width: 100%;
    height: 1px;
    background: var(--accent-rust);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 220ms ease;
}

.site-nav a:hover::after,
.site-nav a.is-active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.site-nav a.is-active {
    color: var(--text-light);
}

.site-nav__item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.18rem;
}

.site-nav__item--status {
    align-items: center;
}

.nav-status {
    color: rgba(247, 241, 232, 0.48);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
}

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    z-index: 61;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: var(--text-light);
    transition: transform 220ms ease, opacity 220ms ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-scrim {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.56);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 54;
}

.nav-scrim.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.hero-stage {
    min-height: 100svh;
    padding: 8.6rem 0 3rem;
    position: relative;
    display: grid;
    align-items: end;
    isolation: isolate;
    overflow: hidden;
}

.hero-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(115deg, rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.26)),
        url("assets/hero-foreground.jpg") center / cover no-repeat;
}

.hero-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent 35%, rgba(20, 20, 17, 0.96));
}

.hero-stage__layout {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr auto;
    align-items: end;
}

.hero-stage__copy {
    max-width: 680px;
}

.hero-stage__title {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1.25rem;
}

.hero-stage__summary {
    max-width: 52ch;
    color: rgba(247, 241, 232, 0.82);
    font-size: clamp(1.04rem, 0.42vw + 0.95rem, 1.2rem);
}

.hero-stage__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.6rem;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 46px;
    min-width: 150px;
    padding: 0.68rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: transform 200ms ease, background-color 200ms ease, border-color 200ms ease;
}

.button-link svg {
    width: 16px;
    height: 16px;
}

.button-link--primary {
    background: var(--accent-rust);
    border-color: var(--accent-rust);
    color: #fff6f3;
}

.button-link--ghost {
    border-color: var(--line-soft);
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.04);
}

.button-link:hover {
    transform: translateY(-2px);
}

.hero-stage__book {
    width: min(29vw, 330px);
    border-radius: 12px;
    box-shadow: var(--shadow-strong);
    transform: translateY(4.8rem);
    border: 2px solid rgba(255, 255, 255, 0.16);
}

.scroll-hint {
    margin-top: 2.2rem;
    display: inline-grid;
    gap: 0.45rem;
    color: rgba(247, 241, 232, 0.72);
    font-size: 0.74rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.scroll-hint__line {
    width: 1px;
    height: 52px;
    margin-inline: auto;
    background: linear-gradient(rgba(247, 241, 232, 0.1), rgba(247, 241, 232, 0.85));
    animation: pulse-line 1.8s ease-in-out infinite;
}

@keyframes pulse-line {
    0%,
    100% {
        transform: scaleY(0.6);
        opacity: 0.6;
    }

    50% {
        transform: scaleY(1);
        opacity: 1;
    }
}

.retailer-strip {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 2rem;
}

.retailer-strip a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 48px;
    border-radius: 999px;
    border: 1px solid #d3b5ab;
    background: rgba(255, 255, 255, 0.74);
    color: var(--accent-earth);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.03em;
    padding: 0.35rem 0.8rem;
    text-align: center;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4.2vw, 3.6rem);
    align-items: center;
}

.split-section__media img {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
    object-position: top;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.split-section__copy h2 {
    max-width: 18ch;
}

.split-section__copy p,
.post-card__content p,
.author-block__body p,
.panel p,
.banner-dark p {
    max-width: var(--measure);
}

.post-card {
    margin-top: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fffefb;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--line-dark);
    display: grid;
    grid-template-columns: minmax(0, 1.07fr) minmax(0, 1fr);
}

.post-card__media {
    min-height: 320px;
}

.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 22%;
}

.post-card__content {
    padding: clamp(1.6rem, 3.1vw, 2.5rem);
}

.post-card__content h3 {
    color: var(--text-ink);
    margin-top: 0.2rem;
}

.post-card__content p {
    color: var(--text-muted);
}

.spotlight-grid {
    display: grid;
    gap: clamp(1.5rem, 4vw, 3.2rem);
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.spotlight-grid img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    object-position: center 24%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.spotlight-grid__text {
    padding: clamp(1.5rem, 4vw, 2.3rem);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.feature-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
    position: relative;
    min-height: 420px;
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    align-items: end;
    padding: 1.5rem;
    color: var(--text-light);
    text-decoration: none;
    transform: translateY(0);
    transition: transform 240ms ease;
}

.feature-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 4, 4, 0.08), rgba(4, 4, 4, 0.84));
}

.feature-card:hover {
    transform: translateY(-6px);
}

.feature-card__body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.75rem;
}

.feature-card__number {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(247, 241, 232, 0.78);
}

.feature-card h3 {
    margin: 0;
    color: var(--text-light);
}

.feature-card p {
    margin: 0;
    color: rgba(247, 241, 232, 0.86);
    max-height: 0;
    overflow: hidden;
    transition: max-height 260ms ease;
}

.feature-card:hover p,
.feature-card:focus-within p {
    max-height: 7rem;
}

.feature-card--trauma {
    background: url("assets/feature-trauma.jpg") center 0% / cover no-repeat;
}

.feature-card--stories {
    background: url("assets/feature-stories.jpg") center 8% / cover no-repeat;
}

.feature-card--solutions {
    background: url("assets/feature-solutions.jpg") center 8% / cover no-repeat;
}

.gallery-grid {
    margin-top: 2rem;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-item {
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 5 / 4;
    box-shadow: var(--shadow-soft);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transform: scale(1);
    transition: transform 240ms ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.photo-credit {
    margin-top: 1.8rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius, 6px);
    background: #000;
    margin-top: 2.5rem;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Stat bar */
.stat-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    text-align: center;
}

.stat-bar__item {
    padding: 2.8rem 1.4rem;
    border-right: 1px solid var(--line-soft);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.stat-bar__item:last-child {
    border-right: none;
}

.stat-bar__item strong {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(2.8rem, 4.5vw, 4.2rem);
    font-weight: 600;
    color: var(--accent-rust);
    line-height: 1;
}

.stat-bar__item span {
    font-size: 0.85rem;
    color: rgba(247, 241, 232, 0.65);
    line-height: 1.45;
    max-width: 18ch;
    margin: 0 auto;
}

/* Pull quote */
.pull-quote {
    margin: 0;
    padding: 3rem 0;
}

.pull-quote p {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.6rem, 2.8vw, 2.5rem);
    font-style: italic;
    font-weight: 400;
    color: var(--text-light);
    line-height: 1.4;
    margin: 0 0 1.2rem;
}

.pull-quote footer {
    font-size: 0.88rem;
    letter-spacing: 0.1em;
    color: rgba(247, 241, 232, 0.55);
    text-transform: uppercase;
}

.pull-quote cite {
    font-style: italic;
    text-transform: none;
}

/* Final CTA banner */
.cta-banner h2 {
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    margin-bottom: 0.8rem;
}

.cta-banner__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 2rem;
}

.page-hero {
    padding: 8.5rem 0 3rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(130deg, #191611, #0c0b0a);
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(190, 58, 47, 0.24), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(143, 35, 28, 0.2), transparent 45%);
}

.page-hero .shell {
    position: relative;
}

.page-hero .eyebrow,
.page-hero .page-title {
    color: var(--text-light);
}

.page-hero .page-title em {
    font-style: italic;
    color: rgba(247, 241, 232, 0.65);
}

.page-hero .subheading {
    color: rgba(247, 241, 232, 0.68);
    max-width: 54ch;
    margin-inline: auto;
}

.author-stack {
    display: grid;
    gap: 1.8rem;
}

.author-divider {
    display: flex;
    justify-content: center;
    padding: 1rem 0 0.5rem;
}

.author-quote {
    margin: 0;
    padding: 2rem 2.5rem;
    max-width: 680px;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.3rem, 2.2vw, 1.75rem);
    font-style: italic;
    font-weight: 600;
    color: var(--text-ink);
    text-align: center;
    line-height: 1.45;
    border-top: 1px solid var(--line-dark);
    border-bottom: 1px solid var(--line-dark);
    position: relative;
}

.author-quote::before {
    content: "\201C";
    position: absolute;
    top: -0.6rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    line-height: 1;
    color: var(--accent-rust);
    background: var(--bg-card);
    padding: 0 0.4rem;
}

.author-block {
    display: grid;
    grid-template-columns: 0.98fr 1.02fr;
    gap: clamp(1.1rem, 3vw, 2.4rem);
    align-items: stretch;
    background: #fffdf8;
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.author-block--reverse {
    grid-template-columns: 1.02fr 0.98fr;
}

.author-block__media img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
    object-position: center 24%;
}

.author-block__body {
    padding: clamp(1.4rem, 3.2vw, 2.5rem);
}

.author-block__body h2,
.author-block__body h3 {
    margin-bottom: 0.8rem;
}

.author-block__body p {
    color: var(--text-muted);
}

.banner-dark {
    padding: clamp(2rem, 5vw, 3rem);
    border-radius: var(--radius-lg);
    background: linear-gradient(130deg, #1a1511, #0e0e0d);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.banner-dark h2,
.banner-dark p {
    color: var(--text-light);
}

.contact-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.panel {
    padding: clamp(1.4rem, 3.5vw, 2.5rem);
    border-radius: var(--radius-lg);
    background: #fffdf8;
    border: 1px solid var(--line-dark);
    box-shadow: var(--shadow-soft);
}

.panel h2,
.panel h3,
.panel h4 {
    margin-bottom: 0.6rem;
}

.panel--info {
    background: linear-gradient(145deg, #17130f, #0b0b0a);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(247, 241, 232, 0.82);
}

.panel--info h3,
.panel--info h4,
.panel--info strong {
    color: var(--text-light);
}

.panel--info strong {
    font-weight: 700;
}

.panel--info p {
    margin-bottom: 0.5rem;
}

.contact-form {
    display: grid;
    gap: 0.95rem;
}

.form-field {
    position: relative;
}

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 1rem 0.95rem 0.65rem;
    border-radius: 12px;
    border: 1px solid var(--line-dark);
    background: #fffcf8;
    font: inherit;
    color: var(--text-ink);
    transition: border-color 180ms ease;
}

.form-field textarea {
    min-height: 160px;
    resize: vertical;
}

.form-field label {
    position: absolute;
    top: 0.9rem;
    left: 0.95rem;
    font-size: 0.83rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #816f61;
    pointer-events: none;
    transform-origin: left center;
    transition: transform 180ms ease, color 180ms ease;
}

.form-field :is(input, textarea):focus,
.form-field :is(input, textarea):not(:placeholder-shown) {
    border-color: #cf766f;
}

.form-field :is(input, textarea):focus + label,
.form-field :is(input, textarea):not(:placeholder-shown) + label {
    transform: translateY(-0.68rem) scale(0.84);
    color: var(--accent-earth);
}

.form-note,
.form-success {
    margin: 0;
    font-size: 0.93rem;
}

.form-success {
    color: #8f231c;
    font-weight: 700;
}

.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.7rem;
}

.hours-table td {
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(247, 241, 232, 0.18);
}

.hours-table td:last-child {
    text-align: right;
}

.site-footer {
    background: #080808;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(247, 241, 232, 0.74);
}

.site-footer__inner {
    padding: 2.2rem 0;
    display: grid;
    gap: 1.6rem;
    grid-template-columns: 1.2fr 1fr 1fr;
}

.site-footer h4 {
    margin-bottom: 0.8rem;
    color: var(--text-light);
}

.site-footer p {
    margin: 0;
    font-size: 0.96rem;
    color: rgba(247, 241, 232, 0.74);
}

.footer-nav,
.footer-links {
    display: grid;
    gap: 0.6rem;
}

.footer-nav a,
.footer-links a {
    color: rgba(247, 241, 232, 0.78);
    text-decoration: none;
    font-size: 0.93rem;
}

.footer-nav a:hover,
.footer-links a:hover,
.footer-nav a.is-active {
    color: var(--text-light);
}

.footer-legal {
    margin-top: 1rem;
    font-size: 0.82rem;
    opacity: 0.8;
}

.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal[data-delay="1"] {
    transition-delay: 70ms;
}

.reveal[data-delay="2"] {
    transition-delay: 130ms;
}

.reveal[data-delay="3"] {
    transition-delay: 180ms;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .page-transition,
    .reveal,
    .button-link,
    .gallery-item img,
    .feature-card,
    .scroll-hint__line {
        transition: none;
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 1024px) {
    .hero-stage__layout,
    .split-section,
    .spotlight-grid,
    .author-block,
    .author-block--reverse,
    .post-card,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-stage {
        min-height: 0;
        padding-bottom: 4rem;
    }

    .hero-stage__book {
        width: min(66vw, 320px);
        transform: translateY(0);
        justify-self: start;
    }

    .feature-grid,
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-footer__inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .site-header__inner {
        min-height: 78px;
    }

    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(84vw, 340px);
        background: #0d0c0b;
        border-left: 1px solid rgba(255, 255, 255, 0.14);
        padding: 6.5rem 1.5rem 2rem;
        display: grid;
        align-content: start;
        gap: 1.2rem;
        transform: translateX(100%);
        transition: transform 220ms ease;
        z-index: 60;
    }

    .site-nav.is-open {
        transform: translateX(0);
    }

    .site-nav a {
        font-family: "Cormorant Garamond", Georgia, serif;
        font-size: 1.45rem;
        letter-spacing: 0.04em;
        text-transform: none;
    }

    .site-nav__item--status {
        align-items: flex-start;
    }

    .nav-status {
        font-size: 0.72rem;
        letter-spacing: 0.16em;
    }

    .hero-stage {
        padding-top: 6.7rem;
    }

    .hero-stage__title {
        font-size: clamp(2rem, 12vw, 3.2rem);
    }

    .retailer-strip,
    .feature-grid,
    .gallery-grid,
    .site-footer__inner {
        grid-template-columns: 1fr;
    }

    .post-card__media {
        min-height: 240px;
    }

    .stat-bar {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-bar__item {
        border-right: none;
        border-bottom: 1px solid var(--line-soft);
    }

    .stat-bar__item:nth-child(odd) {
        border-right: 1px solid var(--line-soft);
    }

    .stat-bar__item:nth-child(3),
    .stat-bar__item:nth-child(4) {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .stat-bar {
        grid-template-columns: 1fr;
    }

    .stat-bar__item {
        border-right: none;
        border-bottom: 1px solid var(--line-soft);
    }

    .stat-bar__item:last-child {
        border-bottom: none;
    }

    .cta-banner__actions {
        flex-direction: column;
        align-items: center;
    }
}

/* ============================================================
   APP STYLES — Conquering Imprisoned Minds Course Platform
   ============================================================ */

/* ---- Auth page ---- */
.auth-page {
    min-height: 100svh;
    display: grid;
    align-items: center;
    padding: 7rem 1rem 3rem;
}

.auth-card {
    width: min(100%, 480px);
    margin: 0 auto;
    background: rgba(20, 17, 14, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    padding: clamp(2rem, 5vw, 3rem);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-strong);
}

.auth-card h1,
.auth-card h2 {
    color: var(--text-light);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    margin-bottom: 0.3rem;
}

.auth-card .eyebrow {
    color: rgba(190, 58, 47, 0.9);
}

.auth-beta-note {
    display: grid;
    gap: 0.25rem;
    margin: -0.55rem 0 1.45rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(190, 58, 47, 0.35);
    border-radius: 10px;
    background: rgba(190, 58, 47, 0.12);
    color: rgba(247, 241, 232, 0.72);
    font-size: 0.88rem;
}

.auth-beta-note strong {
    color: var(--text-light);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tab-bar {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 1.8rem;
}

.tab-bar button {
    flex: 1;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    color: rgba(247, 241, 232, 0.5);
    font-family: "Manrope", sans-serif;
    font-size: 0.87rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 180ms ease, border-color 180ms ease;
    margin-bottom: -1px;
}

.tab-bar button.is-active {
    color: var(--text-light);
    border-bottom-color: var(--accent-rust);
}

.app-form {
    display: grid;
    gap: 1rem;
}

.form-field--dark input,
.form-field--dark textarea,
.form-field--dark select {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text-light);
}

.form-field--dark label {
    color: rgba(247, 241, 232, 0.5);
}

.form-field--dark :is(input, textarea, select):focus,
.form-field--dark :is(input, textarea):not(:placeholder-shown) {
    border-color: rgba(190, 58, 47, 0.7);
}

.form-field--dark :is(input, textarea):focus + label,
.form-field--dark :is(input, textarea):not(:placeholder-shown) + label {
    color: var(--accent-rust);
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: rgba(247, 241, 232, 0.3);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0.5rem 0;
}

.form-divider::before,
.form-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.button-link--full {
    width: 100%;
    justify-content: center;
}

.button-link--google {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-light);
}

.button-link--google:hover {
    background: rgba(255, 255, 255, 0.13);
}

.auth-footer-link {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.9rem;
    color: rgba(247, 241, 232, 0.5);
}

.auth-footer-link a,
.auth-text-link {
    color: var(--accent-rust);
    text-decoration: none;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    font-size: inherit;
    padding: 0;
}

.auth-footer-link a:hover,
.auth-text-link:hover {
    text-decoration: underline;
}

.form-error {
    padding: 0.7rem 0.95rem;
    border-radius: 10px;
    background: rgba(190, 58, 47, 0.15);
    border: 1px solid rgba(190, 58, 47, 0.35);
    color: #f5a89a;
    font-size: 0.88rem;
    display: none;
}

.form-error.is-visible {
    display: block;
}

/* ---- App shell layout ---- */
.app-layout {
    min-height: 100svh;
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "sidebar header"
        "sidebar main";
    padding-top: 88px;
}

.app-sidebar {
    grid-area: sidebar;
    position: fixed;
    top: 88px;
    left: 0;
    bottom: 0;
    width: 260px;
    background: linear-gradient(180deg, #131210, #0d0d0c);
    border-right: 1px solid rgba(255, 255, 255, 0.09);
    padding: 1.8rem 0;
    overflow-y: auto;
    z-index: 40;
}

.app-sidebar__section {
    padding: 0 1rem;
    margin-bottom: 1.8rem;
}

.app-sidebar__label {
    font-size: 0.68rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(247, 241, 232, 0.3);
    font-weight: 700;
    padding: 0 0.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.app-sidebar__nav {
    display: grid;
    gap: 0.1rem;
}

.app-sidebar__nav a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(247, 241, 232, 0.65);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 160ms ease, color 160ms ease;
}

.app-sidebar__nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-light);
}

.app-sidebar__nav a.is-active {
    background: rgba(190, 58, 47, 0.18);
    color: var(--text-light);
}

.app-sidebar__nav a svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.8;
}

.app-sidebar__progress {
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    margin: 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.app-sidebar__progress p {
    margin: 0 0 0.3rem;
    font-size: 0.75rem;
    color: rgba(247, 241, 232, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.app-sidebar__progress strong {
    color: var(--text-light);
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-earth), var(--accent-rust));
    transition: width 600ms ease;
}

.app-main {
    grid-area: main;
    padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.2rem, 3vw, 2.8rem);
    background: #0e0d0c;
    min-height: calc(100svh - 88px);
}

/* ---- Dashboard ---- */
.dashboard-welcome {
    margin-bottom: 2rem;
}

.dashboard-welcome h2 {
    color: var(--text-light);
    margin-bottom: 0.3rem;
}

.dashboard-welcome p {
    color: rgba(247, 241, 232, 0.5);
    margin: 0;
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-md);
    padding: 1.4rem 1.6rem;
}

.stat-card__label {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(247, 241, 232, 0.4);
    margin: 0 0 0.4rem;
}

.stat-card__value {
    font-family: "Cormorant Garamond", serif;
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--accent-rust);
    line-height: 1;
    margin: 0;
}

.stat-card__desc {
    font-size: 0.84rem;
    color: rgba(247, 241, 232, 0.4);
    margin: 0.3rem 0 0;
}

.section-heading {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    color: var(--text-light);
    margin: 0 0 1rem;
}

.lesson-list {
    display: grid;
    gap: 0.6rem;
}

.lesson-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    text-decoration: none;
    color: var(--text-light);
    transition: background 160ms ease, border-color 160ms ease;
}

.lesson-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
}

.lesson-item--completed {
    border-color: rgba(190, 58, 47, 0.3);
}

.lesson-item--locked {
    opacity: 0.45;
    pointer-events: none;
}

.lesson-item__number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(247, 241, 232, 0.6);
    flex-shrink: 0;
}

.lesson-item--completed .lesson-item__number {
    background: rgba(190, 58, 47, 0.25);
    border-color: rgba(190, 58, 47, 0.5);
    color: var(--accent-rust);
}

.lesson-item__title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0 0 0.15rem;
}

.lesson-item__meta {
    font-size: 0.8rem;
    color: rgba(247, 241, 232, 0.4);
    margin: 0;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.badge--done {
    background: rgba(190, 58, 47, 0.2);
    color: #e8806f;
}

.badge--active {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(247, 241, 232, 0.8);
}

.badge--locked {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(247, 241, 232, 0.3);
}

/* ---- Lesson player ---- */
.lesson-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    align-items: start;
}

.lesson-content {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.lesson-content h2,
.lesson-content h3 {
    color: var(--text-light);
}

.lesson-content p,
.lesson-content li {
    color: rgba(247, 241, 232, 0.72);
}

.lesson-disclaimer {
    padding: 1rem 1.3rem;
    border-radius: 10px;
    border-left: 3px solid var(--accent-rust);
    background: rgba(190, 58, 47, 0.08);
    color: rgba(247, 241, 232, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1.8rem;
}

.lesson-disclaimer strong {
    color: rgba(247, 241, 232, 0.9);
}

.grounding-box {
    padding: 1.2rem 1.5rem;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.5rem 0;
    text-align: center;
}

.grounding-box p {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.1rem;
    color: rgba(247, 241, 232, 0.8);
    margin: 0;
}

.grounding-box__label {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-rust);
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.worksheet-section {
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.8rem;
}

.worksheet-question {
    margin-bottom: 1.4rem;
}

.worksheet-question label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    color: rgba(247, 241, 232, 0.85);
    margin-bottom: 0.55rem;
}

.worksheet-question textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: var(--text-light);
    font: inherit;
    font-size: 0.9rem;
    resize: vertical;
    transition: border-color 180ms ease;
}

.worksheet-question textarea:focus {
    outline: none;
    border-color: rgba(190, 58, 47, 0.6);
}

.lesson-panel {
    position: sticky;
    top: calc(88px + 1.5rem);
    display: grid;
    gap: 1rem;
}

.panel--app {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-md);
    padding: 1.3rem;
}

.panel--app h4 {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
}

.panel--app p {
    font-size: 0.88rem;
    color: rgba(247, 241, 232, 0.5);
    margin: 0;
}

/* ---- AI Chat ---- */
.chat-window {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-earth), var(--accent-rust));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: "Cormorant Garamond", serif;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
}

.chat-header-info strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
}

.chat-header-info span {
    font-size: 0.75rem;
    color: rgba(247, 241, 232, 0.4);
}

.chat-messages {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    max-height: 420px;
    min-height: 200px;
}

.chat-msg {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
}

.chat-msg--user {
    flex-direction: row-reverse;
}

.chat-msg__bubble {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.6;
}

.chat-msg--ai .chat-msg__bubble {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(247, 241, 232, 0.82);
    border-bottom-left-radius: 4px;
}

.chat-msg--user .chat-msg__bubble {
    background: rgba(190, 58, 47, 0.22);
    color: rgba(247, 241, 232, 0.9);
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    color: var(--text-light);
    font: inherit;
    font-size: 0.88rem;
    resize: none;
    min-height: 38px;
    max-height: 120px;
}

.chat-input:focus {
    outline: none;
    border-color: rgba(190, 58, 47, 0.5);
}

.chat-send {
    background: var(--accent-rust);
    border: none;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    transition: background 160ms ease;
}

.chat-send:hover {
    background: var(--accent-earth);
}

.chat-send svg {
    width: 16px;
    height: 16px;
}

/* ---- Trauma Timeline ---- */
.timeline-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 1.5rem;
    align-items: start;
}

.timeline-entries {
    display: grid;
    gap: 0.8rem;
}

.timeline-entry {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.timeline-entry:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.16);
}

.timeline-entry__stage {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent-rust);
    font-weight: 700;
    margin: 0 0 0.3rem;
}

.timeline-entry__title {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem;
}

.timeline-entry__meta {
    font-size: 0.82rem;
    color: rgba(247, 241, 232, 0.4);
    margin: 0 0 0.6rem;
}

.intensity-meter {
    display: flex;
    gap: 3px;
    margin-top: 0.3rem;
}

.intensity-meter__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
}

.intensity-meter__dot.is-filled {
    background: var(--accent-rust);
}

.timeline-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.1rem;
    background: rgba(190, 58, 47, 0.08);
    border: 1px dashed rgba(190, 58, 47, 0.35);
    border-radius: var(--radius-md);
    color: var(--accent-rust);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background 160ms ease;
    letter-spacing: 0.06em;
    font-family: "Manrope", sans-serif;
    width: 100%;
}

.timeline-add-btn:hover {
    background: rgba(190, 58, 47, 0.14);
}

.pause-ground-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: rgba(247, 241, 232, 0.75);
    font-family: "Manrope", sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 160ms ease;
    margin-bottom: 1rem;
}

.pause-ground-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Timeline entry modal */
.timeline-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 5, 5, 0.75);
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

.timeline-modal-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.timeline-modal {
    width: min(100%, 680px);
    max-height: 88vh;
    overflow-y: auto;
    background: #141210;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-strong);
}

.timeline-modal h3 {
    color: var(--text-light);
    margin-bottom: 1.4rem;
}

.modal-close {
    background: rgba(255, 255, 255, 0.07);
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(247, 241, 232, 0.6);
    float: right;
    margin: -0.3rem -0.3rem 0 0;
    flex-shrink: 0;
    transition: background 150ms ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.13);
    color: var(--text-light);
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: 1fr 1fr;
}

.modal-grid .form-field--span {
    grid-column: 1 / -1;
}

.intensity-field label {
    display: block;
    font-size: 0.83rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(247, 241, 232, 0.5);
    margin-bottom: 0.5rem;
}

.intensity-slider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.intensity-slider input[type="range"] {
    flex: 1;
    accent-color: var(--accent-rust);
}

.intensity-slider span {
    color: var(--accent-rust);
    font-weight: 700;
    min-width: 2ch;
}

/* Grounding / Pause overlay */
.grounding-overlay {
    position: fixed;
    inset: 0;
    background: rgba(7, 6, 5, 0.93);
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
}

.grounding-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.grounding-card {
    width: min(100%, 500px);
    text-align: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    background: rgba(20, 18, 14, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
}

.grounding-card h3 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.grounding-card p {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-size: 1.15rem;
    color: rgba(247, 241, 232, 0.78);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.breath-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(190, 58, 47, 0.35), rgba(143, 35, 28, 0.12));
    border: 2px solid rgba(190, 58, 47, 0.4);
    margin: 0 auto 1.5rem;
    animation: breathe 8s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
}

/* ---- Admin portal ---- */
.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-toolbar h2 {
    color: var(--text-light);
    font-size: clamp(1.4rem, 2.5vw, 1.9rem);
    margin: 0;
}

.admin-table-wrap {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table th {
    padding: 0.85rem 1.2rem;
    text-align: left;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(247, 241, 232, 0.35);
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.admin-table td {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(247, 241, 232, 0.75);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.admin-action-btns {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background 150ms ease;
}

.btn-icon--edit {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(247, 241, 232, 0.7);
}

.btn-icon--edit:hover {
    background: rgba(255, 255, 255, 0.13);
    color: var(--text-light);
}

.btn-icon--delete {
    background: rgba(190, 58, 47, 0.12);
    color: rgba(190, 58, 47, 0.8);
}

.btn-icon--delete:hover {
    background: rgba(190, 58, 47, 0.22);
    color: #e8806f;
}

.btn-icon svg {
    width: 14px;
    height: 14px;
}

.admin-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.admin-tabs button {
    background: none;
    border: none;
    padding: 0.75rem 1.2rem;
    color: rgba(247, 241, 232, 0.45);
    font-family: "Manrope", sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color 160ms ease, border-color 160ms ease;
    margin-bottom: -1px;
}

.admin-tabs button.is-active {
    color: var(--text-light);
    border-bottom-color: var(--accent-rust);
}

.admin-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
}

.admin-form-grid .form-field--span {
    grid-column: 1 / -1;
}

/* ---- Responsive app layout ---- */
@media (max-width: 1024px) {
    .lesson-layout,
    .timeline-layout {
        grid-template-columns: 1fr;
    }

    .lesson-panel {
        position: static;
    }
}

@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main";
    }

    .app-sidebar {
        display: none;
    }

    .app-main {
        grid-area: main;
    }
}

@media (max-width: 760px) {
    .modal-grid,
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .admin-table-wrap {
        overflow-x: auto;
    }

    .admin-table {
        min-width: 600px;
    }
}

/* ==========================================================================
   COACH WIDGET — floating AI coach (chat + voice)
   ========================================================================== */

/* Floating action button */
.coach-fab {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1.25rem 0.9rem 1rem;
  background: var(--accent-rust);
  color: #fff;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(190, 58, 47, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, padding 0.2s ease;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.coach-fab svg { width: 20px; height: 20px; flex-shrink: 0; }
.coach-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(190, 58, 47, 0.55); }
.coach-fab.is-open { padding: 0.9rem; border-radius: 50%; }
.coach-fab__label { white-space: nowrap; }

/* Backdrop (mobile) */
.coach-backdrop {
  display: none;
}
@media (max-width: 600px) {
  .coach-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(11, 11, 10, 0.7);
    z-index: 1199;
  }
}

/* Drawer */
.coach-drawer {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  z-index: 1200;
  width: 380px;
  max-width: calc(100vw - 2rem);
  max-height: 70vh;
  background: #141412;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* hidden state */
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.coach-drawer.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}

@media (max-width: 600px) {
  .coach-drawer {
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
  }
  .coach-fab { bottom: 1.25rem; right: 1.25rem; }
}

/* Header */
.coach-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

.coach-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(190, 58, 47, 0.18);
  border: 1px solid rgba(190, 58, 47, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-rust);
  flex-shrink: 0;
}

.coach-ctrl-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(247, 241, 232, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.coach-ctrl-btn svg { width: 15px; height: 15px; }
.coach-ctrl-btn:hover { background: rgba(255, 255, 255, 0.14); color: var(--text-light); }
.coach-ctrl-btn.is-active { background: rgba(190, 58, 47, 0.25); color: var(--accent-rust); }

/* Message area */
.coach-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.coach-msg {
  display: flex;
  flex-direction: column;
  max-width: 88%;
}
.coach-msg--user { align-self: flex-end; align-items: flex-end; }
.coach-msg--assistant { align-self: flex-start; align-items: flex-start; }

.coach-msg__bubble {
  padding: 0.65rem 0.9rem;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-light);
}
.coach-msg--user .coach-msg__bubble {
  background: var(--accent-rust);
  border-bottom-right-radius: 4px;
}
.coach-msg--assistant .coach-msg__bubble {
  background: rgba(255, 255, 255, 0.07);
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.coach-msg__bubble p { margin: 0; }

/* Typing dots */
.coach-msg__bubble--typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 0.75rem 1rem;
}
.coach-msg__bubble--typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(247, 241, 232, 0.35);
  animation: coach-blink 1.2s infinite;
}
.coach-msg__bubble--typing span:nth-child(2) { animation-delay: 0.2s; }
.coach-msg__bubble--typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes coach-blink {
  0%, 80%, 100% { opacity: 0.3; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.2); }
}

/* Error bar */
.coach-error {
  padding: 0.5rem 1rem;
  background: rgba(190, 58, 47, 0.15);
  border-top: 1px solid rgba(190, 58, 47, 0.3);
  color: #f5a89a;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Suggested starters */
.coach-starters {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0 0.75rem 0.75rem;
}
.coach-starter-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: rgba(247, 241, 232, 0.65);
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
  font-family: var(--font-body);
}
.coach-starter-btn:hover {
  background: rgba(190, 58, 47, 0.15);
  color: var(--text-light);
  border-color: rgba(190, 58, 47, 0.35);
}

/* Input row */
.coach-input-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.coach-mic-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 241, 232, 0.55);
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.coach-mic-btn svg { width: 15px; height: 15px; }
.coach-mic-btn:hover, .coach-mic-btn.is-listening {
  background: rgba(190, 58, 47, 0.2);
  border-color: var(--accent-rust);
  color: var(--accent-rust);
}
.coach-mic-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* Pulse ring when listening */
.mic-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--accent-rust);
  animation: mic-ring 1s ease infinite;
  pointer-events: none;
}
@keyframes mic-ring {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.5); }
}

.coach-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 0.55rem 0.8rem;
  outline: none;
  transition: border-color 0.15s;
}
.coach-input::placeholder { color: rgba(247, 241, 232, 0.3); }
.coach-input:focus { border-color: rgba(190, 58, 47, 0.5); }

.coach-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent-rust);
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, transform 0.15s;
}
.coach-send-btn svg { width: 14px; height: 14px; }
.coach-send-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.coach-send-btn:not(:disabled):hover { transform: scale(1.08); }

/* Disclaimer */
.coach-disclaimer {
  padding: 0.4rem 1rem 0.65rem;
  font-size: 0.72rem;
  color: rgba(247, 241, 232, 0.28);
  text-align: center;
  flex-shrink: 0;
  line-height: 1.4;
}
