/* MemoryClass — public marketing site (independent of the app build) */
:root {

    /* 1440px real content area + 64px padding on each side */
	--container-width: 1568px;

	/* 20px on smaller screens, scaling up to 64px on wider screens */
	--container-padding: clamp(1.25rem, -8.8462rem + 15.3846vw, 4rem);

    /* ── Palette — Catalogul Amintirilor ──────────────────── */
    --bg:           #FDFAF6;   /* parchment — page background       */
    --soft:         #FFFFFF;   /* pure white — cards / alt sections */
    --ink:          #1A2D3E;   /* headings & default text           */
    --body:         #4A5E6E;   /* body / paragraph text             */
    --muted:        #67747f;   /* meta / secondary text             */
    --brand:        #1E3248;   /* navy — primary button & UI        */
    --accent:       #6d5cf0;   /* purple — links & highlights       */
    --danger:       #D4564A;   /* red — error / destructive actions */
    --green:        #4A8C6A;   /* success / published               */
    --border:       #E8D8C8;   /* warm beige border                 */
    --ink-dark:     #0D1520;   /* footer surface                    */

    /* ── Derived — no extra hex needed ───────────────────── */
    --brand-dark:   oklch(from var(--brand) calc(l - 0.06) c h);
    --brand-soft:   oklch(from var(--brand) l c h / 0.08);
    --accent-soft:  oklch(from var(--accent) l c h / 0.08);

    /* ── Motion ───────────────────────────────────────────── */
    --hover-transition: all 200ms ease;
}

html {
    -webkit-tap-highlight-color: transparent;
}

body main *,
body main *::before,
body main *::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	list-style: none;
    text-wrap: pretty;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}


/* ==========================================
   Base typography
   1rem is the base size. Headings scale fluidly with clamp() between the
   960px and 1440px viewports (no font media queries needed):
     vw coeff  = (maxPx - minPx) / 4.8
     rem const = (3*minPx - 2*maxPx) / 16
     font-size: clamp(minRem, constRem + coeffVw, maxRem)
   ========================================== */
html {
    font-size: 100%;
    scrollbar-gutter: stable;
}

body {
    font-size: 1rem;
}

