/* =========================================================
   Ostento - light editorial studio site
   White foundation, orange as the primary, navy kept for accents.
   One type scale, three radii, measured motion.
   ========================================================= */

:root {
    /* Core palette. Pure white is the page and card background; navy is ink and
       the one dark block at the foot of the page. */
    --white:       #FFFFFF;
    --bg:          var(--white);
    --surface:     var(--white);
    --surface-2:   #F5F5F5;
    --navy:        #0E1B3A;
    --navy-2:      #1B2E5C;

    /* Orange is the primary. --orange fills; --orange-ink carries text and
       small marks, because #FF6A1A does not meet body-text contrast on white. */
    --orange:      #FF6A1A;
    --orange-ink:  #BF4708;
    --orange-hover:#F05A0B;
    --orange-soft: #FF8A4C;
    --orange-tint: rgba(255, 106, 26, 0.10);

    /* Supporting marks, each dark enough to read on white */
    --amber:       #9E5F06;
    --teal:        #1F7A74;
    --danger:      #B3261E;

    --text:        #12203F;
    --text-muted:  #5C6885;
    --border:      rgba(14, 27, 58, 0.12);
    --border-2:    rgba(14, 27, 58, 0.20);
    --border-orange: rgba(255, 106, 26, 0.45);

    /* Inputs use white fills and visible borders on both pages and cards. */
    --field-bg: var(--white);

    /* Type scale */
    --fs-100: 0.75rem;    /* 12px mono labels */
    --fs-200: 0.875rem;   /* 14px small */
    --fs-300: 1rem;       /* 16px */
    --fs-400: 1.125rem;   /* 18px body / lede */
    --fs-500: 1.375rem;   /* 22px card title */
    --fs-600: 1.75rem;    /* 28px */
    --fs-700: clamp(2rem, 4vw, 3.25rem);   /* section headline */
    --fs-800: clamp(2.5rem, 6vw, 4.5rem);  /* big stat */
    --fs-hero: clamp(3.75rem, 15vw, 11rem);/* the word Ostento */

    /* Weights */
    --w-regular: 400;
    --w-medium: 500;
    --w-semi: 600;
    --w-bold: 700;

    /* Fonts */
    --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", "Menlo", "Consolas", monospace;

    /* Spacing */
    --sp-1: 0.5rem;
    --sp-2: 0.75rem;
    --sp-3: 1rem;
    --sp-4: 1.5rem;
    --sp-5: 2rem;
    --sp-6: 3rem;
    --sp-7: 4.5rem;
    --sp-8: 7rem;

    /* Radius - three shapes, plus a named alias for the pill */
    --r-sm: 10px;
    --r-md: 16px;
    --r-lg: 26px;
    --r-pill: 999px;

    /* Motion */
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
    --dur: 0.3s;

    /* Elevation. Navy-tinted and shallow: depth on a light page comes from
       the shadow, never from a coloured glow. */
    --shadow-sm: 0 1px 2px rgba(14, 27, 58, 0.05);
    --shadow-md: 0 2px 4px rgba(14, 27, 58, 0.04), 0 10px 26px rgba(14, 27, 58, 0.08);
    --shadow-lg: 0 18px 50px rgba(14, 27, 58, 0.16);

    --container: 1200px;
    --header-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }

/* The UA rule for [hidden] is display:none at zero specificity, so any class
   that sets display beats it. Several here do, so hiding must be enforced. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
    margin: 0;
    font-family: var(--font-body);
    font-size: var(--fs-400);
    line-height: 1.6;
    color: var(--text);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--orange-ink); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--navy); }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text);
    line-height: 1.05;
    margin: 0 0 var(--sp-3);
    font-weight: var(--w-bold);
    letter-spacing: -0.02em;
}
p { margin: 0 0 var(--sp-3); }

:focus-visible {
    /* No border-radius here: it would snap a 999px pill to near-square while focused. */
    outline: 2px solid var(--orange-ink);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    left: -999px; top: 0;
    background: var(--orange);
    color: var(--navy);
    padding: 0.6rem 1rem;
    font-weight: var(--w-semi);
    border-radius: 0 0 var(--r-sm) 0;
    z-index: 300;
}
.skip-link:focus { left: 0; color: var(--navy); }

/* ---------- Layout ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--sp-4);
}

.section {
    padding: clamp(3.5rem, 9vw, 7rem) 0;
    position: relative;
}

.sec-title {
    font-size: var(--fs-700);
    max-width: 20ch;
    margin-bottom: var(--sp-5);
}

.sec-head { max-width: 760px; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.sec-head p { color: var(--text-muted); font-size: var(--fs-400); margin: 0; }

.muted { color: var(--text-muted); }
.lede { font-size: var(--fs-400); color: var(--text-muted); }

/* ---------- Standalone sections ---------- */
.standalone-main > .section:first-child { padding-top: calc(var(--header-h) + var(--sp-6)); }

/* ---------- Floating WhatsApp contact ---------- */
.whatsapp-float {
    position: fixed;
    right: calc(1.5rem + env(safe-area-inset-right));
    bottom: calc(1.5rem + env(safe-area-inset-bottom));
    z-index: 210;
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 3px solid #fff;
    border-radius: 50%;
    background: linear-gradient(145deg, #149F4D, #087B38);
    color: #fff;
    box-shadow: 0 6px 22px rgba(8, 123, 56, 0.32), 0 2px 6px rgba(14, 27, 58, 0.15);
    text-decoration: none;
    isolation: isolate;
    -webkit-tap-highlight-color: transparent;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.whatsapp-float::before,
.whatsapp-float::after {
    content: "";
    position: absolute;
    inset: -3px;
    z-index: -1;
    border: 2px solid #149F4D;
    border-radius: 50%;
    pointer-events: none;
    animation: whatsapp-pulse 3.2s ease-out infinite;
}
.whatsapp-float::after { animation-delay: -1.6s; }
@keyframes whatsapp-pulse {
    0% { transform: scale(1); opacity: 0.5; }
    75%, 100% { transform: scale(1.55); opacity: 0; }
}
.whatsapp-float svg { display: block; flex: 0 0 auto; width: 34px; height: 34px; }
.whatsapp-float:focus-visible { outline: 3px solid var(--navy); outline-offset: 5px; }
.whatsapp-float:active { transform: scale(0.96); }
.whatsapp-float__label {
    position: absolute;
    right: calc(100% + 14px);
    padding: 0.65rem 0.9rem;
    border-radius: var(--r-sm);
    background: var(--navy);
    color: #fff;
    box-shadow: var(--shadow-md);
    font-size: var(--fs-200);
    font-weight: var(--w-medium);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(6px);
    pointer-events: none;
    transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.whatsapp-float:focus-visible .whatsapp-float__label { opacity: 1; visibility: visible; transform: translateX(0); }
@media (hover: hover) and (pointer: fine) {
    .whatsapp-float:hover { color: #fff; transform: translateY(-3px) scale(1.04); box-shadow: 0 10px 28px rgba(8, 123, 56, 0.4), 0 3px 8px rgba(14, 27, 58, 0.18); }
    .whatsapp-float:hover .whatsapp-float__label { opacity: 1; visibility: visible; transform: translateX(0); }
}
@media (max-width: 760px) {
    .whatsapp-float {
        right: calc(1.25rem + env(safe-area-inset-right));
        bottom: calc(1.25rem + env(safe-area-inset-bottom));
        width: 60px;
        height: 60px;
    }
    .whatsapp-float svg { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float::before, .whatsapp-float::after { animation: none; opacity: 0; }
    .whatsapp-float, .whatsapp-float__label { transition: none; }
}
.whatsapp-float.is-hidden,
.site-header.nav-is-open ~ .whatsapp-float { opacity: 0; visibility: hidden; pointer-events: none; }
.whatsapp-float.is-hidden::before, .whatsapp-float.is-hidden::after,
.site-header.nav-is-open ~ .whatsapp-float::before,
.site-header.nav-is-open ~ .whatsapp-float::after { animation-play-state: paused; }

/* ---------- Shared header / navigation ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 200;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: saturate(140%) blur(16px);
    -webkit-backdrop-filter: saturate(140%) blur(16px);
    border-bottom: 1px solid var(--border);
    transition: box-shadow var(--dur) var(--ease);
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5); }
.nav__brand { display: inline-flex; align-items: center; flex-shrink: 0; }
.nav__brand img { height: 60px; width: auto; object-fit: contain; }
.nav__menu { list-style: none; display: flex; align-items: center; gap: 0.2rem; margin: 0; padding: 0; }
.nav__menu li { min-width: 0; }
.nav__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.65rem 0.8rem;
    border-radius: var(--r-sm);
    color: var(--text-muted);
    font-size: var(--fs-200);
    font-weight: var(--w-medium);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav__link:hover, .nav__link.is-active { background: var(--surface-2); color: var(--navy); }
.nav__link::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: calc(50% - 7px);
    width: 14px;
    height: 2px;
    background: var(--orange-ink);
    border-radius: var(--r-pill);
    transform: scaleX(0);
    transition: transform var(--dur) var(--ease);
}
.nav__link.is-active::after { transform: scaleX(1); }
.nav__cta { margin-left: var(--sp-3); }
.nav__project {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 44px;
    padding: 0.65rem 1.1rem;
    border-radius: var(--r-sm);
    background: var(--navy);
    color: var(--white);
    font-size: var(--fs-200);
    font-weight: var(--w-medium);
    white-space: nowrap;
    transition: background var(--dur) var(--ease);
}
.nav__project:hover, .nav__project[aria-current="page"] { background: var(--navy-2); color: var(--white); }
.nav__project svg { width: 17px; height: 17px; transition: transform var(--dur) var(--ease); }
.nav__project:hover svg { transform: translate(2px, -2px); }
.nav__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: var(--sp-2);
    min-height: 44px;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--navy);
    font: inherit;
    font-size: var(--fs-200);
    cursor: pointer;
}
.nav__toggle:hover { background: var(--surface-2); }
.nav__toggle-icon { position: relative; width: 18px; height: 14px; }
.nav__toggle-icon::before, .nav__toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    transition: transform var(--dur) var(--ease);
}
.nav__toggle-icon::after { top: 10px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-icon::before { transform: translateY(3.5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-icon::after { transform: translateY(-3.5px) rotate(-45deg); }
.nav__backdrop { position: absolute; inset: var(--header-h) 0 auto; height: calc(100dvh - var(--header-h)); z-index: -1; background: rgba(14, 27, 58, 0.25); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-family: var(--font-body);
    font-size: var(--fs-200);
    font-weight: var(--w-semi);
    line-height: 1;
    padding: 0.95rem 1.5rem;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: transform var(--dur) var(--ease), background-color var(--dur) var(--ease),
                border-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn--primary {
    /* Navy on orange clears 5.8:1; the hover deepens the fill rather than
       lightening it, so the label keeps its contrast through the whole state. */
    background: var(--orange);
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--orange-hover); color: var(--navy); transform: translateY(-2px); }
.btn--secondary {
    background: transparent;
    color: var(--navy);
    border-color: var(--border-2);
}
.btn--secondary:hover { color: var(--white); background: var(--navy); transform: translateY(-2px); }
.btn--ghost {
    /* White buttons inside the cookie banner and modal. */
    background: var(--white);
    color: var(--text);
    border-color: var(--border-2);
}
.btn--ghost:hover { background: var(--surface-2); border-color: var(--navy-2); transform: translateY(-2px); }
.btn--lg { padding: 1.1rem 1.8rem; font-size: var(--fs-300); }

@keyframes spin { to { transform: rotate(360deg); } }

.arrow-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: var(--w-semi);
    font-size: var(--fs-200);
    color: var(--orange-ink);
}
.arrow-link svg { transition: transform var(--dur) var(--ease); }
.arrow-link:hover svg { transform: translateX(4px); }

/* ---------- Hero ---------- */
.hero--studio {
    background: var(--white);
    isolation: isolate;
}
.hero--studio::before,
.hero--studio::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}
.hero--studio::before {
    background: url("../images/hero-studio.jpg") center 48% / cover no-repeat;
    filter: saturate(0.72) contrast(0.9);
    opacity: 0.78;
}
.hero--studio::after {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.86) 38%, rgba(255, 255, 255, 0.42) 70%, rgba(255, 255, 255, 0.27) 100%),
        linear-gradient(0deg, var(--white) 0%, rgba(255, 255, 255, 0) 32%);
}
.hero--studio .hero__inner { max-width: 680px; }
.hero--studio .hero__title {
    font-size: clamp(3.25rem, 5.8vw, 6.5rem);
    line-height: 1.02;
    max-width: 12ch;
}
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh; /* progressive override: excludes the collapsing mobile URL bar */
    display: flex;
    align-items: center;
    padding-top: var(--header-h);
    overflow: hidden;
}

