/* PDF-style scaling: 1rem equals 1px at a 1366px desktop width.
   On smaller screens every font, gap and image limit shrinks proportionally.
   Keep the desktop grids and diagram at every width; browser zoom stays enabled. */
:root {
    font-size: min(1px, calc(100vw / 1366));
    --color-background: #e5ddd2;
    --color-ink: #383e27;
    --font-heading: "Playfair Display", Georgia, serif;
    --font-body: Arial, Helvetica, sans-serif;
    --font-gotham: "Gotham", Arial, Helvetica, sans-serif;
    --section-space: clamp(80rem, 13vw, 180rem);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background: var(--color-background);
    color: var(--color-ink);
    font-family: var(--font-body);
    font-size: 18rem;
    line-height: 1.5;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 400; }
h1 { font-size: 67rem; line-height: 1.1; letter-spacing: -0.04em; }
h2 { font-size: clamp(30rem, 4vw, 50rem); font-style: italic; line-height: 1.25; }
h3 { margin-bottom: 10rem; font-size: clamp(23rem, 2.6vw, 32rem); font-style: italic; line-height: 1.25; }

.wellness-guide { width: min(80%, 1093rem); margin-inline: auto; }
.sparkle { display: inline-block; font-style: normal; }
.hero { padding-top: clamp(40rem, 9vw, 140rem); }
.hero-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 32rem; }
/* Gotham uses the fallback until a Gotham webfont is supplied or installed locally. */
.eyebrow { margin-bottom: 12rem; font-family: var(--font-gotham); font-size: 18rem; letter-spacing: 0.35em; text-transform: uppercase; }
.brand-logo { width: clamp(100rem, 16vw, 210rem); flex-shrink: 0; }
.hero-subtitle { margin-top: 22rem; font-family: var(--font-gotham); font-size: 24rem; line-height: 1.4; }
.hero-subtitle span, .statement { text-transform: uppercase; }
.hero-image { width: 100%; margin-top: clamp(64rem, 14vw, 200rem); }
.hero-message { margin-top: 44rem; }
.hero-message p:first-child { font-size: clamp(16rem, 2vw, 24rem); }
.statement { margin-top: 8rem; font-family: var(--font-gotham); font-size: clamp(22rem, 2.8vw, 36rem); }
.plate-intro { margin-top: var(--section-space); }
.plate-intro p { margin-top: 22rem; font-size: 22rem; }
.plate-intro p em { font-family: var(--font-gotham); font-style: italic; }
.food-section, .habits-section, .swaps-section, .moderation-section { margin-top: var(--section-space); }
.section-heading { display: flex; align-items: baseline; gap: 24rem; margin-bottom: clamp(44rem, 10vw, 150rem); font-family: var(--font-body); font-size: clamp(26rem, 3.8vw, 50rem); font-style: normal; }
.section-number { font-size: 1.35em; font-weight: 300; }
.food-card p, .food-pair p, .probiotic-notes p, .fermented-note p, .fats-layout p { font-size: 18rem; line-height: 1.4; }

/* Food photographs and captions. */
.carbs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grain-image { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; }
.food-card h3 { margin-top: 22rem; }
.food-card h3, .food-card p { padding-right: 20rem; }
.vegetable-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 110rem 60rem; }
.food-pair { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40rem; }
.vegetable-image { width: 100%; border-radius: 999rem; }
.fruit-list { display: flex; flex-direction: column; gap: 0; }
.fruit-item { width: 57%; grid-template-columns: 1.2fr 1fr; gap: 40rem; }
.fruit-item:nth-child(even) { align-self: flex-end; }
.fruit-image { width: 100%; height: auto; max-height: 330rem; object-fit: contain; }

/* The spoon sits over two decorative circles, like the PDF. */
.probiotic-notes { display: flex; justify-content: space-between; gap: 40rem; }
.probiotic-notes article { max-width: 280rem; }
.probiotic-visual { position: relative; isolation: isolate; width: 80%; aspect-ratio: 1.4; margin: 24rem 0 0 auto; display: grid; align-items: center; }
.probiotic-visual::before { content: ""; position: absolute; inset: 0 25% 0 0; border: 1rem solid var(--color-ink); border-radius: 50%; z-index: -1; }
.probiotic-visual::after { content: ""; position: absolute; width: 36%; aspect-ratio: 1; right: 0; bottom: 0; border-radius: 50%; background: var(--color-ink); z-index: -1; }
.probiotic-image { width: 90%; margin-left: auto; }
.fermented-note { max-width: 470rem; margin-top: 32rem; }
.fermented-note h3 { font-size: clamp(26rem, 3vw, 40rem); }
.fats-section { border-top: 16rem solid rgb(217 209 194 / 35%); padding-top: 56rem; }
.fats-layout { display: grid; grid-template-columns: 1fr 2.3fr 0.85fr; grid-template-rows: 1fr 1fr; gap: 40rem 20rem; align-items: center; }
.nuts-note { grid-column: 1; grid-row: 1; align-self: start; }
.fats-image { grid-column: 2; grid-row: 1 / 3; width: 100%; }
.sesame-note { grid-column: 3; grid-row: 1 / 3; }
.oils-note { grid-column: 1; grid-row: 2; align-self: end; }