h1,
.h1 {
    font-size: clamp(2.125rem, 0.9350rem + 1.9833vw, 2.72rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
}

h2,
.h2 {
    /* fluid 24px → 30px */
    font-size: clamp(1.5rem, 0.75rem + 1.25vw, 1.875rem);
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h3,
.h3 {
    /* fluid 16px → 18px */
    font-size: clamp(1rem, 0.75rem + 0.4167vw, 1.125rem);
    line-height: 1.3;
    font-weight: 700;
}

h4,
.h4 {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 700;
}

h5,
.h5 {
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 700;
}

h6,
.h6 {
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 700;
}

p,
li {
    font-size: 1rem;
}

html,
body {
    margin: 0;
    padding: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    grid-template-columns: minmax(0, 1fr); /* stops any child (e.g. a wide nav) from stretching the page wider than the viewport */
    min-height: 100vh;
    min-height: 100dvh;
}

body .container {
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

a {
    color: var(--accent);
    text-decoration: none;
    border-radius: 0.25rem;
    white-space: nowrap;
}

a:focus-visible {
    outline: 0.125rem solid var(--accent);
    outline-offset: 0.125rem;
}

/* Nav */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: oklch(from var(--bg) l c h / 0.92);
    backdrop-filter: blur(0.5rem);
    border-bottom: 0.0625rem solid var(--border);
    box-shadow: 0px 2px 6px 0px rgba(0,0,0,.08);
    z-index: 1000;
}

.site-nav .inner {
    display: flex;
    align-items: center;
    gap: 1.125rem;
    height: 4.125rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 800;
    font-size: 1.0625rem;
    letter-spacing: -.01em;
    color: var(--ink);
    flex-shrink: 0; /* don't let the logo squish — force overflow onto .inner so nav-more.js can detect it */
}

.logo-img {
    width: 3rem;
    height: 3rem;
    border-radius: 0.625rem;
    object-fit: cover;
    background: #fff;
    flex-shrink: 0;
}

.logo small {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--muted);
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    margin-left: 0.875rem;
    flex-shrink: 0; /* keep natural width so overflow is detectable by nav-more.js */
}

.nav-links a {
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9375rem;
    white-space: nowrap; /* links must not wrap — priority-nav relies on real overflow */
    transition: var(--hover-transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-spacer {
    flex: 1;
}

.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-shrink: 0; /* keep login/register at full size — overflow must land on .inner */
}

/* Mobile menu toggle (hidden on desktop) */
.nav-toggle-cb {
    display: none;
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.625rem;
    height: 2.625rem;
    margin: 0 -0.375rem 0 0.125rem;
    border-radius: 0.625rem;
    color: var(--ink);
    cursor: pointer;
    transition: var(--hover-transition);
}


.nav-toggle .lic {
    width: 1.625rem;
    height: 1.625rem;
}

.nav-toggle .open-ic,
.nav-toggle .close-ic {
    display: inline-flex;
}

.nav-toggle .close-ic {
    display: none;
}

.mobile-menu {
    display: none;
}

.nav-scrim {
    display: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 0.0625rem solid transparent;
    border-radius: 0.6875rem;
    padding: 0.625rem 1.125rem;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    background: var(--brand);
    color: #fff;
    box-shadow: 0 0.375rem 1rem rgba(30, 50, 72, .28);
    transition: var(--hover-transition);
}

.btn:hover {
    background: var(--brand-dark);
}

.btn.ghost {
    background: transparent;
    color: var(--ink);
    box-shadow: none;
    border-color: var(--border);
}

.btn.ghost:hover {
    background: var(--soft);
}

.btn.lg {
    padding: 0.8125rem 1.5rem;
    font-size: 1rem;
}

/* Glassy hero ghost button — frosts the busy image behind it so it stays readable */
.btn.ghost.lg {
    color: var(--ink);
    background: oklch(from var(--bg) l c h / 0.55);        /* translucent parchment */
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    backdrop-filter: blur(10px) saturate(1.2);
    border-color: oklch(from var(--ink) l c h / 0.12);     /* faint edge definition */
    box-shadow:
        0 2px 10px oklch(from var(--ink) l c h / 0.10),    /* soft lift off the page */
        inset 0 1px 0 rgba(255, 255, 255, 0.55);           /* top sheen = "glass" */
}

/* keep it glassy on hover (overrides the base .btn.ghost:hover → solid white) */
.btn.ghost.lg:hover {
    background: oklch(from var(--bg) l c h / 0.72);
    border-color: oklch(from var(--ink) l c h / 0.2);
}



/* Sections - common for all sections on the page  */
section.block {
    padding-block: clamp(2.5rem, 1.7857rem + 1.9048vw, 3.5rem);
}

section.block.alt {
    background: var(--soft);
}

.h2{
    margin: 0 0 0.5rem;
    text-align: center;
}

.sub {
    color: var(--muted);
    text-align: center;
    max-width: 60ch;
    margin: 0 auto 2.25rem;
    /* fluid 16px → 18px */
    font-size: clamp(1rem, 0.75rem + 0.4167vw, 1.125rem);
}


/* Hero */
.hero-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: clamp(1.5rem, -0.2095rem + 3.5661vw, 3rem);
    align-items: center;
    isolation: isolate;
    padding-top: clamp(2rem, -0.2793rem + 4.7548vw, 4rem);
    padding-bottom: clamp(4rem, -0.5587rem + 9.5097vw, 8rem);
    overflow: hidden;
    height: 100dvh;
    max-height: 800px;
}

/* Left side */
.hero-text {
    z-index: 2;
}
.hero h1 {
    margin: 0 0 0.875rem;
}
.hero p.lead {
    font-size: 1.1875rem;
    color: var(--muted);
    margin: 0 0 1.75rem;
}
.hero .cta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.tagline {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.8125rem;
    padding: 0.375rem 0.8125rem;
    border-radius: 100dvw;;
    margin-bottom: 1.125rem;
}

/* Hero trust line (shield icon + reassurance) — baseline, restyle freely */
.hero-trust {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--body);
    font-size: 0.875rem;
    font-weight: 600;
}

.hero-trust .lic {
    width: 1.125rem;
    height: 1.125rem;
    color: var(--green);   /* safety cue */
    flex-shrink: 0;
}