.hero .container { position: relative; z-index: 2; width: 100%; }
.hero__inner { max-width: 760px; }
.hero__title {
    font-size: var(--fs-hero);
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin: 0.5rem 0 var(--sp-3);
}

.hero__sub {
    font-size: var(--fs-400);
    color: var(--text-muted);
    max-width: 48ch;
    margin-bottom: var(--sp-5);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: var(--sp-4); }

/* ---------- Work ---------- */
.work-card {
    position: relative;
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface);
    transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.work-card { box-shadow: var(--shadow-sm); }
.work-card:hover { transform: translateY(-4px); border-color: var(--border-orange); box-shadow: var(--shadow-md); }
.work-card__media {
    aspect-ratio: 16 / 10;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: var(--fs-700);
    color: rgba(255, 255, 255, 0.9);
    overflow: hidden;
}
.work-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Darkening belongs on hover, not baked into every image: a logo or a screenshot
   needs its real contrast, unlike the decorative crop this rule was written for. */
.work-card__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--navy);
    opacity: 0;
    transition: opacity var(--dur) var(--ease);
    pointer-events: none;
}
.work-card:hover .work-card__media::after { opacity: 0.18; }
/* Placeholder tiles stay dark: navy is the accent that lets the light
   monogram on top read, and it keeps the grid from going flat on white. */
.wm-a { background: linear-gradient(135deg, #0E1B3A, #1B2E5C); }
.wm-b { background: linear-gradient(135deg, #0E1B3A, #FF6A1A); }
.wm-c { background: linear-gradient(135deg, #BF4708, #FF8A4C); }
.wm-d { background: linear-gradient(135deg, #1B2E5C, #1F7A74); }
.work-card__body { padding: var(--sp-4); display: flex; flex-direction: column; gap: 0.35rem; }
.work-card__tag {
    font-family: var(--font-mono);
    font-size: var(--fs-100);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange-ink);
}
.work-card__body h3 { font-size: var(--fs-500); margin: 0; }
.work-card__client { color: var(--text-muted); font-size: var(--fs-200); margin: 0; }
.work-card__result { color: var(--text); font-size: var(--fs-300); margin: 0.35rem 0 0; }

/* ---------- Studio services ---------- */
.studio-intro { padding-bottom: clamp(3rem, 6vw, 5rem); }
.studio-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    align-items: end;
    gap: clamp(2rem, 6vw, 5rem);
}
.studio-title {
    font-size: clamp(2.15rem, 4.8vw, 4rem);
    line-height: 1.1;
    margin: 0;
}
.studio-title em { color: var(--orange-ink); font-style: normal; }
.studio-main .reveal { opacity: 1; transform: none; }
.studio-main .reveal.is-pending { opacity: 0; transform: translateY(18px); }
.studio-intro__copy { max-width: 52ch; }
.studio-intro__copy > p { color: var(--text-muted); }
.studio-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem; margin-top: var(--sp-5); }
.studio-text-link { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; font-weight: var(--w-medium); }
.studio-text-link span { transition: transform var(--dur) var(--ease); }
.studio-text-link:hover span { transform: translateX(4px); }
.studio-services-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 100;
    background: var(--white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.studio-service-nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); overflow-x: auto; scroll-snap-type: x proximity; }
.studio-service-nav a {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 64px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    color: var(--text-muted);
    font-size: var(--fs-200);
    font-weight: var(--w-medium);
    scroll-snap-align: start;
}
.studio-service-nav a:hover,
.studio-service-nav a[aria-current="location"] { color: var(--orange-ink); border-bottom-color: var(--orange-ink); }
.studio-service-nav a:focus-visible { outline-offset: -4px; }
.studio-service {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(2rem, 6vw, 5rem);
    padding: clamp(2.5rem, 6vw, 4.5rem) 0;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: calc(var(--header-h) + 88px);
}
.studio-service:nth-child(even) .studio-service__media { order: 2; }
.studio-service__media { aspect-ratio: 8 / 5; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--white); }
.studio-service__media img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s var(--ease-out); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .studio-service:hover .studio-service__media img { transform: scale(1.025); }
}
.studio-service__copy { min-width: 0; }
.studio-service h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); line-height: 1.12; max-width: 22ch; }
.studio-service p { color: var(--text-muted); font-size: var(--fs-400); max-width: 50ch; margin: 0; }
.studio-service__list { list-style: none; padding: 0; margin: var(--sp-4) 0 0; display: grid; gap: 0.6rem; }
.studio-service__list li { position: relative; padding-left: 1.1rem; }
.studio-service__list li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 5px; height: 5px; border-radius: 50%; background: var(--orange-ink); }
.studio-contact__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--sp-5); }
.studio-contact h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.1; }
.studio-contact p { max-width: 54ch; margin: 0; color: var(--text-muted); }
.studio-contact .studio-actions { margin-top: 0; }
@media (max-width: 760px) {
    .studio-intro__grid, .studio-service { grid-template-columns: minmax(0, 1fr); }
    .studio-intro__copy { max-width: none; }
    .studio-service:nth-child(even) .studio-service__media { order: 0; }
    .studio-service-nav a { min-height: 56px; }
    .studio-service { gap: var(--sp-5); }
    .studio-service p { font-size: var(--fs-300); }
}

/* ---------- Panels ---------- */

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: var(--sp-5);
    box-shadow: var(--shadow-sm);
}
.panel h3 { font-size: var(--fs-500); margin-bottom: var(--sp-2); }
.panel p { color: var(--text-muted); font-size: var(--fs-200); margin: 0; }

/* ---------- Inquiry ---------- */
.inquiry {
    --field-bg: var(--white);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: clamp(1.75rem, 4vw, 3.5rem);
    box-shadow: var(--shadow-md);
}
.inquiry__head { max-width: 30ch; margin-bottom: var(--sp-5); }
.inquiry__head h1, .inquiry__head h2 { font-size: var(--fs-700); }
.inquiry__head p { color: var(--text-muted); margin: 0; }
.contact-form .hero__actions { margin-top: var(--sp-1); }
.contact-form .form-note { margin-top: var(--sp-3); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: var(--sp-4); }

.field label { font-size: var(--fs-200); font-weight: var(--w-semi); color: var(--text); }
.field .req { color: var(--orange-ink); }
.field input, .field select, .field textarea {
    font: inherit;
    font-size: var(--fs-300);
    color: var(--text);
    background: var(--field-bg);
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-2);
    border-radius: var(--r-sm);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235C6885' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; padding-right: 2.4rem; }
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--orange-ink);
    box-shadow: 0 0 0 3px rgba(255, 106, 26, 0.22);
}

.form-note { font-size: var(--fs-100); color: var(--text-muted); }

/* ---------- Shared footer ---------- */
.site-footer {
    --text: #FFFFFF;
    --text-muted: #B8C1D5;
    --border: rgba(255, 255, 255, 0.12);
    background: var(--navy);
    color: var(--text);
    padding: clamp(2.5rem, 5vw, 4rem) 0 var(--sp-4);
}
.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.35fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}
.footer-top > * { min-width: 0; }
.footer-brand__logo { display: inline-flex; align-items: center; min-height: 40px; margin-bottom: var(--sp-3); }
.footer-brand__logo img {
    height: 128px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.footer-brand p { max-width: 27ch; margin: 0; color: var(--text-muted); font-size: var(--fs-200); }
.footer-social { display: flex; gap: var(--sp-1); margin-top: var(--sp-3); }
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.footer-social svg { width: 19px; height: 19px; }
.footer-social a:hover { color: var(--white); background: rgba(255, 255, 255, 0.1); }
.footer-col h2 { display: flex; align-items: center; min-height: 40px; margin: 0 0 var(--sp-3); font: var(--w-medium) var(--fs-200)/1.6 var(--font-body); color: var(--text); letter-spacing: 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--sp-3); }
.footer-col a { display: flex; align-items: center; min-height: 44px; padding: 0.5rem 0; color: var(--text-muted); font-size: var(--fs-200); }
.footer-col a:hover { color: var(--white); }
.footer-contact a, .footer-contact__location { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: center; column-gap: var(--sp-2); min-height: 44px; font-size: var(--fs-200); color: var(--text-muted); }
.footer-contact svg { width: 20px; height: 20px; }
.footer-contact span { overflow-wrap: anywhere; }
.footer-contact__location { padding: 0.5rem 0; }
.footer-bottom { margin-top: var(--sp-5); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 0 var(--sp-4); }
.footer-legal a, .footer-legal button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0;
    border: none;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: var(--fs-100);
    cursor: pointer;
}
.footer-legal a:hover, .footer-legal button:hover { color: var(--white); }
.site-footer :focus-visible { outline-color: var(--orange-soft); }
.footer-fineprint { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem var(--sp-5); padding-top: var(--sp-2); }
.footer-fineprint p { margin: 0; color: var(--text-muted); font-size: 0.6875rem; line-height: 1.7; }
.footer-fineprint__separator { padding: 0 0.3rem; }

/* ---------- Cookie consent ---------- */
.cookie-banner {
    position: fixed;
    left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4);
    max-width: 560px;
    /* margin must stay 0: `left` already provides the inset, and a margin-left
       here would stack on top of it and push the box past its right inset. */
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-4);
    z-index: 260;
    display: none;
}
.cookie-banner.is-open { display: block; }
/* On wide screens the banner sits bottom right, clear of the left-aligned hero
   actions it used to cover on a first visit. */