/* Preserve the circular habit diagram at every screen size. */
.habits-diagram { position: relative; width: min(50%, 550rem); aspect-ratio: 1; border: 1rem solid var(--color-ink); border-radius: 50%; margin: 140rem auto 100rem; }
.habits-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 0.25em; font-family: var(--font-heading); font-size: clamp(22rem, 2.8vw, 38rem); }
.habits-list { list-style: none; margin: 0; padding: 0; font-size: 24rem; }
.habits-list li { position: absolute; }
.habits-list li::before { content: ""; position: absolute; width: 16rem; height: 16rem; background: var(--color-ink); border-radius: 50%; }
.habit-water { right: 83%; bottom: 83%; width: 190rem; padding: 0 24rem 20rem 0; text-align: right; }
.habit-water::before { right: 0; bottom: 0; }
.habit-fibre { left: 83%; bottom: 83%; width: 170rem; padding: 0 0 20rem 24rem; }
.habit-fibre::before { left: 0; bottom: 0; }
.habit-sleep { left: 100%; top: 50%; transform: translateY(-50%); width: 170rem; padding-left: 40rem; }
.habit-sleep::before { left: -8rem; top: calc(50% - 8rem); }
.habit-slow { right: 100%; top: 50%; transform: translateY(-50%); width: 170rem; padding-right: 40rem; text-align: right; }
.habit-slow::before { right: -8rem; top: calc(50% - 8rem); }
.habit-move { top: 100%; left: 50%; transform: translateX(-50%); width: 240rem; padding-top: 24rem; text-align: center; }
.habit-move::before { top: -8rem; left: calc(50% - 8rem); }

.swaps-table { width: 100%; margin-top: 80rem; border-collapse: collapse; table-layout: fixed; font-size: clamp(17rem, 2.3vw, 29rem); text-align: left; }
.swaps-table th { font-family: var(--font-heading); font-size: clamp(28rem, 3.7vw, 48rem); font-style: italic; font-weight: 400; padding-bottom: 32rem; }
.swaps-table th:first-child { width: 58%; }
.swaps-table td { padding-block: 32rem; vertical-align: top; }
.swaps-table td:first-child { padding-right: 20rem; }
.swaps-table td:first-child span { display: flex; align-items: center; gap: 12rem; }
.swaps-table td:first-child span::after { content: ""; flex: 1; min-width: 20rem; height: 1rem; background: var(--color-ink); }
.moderation-section > p { max-width: 1000rem; margin-top: 28rem; font-size: clamp(18rem, 2.3vw, 29rem); line-height: 1.7; }
.moderation-list { list-style: none; margin: 44rem 0 0; padding: 0; font-size: clamp(18rem, 2.3vw, 29rem); }
.moderation-list li { display: flex; align-items: baseline; gap: 44rem; margin-top: 24rem; }
.moderation-list li::before { content: "✦"; flex-shrink: 0; }
.page-footer { padding-block: var(--section-space) 180rem; }
.page-footer > p { font-family: var(--font-heading); font-size: clamp(23rem, 3vw, 38rem); font-style: italic; }
.page-footer > p + p { margin-top: 22rem; }

.footer-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: max(8px, 24rem);
    max-width: max(280px, 650rem);
    margin-top: 100rem;
}

/* Keep the new controls easy to tap even when the PDF layout scales down. */
.footer-button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: max(10px, 18rem) max(8px, 28rem);
    border: 1px solid var(--color-ink);
    border-radius: 999px;
    background: var(--color-ink);
    color: var(--color-background);
    font-family: var(--font-heading);
    font-size: max(12px, 24rem);
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
}

.footer-button-outline {
    background: transparent;
    color: var(--color-ink);
}

@media (hover: hover) {
    .footer-button:hover { background: var(--color-background); color: var(--color-ink); }
    .footer-button-outline:hover { background: var(--color-ink); color: var(--color-background); }
}

.footer-button:focus-visible {
    outline: 2px solid var(--color-ink);
    outline-offset: 4px;
}