/* Right side */
.hero-media {
    z-index: 1;
    isolation: isolate;
    user-select: none;
    position: relative;
    display: grid;
}

.hero-media * {
    grid-area: 1/1;
}


/* The hero book img */
.hero-media .book {
    filter: drop-shadow(-64px 128px 34px rgba(31, 25, 18, .25));
    transform: rotate(7deg);
    scale: 1.3;
    max-height: 100%;
    width: 100%;
}

.hero-media-small-images-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
}

.hero-media-small-images-wrapper img {
    position: absolute;
}

.hero-media-small-images-wrapper .flower {
    max-width: clamp(20rem, 7.4636rem + 26.1516vw, 31rem);
    top: calc(calc(23rem - clamp(10rem, 4.0000rem + 10.0000vw, 13rem)) * -1.5);
    left: calc(100% - 230px);
    box-shadow: none;
    filter: drop-shadow(0 12px 18px rgba(31, 25, 18, .13));
    transform: rotate(-180deg);
    animation: floatSoft 5.5s ease-in-out infinite;
}

.hero-media-small-images-wrapper .pencil-box {
    max-width: clamp(15rem, 3.6033rem + 23.7741vw, 25rem);
    bottom: calc(clamp(7.5rem, 5.7394rem + 7.5117vw, 12.5rem) * -1.5);
    right: calc(clamp(7.5rem, 5.7394rem + 7.5117vw, 12.5rem) * -1);
    filter: drop-shadow(0 12px 18px rgba(31, 25, 18, .13));
    transform: rotate(-180deg);
    animation: floatSoft 3.5s ease-in-out infinite;
}

/* Children images */
.hero-media-small-images-wrapper img.children {
    max-width: clamp(9rem, 1.0000rem + 13.3333vw, 13rem);
    border-radius: 8px;
    transition: transform .28s ease, box-shadow .28s ease, filter .28s ease;
    transform: rotate(8deg); 
}

.hero-media-small-images-wrapper .children.first {
    left:6%;
    top: 0%;
}

.hero-media-small-images-wrapper .children.second {
    left: 15%;
    top: 58%;
}
.hero-media-small-images-wrapper .children.third {
    left: 57%;
    top: 8%;
}

.hero-media-small-images-wrapper .children.fourth {
    left: 70%;
    top: 40%;
}

.hero-media-small-images-wrapper .children.fifth {
    left: 52%;
    top: 70%;
}

.hero-media-small-images-wrapper .children:hover {
    transform: translateY(-14px) rotate(var(--hover-rotate, 0deg)) scale(1.04);
    box-shadow: 0 24px 32px rgba(33, 30, 24, .26);
}

.first { transform: rotate(6deg); --hover-rotate: 4deg; }
.second { transform: rotate(5deg); --hover-rotate: 7deg; }
.third { transform: rotate(-5deg); --hover-rotate: -4deg; }
.fourth { transform: rotate(-3deg); --hover-rotate: -5deg; }
.fifth { transform: rotate(-1deg); --hover-rotate: -1deg; }


@keyframes floatSoft {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

/* Drawing svg */
.child-drawing {
    position: absolute;
    width: 20%;
    left: 15%;
    top: 30%;
    z-index: 4;
    opacity: .92;
    transform: rotate(8deg);
    filter: drop-shadow(0 10px 2px rgba(31, 25, 18, .06));
}


/* ==========================================
   Problem / Solution (home) — baseline layout, restyle freely
   ========================================== */
.ps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
    gap: clamp(2rem, 1rem + 3vw, 4rem);
    align-items: stretch;
}