@media (min-width: 761px) {
    .cookie-banner { left: auto; width: calc(100% - 2 * var(--sp-4)); }
}
.cookie-banner h3 { font-size: var(--fs-400); margin-bottom: var(--sp-2); }
.cookie-banner p { font-size: var(--fs-200); color: var(--text-muted); margin-bottom: var(--sp-3); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.cookie-actions .btn { padding: 0.7rem 1.1rem; }

.cookie-modal,
.modal {
    position: fixed; inset: 0;
    z-index: 280;
    display: none;
    align-items: center; justify-content: center;
    padding: var(--sp-4);
    background: rgba(10, 20, 48, 0.55);
    backdrop-filter: blur(4px);
}
.cookie-modal.is-open,
.modal.is-open { display: flex; }
.cookie-modal__box,
.modal__box {
    --field-bg: var(--white);
    width: 100%; max-width: 560px;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    padding: var(--sp-5);
    max-height: 90vh; overflow-y: auto;
}
.cookie-modal__box h3 { font-size: var(--fs-600); margin-bottom: var(--sp-2); }
.cookie-cat { border-top: 1px solid var(--border); padding: var(--sp-3) 0; }
.cookie-cat__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.cookie-cat h4 { font-size: var(--fs-300); margin: 0; font-family: var(--font-body); font-weight: var(--w-semi); }
.cookie-cat p { font-size: var(--fs-200); color: var(--text-muted); margin: 0.4rem 0 0; }
/* toggle */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex: 0 0 auto; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.toggle__track { position: absolute; inset: 0; background: rgba(14, 27, 58, 0.14); border-radius: var(--r-pill); transition: background var(--dur) var(--ease); }
.toggle__track::before { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-muted); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
.toggle input:checked + .toggle__track { background: rgba(255, 106, 26, 0.4); }
.toggle input:checked + .toggle__track::before { transform: translateX(20px); background: var(--orange); }
/* Locked on (strictly necessary): a navy knob on the orange track reads as
   "on and not yours to change" without introducing a third hue. */
.toggle input:disabled + .toggle__track::before { background: var(--navy); }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--orange-ink); outline-offset: 2px; }

/* ---------- Legal / content pages ---------- */
.legal { padding-top: calc(var(--header-h) + var(--sp-6)); padding-bottom: var(--sp-7); }
.legal__inner { max-width: 780px; }
.legal h1 { font-size: var(--fs-700); margin-bottom: var(--sp-3); }
.legal .updated { font-family: var(--font-mono); font-size: var(--fs-100); color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: var(--sp-5); }
.legal h2 { font-size: var(--fs-600); margin: var(--sp-6) 0 var(--sp-3); }
.legal h3 { font-size: var(--fs-500); margin: var(--sp-5) 0 var(--sp-2); }
.legal p, .legal li { color: var(--text-muted); font-size: var(--fs-300); }
.legal ul { padding-left: 1.2rem; }
.legal li { margin-bottom: 0.5rem; }
.legal a { color: var(--orange-ink); }
.legal-steps { padding-left: 1.4rem; }
.legal-steps a { overflow-wrap: anywhere; }
.legal-table { width: 100%; border-collapse: collapse; margin: var(--sp-4) 0; font-size: var(--fs-300); }
.legal-table caption { text-align: left; font-weight: 600; color: var(--text); padding-bottom: var(--sp-2); }
.legal-table th, .legal-table td { padding: var(--sp-3); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.legal-table thead { background: var(--surface); color: var(--text); }
.legal-table tbody th { font-weight: 500; color: var(--text); }
.legal-table th span { display: block; font-weight: 400; color: var(--text-muted); }
.legal-table td { width: 22%; white-space: nowrap; color: var(--orange-ink); font-weight: 600; }
@media (max-width: 460px) {
    .legal-table th, .legal-table td { padding: var(--sp-2); }
}


/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Unfilled values ---------- */
/* A value still waiting on the business. Deliberately conspicuous, so an
   unfilled one cannot ship looking intentional. List every outstanding item:
   grep -rn 'data-todo' . --include=*.html */
[data-todo] {
    display: inline-block;
    /* .work-card__body is a flex column, and a flex child stretches to full
       width whatever its display is, which made the dashed rule read as a
       divider instead of a marked value. */
    align-self: flex-start;
    color: var(--amber);
    background: rgba(158, 95, 6, 0.08);
    border-bottom: 1px dashed currentColor;
}

/* ---------- Portfolio: media variants and monogram tiles ---------- */
/* Ratio is per category. One global 16/10 box letterboxes every logo and
   crops every A4 page, so each discipline gets the shape it actually is. */
.work-card__media--wide     { aspect-ratio: 16 / 10; }
.work-card__media--square   { aspect-ratio: 1 / 1; }

.work-card__media--mockup   { aspect-ratio: 3 / 2; }
.work-card__media--print    { aspect-ratio: 25 / 21; }
.work-card__media--presentation { aspect-ratio: 3 / 4; background: var(--white); }
.work-card__media--presentation img { object-fit: contain; }
.work-card__media--presentation::after { display: none; }

/* Keep every website preview aligned with the supplied 1280x720 screenshots. */
.pf-card[data-category="websites"] .work-card__media { aspect-ratio: 16 / 9; }
.pf-card[data-category="websites"] .work-card__media img { object-position: top; }

/* Logo artwork is contained rather than cropped, on a plain white plate so
   a mark with its own background does not collide with the white page. */
.work-card__media--plate { background: var(--white); }
.work-card__media--plate img { object-fit: contain; padding: 12%; }

/* Typographic tile, shown whenever a project has no image file yet. Built
   from the existing .wm-a to .wm-d gradients so it reads as designed rather
   than missing. */
.wm-mono { flex-direction: column; gap: 0.45rem; }
.wm-mono__glyph {
    font-family: var(--font-display);
    font-size: var(--fs-700);
    font-weight: var(--w-bold);
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--white);
}
.wm-mono__cat {
    font-family: var(--font-mono);
    font-size: var(--fs-100);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

/* ---------- Portfolio grid ---------- */
.pf-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); align-items: start; }
.pf-category {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    margin: var(--sp-5) 0 0;
    font-size: var(--fs-500);
    line-height: 1.3;
}
.pf-category:first-of-type { margin-top: 0; }
.pf-category::after {
    content: "";
    flex: 1;
    min-width: var(--sp-5);
    height: 1px;
    background: var(--border-2);
}
.pf-category[hidden] { display: none; }
@media (min-width: 620px)  { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1001px) { .pf-grid { grid-template-columns: repeat(3, 1fr); } }
/* Only ever added by JS, so every card is visible with JS off. */
.pf-card.is-hidden { display: none; }

/* Enter state for cards a filter or the Show more button reveals. Applied and
   released by JS, never left in the stylesheet, so nothing is hidden with JS
   off. Opacity only: a transform here would fight the hover lift. */
.pf-card {
    transition: opacity 0.45s var(--ease-out),
                transform var(--dur) var(--ease),
                border-color var(--dur) var(--ease);
}
.pf-card.is-entering { opacity: 0; }

/* One tab stop per card: the control lives in the heading and its ::after
   stretches the hit area across the whole card, which is already relative. */
.work-card__link {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    text-align: left;
    cursor: pointer;
    transition: color var(--dur) var(--ease);
}
.work-card__link::after { content: ""; position: absolute; inset: 0; }
.work-card__link:hover { color: var(--orange-ink); }
.work-card__body h3 { display: flex; }

/* ---------- Portfolio controls ---------- */
.pf-controls { margin-bottom: var(--sp-5); }

/* Scrolls rather than wraps on a phone, so the filter row stays one line. */
.pf-toolbar {
    display: flex;
    gap: var(--sp-2);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    padding-bottom: var(--sp-2);
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.pf-toolbar::-webkit-scrollbar { display: none; }
.pf-filter {
    flex: 0 0 auto;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-body);
    font-size: var(--fs-200);
    font-weight: var(--w-medium);
    color: var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-pill);
    padding: 0.6rem 1rem;
    min-height: 44px;
    cursor: pointer;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease),
                background-color var(--dur) var(--ease);
}
.pf-filter:hover { color: var(--text); border-color: var(--border-2); }
/* Selected reads as a solid navy pill rather than a tint, so the active
   filter is unmistakable at a glance on a light page. */
.pf-filter[aria-pressed="true"] {
    color: var(--white);
    border-color: var(--navy);
    background: var(--navy);
}
.pf-filter__count { font-family: var(--font-mono); font-size: var(--fs-100); color: var(--text-muted); }
.pf-filter[aria-pressed="true"] .pf-filter__count { color: var(--orange); }

.pf-search { max-width: 380px; margin-top: var(--sp-3); }
.pf-status {
    font-family: var(--font-mono);
    font-size: var(--fs-100);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: var(--sp-3) 0 0;
    min-height: 1.2em;
}
.pf-empty {
    border: 1px dashed var(--border-2);
    border-radius: var(--r-md);
    padding: var(--sp-6) var(--sp-4);
    text-align: center;
}
.pf-empty h3 { font-size: var(--fs-500); margin-bottom: var(--sp-2); }
.pf-empty p { margin: 0 auto; max-width: 46ch; color: var(--text-muted); font-size: var(--fs-300); }
.pf-more-wrap { margin-top: var(--sp-5); text-align: center; }

/* ---------- Proof: tabs, reviews, clients (homepage 05) ---------- */
.proof-tabs {
    display: flex;
    gap: var(--sp-2);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: var(--sp-5);
    border-bottom: 1px solid var(--border);
}
.proof-tabs::-webkit-scrollbar { display: none; }
.proof-tab {
    flex: 0 0 auto;
    font-family: var(--font-body);
    font-size: var(--fs-200);
    font-weight: var(--w-medium);
    color: var(--text-muted);
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px; /* sit the underline on the container rule */
    padding: 0.7rem 0.9rem;
    min-height: 44px;
    cursor: pointer;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.proof-tab:hover { color: var(--text); }
.proof-tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--orange-ink); }

/* Shown only by the noscript block, where the tabs cannot switch panels. */
.proof-panel__title { display: none; }

/* ---------- Continuously scrolling client logos ---------- */
.client-slider {
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}
.client-slider::-webkit-scrollbar { display: none; }
.client-slider:focus-visible { outline: 2px solid var(--orange-ink); outline-offset: 3px; }
.client-slider.is-animated { overflow: hidden; }
.client-track { display: flex; width: max-content; }
.client-group {
    display: flex;
    flex-shrink: 0;
    gap: var(--sp-3);
    padding-right: var(--sp-3);
}
.client-slider.is-animated .client-track {
    animation: client-scroll 48s linear infinite;
    will-change: transform;
}
.client-slider.is-paused .client-track,
.client-slider:focus-visible .client-track { animation-play-state: paused; }
@media (hover: hover) and (pointer: fine) {
    .client-slider:hover .client-track { animation-play-state: paused; }
}
@keyframes client-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.client-logo {
    flex: 0 0 clamp(160px, 24vw, 260px);
    width: clamp(160px, 24vw, 260px);
    height: 148px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
}
.client-logo img {
    display: block;
    width: 100%;
    max-width: 260px;
    height: 112px;
    object-fit: contain;
}
@media (prefers-reduced-motion: reduce) {
    .client-slider.is-animated { overflow-x: auto; }
    .client-slider.is-animated .client-track { animation: none; transform: none; will-change: auto; }
    .client-group[aria-hidden="true"] { display: none; }
}

