:root {
    --clay-cream: #F7ECDF;
    --sand-light: #EBD6BA;
    --terracotta: #C0673F;
    --terracotta-deep: #8E4424;
    --olive-deep: #5C6337;
    --cocoa-ink: #3B2519;
    --blush-soft: #E3A98C;
    --ember-radius: 18px;
    --ember-shadow: 0 18px 40px -16px rgba(94, 50, 20, 0.45);
    --font-display: "Fraunces", Georgia, serif;
    --font-body: "Nunito Sans", system-ui, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: clamp(1.125rem, 1.6vw, 1.4rem);
    line-height: 1.6;
    color: var(--cocoa-ink);
    background: var(--clay-cream);
    overflow-x: hidden;
}

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

a {
    color: var(--terracotta-deep);
}

a:focus-visible,
input:focus-visible,
button:focus-visible {
    outline: 3px solid var(--olive-deep);
    outline-offset: 3px;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    line-height: 1.15;
    margin: 0 0 0.6em;
    color: var(--cocoa-ink);
}

h1 {
    font-size: clamp(2.6rem, 6vw, 5.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4.2vw, 3.6rem);
    font-weight: 600;
}

h3 {
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 600;
}

p {
    margin: 0 0 1em;
    max-width: 38rem;
}

/* ---------- Screens ---------- */

.ember-hero,
.ember-screen,
.ember-order {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 8vw, 6rem) 1.25rem;
    overflow: hidden;
}

.ember-hero {
    background:
        radial-gradient(circle at 15% 15%, var(--sand-light), transparent 55%),
        radial-gradient(circle at 90% 85%, var(--blush-soft), transparent 45%),
        var(--clay-cream);
}

.ember-hero-photo,
.ember-screen-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.ember-screen::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(59, 37, 25, 0.15), rgba(59, 37, 25, 0.45));
    z-index: 0;
}

.ember-order {
    background:
        radial-gradient(circle at 85% 10%, rgba(247, 236, 223, 0.7), transparent 40%),
        var(--sand-light);
}

/* ---------- Plaque (text overlay) ---------- */

.ember-plaque {
    position: relative;
    z-index: 1;
    max-width: 38rem;
    width: 100%;
    padding: clamp(1.5rem, 4vw, 3rem);
    background: rgba(247, 236, 223, 0.92);
    border-radius: var(--ember-radius);
    box-shadow: var(--ember-shadow);
}

.ember-screen-left .ember-plaque {
    margin-right: auto;
}

.ember-screen-right .ember-plaque {
    margin-left: auto;
}

.ember-kicker {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    color: var(--terracotta-deep);
    margin-bottom: 1rem;
}

.ember-lead {
    font-size: clamp(1.125rem, 1.6vw, 1.4rem);
}

.ember-hero-row {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    align-items: flex-start;
    margin-top: 1.5rem;
}

/* ---------- Cover (CSS-drawn) ---------- */

.ember-cover {
    position: relative;
    width: min(60vw, 12rem);
    aspect-ratio: 2 / 3;
    border-radius: 6px var(--ember-radius) var(--ember-radius) 6px;
    background: linear-gradient(150deg, var(--terracotta) 0%, var(--terracotta-deep) 60%, #5a2a16 100%);
    color: #FFF6EC;
    padding: 1.5rem 1.25rem 1.25rem 1.9rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 12px 18px 30px -10px rgba(59, 37, 25, 0.55);
}

.ember-cover::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 14px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), rgba(255, 255, 255, 0.12));
    border-radius: 6px 0 0 6px;
}

.ember-cover::after {
    content: "";
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(255, 235, 210, 0.45);
    border-radius: 10px;
    pointer-events: none;
}

.ember-cover-small {
    width: min(55vw, 10rem);
}

.ember-cover-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.9;
}

.ember-cover-title {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    line-height: 1.1;
}

.ember-cover-author {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    border-top: 1px solid rgba(255, 235, 210, 0.5);
    padding-top: 0.6rem;
}

/* ---------- Buttons ---------- */

.ember-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.5rem;
    background: var(--terracotta);
    color: #FFF8F0;
    font-weight: 800;
    font-size: 1.2rem;
    text-decoration: none;
    padding: 1rem 2.2rem;
    border-radius: 999px;
    box-shadow: 0 10px 22px -8px rgba(142, 68, 36, 0.6);
    transition: transform 0.2s ease, background 0.2s ease;
}

.ember-cta:hover {
    background: var(--terracotta-deep);
    transform: translateY(-2px);
}