.ps-eyebrow {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.ps-eyebrow--problem { color: var(--danger); }
.ps-eyebrow--solution { color: var(--green); }

.ps-h2 {
    margin: 0 0 0.75rem;
    text-align: left;
}

/* Left and right side container */
.ps-col {
    display: flex;
    flex-direction: column;
}

.ps-col > p {
    color: var(--body);
    margin: 0 0 0.75rem;
}

.ps-note {
    font-weight: 700;
    color: var(--ink);
}

/* Left - Generic "many places" chips (no brand logos) */
.ps-apps {
    position: relative;
    z-index: 3;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.625rem;
    justify-content: space-evenly;
}

.ps-app {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    color: var(--muted);
    box-shadow: 0 2px 4px rgba(20, 24, 40, .05);
}

.ps-app .lic {
    width: 1.375rem;
    height: 1.375rem;
}

.ps-app--q {
    font-weight: 800;
    font-size: 1.25rem;
}

/* Connection lines */
.ps-connections {
    position: relative;
    z-index: 1;
    height: 11rem;
    margin-top: 0.25rem;
    margin-bottom: -1.75rem;
    pointer-events: none;
}

.ps-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.ps-lines path {
    fill: none;
    stroke: var(--muted);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.85;
}

.ps-alert-container {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    z-index: 2;
}

/* Alert symbol */
.ps-alert {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    background: var(--danger);
    color: #fff;
    border-radius: 50%;
    font-weight: 800;
    box-shadow: 0 0.375rem 0.75rem oklch(from var(--danger) l c h / 0.45);
}

/* Problem visual: fanned pile of photos */
.ps-scatter {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0 1.5rem;
}

.ps-scatter img {
    width: 100%;
    border-radius: 0.75rem;
    border: 3px solid #fff;
    box-shadow: 0 0.5rem 1.25rem rgba(31, 25, 18, .18);
}


.ps-scatter img:nth-child(1) {
    transform: rotate(-6deg);
    margin-top:2rem;
}

.ps-scatter img:nth-child(2) {
    transform: rotate(3deg);
    margin-top: 1rem;
}

.ps-scatter img:nth-child(3) {
    transform: rotate(-2deg);
    margin-top: 2rem;
}

/* Right side - platform sreenshot */
.ps-visual .platform-screenshot {
    width: 100%;
}

/* Card grids (How it works · Pillars) — auto-fit wraps without media queries;
   min(17rem, 100%) lets a card go full-width on very narrow screens. */
.steps,
.features {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
}

.card {
    background: var(--soft);
    border: 0.0625rem solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 0.0625rem 0.125rem rgba(20, 24, 40, .04), 0 0.5rem 1.5rem rgba(20, 24, 40, .04);
    transition: var(--hover-transition);
}

.card:hover {
    box-shadow: 0 0.25rem 0.5rem rgba(20, 24, 40, .06), 0 0.75rem 2rem rgba(20, 24, 40, .08);
    transform: translateY(-0.125rem);
}

.card .ic {
    width: 2.875rem;
    height: 2.875rem;
    border-radius: 0.75rem;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.875rem;
    font-size: 1.375rem;
    font-weight: 800;
}

.card h3{
    margin: 0 0 0.375rem;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9375rem;
}


/* ==========================================
   Reasons cards (home) — per-audience benefit cards. Baseline, restyle freely.
   ========================================== */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(28rem, 100%), 1fr));
    gap: 1.5rem;
}

.reason-card {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 12px 32px rgba(20, 24, 40, .06);
}

.reason-text {
    padding: clamp(1.25rem, -0.2500rem + 2.5000vw, 2rem);
    display: flex;
    flex-direction: column;
}

.reason-eyebrow {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 0.625rem;
}

.reason-card--educator .reason-eyebrow {
    color: var(--green);
}
.reason-card--parent .reason-eyebrow {
    color: var(--accent);
}

.reason-h2 {
    margin: 0 0 1.25rem;
    text-align: left;
}

.reason-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.reason-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: var(--body);
}

.reason-ic {
    flex-shrink: 0;
    display: inline-flex;
    margin-top: 0.125rem;
    color: var(--brand);
    margin-top: 4px;
}

.reason-card--educator .reason-ic {
    color: var(--green);
}
.reason-card--parent .reason-ic {
    color: var(--accent);
}

.reason-ic .lic {
    width: 1.125rem;
    height: 1.125rem;
}

.reason-link {
    font-weight: 700;
    margin-top: auto;
}
.reason-card--educator .reason-link {
    color: var(--green);
}
.reason-card--parent .reason-link {
    color: var(--accent);
}

.reason-media {
    position: relative;
    background: var(--brand-soft);
}

.reason-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* ==========================================
   FAQ accordion (home) — baseline, restyle freely
   ========================================== */
.faq-eyebrow {
    display: block;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.375rem;
}