/* ---------- Project detail modal ---------- */
.modal__box { max-width: 640px; }
.modal__head { display: flex; align-items: flex-start; gap: var(--sp-3); margin-bottom: var(--sp-2); }
.modal__title { font-size: var(--fs-600); margin: 0; flex: 1 1 auto; }
.modal__close {
    flex: 0 0 auto;
    width: 44px; height: 44px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.modal__close:hover { color: var(--text); border-color: var(--border-2); }
.modal__meta {
    font-family: var(--font-mono);
    font-size: var(--fs-100);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--orange-ink);
    margin-bottom: var(--sp-4);
}
.modal__meta:empty { display: none; }
.modal__body { color: var(--text-muted); font-size: var(--fs-300); }
.modal__body img { width: 100%; height: auto; border-radius: var(--r-sm); }
.project-gallery { display: grid; gap: var(--sp-4); }
.project-gallery figure { margin: 0; }
.project-gallery figcaption { margin-top: var(--sp-1); font-size: var(--fs-200); }
.modal__body p:last-child { margin-bottom: 0; }

/* ---------- Image loading state ---------- */
/* The only genuinely async thing in the grid is the image itself, so this is
   the one place a skeleton is honest. .media-skel is added by JS only, so
   images are never hidden with JS off. */
.work-card__media img { transition: opacity 0.4s var(--ease-out); }
.work-card__media.media-skel img { opacity: 0; }
.work-card__media.media-skel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .nav__toggle { display: inline-flex; }
    .nav__menu {
        position: absolute;
        top: calc(var(--header-h) + var(--sp-2));
        left: var(--sp-4);
        right: var(--sp-4);
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--sp-1);
        padding: var(--sp-3);
        border: 1px solid var(--border);
        border-radius: var(--r-md);
        background: var(--white);
        box-shadow: var(--shadow-lg);
        max-height: calc(100dvh - var(--header-h) - var(--sp-4));
        overflow-y: auto;
        overscroll-behavior: contain;
        transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
    }
    .nav-ready .nav__menu { opacity: 0; visibility: hidden; transform: translateY(-8px); pointer-events: none; }
    .nav-ready .nav__menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
    .nav__link { justify-content: flex-start; min-height: 52px; padding: 0.75rem; }
    .nav__link::after { left: 12px; bottom: 7px; }
    .nav__cta { grid-column: 1 / -1; margin: var(--sp-1) 0 0; }
    .nav__project { min-height: 48px; }
    .site-header:not(.nav-ready) { position: sticky; height: auto; min-height: var(--header-h); padding: var(--sp-3) 0; }
    .site-header:not(.nav-ready) .nav { flex-wrap: wrap; }
    .site-header:not(.nav-ready) .nav__toggle { display: none; }
    .site-header:not(.nav-ready) .nav__menu { position: static; width: 100%; box-shadow: none; max-height: none; }
}
@media (min-width: 641px) and (max-width: 1000px) {
    .footer-top { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--sp-5); }
    .footer-brand { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; column-gap: var(--sp-5); }
    .footer-brand__logo { grid-column: 1; }
    .footer-brand p { grid-column: 1; }
    .footer-social { grid-column: 2; grid-row: 1 / 3; margin-top: 0; align-self: start; }
}
@media (max-width: 640px) {
    .footer-top { grid-template-columns: minmax(0, 1fr); gap: var(--sp-5); }
    .footer-brand { padding-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
    .footer-brand p { max-width: 30ch; }
    .footer-fineprint { display: grid; gap: var(--sp-1); }
    .footer-fineprint p:last-child { max-width: 40ch; }
}

@media (max-width: 760px) {
    .hero--studio::before { background-position: 58% center; opacity: 0.92; }
    .hero--studio::after {
        background:
            linear-gradient(0deg, var(--white) 0%, rgba(255, 255, 255, 0) 22%),
            linear-gradient(90deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.42));
    }
    .hero--studio .hero__title { font-size: clamp(2.7rem, 10vw, 4.25rem); }
    .hero--studio .hero__sub { color: var(--text); }

    .form-grid { grid-template-columns: 1fr; }

}

@media (max-width: 460px) {
    .cookie-actions .btn { flex: 1 1 auto; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
    html { scroll-behavior: auto; }
    .reveal, .studio-main .reveal.is-pending { opacity: 1; transform: none; }
}

/* ---------- Service-focused homepage and photo-led process ---------- */
.hero--studio .hero__inner { max-width: 760px; padding: clamp(2rem, 5vw, 4rem) 0; }
.hero--studio .hero__title { max-width: 22ch; font-size: clamp(2.45rem, 4.7vw, 4.6rem); line-height: 1.08; }
.hero__title em, .process-title em { color: var(--orange-ink); font-style: normal; }
.hero--studio .hero__sub { max-width: 56ch; line-height: 1.65; }
.footer-brand p { max-width: 38ch; line-height: 1.65; }
.studio-service__copy > .studio-text-link { margin-top: var(--sp-4); }
.process-intro { padding-bottom: clamp(3rem, 6vw, 5rem); }
.process-intro__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: end; gap: clamp(2rem, 6vw, 5rem); }
.process-title { font-size: clamp(2.15rem, 4.8vw, 4rem); line-height: 1.1; margin: 0; }
.process-intro__grid p { max-width: 54ch; color: var(--text-muted); }
.process-main .reveal { opacity: 1; transform: none; }
.process-main .reveal.is-pending { opacity: 0; transform: translateY(18px); }
.process-stage-bar { position: sticky; top: var(--header-h); z-index: 100; background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.process-stage-nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); overflow-x: auto; scroll-snap-type: x proximity; }
.process-stage-nav a { display: inline-flex; align-items: center; gap: 0.6rem; flex-shrink: 0; min-height: 64px; border-bottom: 2px solid transparent; white-space: nowrap; color: var(--text-muted); font-size: var(--fs-200); font-weight: var(--w-medium); scroll-snap-align: start; }
.process-stage-nav a span { font-size: var(--fs-100); color: var(--orange-ink); }
.process-stage-nav a:hover, .process-stage-nav a[aria-current="location"] { color: var(--orange-ink); border-bottom-color: var(--orange-ink); }
.process-stage-nav a:focus-visible { outline-offset: -4px; }
.process-stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 6vw, 5rem); padding: clamp(2.5rem, 6vw, 4.5rem) 0; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 88px); }
.process-stage:nth-child(even) .process-stage__media { order: 2; }
.process-stage__media { margin: 0; min-width: 0; }
.process-stage__media img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; border-radius: var(--r-md); }
.process-stage__media figcaption { margin-top: 0.75rem; color: var(--text-muted); font-size: var(--fs-200); }
.process-stage__copy { min-width: 0; }
.process-stage h2 { display: flex; align-items: baseline; gap: 0.8rem; font-size: clamp(1.65rem, 3vw, 2.4rem); line-height: 1.15; }
.process-stage__number { flex: 0 0 auto; color: var(--orange-ink); font-size: var(--fs-200); font-weight: var(--w-medium); }
.process-stage p { margin: 0; color: var(--text-muted); font-size: var(--fs-300); line-height: 1.7; }
.process-stage .process-stage__outcome { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border); font-size: var(--fs-200); }
.process-stage__outcome strong { color: var(--text); }
@media (max-width: 760px) {
    .process-intro__grid, .process-stage { grid-template-columns: minmax(0, 1fr); }
    .process-stage:nth-child(even) .process-stage__media { order: 0; }
    .process-stage { gap: var(--sp-5); }
    .process-stage-nav a { min-height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
    .studio-main .reveal.is-pending, .process-main .reveal.is-pending { opacity: 1; transform: none; }
}

/* ---------- Homepage sections ----------
   Short previews of the standalone pages, each ending in a link to the full
   page. No ids from the old one-page layout are reused here: script.js still
   redirects those hashes (#work, #process, #proof ...) to their new pages. */
.home-section--tint { background: var(--surface-2); }
.home-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-2) var(--sp-5);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}
.home-head .sec-title { margin: 0; }

.home-services { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--sp-4); }
.home-service {
    position: relative;
    grid-column: span 2;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out),
                border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.home-service:nth-child(-n+2) { grid-column: span 3; }
.home-service:hover { border-color: var(--border-orange); box-shadow: var(--shadow-md); }
.home-service__media { aspect-ratio: 8 / 5; overflow: hidden; }
.home-service__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .home-service:hover .home-service__media img { transform: scale(1.03); }
}
.home-service__body { padding: var(--sp-4); }
.home-service__body h3 { font-size: var(--fs-500); margin: 0 0 var(--sp-1); }
.home-service__body p { margin: 0; color: var(--text-muted); font-size: var(--fs-300); }
/* One link per card, stretched over the whole card. */
.home-service__link { color: inherit; }
.home-service__link::after { content: ""; position: absolute; inset: 0; }
.home-service:hover .home-service__link { color: var(--orange-ink); }

.home-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-5); }
.home-steps li { padding-top: var(--sp-3); border-top: 2px solid var(--orange-ink); }
.home-steps__number { display: block; margin-bottom: var(--sp-2); font-family: var(--font-mono); font-size: var(--fs-200); color: var(--orange-ink); }
.home-steps h3 { font-size: var(--fs-500); margin: 0 0 var(--sp-1); }
.home-steps p { margin: 0; color: var(--text-muted); font-size: var(--fs-300); }

@media (max-width: 900px) {
    .home-services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-service, .home-service:nth-child(-n+2) { grid-column: span 1; }
    .home-service:first-child { grid-column: 1 / -1; }
    .home-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .home-services, .home-steps { grid-template-columns: minmax(0, 1fr); }
    .home-service:first-child { grid-column: auto; }
}

/* ---------- Academy ----------
   academy.html and the pages in academy/ are generated by tools/academy.py.
   They reuse the site's tabs (.proof-tabs), steps (.home-steps), panels and
   lists, so only what is new to the Academy is defined here. */
.home-steps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.academy-title { font-size: clamp(2.3rem, 5vw, 4.25rem); line-height: 1.08; margin: var(--sp-2) 0 var(--sp-4); }
.academy-title em { color: var(--orange-ink); font-style: normal; }
.academy-hero__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 6vw, 5rem); }
.academy-hero__copy .lede { max-width: 50ch; }
.academy-hero__copy .form-note { margin: var(--sp-4) 0 0; }
.academy-hero__media { margin: 0; }
.academy-hero__media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.home-head .muted { margin: 0; }