/* ---------- Chapters, audience, quote ---------- */

.ember-audience {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.ember-audience li {
    position: relative;
    padding: 0.6rem 0 0.6rem 1.6rem;
    border-bottom: 1px dashed rgba(59, 37, 25, 0.25);
}

.ember-audience li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1.15rem;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--terracotta);
}

.ember-chapters {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    counter-reset: chapter;
}

.ember-chapters li {
    position: relative;
    padding-left: 3.2rem;
    margin-bottom: 1rem;
}

.ember-chapters li::before {
    counter-increment: chapter;
    content: counter(chapter);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 50%;
    background: var(--olive-deep);
    color: #FFF8F0;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1rem;
}

.ember-chapters h3 {
    font-size: 1.15rem;
    margin: 0 0 0.2rem;
}

.ember-chapters p {
    margin: 0;
}

.ember-quote {
    margin: 1.5rem 0 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--olive-deep);
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    background: rgba(227, 169, 140, 0.18);
    border-radius: 0 var(--ember-radius) var(--ember-radius) 0;
}

.ember-quote p {
    margin: 0;
    max-width: none;
}

.ember-quote cite {
    display: block;
    font-family: var(--font-body);
    font-style: normal;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    color: var(--olive-deep);
}

/* ---------- Order section ---------- */

.ember-order-grid {
    display: grid;
    gap: 2.5rem;
    width: 100%;
    max-width: 64rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.ember-order-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.ember-order-facts {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-width: 22rem;
}

.ember-order-facts li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(59, 37, 25, 0.2);
    font-size: 1rem;
}

.ember-order-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ember-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--clay-cream);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: var(--ember-radius);
    box-shadow: var(--ember-shadow);
    width: 100%;
    max-width: 34rem;
}

.ember-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.ember-form input {
    width: 100%;
    min-height: 3.5rem;
    font: inherit;
    font-size: 1.125rem;
    padding: 0.8rem 1rem;
    color: var(--cocoa-ink);
    background: #FFFDF9;
    border: 2px solid var(--sand-light);
    border-radius: 12px;
}

.ember-form input::placeholder {
    color: #8a6f5e;
}

.ember-form button {
    min-height: 3.5rem;
    font: inherit;
    font-weight: 800;
    font-size: 1.2rem;
    background: var(--olive-deep);
    color: #FFF8F0;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    margin-top: 0.5rem;
}

.ember-form button:hover {
    background: #474d28;
}

.ember-consent {
    font-size: 0.9rem;
    margin: 0;
    max-width: none;
    color: #6b4a3a;
}

/* ---------- Footer ---------- */

.ember-footer {
    background: var(--cocoa-ink);
    color: #F3E4D3;
    padding: 2.5rem 1.25rem;
    text-align: center;
    font-size: 1rem;
}

.ember-footer p {
    margin: 0.4rem auto;
}

.ember-footer a {
    color: #F6C7A8;
}

.ember-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.ember-footer-note {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* ---------- Legal pages ---------- */

.legal-page {
    background: var(--clay-cream);
}

.legal-main {
    max-width: 46rem;
    margin: 0 auto;
    padding: 3rem 1.25rem 4rem;
}

.legal-main h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

.legal-main h2 {
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    margin-top: 0.5rem;
}

.legal-main p,
.legal-main li {
    max-width: none;
}

.legal-back {
    display: inline-block;
    margin-bottom: 2rem;
    font-weight: 700;
    text-decoration: none;
}

.legal-section {
    border-top: 1px solid rgba(59, 37, 25, 0.2);
    padding-top: 1.25rem;
    margin-top: 1.5rem;
}

.legal-updated {
    font-size: 0.95rem;
    color: var(--olive-deep);
    font-weight: 700;
}

/* ---------- Wider screens ---------- */

@media (min-width: 900px) {
    .ember-hero {
        justify-content: flex-start;
        padding-left: 6vw;
    }

    .ember-hero-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .ember-screen-left {
        justify-content: flex-start;
        padding-left: 6vw;
    }

    .ember-screen-right {
        justify-content: flex-end;
        padding-right: 6vw;
    }

    .ember-order-grid {
        grid-template-columns: 1fr 1.2fr;
    }

    .ember-form {
        margin-left: auto;
    }
}

@media (max-width: 360px) {
    .ember-hero,
    .ember-screen,
    .ember-order {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .ember-plaque {
        padding: 1.25rem;
    }

    .ember-cta {
        width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}