.faq {
    max-width: 48rem;
    margin: 1.75rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    background: var(--soft);
    border: 1px solid var(--border);
    border-radius: 0.875rem;
    padding: 0 1.25rem;
    box-shadow: 0 1px 2px rgba(20, 24, 40, .04);
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.125rem 0;
    font-weight: 700;
    color: var(--ink);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-plus {
    flex-shrink: 0;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--accent);
    transition: var(--hover-transition);
}

.faq-item[open] .faq-plus { transform: rotate(45deg); }

.faq-answer {
    padding: 0 0 1.125rem;
    color: var(--body);
}

.faq-answer p { margin: 0; }



/* Final CTA */
.cta-band {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand), oklch(from var(--brand) calc(l + 0.12) calc(c - 0.01) h));
    color: #fff;
    border-radius: 1.375rem;
    padding: clamp(2.5rem, 1.4643rem + 3vw, 4rem) clamp(2rem, 1.4643rem + 1.4286vw, 2.75rem);
    text-align: center;
    margin: 1.25rem 0;
}

.cta-inner {
    position: relative;
    z-index: 2;
}

.cta-band h2 {
    color: #fff;
}

.cta-band .sub {
    color: oklch(from #fff l c h / 0.82);
}

.cta-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.cta-band .btn {
    background: #fff;
    color: var(--brand);
}

.cta-band .btn:hover {
    background: var(--soft);
}

/* Trust microcopy under the button (bookends the hero's trust line) */
.cta-trust {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: oklch(from #fff l c h / 0.78);
}

.cta-trust .lic {
    width: 1.125rem;
    height: 1.125rem;
    color: #9ad9b4;   /* light green = "safe", legible on navy */
    flex-shrink: 0;
}

/* Decorative "scattered snapshots" bleeding from the corners */
.cta-decor {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.cta-photo {
    position: absolute;
    width: clamp(10rem, 0.0000rem + 16.6667vw, 15rem);
    border-radius: 0.625rem;
    border: 0.25rem solid #fff;
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, .28);
    opacity: 0.85;
}

.cta-photo--1 {
    top: -1.25rem;
    left: -1.25rem;
    transform: rotate(-8deg);
}

.cta-photo--2 {
    bottom: -1.75rem;
    right: -1.25rem;
    transform: rotate(7deg);
}

/* On narrow screens the snapshots crowd the text — hide them */
@media (max-width: 767px) {
    .cta-decor { display: none; }
}


/* Content pages */
.page {
    padding: 3rem 0 4rem;
}

.page h1{
    margin: 0 0 0.375rem;
}

.page .muted {
    color: var(--muted);
}

.prose {
    max-width: 47.5rem;
}

.prose h2{
    margin: 1.75rem 0 0.5rem;
    text-align: left;
}

.prose p,
.prose li {
    color: var(--body);
    font-size: 1rem;
}

.about-prose h1 {
    margin-bottom: 1.5rem;
}

.about-prose h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--accent);
}

.about-block {
    margin: 1.25rem 0;
}

.about-highlight {
    margin-top: 1rem;
    padding: 0.875rem 1rem 0.875rem 1.125rem;
    border-left: 0.25rem solid var(--accent);
    border-radius: 0 0.625rem 0.625rem 0;
    background: var(--accent-soft);
    color: var(--ink);
}

.about-highlight strong {
    color: var(--ink);
}

.about-rule {
    border: 0;
    border-top: 0.0625rem solid var(--border);
    margin: 2rem 0;
}

.about-rule--sub {
    margin: 1.25rem 0;
    opacity: 0.65;
}

.placeholder {
    background: #fff7ed;
    border: 0.0625rem dashed #f3c98b;
    color: #9a5b13;
    padding: 0.75rem 0.875rem;
    border-radius: 0.625rem;
    font-size: 0.875rem;
}

/* Footer */
.site-foot {
    border-top: 0.0625rem solid var(--border);
    background: var(--ink-dark);
    color: #aeb8cc;
    padding: 2rem 0;
    margin-top: 1.25rem;
}

.site-foot .inner {
    display: flex;
    row-gap: 0.5rem;
    column-gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}