.course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.course-card {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out),
                border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.course-card:hover { border-color: var(--border-orange); box-shadow: var(--shadow-md); }
.course-card__media { aspect-ratio: 3 / 2; overflow: hidden; }
.course-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .course-card:hover .course-card__media img { transform: scale(1.03); }
}
.course-card__body { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; padding: var(--sp-4); }
.course-card__body h3 { font-size: var(--fs-500); margin: 0; }
.course-card__body p { margin: 0; color: var(--text-muted); font-size: var(--fs-300); }
.course-card__body .course-card__status { margin-top: auto; padding-top: var(--sp-2); color: var(--text); font-size: var(--fs-200); font-weight: var(--w-medium); }
/* One link per card, stretched over the whole card. */
.course-card__link { color: inherit; }
.course-card__link::after { content: ""; position: absolute; inset: 0; }
.course-card:hover .course-card__link { color: var(--orange-ink); }

.back-link { display: flex; width: fit-content; align-items: center; gap: 0.5rem; min-height: 44px; margin-bottom: var(--sp-4); font-size: var(--fs-200); font-weight: var(--w-medium); }
.course-layout, .lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 380px); align-items: start; gap: clamp(2rem, 5vw, 4.5rem); }
.course-detail .lede, .lesson-detail .lede { max-width: 58ch; }
.course-features { list-style: none; display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-4) 0 0; padding: 0; }
.course-features li { padding: 0.45rem 0.9rem; border: 1px solid var(--border); border-radius: var(--r-pill); font-size: var(--fs-200); color: var(--text); }
.course-section { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--border); }
.course-section h2, .lesson-panel h2 { font-size: var(--fs-600); line-height: 1.2; margin-bottom: var(--sp-3); }
.course-section .muted { font-size: var(--fs-300); }
.course-syllabus { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: grid; gap: var(--sp-2); }
.course-syllabus li { display: flex; align-items: baseline; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); }
.course-syllabus span { font-family: var(--font-mono); font-size: var(--fs-200); color: var(--orange-ink); }
.course-aside { position: sticky; top: calc(var(--header-h) + var(--sp-4)); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-md); }
.course-aside img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.course-aside__body { display: grid; gap: var(--sp-2); padding: var(--sp-4); }
.course-aside__body h2 { font-size: var(--fs-600); margin: 0; }
.course-aside__body p { margin: 0; color: var(--text-muted); font-size: var(--fs-300); }
.course-aside__body .btn { width: 100%; }
.course-aside__body .form-note { text-align: center; }

.lesson-banner { display: inline-block; margin: 0 0 var(--sp-4); padding: 0.55rem 1rem; border-radius: var(--r-pill); background: var(--orange-tint); color: var(--text); font-size: var(--fs-200); font-weight: var(--w-medium); }
.lesson-detail .academy-title { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.lesson-detail .proof-tabs { margin-top: var(--sp-5); }
.lesson-panel p { color: var(--text-muted); font-size: var(--fs-300); max-width: 64ch; }
.lesson-panel:focus-visible { outline-offset: 6px; }
.lesson-practice { padding-left: 1.3rem; margin: 0 0 var(--sp-5); color: var(--text); font-size: var(--fs-300); }
.lesson-practice li { margin-bottom: 0.5rem; }
.lesson-checks { margin: 0; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); display: grid; gap: var(--sp-1); }
.lesson-checks legend { padding: 0 0.4rem; font-size: var(--fs-200); font-weight: var(--w-semi); }
.lesson-checks label { display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; font-size: var(--fs-300); cursor: pointer; }
.lesson-checks input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; accent-color: var(--orange-ink); cursor: pointer; }
.lesson-checks input:checked + span { color: var(--text-muted); text-decoration: line-through; }
.lesson-panel .field { margin: var(--sp-4) 0 var(--sp-3); }
.lesson-answer { margin-top: var(--sp-4); padding: var(--sp-4); border-left: 3px solid var(--orange-ink); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface-2); }
.lesson-answer p { margin: 0; color: var(--text); }
.lesson-next { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.lesson-aside { display: grid; gap: var(--sp-4); position: sticky; top: calc(var(--header-h) + var(--sp-4)); }
.lesson-aside h2 { font-size: var(--fs-500); margin-bottom: var(--sp-2); }
.lesson-aside ol { margin: 0; padding-left: 1.2rem; color: var(--text-muted); font-size: var(--fs-200); }
.lesson-aside li { margin-bottom: 0.4rem; }

@media (max-width: 900px) {
    .academy-hero__grid, .course-layout, .lesson-layout { grid-template-columns: minmax(0, 1fr); }
    .academy-hero__media img { aspect-ratio: 16 / 9; object-position: center 30%; }
    .course-aside, .lesson-aside { position: static; }
    .home-steps--3 { grid-template-columns: minmax(0, 1fr); }
}
/* Three cards stay in one row until there is room for only one, so the last
   card is never left alone on a row of its own. */
@media (max-width: 760px) {
    .course-grid { grid-template-columns: minmax(0, 1fr); }
    .course-card__media { aspect-ratio: 16 / 9; }
}

/* ---------- Academy accounts (academy/account.php) ----------
   One form serves every step. The panel's data-mode names the step, and
   anything whose data-show list does not include it is hidden, so the right
   fields show even before academy-account.js has loaded. */
[data-auth][data-mode="login"] [data-show]:not([data-show~="login"]),
[data-auth][data-mode="signup"] [data-show]:not([data-show~="signup"]),
[data-auth][data-mode="recover"] [data-show]:not([data-show~="recover"]),
[data-auth][data-mode="verify"] [data-show]:not([data-show~="verify"]),
[data-auth][data-mode="recovery-verify"] [data-show]:not([data-show~="recovery-verify"]),
[data-auth][data-mode="reset"] [data-show]:not([data-show~="reset"]) { display: none !important; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); align-items: start; gap: clamp(2rem, 6vw, 5rem); }
.account-intro .studio-service__list { margin-top: var(--sp-4); }
.account-panel { padding: clamp(1.5rem, 4vw, 2.25rem); }
.account-switch { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-4); border-bottom: 1px solid var(--border); }
.account-switch .proof-tab[aria-pressed="true"] { color: var(--text); border-bottom-color: var(--orange-ink); }
.account-heading { font-size: var(--fs-600); margin-bottom: var(--sp-4); }
.account-form .field { margin-bottom: var(--sp-3); }
.account-form .field input:disabled { background: var(--surface-2); color: var(--text-muted); }
.account-form .form-note { margin: 0.2rem 0 0; }
.account-submit { width: 100%; margin-top: var(--sp-2); }
.account-submit[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.account-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.account-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-3); }
.btn-text { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--orange-ink); font: inherit; font-size: var(--fs-200); font-weight: var(--w-medium); cursor: pointer; }
.btn-text:hover { color: var(--navy); }
.btn-text:disabled { color: var(--text-muted); cursor: not-allowed; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.form-message { margin: var(--sp-3) 0; padding: var(--sp-2) var(--sp-3); border-radius: var(--r-sm); background: var(--orange-tint); color: var(--text); font-size: var(--fs-200); }
.form-message--error { background: rgba(179, 38, 30, 0.08); color: var(--danger); }
.student-number { display: grid; gap: 0.2rem; margin-bottom: var(--sp-4); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-sm); background: var(--navy); color: var(--white); }
.student-number span { font-family: var(--font-mono); font-size: var(--fs-100); letter-spacing: 0.14em; text-transform: uppercase; color: #B8C1D5; }
.student-number strong { font-family: var(--font-display); font-size: var(--fs-500); letter-spacing: 0.04em; }
@media (max-width: 900px) {
    .account-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Academy admin console (academy/admin/) ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1) var(--sp-4); margin-bottom: var(--sp-5); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--border); }
.admin-bar a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-muted); font-size: var(--fs-200); font-weight: var(--w-medium); border-bottom: 2px solid transparent; }
.admin-bar a:hover, .admin-bar a[aria-current="page"] { color: var(--text); border-bottom-color: var(--orange-ink); }
.admin-bar a:last-child { margin-left: auto; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.admin-head .academy-title { margin-bottom: var(--sp-1); }
.admin-head .muted { margin: 0; max-width: 60ch; font-size: var(--fs-300); }
.admin-section-title { font-size: var(--fs-500); margin: var(--sp-6) 0 var(--sp-3); }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--fs-300); }
.admin-table th, .admin-table td { padding: var(--sp-3); border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.admin-table thead th { font-size: var(--fs-200); font-weight: var(--w-semi); color: var(--text-muted); background: var(--surface-2); }
.admin-table tbody tr:last-child > * { border-bottom: 0; }
.admin-table tbody th { font-weight: var(--w-semi); }
.admin-table tbody th a { color: var(--text); }
.admin-table tbody th a:hover { color: var(--orange-ink); }
.admin-sub { display: block; margin-top: 0.15rem; color: var(--text-muted); font-size: var(--fs-200); font-weight: var(--w-regular); }
.admin-actions { white-space: nowrap; }
.admin-actions a { display: inline-flex; align-items: center; min-height: 44px; margin-right: var(--sp-3); font-size: var(--fs-200); font-weight: var(--w-medium); }
.admin-inline { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: 0; }
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: var(--r-pill); background: var(--surface-2); color: var(--text-muted); font-size: var(--fs-100); font-weight: var(--w-semi); white-space: nowrap; }
.badge--live { background: rgba(31, 122, 116, 0.12); color: var(--teal); }
.admin-form { max-width: 820px; }
.admin-form fieldset { margin: 0 0 var(--sp-5); padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.admin-form legend { padding: 0 0.4rem; font-family: var(--font-display); font-size: var(--fs-400); font-weight: var(--w-bold); }
.admin-form .field { margin-bottom: var(--sp-3); }
.admin-form .form-note { margin: 0.2rem 0 0; }
.admin-check { display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; font-size: var(--fs-300); cursor: pointer; }
.admin-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--orange-ink); }
.admin-cover { width: 320px; max-width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: var(--sp-3); border-radius: var(--r-sm); border: 1px solid var(--border); }
.admin-form__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-4); }
.admin-review { margin-bottom: var(--sp-3); padding: var(--sp-4); }
.admin-review p { margin-bottom: var(--sp-2); color: var(--text); font-size: var(--fs-300); }
.admin-review__actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
@media (max-width: 760px) {
    .admin-bar a:last-child { margin-left: 0; }
}