.site-foot .footer-links {
    display: flex;
    column-gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.site-foot a {
    color: #cdd5e6;
    font-weight: 600;
    transition: var(--hover-transition);
}

.site-foot a:hover {
    color: #fff;
}

/* Motto */
.motto {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--brand);
    margin: 0 0 1.125rem;
    max-width: 30ch;
    letter-spacing: -.01em;
}

/* Language dropdown (compact, scales as languages are added) */
.lang-dd {
    position: relative;
    margin-right: 0.375rem;
    flex-shrink: 0;
}

.lang-dd summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.5625rem;
    border: 0.0625rem solid var(--border);
    border-radius: 0.5625rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ink);
    transition: var(--hover-transition);
}

.lang-dd summary::-webkit-details-marker {
    display: none;
}

.lang-dd summary:hover {
    background: var(--soft);
}

.lang-dd summary .ic {
    display: inline-flex;
}

.lang-dd summary .lic {
    width: 1.0625rem;
    height: 1.0625rem;
}

.lang-dd .caret {
    display: inline-flex;
    transition: var(--hover-transition);
}

.lang-dd .caret .lic {
    width: 0.9375rem;
    height: 0.9375rem;
    color: var(--muted);
}

.lang-dd[open] .caret {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    min-width: 10rem;
    background: var(--soft);
    border: 0.0625rem solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.75rem rgba(30, 50, 72, .14);
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    z-index: 30;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ink);
    transition: var(--hover-transition);
}

.lang-menu a:hover {
    background: var(--bg);
}

.lang-menu a.on {
    background: var(--brand-soft);
    color: var(--brand);
}

.lang-menu .code {
    font-size: 0.6875rem;
    font-weight: 800;
    color: var(--muted);
    min-width: 1.25rem;
}

.lang-menu a.on .code {
    color: var(--brand);
}

/* Languages not yet translated — visible but disabled */
.lang-menu .lang-disabled {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
    opacity: 0.55;
    cursor: not-allowed;
}

.lang-menu .lang-disabled em {
    margin-left: auto;
    font-style: normal;
    font-size: 0.6875rem;
    letter-spacing: .02em;
}

/* "More" overflow dropdown (built by public/nav-more.js; desktop only) */
.nav-more {
    position: relative;
}

.nav-more summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--hover-transition);
}

.nav-more summary::-webkit-details-marker {
    display: none;
}

.nav-more summary:hover {
    color: var(--accent);
}

.nav-more .caret {
    display: inline-flex;
    transition: var(--hover-transition);
}

.nav-more .caret .lic {
    width: 0.9375rem;
    height: 0.9375rem;
    color: var(--muted);
}

.nav-more[open] .caret {
    transform: rotate(180deg);
}

.nav-more-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 0.75rem);
    min-width: 11.25rem;
    background: var(--soft);
    border: 0.0625rem solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.75rem rgba(30, 50, 72, .14);
    padding: 0.375rem;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    z-index: 30;
}

.nav-more-menu a {
    display: block;
    padding: 0.5625rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--ink);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: var(--hover-transition);
}

.nav-more-menu a:hover {
    background: var(--bg);
    color: var(--accent);
}

/* Marketing 404 */
.error-page {
    padding-block: clamp(3rem, 8vw, 5.5rem);
}
.error-page-inner {
    max-width: 34rem;
    margin-inline: auto;
    text-align: center;
}
.error-code {
    margin: 0 0 0.75rem;
    font-size: clamp(4rem, 14vw, 6.5rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--accent);
    opacity: 0.22;
}
.error-page h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}
.error-page .lead {
    margin: 0 0 1.75rem;
    color: var(--muted);
    font-size: 1.0625rem;
    line-height: 1.55;
}
.error-page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.error-page-help {
    margin: 0;
    font-size: 0.9375rem;
}
.error-page-help a {
    font-weight: 600;
}

/* Audience-page hero (used by /pentru-educatori & /pentru-parinti) */
.audience-hero {
    padding-block: clamp(2rem, -0.2793rem + 4.7548vw, 4rem);
}

/* Two-column audience hero (text + photo) — baseline, restyle freely.
   Reuses the .hero text styles; add .page-hero to a .audience-hero container. */
.page-hero {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(1.5rem, -0.2095rem + 3.5661vw, 3rem);
    align-items: center;
}
.page-hero-text {
    z-index: 2;
}
.page-hero-media {
    border-radius: 1.25rem;
    overflow: hidden;
    rotate: 1.5deg;
    box-shadow: 0 20px 45px -20px rgba(26, 45, 62, .45);
    border: 6px solid var(--soft);
}
.page-hero-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}
/* The homepage-only lead glow (positioned over the book) doesn't apply here. */
.page-hero p.lead::before {
    display: none;
}
@media (max-width: 860px) {
    .page-hero {
        grid-template-columns: 1fr;
    }
    .page-hero-media {
        rotate: none;
    }
}

/* ==========================================
   Problem → Solution paired comparison (audience pages) — baseline, restyle freely.
   Left column = "how it is now" (pain), right column = MemoryClass answer.
   Grid rows keep each pair aligned; on mobile it stacks problem → solution.
   ========================================== */
.solve {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1.5rem;
    align-items: stretch;
    margin-top: 2rem;
    text-align: left;
}
.solve-col-head {
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 0.25rem 0.25rem;
}
.solve-col-head--problem {
    color: var(--danger);
}
.solve-col-head--solution {
    color: var(--green);
}
.solve-cell {
    display: flex;
    gap: 0.85rem;
    padding: 1.15rem 1.3rem;
    border-radius: 14px;
    border: 1px solid var(--border);
}
.solve-cell p {
    margin: 0;
}
/* Left: the pain — muted, faint coral wash */
.solve-cell--problem {
    background: color-mix(in srgb, var(--danger) 5%, var(--soft));
    border-color: color-mix(in srgb, var(--danger) 22%, var(--border));
    color: var(--body);
    align-items: flex-start;
}
/* Right: the answer — clean white card, green accent */
.solve-cell--solution {
    background: var(--soft);
    box-shadow: 0 12px 30px -22px rgba(26, 45, 62, 0.5);
}
.solve-ic {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--green);
    background: color-mix(in srgb, var(--green) 12%, var(--soft));
}
.solve-ic .lic {
    width: 22px;
    height: 22px;
}
.solve-body h3 {
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
}
.solve-body p {
    color: var(--muted);
}