/* ---------- Academy learning (dashboard, lessons, certificates) ---------- */
.dashboard-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.dashboard-head .student-number { margin: 0; min-width: 220px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); align-items: start; gap: var(--sp-5); }
.dashboard-courses { display: grid; gap: var(--sp-4); }
.dashboard-empty { padding: var(--sp-5); }
.dashboard-empty h2 { font-size: var(--fs-600); }
.dashboard-empty p { color: var(--text-muted); }
.dashboard-aside h2 { font-size: var(--fs-500); }
.dashboard-aside p, .dashboard-aside ol { color: var(--text-muted); font-size: var(--fs-300); }
.dashboard-aside ol { padding-left: 1.2rem; }
.dashboard-links { list-style: none; margin: var(--sp-4) 0 0; padding: var(--sp-3) 0 0; border-top: 1px solid var(--border); display: grid; }
.dashboard-links a { display: flex; align-items: center; min-height: 44px; font-size: var(--fs-300); font-weight: var(--w-medium); }
.learning-card { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: var(--sp-4); align-items: start; padding: var(--sp-4); }
.learning-card > img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-sm); }
.learning-card h2 { font-size: var(--fs-500); margin: 0.3rem 0; }
.learning-card p { margin: 0 0 var(--sp-2); font-size: var(--fs-300); }
.learning-card .form-note { margin-bottom: var(--sp-2); }
.learning-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3); margin-top: var(--sp-3); }
.progress { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--orange); }
.review-box { margin-top: var(--sp-4); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.review-box summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--orange-ink); font-size: var(--fs-200); font-weight: var(--w-semi); }
.review-form { margin-top: var(--sp-2); }
.rating { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin: 0 0 var(--sp-3); padding: 0; border: 0; }
.rating legend { width: 100%; margin-bottom: var(--sp-1); font-size: var(--fs-200); font-weight: var(--w-semi); }
.rating label { display: inline-flex; align-items: center; gap: 0.35rem; min-height: 44px; padding: 0 0.8rem; border: 1px solid var(--border-2); border-radius: var(--r-pill); font-size: var(--fs-200); cursor: pointer; }
.rating input { accent-color: var(--orange-ink); }
.rating label:has(input:checked) { border-color: var(--orange-ink); background: var(--orange-tint); }
.lesson-complete .btn { margin-top: var(--sp-3); }
.lesson-video { position: relative; aspect-ratio: 16 / 9; margin: var(--sp-4) 0 var(--sp-2); border-radius: var(--r-md); overflow: hidden; background: var(--navy); }
.lesson-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.lesson-video__status { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; padding: var(--sp-4); color: #B8C1D5; text-align: center; font-size: var(--fs-300); }
.admin-video { margin-top: var(--sp-5); }
.admin-video__progress { width: 100%; height: 10px; margin-bottom: var(--sp-2); accent-color: var(--orange); }
.lesson-done { display: inline-flex; margin-top: var(--sp-3); padding: 0.55rem 1rem; border-radius: var(--r-pill); background: rgba(31, 122, 116, 0.12); color: var(--teal); font-weight: var(--w-semi); }
.lesson-checks input:disabled + span { text-decoration: none; }
.enrol-confirm { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: var(--sp-5); align-items: center; padding: var(--sp-5); }
.enrol-confirm img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-md); }
.enrol-confirm form { margin-top: var(--sp-3); }
.certificate-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--sp-4); margin-top: var(--sp-4); }
.certificate-list h2 { font-size: var(--fs-500); margin: var(--sp-1) 0 var(--sp-2); }
.certificate { max-width: 860px; margin: 0 auto; padding: clamp(2rem, 6vw, 4.5rem); text-align: center; background: var(--white); border: 1px solid var(--border-2); border-radius: var(--r-md); box-shadow: var(--shadow-md); outline: 6px solid var(--orange-tint); outline-offset: -18px; }
.certificate__logo { width: 96px; height: auto; margin: 0 auto var(--sp-3); }
.certificate h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: var(--sp-2) 0 var(--sp-5); }
.certificate p { margin-bottom: var(--sp-2); color: var(--text-muted); }
.certificate__name { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: var(--w-bold); color: var(--text) !important; }
.certificate__course { font-family: var(--font-display); font-size: var(--fs-600); font-weight: var(--w-bold); color: var(--orange-ink) !important; }
.certificate__meta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-3) var(--sp-6); margin: var(--sp-5) 0 0; padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.certificate__meta dt { font-family: var(--font-mono); font-size: var(--fs-100); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }
.certificate__meta dd { margin: 0.2rem 0 0; font-size: var(--fs-200); font-weight: var(--w-semi); overflow-wrap: anywhere; }
.certificate-actions { margin-top: var(--sp-4); text-align: center; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-4); margin-top: var(--sp-5); }
.pricing-card { display: flex; flex-direction: column; gap: var(--sp-2); padding: var(--sp-5); }
.pricing-card h2 { font-size: var(--fs-600); margin: 0; }
.pricing-card p { margin: 0; color: var(--text-muted); font-size: var(--fs-300); }
.pricing-card .price-display { font-family: var(--font-display); font-size: var(--fs-500); font-weight: var(--w-bold); color: var(--text); }
.pricing-card .btn { align-self: flex-start; margin-top: auto; }
.pricing-notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-5); margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--border); }
.pricing-notes h2 { font-size: var(--fs-500); }
.pricing-notes p { color: var(--text-muted); font-size: var(--fs-300); margin: 0; }
.billing-section { margin-top: var(--sp-6); }
.billing-section > h2 { font-size: var(--fs-600); margin-bottom: var(--sp-3); }
.billing-card { margin-top: var(--sp-4); padding: var(--sp-4); }
.billing-card h2, .billing-card h3 { font-size: var(--fs-500); margin-bottom: var(--sp-2); }
.billing-card p { font-size: var(--fs-300); }
.payment-form { margin-top: var(--sp-3); }
.payment-form .btn { width: 100%; margin-top: var(--sp-2); }
.admin-interval { display: flex; gap: var(--sp-2); }
.admin-interval input { width: 5rem; }
.admin-checks { margin: var(--sp-2) 0 var(--sp-3); padding: 0; border: 0; }
.admin-checks legend { font-size: var(--fs-200); font-weight: var(--w-semi); margin-bottom: var(--sp-1); }
.admin-search { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); max-width: 620px; margin-bottom: var(--sp-5); }
.admin-search .field { flex: 1 1 280px; margin: 0; }
.admin-student { margin-bottom: var(--sp-4); padding: var(--sp-4); }
.admin-student h2 { font-size: var(--fs-500); margin-bottom: 0.2rem; }
.admin-access { list-style: none; margin: var(--sp-3) 0; padding: 0; display: grid; gap: var(--sp-1); }
.admin-access li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); font-size: var(--fs-300); }
.admin-access .admin-sub { display: inline; margin: 0; }
.admin-grant { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sp-3); margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.admin-grant .field { margin: 0; flex: 1 1 200px; }
.field select { width: 100%; }
@media (max-width: 900px) {
    .dashboard-grid, .enrol-confirm { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .learning-card { grid-template-columns: minmax(0, 1fr); }
}
/* ---------- Academy platform (academy/lib/ui.php) ----------
   The Academy's own bar, course cards with meta and progress, the course
   page's curriculum and enrol card, the lesson contents sidebar and the
   My learning dashboard. Built on the site's tokens, panels and buttons. */
:root { --academy-bar-h: 60px; }
.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; vertical-align: -0.2em; }
.btn--sm { padding: 0.55rem 1.1rem; min-height: 40px; font-size: var(--fs-200); }

/* The bar sits under the fixed site header and stays with it while scrolling. */
.academy-bar {
    position: sticky;
    top: var(--header-h);
    z-index: 90;
    margin-top: var(--header-h);
    background: var(--navy);
    color: var(--white);
}
.site-header:not(.nav-ready) ~ .academy-bar { margin-top: 0; top: 0; position: relative; }
.academy-bar__inner { display: flex; align-items: center; gap: var(--sp-4); min-height: var(--academy-bar-h); }
.academy-bar__brand { display: inline-flex; align-items: center; gap: 0.6rem; flex-shrink: 0; color: var(--white); font-family: var(--font-display); font-size: var(--fs-300); }
.academy-bar__brand strong { color: var(--orange-soft); font-weight: var(--w-bold); }
.academy-bar__brand:hover { color: var(--white); }
.academy-bar__mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--orange); color: var(--navy); }
.academy-bar__links { display: flex; gap: var(--sp-1); margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.academy-bar__links::-webkit-scrollbar { display: none; }
.academy-bar__links a,
.academy-bar__admin {
    display: inline-flex; align-items: center; min-height: 40px; padding: 0 0.85rem;
    border-radius: var(--r-pill); color: #C9D1E3; font-size: var(--fs-200); font-weight: var(--w-medium); white-space: nowrap;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.academy-bar__links a:hover, .academy-bar__admin:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.academy-bar__links a[aria-current="page"], .academy-bar__admin[aria-current="page"] { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.academy-bar__account { display: flex; align-items: center; gap: var(--sp-1); margin-left: auto; flex-shrink: 0; }
.academy-bar__account .btn--primary:hover { color: var(--navy); }
.academy-avatar { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 40px; padding: 0.2rem 0.85rem 0.2rem 0.25rem; border-radius: var(--r-pill); background: rgba(255, 255, 255, 0.08); color: var(--white); font-size: var(--fs-200); font-weight: var(--w-semi); }
.academy-avatar:hover, .academy-avatar[aria-current="page"] { background: rgba(255, 255, 255, 0.16); color: var(--white); }
.academy-avatar__initials { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--orange); color: var(--navy); font-size: var(--fs-100); letter-spacing: 0.04em; }
.academy-bar ~ .standalone-main > .section:first-child { padding-top: clamp(2rem, 5vw, 3.5rem); }
.academy-bar ~ .standalone-main .course-aside,
.academy-bar ~ .standalone-main .lesson-aside { top: calc(var(--header-h) + var(--academy-bar-h) + var(--sp-4)); }
html:has(.academy-bar) { scroll-padding-top: calc(var(--header-h) + var(--academy-bar-h) + var(--sp-2)); }

/* Home: hero ticks, the platform preview and the stats strip */
.academy-eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; padding: 0.4rem 0.9rem; border-radius: var(--r-pill); background: var(--orange-tint); color: var(--orange-ink); font-size: var(--fs-200); font-weight: var(--w-semi); }
.academy-ticks { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4); margin: var(--sp-4) 0 0; padding: 0; list-style: none; font-size: var(--fs-200); font-weight: var(--w-medium); }
.academy-ticks li { display: inline-flex; align-items: center; gap: 0.4rem; }
.academy-ticks .icon { color: var(--teal); }
.platform-preview { position: relative; padding: var(--sp-4) var(--sp-4) var(--sp-6) 0; }
.platform-preview__window { border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.platform-preview__top { display: flex; align-items: center; gap: var(--sp-3); padding: 0.85rem var(--sp-4); background: var(--navy); color: #C9D1E3; font-size: var(--fs-200); font-weight: var(--w-medium); }
.platform-preview__dots { display: inline-flex; gap: 6px; }
.platform-preview__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.25); }
.platform-preview__dots i:first-child { background: var(--orange); }
.platform-preview__body { display: grid; gap: var(--sp-2); padding: var(--sp-4); }
.platform-preview__progress { display: grid; grid-template-columns: 1fr auto; gap: 0.35rem; padding: var(--sp-3); border-radius: var(--r-sm); background: var(--surface-2); font-size: var(--fs-200); color: var(--text-muted); }
.platform-preview__progress strong { color: var(--text); }
.platform-preview__progress .progress { grid-column: 1 / -1; }
.platform-preview__tag { margin: var(--sp-1) 0 0; color: var(--orange-ink); font-family: var(--font-mono); font-size: var(--fs-100); letter-spacing: 0.12em; text-transform: uppercase; }
.platform-preview__title { margin: 0; font-family: var(--font-display); font-size: var(--fs-500); font-weight: var(--w-bold); line-height: 1.2; color: var(--text); }
.platform-preview__tabs { display: flex; gap: var(--sp-4); border-bottom: 1px solid var(--border); font-size: var(--fs-200); color: var(--text-muted); }
.platform-preview__tabs span { padding: 0.5rem 0; border-bottom: 2px solid transparent; }
.platform-preview__tabs .is-on { color: var(--text); border-bottom-color: var(--orange-ink); font-weight: var(--w-semi); }
.platform-preview__checks { display: grid; gap: 0.45rem; margin: var(--sp-1) 0 0; padding: 0; list-style: none; font-size: var(--fs-200); }
.platform-preview__checks li { display: flex; align-items: center; gap: 0.6rem; }
.platform-preview__checks li > span { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; border: 1.5px solid var(--border-2); border-radius: 6px; }
.platform-preview__checks .is-done { color: var(--text-muted); text-decoration: line-through; }
.platform-preview__checks .is-done > span { border-color: var(--teal); background: var(--teal); color: var(--white); }
.platform-preview__checks .icon { width: 14px; height: 14px; }
.platform-preview__button { justify-self: start; margin-top: var(--sp-1); padding: 0.65rem 1.2rem; border-radius: var(--r-pill); background: var(--orange); color: var(--navy); font-size: var(--fs-200); font-weight: var(--w-semi); }
.platform-preview__badge { position: absolute; right: 0; bottom: 0; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-lg); font-size: var(--fs-200); color: var(--text-muted); }
.platform-preview__badge > .icon { width: 36px; height: 36px; padding: 7px; border-radius: 50%; background: rgba(31, 122, 116, 0.12); color: var(--teal); }
.platform-preview__badge strong { display: block; color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
    .platform-preview__badge { animation: preview-float 5s var(--ease) infinite alternate; }
}
@keyframes preview-float { from { transform: translateY(0); } to { transform: translateY(-8px); } }