@media (max-width: 760px) {
    .solve {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    /* Headers make no sense once columns stack */
    .solve-col-head {
        display: none;
    }
    /* Separate each problem→solution pair */
    .solve-cell--solution {
        margin-bottom: 1.25rem;
    }
    .solve-cell--solution:last-child {
        margin-bottom: 0;
    }
}


/* Readability glow behind the RIGHT side of the hero lead — only where it
   overlaps the book (large screens). Transparent on the left, parchment on the
   right, blurred edges so it's a soft glow. */
@media (min-width: 961px) {
    .hero p.lead {
        position: relative;
    }

    .hero p.lead::before {
        content: "";
        position: absolute;
        inset: -0.6rem -1.75rem;
        z-index: -1;
        pointer-events: none;
        background: linear-gradient(
            90deg,
            oklch(from var(--bg) l c h / 0) 0%,
            oklch(from var(--bg) l c h / 0) 25%,
            oklch(from var(--bg) l c h / 0.92) 60%,
            oklch(from var(--bg) l c h / 0.92) 1000%
        );
        filter: blur(20px);
    }
}


/* ==========================================
   Mobile navigation (≤ 960px)
   Hide the inline nav, reveal the hamburger + dropdown panel.
   ========================================== */
@media (max-width: 960px) {

    /* inline links + CTA give way to the hamburger */
    .nav-links,
    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: inline-flex;
    }

    .lang-dd {
        margin-right: 0;
    }

    /* checkbox is a sibling of .inner and .mobile-menu inside .container */
    .nav-toggle-cb:checked ~ .inner .nav-toggle .open-ic {
        display: none;
    }

    .nav-toggle-cb:checked ~ .inner .nav-toggle .close-ic {
        display: inline-flex;
    }

    .nav-toggle-cb:checked ~ .mobile-menu {
        display: block;
        max-height: 30rem;
        opacity: 1;
    }

    /* Entry animation: start collapsed on the first rendered frame, then grow.
       Needs allow-discrete (below) so display:none→block can be transitioned. */
    @starting-style {
        .nav-toggle-cb:checked ~ .mobile-menu {
            max-height: 0;
            opacity: 0;
        }
    }

    /* Dropdown panel — an OVERLAY (absolute), not in flow. This keeps the sticky
       nav's height constant while animating, so:
         • it doesn't push/reflow the page content each frame, and
         • the nav's backdrop-filter isn't re-composited every frame (no flicker).
       Positioned against .site-nav (the sticky ancestor = containing block). */
    .mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 20;
        box-sizing: border-box;   /* header is outside the `main *` reset */
        padding: 0.5rem var(--container-padding) 1.25rem;
        border-top: 0.0625rem solid var(--border);
        background: var(--bg);
        box-shadow: 0 0.75rem 1.25rem rgba(0, 0, 0, .08);
        overflow: hidden;
        max-height: 0;   /* collapsed by default; grows/shrinks with the toggle */
        opacity: 0;
        transition: max-height 280ms ease, opacity 180ms ease, display 280ms;
        transition-behavior: allow-discrete;
    }

    .mobile-menu > a {
        display: block;
        padding: 0.8125rem 0.25rem;
        color: var(--ink);
        font-weight: 600;
        font-size: 1rem;
        border-bottom: 0.0625rem solid var(--border);
        transition: var(--hover-transition);
    }

    .mobile-menu > a:hover {
        color: var(--accent);
    }

    .mobile-cta {
        display: flex;
        gap: 0.625rem;
        margin-top: 0.875rem;
    }

    .mobile-cta a {
        flex: 1;
        text-align: center;
    }

    /* Dark scrim behind the menu; tapping it closes the menu (it's a <label>).
       Sits below the nav (z 1000) but above page content. */
    .nav-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 900;
        background: rgba(8, 12, 22, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity 280ms ease, visibility 280ms;
    }

    /* :has() lets a descendant checkbox drive ancestors — no JS needed */
    body:has(.nav-toggle-cb:checked) .nav-scrim {
        opacity: 1;
        visibility: visible;
    }

    /* Lock page scroll while the menu is open */
    html:has(.nav-toggle-cb:checked) {
        overflow: hidden;
    }


    /* Hero */
    .hero-grid {
        grid-template-columns: 1fr;
        max-height: unset;
        min-height: 100dvh;
        height: fit-content;
    }

    .hero-media .book {
        filter: drop-shadow(-32px 64px 16px rgba(31, 25, 18, .25));
        transform: rotate(7deg);
        scale: 1;
    }

    .hero-media-small-images-wrapper .flower {
        max-width: clamp(12.5rem, 7.6923rem + 20.5128vw, 20rem);
        top: calc(clamp(12.5rem, 7.6923rem + 20.5128vw, 20rem) * -0.75);
        left: calc(100% - clamp(6.25rem, 2.1739rem + 17.3913vw, 12.5rem));
    }

    .hero-media-small-images-wrapper .pencil-box {
        max-width: clamp(10rem, 3.5897rem + 27.3504vw, 20rem);
        bottom: calc(clamp(10rem, 3.5897rem + 27.3504vw, 20rem) * -0.6);
        right: calc(clamp(10rem, 3.5897rem + 27.3504vw, 20rem) * -0.5);
    }

    /* Children images */
    .hero-media-small-images-wrapper img.children {
        max-width: clamp(4.5rem, -3.0000rem + 25.0000vw, 12rem);
    }

    .hero-media-small-images-wrapper .children.first {
        left:17%;
        top: 8%;
    }

    .hero-media-small-images-wrapper .children.second {
        left: 25%;
        top: 58%;
    }
    .hero-media-small-images-wrapper .children.third {
        left: 57%;
        top: 15%;
    }

    .hero-media-small-images-wrapper .children.fourth {
        left: 67%;
        top: 45%;
    }

    .hero-media-small-images-wrapper .children.fifth {
        left: 52%;
        top: 65%;
    }


    .site-foot .inner {
        flex-direction: column-reverse;
        align-items: flex-start;
    }
}

/* Stack image below text on narrow cards */
@media (max-width: 640px) {
    .reason-card {
        grid-template-columns: 1fr;
    }

    .reason-media {
        min-height: 12rem;
    }
}