.academy-stats { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface); }
.academy-stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.academy-stats__grid > div { display: grid; gap: 0.15rem; padding: var(--sp-4) var(--sp-3); border-left: 1px solid var(--border); }
.academy-stats__grid > div:first-child { border-left: 0; padding-left: 0; }
.academy-stats strong { font-family: var(--font-display); font-size: var(--fs-700); line-height: 1; color: var(--text); }
.academy-stats span { color: var(--text-muted); font-size: var(--fs-200); }

/* Course cards: badge, meta, progress and footer */
.course-card__media { position: relative; }
.course-card__badge { position: absolute; top: var(--sp-2); left: var(--sp-2); display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.35rem 0.75rem; border-radius: var(--r-pill); background: var(--white); color: var(--text); box-shadow: var(--shadow-md); font-size: var(--fs-100); font-weight: var(--w-semi); }
.course-card__badge .icon { color: var(--orange-ink); }
.course-meta { display: flex; flex-wrap: wrap; gap: 0.35rem var(--sp-3); margin: var(--sp-1) 0 0; padding: 0; list-style: none; color: var(--text-muted); font-size: var(--fs-200); }
.course-meta li { display: inline-flex; align-items: center; gap: 0.35rem; }
.course-meta .icon { color: var(--orange-ink); }
.course-card__progress { display: grid; gap: 0.35rem; margin-top: var(--sp-2); font-size: var(--fs-200); color: var(--text-muted); }
.course-card__progress[hidden] { display: none; }
.course-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: auto; padding-top: var(--sp-3); border-top: 1px solid var(--border); }
.course-card__body .course-card__foot { margin-top: auto; }
.course-card__body .course-meta + .course-card__foot,
.course-card__body .course-card__progress + .course-card__foot { margin-top: auto; }
.course-card__body ul.course-meta { margin-bottom: var(--sp-2); }
.course-card__price { font-family: var(--font-display); font-size: var(--fs-300); font-weight: var(--w-bold); line-height: 1.25; color: var(--text); }
.course-card__cta { display: inline-flex; align-items: center; gap: 0.3rem; flex-shrink: 0; white-space: nowrap; color: var(--orange-ink); font-size: var(--fs-200); font-weight: var(--w-semi); }
.course-card__cta .icon { transition: transform var(--dur) var(--ease); }
.course-card:hover .course-card__cta .icon { transform: translateX(3px); }
.course-card.is-enrolled { border-color: rgba(31, 122, 116, 0.35); }
.course-card.is-enrolled .course-card__price { color: var(--teal); font-size: var(--fs-200); }

/* How every lesson works */
.academy-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); margin: 0; padding: 0; list-style: none; counter-reset: none; }
.academy-steps li { position: relative; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.academy-steps h3 { margin: var(--sp-3) 0 var(--sp-1); font-size: var(--fs-500); }
.academy-steps p { margin: 0; color: var(--text-muted); font-size: var(--fs-300); }
.academy-steps__icon, .how-grid__icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--orange-tint); color: var(--orange-ink); }
.academy-steps__icon .icon, .how-grid__icon .icon { width: 22px; height: 22px; }
.academy-steps__number { position: absolute; top: var(--sp-4); right: var(--sp-4); font-family: var(--font-mono); font-size: var(--fs-200); color: var(--text-muted); }

/* FAQ */
.academy-faq__list { display: grid; gap: var(--sp-2); max-width: 820px; }
.academy-faq details { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.academy-faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 60px; padding: var(--sp-2) var(--sp-4); cursor: pointer; font-weight: var(--w-semi); list-style: none; }
.academy-faq summary::-webkit-details-marker { display: none; }
.academy-faq summary::after { content: "+"; flex: 0 0 auto; font-size: 1.4rem; line-height: 1; color: var(--orange-ink); transition: transform var(--dur) var(--ease); }
.academy-faq details[open] summary::after { transform: rotate(45deg); }
.academy-faq details p { margin: 0; padding: 0 var(--sp-4) var(--sp-4); color: var(--text-muted); max-width: 70ch; }

/* Breadcrumbs */
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin: 0 0 var(--sp-3); padding: 0; list-style: none; font-size: var(--fs-200); color: var(--text-muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 0.35rem; color: var(--border-2); }
.breadcrumb a { color: var(--text-muted); font-weight: var(--w-medium); }
.breadcrumb a:hover { color: var(--orange-ink); }
.breadcrumb [aria-current] { color: var(--text); }

/* Course page */
.course-hero { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(2rem, 5vw, 3rem); background: var(--surface-2); border-bottom: 1px solid var(--border); }
.course-hero .academy-title { max-width: 18ch; }
.course-hero .lede { max-width: 60ch; margin: 0; }
.course-meta--hero { gap: var(--sp-2); margin-top: var(--sp-4); }
.course-meta--hero li { padding: 0.45rem 0.9rem; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: var(--text); }
.course-page { padding-top: clamp(2rem, 5vw, 3.5rem); }
.course-layout--page { align-items: start; }
.course-section--first { margin-top: 0; padding-top: 0; border-top: 0; }
.course-description { color: var(--text-muted); font-size: var(--fs-400); max-width: 62ch; }
.course-section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sp-2); }
.course-section__head h2 { margin-bottom: 0; }
.course-section__head .muted { margin: 0; font-size: var(--fs-200); }
.outcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2) var(--sp-4); margin: 0; padding: var(--sp-4); list-style: none; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.outcome-grid li { display: flex; gap: 0.6rem; font-size: var(--fs-300); }
.outcome-grid .icon { margin-top: 0.15rem; color: var(--teal); }
.curriculum { margin: var(--sp-3) 0 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.curriculum__item { display: flex; align-items: center; gap: var(--sp-3); min-height: 60px; padding: var(--sp-2) var(--sp-4); border-top: 1px solid var(--border); }
.curriculum__item:first-child { border-top: 0; }
.curriculum__icon { display: inline-grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: var(--surface-2); color: var(--text-muted); }
.curriculum__icon--number { font-family: var(--font-mono); font-size: var(--fs-100); }
.curriculum__text { flex: 1; min-width: 0; font-size: var(--fs-300); }
.curriculum__label { display: block; color: var(--orange-ink); font-size: var(--fs-100); font-weight: var(--w-semi); letter-spacing: 0.06em; text-transform: uppercase; }
.curriculum__lock { color: var(--text-muted); opacity: 0.7; }
.curriculum__action { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border: 1px solid var(--border-orange); border-radius: var(--r-pill); font-size: var(--fs-200); font-weight: var(--w-semi); }
.curriculum__action:hover { background: var(--orange); border-color: var(--orange); color: var(--navy); }
.curriculum__item--free { background: var(--orange-tint); }
.curriculum__item--free .curriculum__icon { background: var(--orange); color: var(--navy); }
.how-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); margin: 0; padding: 0; list-style: none; }
.how-grid li { padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.how-grid h3 { margin: var(--sp-2) 0 0.3rem; font-size: var(--fs-400); }
.how-grid p { margin: 0; color: var(--text-muted); font-size: var(--fs-200); }
.course-aside__media { position: relative; }
.course-aside__play { position: absolute; inset: auto var(--sp-3) var(--sp-3); display: flex; align-items: center; justify-content: center; gap: 0.45rem; min-height: 44px; border-radius: var(--r-pill); background: rgba(14, 27, 58, 0.82); color: var(--white); font-size: var(--fs-200); font-weight: var(--w-semi); backdrop-filter: blur(4px); }
.course-aside__play:hover { background: var(--navy); color: var(--white); }
.course-aside__price { font-size: clamp(1.6rem, 2.6vw, 2.1rem) !important; line-height: 1.1; }
.course-aside__body > div { display: grid; gap: var(--sp-2); }
.course-aside__body > div[hidden] { display: none; }
.course-includes { display: grid; gap: 0.55rem; margin: var(--sp-2) 0 0; padding: var(--sp-3) 0 0; border-top: 1px solid var(--border); list-style: none; font-size: var(--fs-200); color: var(--text); }
.course-includes li { display: flex; align-items: center; gap: 0.6rem; }
.course-includes .icon { color: var(--orange-ink); }
.course-mobilebar { display: none; }
@media (max-width: 900px) {
    .course-mobilebar {
        position: fixed; inset: auto 0 0; z-index: 95; display: block;
        padding: var(--sp-2) var(--sp-4) calc(var(--sp-2) + env(safe-area-inset-bottom));
        background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(14, 27, 58, 0.08);
    }
    .course-mobilebar > div { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
    .course-mobilebar > div[hidden] { display: none; }
    .course-mobilebar strong { font-family: var(--font-display); font-size: var(--fs-300); line-height: 1.25; }
    .course-mobilebar .btn { flex-shrink: 0; }
    .course-mobilebar span { font-size: var(--fs-200); color: var(--text-muted); }
    body:has(.course-mobilebar) { padding-bottom: 84px; }
    body:has(.course-mobilebar) .whatsapp-float { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* Lessons: banner icon, the contents sidebar and the pager */
.lesson-banner { display: inline-flex; align-items: center; gap: 0.45rem; }
.lesson-banner .icon { color: var(--orange-ink); }
.course-contents { padding: 0; overflow: hidden; }
.course-contents__head { display: grid; gap: var(--sp-1); padding: var(--sp-4); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.course-contents__head h2 { margin: 0; font-size: var(--fs-400); }
.course-contents__head p { margin: 0; font-size: var(--fs-200); color: var(--text-muted); }
.course-contents .course-contents__module { margin: 0; padding: var(--sp-3) var(--sp-4) 0.3rem; font-family: var(--font-mono); font-size: var(--fs-100); font-weight: var(--w-medium); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.course-contents__list { margin: 0; padding: 0 0 var(--sp-2); list-style: none; max-height: 52vh; overflow-y: auto; }
.course-contents__list a,
.course-contents__row { display: flex; align-items: center; gap: var(--sp-2); min-height: 48px; padding: 0.4rem var(--sp-4); color: var(--text); font-size: var(--fs-200); border-left: 3px solid transparent; }
.course-contents__list a:hover { background: var(--surface-2); color: var(--text); }
.course-contents__list .is-current a { border-left-color: var(--orange); background: var(--orange-tint); font-weight: var(--w-semi); }
.course-contents__status { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 auto; border: 1.5px solid var(--border-2); border-radius: 50%; color: var(--text-muted); font-family: var(--font-mono); font-size: var(--fs-100); }
.course-contents__status .icon { width: 14px; height: 14px; }
.course-contents__list .is-done .course-contents__status { border-color: var(--teal); background: var(--teal); color: var(--white); }
.course-contents__list .is-current .course-contents__status { border-color: var(--orange-ink); color: var(--orange-ink); }
.course-contents__list .is-locked .course-contents__row { color: var(--text-muted); }
.course-contents__title { flex: 1; min-width: 0; }
.course-contents__cta { margin: var(--sp-2) var(--sp-4) var(--sp-4); width: calc(100% - 2 * var(--sp-4)); }
.lesson-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.lesson-pager__link { display: grid; gap: 0.3rem; padding: var(--sp-3) var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.lesson-pager__link:hover { border-color: var(--border-orange); box-shadow: var(--shadow-md); color: var(--text); }
.lesson-pager__link span { display: inline-flex; align-items: center; gap: 0.35rem; color: var(--orange-ink); font-size: var(--fs-200); font-weight: var(--w-semi); }
.lesson-pager__link strong { font-size: var(--fs-300); }
.lesson-pager__link--next { text-align: right; }
.lesson-pager__link--next span { justify-content: flex-end; }
.lesson-tips ol { margin-top: 0; }

/* My learning */
.dashboard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); margin: 0 0 var(--sp-5); padding: 0; list-style: none; }
.dashboard-stats li { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: var(--sp-3); align-items: center; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-sm); }
.dashboard-stats__icon { grid-row: span 2; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--orange-tint); color: var(--orange-ink); }
.dashboard-stats__icon .icon { width: 24px; height: 24px; }
.dashboard-stats strong { font-family: var(--font-display); font-size: var(--fs-600); line-height: 1; }
.dashboard-stats li > span:last-child { color: var(--text-muted); font-size: var(--fs-200); }
.resume-card { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: var(--sp-5); align-items: center; margin-bottom: var(--sp-6); padding: var(--sp-4); border-radius: var(--r-lg); background: var(--navy); color: var(--white); box-shadow: var(--shadow-lg); }
.resume-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--r-md); }
.resume-card__body { display: grid; gap: var(--sp-2); justify-items: start; }
.resume-card .work-card__tag { color: var(--orange-soft); }
.resume-card h2 { margin: 0; color: var(--white); font-size: var(--fs-600); line-height: 1.15; }
.resume-card__course { margin: 0; color: #C9D1E3; font-size: var(--fs-300); }
.resume-card .progress { width: 100%; max-width: 420px; background: rgba(255, 255, 255, 0.14); }
.resume-card .form-note { margin: 0; color: #C9D1E3; }
.resume-card .btn { margin-top: var(--sp-2); gap: 0.5rem; }
.dashboard-section-title { margin: 0 0 var(--sp-1); font-size: var(--fs-600); }
.learning-card__progress { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-1) 0; }
.learning-card__progress .progress { flex: 1; }
.learning-card__progress > span { font-family: var(--font-mono); font-size: var(--fs-200); color: var(--text); }
.dashboard-aside .panel { padding: var(--sp-4); }
.dashboard-links a { gap: 0.6rem; }
.dashboard-links .icon { color: var(--orange-ink); }
.dashboard-explore { margin-top: var(--sp-7); }
.dashboard-explore .dashboard-section-title { margin-bottom: var(--sp-4); }

@media (max-width: 1000px) {
    .academy-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .platform-preview { max-width: 520px; padding-right: var(--sp-3); }
    .resume-card { grid-template-columns: minmax(0, 1fr); }
    .resume-card img { aspect-ratio: 16 / 9; }
    .course-contents__list { max-height: none; }
}
@media (max-width: 760px) {
    :root { --academy-bar-h: 56px; }
    .academy-bar__inner { gap: var(--sp-2); }
    .academy-bar__brand > span:last-child { display: none; }
    .academy-bar__links a, .academy-bar__admin { padding: 0 0.65rem; }
    .academy-avatar__name { display: none; }
    .academy-avatar { padding-right: 0.25rem; }
    .academy-stats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .academy-stats__grid > div { padding-left: var(--sp-3); }
    .academy-stats__grid > div:nth-child(odd) { border-left: 0; padding-left: 0; }
    .academy-stats__grid > div:nth-child(n+3) { border-top: 1px solid var(--border); }
    .outcome-grid, .how-grid, .academy-steps { grid-template-columns: minmax(0, 1fr); }
    .dashboard-stats { grid-template-columns: minmax(0, 1fr); }
    .lesson-pager { grid-template-columns: minmax(0, 1fr); }
    .lesson-pager > span:empty { display: none; }
}
@media (max-width: 440px) {
    /* Courses already leads to the Academy home, so the mark gives way. */
    .academy-bar__brand { display: none; }
    .academy-bar__links a, .academy-bar__admin { padding: 0 0.6rem; }
    .academy-bar__account .btn--sm { padding: 0.5rem 0.85rem; }
}

/* A certificate prints on its own: no header, footer, buttons or banners. */
@media print {
    .site-header, .site-footer, .whatsapp-float, .cookie-banner, .cookie-modal, .skip-link, .no-print, .academy-bar, .course-mobilebar { display: none !important; }
    .standalone-main > .section:first-child, .academy-page { padding: 0 !important; }
    .academy-bar ~ .standalone-main > .section:first-child { padding: 0 !important; }
    .certificate { box-shadow: none; border-color: #999; }
}

/* ---------- Homepage hero entrance ----------
   One choreographed sequence on arrival, so the page reads in order: the photo
   settles into place, the headline lines rise out of their own masks, the
   orange accent underlines the promise, then the supporting copy and the two
   actions arrive. Each step starts before the last one ends (overlap, not
   queue), and nothing runs again after it lands. Fill mode is
   backwards everywhere: each final keyframe matches the resting style, so once
   a step lands the element's own hover transforms apply again. The photo uses the
   individual `scale` and `translate` properties so the entrance and the
   pointer parallax in script.js never fight over `transform`. */
.hero--motion {
    --hero-px: 0px;
    --hero-py: 0px;
    --hero-lift: 0px;
    --hero-fade: 1;
}
.hero--motion::before {
    scale: 1.04;
    translate: var(--hero-px) var(--hero-py);
    animation: hero-photo-settle 2.2s var(--ease-out) backwards;
    will-change: scale, translate;
}
.hero--motion::after { animation: hero-veil 1.2s var(--ease) backwards; }
.hero--motion .hero__inner {
    translate: 0 var(--hero-lift);
    opacity: var(--hero-fade);
}

/* Each line sits in a clipping box and rises from below it. The extra padding
   and matching negative margin keep descenders (g, p) inside the clip. */
.hero--motion .hero__line {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: 0.08em;
    margin-bottom: -0.08em;
}
.hero--motion .hero__line > span {
    display: inline-block;
    animation: hero-line-rise 1s var(--ease-out) backwards;
    animation-delay: calc(0.25s + var(--line, 0) * 0.12s);
}
.hero--motion .hero__line:nth-of-type(2) > span { --line: 1; }
.hero--motion .hero__line:nth-of-type(3) > span { --line: 2; }

.hero--motion .hero__title em { position: relative; display: inline-block; }
.hero--motion .hero__title em::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.02em; /* below the descender of the p, inside the line's clip */
    height: 0.06em;
    background: var(--orange);
    border-radius: var(--r-pill);
    transform-origin: left center;
    animation: hero-underline 0.8s var(--ease-out) 1.05s backwards;
}

.hero--motion .hero__sub { animation: hero-rise 0.9s var(--ease-out) 0.75s backwards; }
.hero--motion .hero__actions > * { animation: hero-rise 0.8s var(--ease-out) backwards; }
.hero--motion .hero__actions > :nth-child(1) { animation-delay: 0.95s; }
.hero--motion .hero__actions > :nth-child(2) { animation-delay: 1.05s; }

/* The header steps down first so the brand is in place before the headline. */
body:has(.hero--motion) .site-header { animation: hero-header-in 0.7s var(--ease-out) backwards; }

@keyframes hero-photo-settle {
    from { scale: 1.14; opacity: 0; }
    to   { scale: 1.04; opacity: 0.78; }
}
@keyframes hero-veil { from { opacity: 0.6; } to { opacity: 1; } }
@keyframes hero-line-rise { from { transform: translateY(160%); } to { transform: none; } }
@keyframes hero-underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hero-rise {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: none; }
}
@keyframes hero-header-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: none; }
}

/* The mobile photo is stronger, so it settles to its own opacity. */
@media (max-width: 760px) {
    .hero--motion::before { animation-name: hero-photo-settle-sm; }
}
@keyframes hero-photo-settle-sm {
    from { scale: 1.14; opacity: 0; }
    to   { scale: 1.04; opacity: 0.92; }
}

@media (prefers-reduced-motion: reduce) {
    .hero--motion::before,
    .hero--motion::after,
    .hero--motion .hero__line > span,
    .hero--motion .hero__title em::after,
    .hero--motion .hero__sub,
    .hero--motion .hero__actions > *,
    body:has(.hero--motion) .site-header { animation: none; }
    .hero--motion::before { scale: 1; translate: none; }
    .hero--motion .hero__inner { translate: none; opacity: 1; }
}
