/* =========================================================================
   WOILIOW DRIVING ACADEMY  --  "Punchy youthful poster / Tallaght local pride"
   Redesign: oversized Anton display, electric yellow on near-black charcoal,
   warm newsprint paper, hard offset shadows, halftone texture, area marquees.
   Mobile-first (authored at 375px, scaled up with min-width queries).
   Fonts: Anton (display) + Archivo (body/UI). Content + links FROZEN; this is
   appearance only, incl. a compat layer for the scraped UIkit/YOOtheme markup.
   ========================================================================= */

@layer reset, base, chrome, hero, content, compat, motion, article;

/* ------------------------------------------------------------------ tokens */
:root {
  /* charcoal + electric yellow, authored in sRGB with OKLCH intent */
  --ink:         #16151a;   /* near-black poster base */
  --ink-2:       #211f28;
  --ink-3:       #2c2935;
  --yellow:      #fcff4a;   /* brand electric yellow (dark surfaces only) */
  --yellow-deep: #e4e800;   /* hover on dark */
  --olive:       #5f6100;   /* accessible "yellow" for links on paper */
  --olive-deep:  #3d3e00;
  --paper:       #f4f1e8;   /* warm newsprint */
  --paper-2:     #ece7d8;
  --white:       #ffffff;
  --plate-red:   #d81f2a;   /* L-plate sticker accent, sparse */

  --ink-soft:  color-mix(in oklab, var(--ink) 68%, transparent);
  --ink-faint: color-mix(in oklab, var(--ink) 14%, transparent);
  --line:      color-mix(in oklab, var(--ink) 16%, transparent);

  --font-display: "Anton", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --gutter: clamp(1.1rem, 5vw, 2.5rem);
  --shadow-hard: 6px 6px 0 var(--ink);
  --shadow-hard-y: 6px 6px 0 var(--yellow);
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);

  /* halftone dot field, reused on dark poster surfaces */
  --halftone: radial-gradient(circle at center, rgba(252,255,74,0.14) 1.4px, transparent 1.6px);
}

/* -------------------------------------------------------------------- reset */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
  body { margin: 0; }
  img, picture, video, svg { max-width: 100%; height: auto; display: block; }
  ul, ol { margin: 0; padding: 0; }
  a { color: inherit; }
  h1, h2, h3, h4, h5, h6 { margin: 0; }
  :focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
}

/* --------------------------------------------------------------------- base */
@layer base {
  body {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: clamp(1rem, 0.96rem + 0.3vw, 1.12rem);
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
  }

  h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    line-height: 0.95;
    letter-spacing: 0.01em;
    text-wrap: balance;
    overflow-wrap: break-word;
  }
  h4, h5, h6 { font-family: var(--font-body); font-weight: 800; line-height: 1.2; }

  p { margin: 0 0 1.15em; }
  a { text-underline-offset: 3px; }

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

  .skip-link {
    position: absolute;
    left: 0.5rem; top: -3rem;
    z-index: 200;
    background: var(--yellow);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 800;
    padding: 0.6rem 1rem;
    border-radius: 2px;
    text-decoration: none;
    transition: top 0.2s var(--ease);
  }
  .skip-link:focus { top: 0.5rem; }
}

/* ------------------------------------------------------------------- chrome */
@layer chrome {
  .site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ink);
    color: var(--white);
    border-bottom: 4px solid var(--yellow);
  }
  .header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 64px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--white);
    line-height: 1;
  }
  .brand-mark {
    display: grid;
    place-items: center;
    background: var(--yellow);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 1.5rem;
    width: 1.7em;
    height: 1.7em;
    border-radius: 4px;
    transform: rotate(-4deg);
    box-shadow: 3px 3px 0 rgba(0,0,0,0.35);
  }
  .brand-word {
    font-family: var(--font-display);
    font-size: 1.5rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }
  .brand-sub {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.56rem;
    text-transform: uppercase;
    letter-spacing: 0.28em;
    color: var(--yellow);
    align-self: center;
    display: none;
  }

  .site-nav ul { list-style: none; display: flex; gap: 0.2rem; }
  .site-nav a {
    display: block;
    padding: 0.55rem 0.85rem;
    color: rgba(255,255,255,0.82);
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
  }
  .site-nav a:hover { color: var(--yellow); }
  .site-nav a[aria-current="page"] {
    color: var(--ink);
    background: var(--yellow);
  }

  /* hamburger (mobile-first: visible by default, hidden on desktop) */
  .nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
  .nav-toggle-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 46px; height: 46px;
    padding: 11px;
    cursor: pointer;
    border: 2px solid rgba(255,255,255,0.28);
    border-radius: 5px;
  }
  .nav-toggle-btn span {
    height: 3px; width: 100%;
    background: var(--yellow);
    border-radius: 2px;
    transition: transform 0.25s var(--ease), opacity 0.2s;
  }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-toggle-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ink);
    border-bottom: 4px solid var(--yellow);
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.28s var(--ease);
  }
  .site-nav ul { flex-direction: column; gap: 0; overflow: hidden; min-height: 0; padding: 0 var(--gutter); }
  .nav-toggle:checked ~ .site-nav { grid-template-rows: 1fr; }
  .site-nav li { border-top: 1px solid rgba(255,255,255,0.1); }
  .site-nav li:first-child { border-top: 0; }
  .site-nav a {
    padding: 1rem 0.25rem;
    font-size: 0.95rem;
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* -------------------------------------------------------------------- hero */
@layer hero {
  .page-hero {
    position: relative;
    isolation: isolate;
    background: var(--ink);
    color: var(--white);
    overflow: hidden;
    padding-block: clamp(2.75rem, 9vw, 5rem) 0;
    border-bottom: 4px solid var(--yellow);
  }
  .hero-halftone {
    position: absolute; inset: 0; z-index: -1;
    background-image: var(--halftone);
    background-size: 14px 14px;
    opacity: 0.9;
    pointer-events: none;
  }
  /* home: full-bleed duotone photo */
  .page-hero--home { padding-top: clamp(3rem, 11vw, 6.5rem); }
  .hero-photo { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
  .hero-photo img {
    width: 100%; height: 100%; object-fit: cover;
    object-position: 60% 40%;
    filter: grayscale(0.35) contrast(1.08) brightness(0.62) saturate(1.05);
  }
  .hero-photo::after {
    content: "";
    position: absolute; inset: 0;
    background:
      linear-gradient(180deg, rgba(22,21,26,0.55) 0%, rgba(22,21,26,0.35) 40%, rgba(22,21,26,0.92) 100%),
      linear-gradient(90deg, rgba(22,21,26,0.85) 0%, rgba(22,21,26,0.1) 70%);
    mix-blend-mode: multiply;
  }
  .page-hero--home .hero-halftone { opacity: 0.5; }

  .hero-inner { position: relative; padding-block: 0 clamp(2rem, 6vw, 3.5rem); }
  .page-hero--home .hero-inner { min-height: clamp(30vh, 62vw, 66vh); display: flex; flex-direction: column; justify-content: flex-end; }

  .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 1rem;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--yellow);
  }
  .lplate {
    display: inline-grid;
    place-items: center;
    width: 1.7em; height: 1.7em;
    background: var(--plate-red);
    color: var(--white);
    font-family: var(--font-display);
    font-size: 0.95em;
    border-radius: 3px;
    border: 2px solid var(--white);
    transform: rotate(-6deg);
    line-height: 1;
  }

  .page-hero h1 {
    color: var(--white);
    font-size: clamp(2.7rem, 12.5vw, 6.8rem);
    max-width: 16ch;
  }
  .page--article .page-hero h1 { font-size: clamp(2.3rem, 9vw, 5rem); max-width: 20ch; }
  /* yellow marker sweep behind the headline on the home hero */
  .page-hero--home h1 {
    display: inline;
    background: linear-gradient(var(--yellow), var(--yellow)) no-repeat;
    background-size: 100% 0.22em;
    background-position: 0 0.92em;
    padding-inline: 0.05em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
  }
  .hero-tag {
    margin: 1.25rem 0 0;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(1rem, 3.4vw, 1.35rem);
    color: rgba(255,255,255,0.86);
    max-width: 34ch;
  }

  /* scrolling area marquee acting as a divider into the content */
  .hero-marquee, .footer-marquee {
    position: relative;
    overflow: hidden;
    background: var(--yellow);
    color: var(--ink);
    border-block: 3px solid var(--ink);
    padding-block: 0.55rem;
  }
  .hero-marquee { border-bottom: 0; }
  .hero-marquee-track, .footer-marquee-track {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    width: max-content;
    white-space: nowrap;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 3.5vw, 1.6rem);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    animation: marquee 22s linear infinite;
  }
  .hero-marquee-track .dot, .footer-marquee-track .dot { color: var(--plate-red); }
  @keyframes marquee { to { transform: translateX(-33.333%); } }
}

/* ------------------------------------------------------------------ content */
@layer content {
  .page-body {
    padding-block: clamp(2.25rem, 6vw, 4rem);
    font-size: clamp(1rem, 0.96rem + 0.35vw, 1.14rem);
  }
  .page:not(.page--home) .page-body { max-width: 760px; }

  .page-body h2 {
    font-size: clamp(1.9rem, 6vw, 3rem);
    margin: 1.8em 0 0.65em;
    letter-spacing: 0.005em;
  }
  .page-body h2::after {
    content: "";
    display: block;
    width: 3.2rem; height: 0.32rem;
    margin-top: 0.5rem;
    background: var(--plate-red);
  }
  .page-body h2.uk-text-center::after { margin-inline: auto; }
  .page-body h3 { font-size: clamp(1.35rem, 4vw, 1.7rem); margin: 1.4em 0 0.5em; }
  .page-body h4 { font-size: 1.15rem; margin: 1.3em 0 0.5em; }

  .page-body a {
    color: var(--olive);
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-decoration-color: var(--yellow-deep);
  }
  .page-body a:hover { color: var(--olive-deep); text-decoration-color: var(--plate-red); }

  .page-body ul, .page-body ol { padding-left: 1.3em; margin: 0 0 1.2em; }
  .page-body li { margin-bottom: 0.45em; }
  .page-body ul > li::marker { color: var(--plate-red); }

  .page-body img {
    border-radius: 4px;
    border: 3px solid var(--ink);
    box-shadow: var(--shadow-hard-y);
  }
  .page-body hr { border: 0; border-top: 3px solid var(--ink); margin: 2.5rem 0; }

  blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.4rem;
    border-left: 6px solid var(--yellow);
    background: var(--paper-2);
    font-size: 1.1rem;
  }
}

/* ==================================================================== compat
   Poster reinterpretation of the scraped UIkit/YOOtheme utility classes. */
@layer compat {
  .uk-container { width: 100%; max-width: var(--container); margin-inline: auto; }
  .uk-container-small { max-width: 820px; }
  .page-body .uk-container { padding-inline: 0; }

  .uk-section, .uk-section-default { padding-block: clamp(1.25rem, 4vw, 2.5rem); }
  .uk-section-large { padding-block: clamp(2rem, 6vw, 3.5rem); }
  .uk-section-muted {
    background: var(--paper-2);
    border: 3px solid var(--ink);
    border-radius: 6px;
    padding: clamp(1.25rem, 4vw, 2.5rem);
    box-shadow: var(--shadow-hard);
  }
  .uk-section-primary, .uk-section-secondary {
    background: var(--ink);
    color: var(--white);
    border-radius: 6px;
    padding: clamp(1.5rem, 4vw, 2.75rem);
    background-image: var(--halftone);
    background-size: 14px 14px;
  }
  .uk-section-primary :is(h1,h2,h3,h4), .uk-section-secondary :is(h1,h2,h3,h4) { color: var(--white); }
  .uk-section-primary h2::after, .uk-section-secondary h2::after { background: var(--yellow); }
  .uk-section-primary a, .uk-section-secondary a { color: var(--yellow); text-decoration-color: var(--yellow); }
  .uk-position-relative { position: relative; }
  .uk-position-cover { position: absolute; inset: 0; }

  /* grids */
  .uk-grid {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 2rem);
    list-style: none;
    align-items: flex-start;
  }
  .uk-grid-small { gap: 0.75rem; }
  .uk-grid-margin { margin-top: clamp(1rem, 3vw, 2rem); }
  .uk-flex-middle { align-items: center; }
  .uk-grid-match, .uk-grid-item-match { align-items: stretch; }
  .uk-flex-nowrap { flex-wrap: nowrap; }

  [class*="uk-width-1-1"] { flex: 1 1 100%; }
  [class*="uk-width-1-2"] { flex: 1 1 100%; }
  [class*="uk-width-1-3"] { flex: 1 1 100%; }
  [class*="uk-width-2-3"] { flex: 1 1 100%; }
  [class*="uk-width-1-4"] { flex: 1 1 100%; }
  [class*="uk-width-3-4"] { flex: 1 1 100%; }
  [class*="uk-width-1-5"] { flex: 1 1 100%; }
  [class*="uk-width-2-5"] { flex: 1 1 100%; }
  [class*="uk-width-3-5"] { flex: 1 1 100%; }
  [class*="uk-width-auto"] { flex: 0 1 auto; }
  [class*="uk-width-expand"], [class*="uk-width-expand"] { flex: 1 1 0; }
  [class*="uk-width-2xlarge"], [class*="uk-width-xlarge"], [class*="uk-width-large"] { max-width: 100%; }
  .uk-margin-auto { margin-inline: auto; }

  .uk-child-width-1-1 > * { flex-basis: 100%; }
  .uk-child-width-1-2\@m > *, .uk-child-width-1-3\@m > *, .uk-child-width-expand > * { flex: 1 1 100%; }

  /* multi-column text */
  [class*="uk-column-"] { column-gap: clamp(1.5rem, 4vw, 2.5rem); }

  /* poster cards: tiles + panels + cards share the hard-shadow language */
  .uk-panel { position: relative; }
  .el-item, .uk-tile, .uk-card {
    position: relative;
    border-radius: 6px;
    height: 100%;
    transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
  }
  .uk-tile, .uk-card, .uk-card-default {
    background: var(--white);
    border: 3px solid var(--ink);
    box-shadow: var(--shadow-hard);
    padding: clamp(1.25rem, 3vw, 1.9rem);
  }
  .uk-card-body { padding: clamp(1.25rem, 3vw, 1.9rem); }
  .uk-tile-muted { background: var(--white); }
  .uk-tile-primary, .uk-card-primary, .uk-card-secondary {
    background: var(--ink);
    color: var(--white);
    border: 3px solid var(--ink);
    box-shadow: var(--shadow-hard-y);
    background-image: var(--halftone);
    background-size: 13px 13px;
  }
  .uk-tile-primary :is(h1,h2,h3,h4), .uk-card-primary :is(h1,h2,h3,h4),
  .uk-card-secondary :is(h1,h2,h3,h4) { color: var(--white); }
  .uk-tile-primary a, .uk-card-primary a { color: var(--yellow); }
  /* yellow kicker bar at the top of every poster card */
  .el-item::before {
    content: "";
    position: absolute;
    top: -3px; left: -3px;
    width: 44%; height: 8px;
    background: var(--yellow);
  }
  .uk-tile-primary.el-item::before { background: var(--plate-red); }
  .el-item:hover, .uk-tile:hover, .uk-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0 var(--ink);
  }
  .uk-tile-primary:hover, .uk-card-primary:hover { box-shadow: 9px 9px 0 var(--yellow); }

  .el-title, .uk-card-title {
    font-family: var(--font-display);
    font-weight: 400;
    text-transform: uppercase;
    font-size: clamp(1.25rem, 3.4vw, 1.6rem);
    line-height: 1;
    letter-spacing: 0.01em;
    margin: 0.35rem 0 0.6rem;
  }
  .el-content { margin: 0; }
  .el-content :last-child { margin-bottom: 0; }

  .uk-tile > :first-child, .uk-card > :first-child,
  .el-item > :first-child, .uk-card-body > :first-child { margin-top: 0; }
  .uk-tile > :last-child, .uk-card > :last-child,
  .el-item > :last-child, .uk-card-body > :last-child { margin-bottom: 0; }

  /* image tiles / masks */
  .uk-inline, .uk-tile { display: block; }
  .tm-mask-default, .el-image, .uk-overlay-default { border-radius: 4px; overflow: hidden; }
  .el-image { border: 3px solid var(--ink); box-shadow: var(--shadow-hard-y); }
  .uk-overlay {
    padding: 1.25rem;
    background: color-mix(in oklab, var(--ink) 78%, transparent);
    color: var(--white);
  }
  .uk-background-cover, .uk-background-norepeat { background-size: cover; background-repeat: no-repeat; }

  /* spacing helpers */
  .uk-margin, .uk-margin-top { margin-top: 1rem; }
  .uk-margin-small, .uk-margin-small-top { margin-top: 0.5rem; }
  .uk-margin-medium-top { margin-top: 1.75rem; }
  .uk-margin-large-top { margin-top: 2.5rem; }
  .uk-margin-bottom { margin-bottom: 1rem; }
  .uk-margin-small-bottom { margin-bottom: 0.5rem; }
  .uk-margin-medium-bottom { margin-bottom: 1.75rem; }
  .uk-margin-large-bottom { margin-bottom: 2.5rem; }
  .uk-margin-remove-top, .uk-margin-remove-vertical { margin-top: 0; }
  .uk-margin-remove-bottom, .uk-margin-remove-vertical { margin-bottom: 0; }
  .uk-margin-remove-first-child > :first-child { margin-top: 0; }
  .uk-padding { padding: clamp(1.1rem, 3vw, 1.75rem); }
  .uk-padding-small { padding: 0.75rem; }

  /* text helpers */
  .uk-text-center { text-align: center; }
  .uk-text-right { text-align: right; }
  .uk-text-left { text-align: left; }
  .uk-text-lead, .uk-text-large {
    font-size: clamp(1.12rem, 2.6vw, 1.35rem);
    line-height: 1.55;
    font-weight: 500;
  }
  .uk-text-small { font-size: 0.875rem; }
  .uk-text-muted { color: var(--ink-soft); }
  .uk-section-primary .uk-text-muted, .uk-tile-primary .uk-text-muted { color: rgba(255,255,255,0.72); }
  .uk-text-bold, .uk-text-bolder { font-weight: 800; }
  .uk-text-primary, .uk-text-emphasis { color: inherit; }
  .uk-heading-small { font-size: clamp(1.7rem, 5vw, 2.4rem); }
  .uk-heading-medium { font-size: clamp(2rem, 6vw, 3rem); }
  .uk-heading-large { font-size: clamp(2.4rem, 8vw, 3.8rem); }
  .uk-font-secondary, .uk-font-tertiary { font-family: var(--font-display); text-transform: uppercase; }

  /* dropcap */
  .uk-dropcap::first-letter, p.uk-dropcap::first-letter {
    font-family: var(--font-display);
    float: left;
    font-size: 3.4em;
    line-height: 0.72;
    padding: 0.05em 0.12em 0 0;
    color: var(--plate-red);
  }

  /* buttons -- chunky hard-edged poster buttons */
  .uk-button {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    border-radius: 3px;
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    cursor: pointer;
    border: 3px solid var(--ink);
    background: var(--yellow);
    color: var(--ink);
    box-shadow: 4px 4px 0 var(--ink);
    transition: transform 0.14s var(--ease), box-shadow 0.14s var(--ease), background 0.14s;
  }
  .uk-button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); background: var(--yellow-deep); }
  .uk-button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
  .uk-button-secondary { background: var(--ink); color: var(--white); }
  .uk-button-secondary:hover { background: var(--ink-2); }
  .uk-button-default { background: transparent; }
  .uk-tile-primary .uk-button, .uk-section-primary .uk-button,
  .uk-card-primary .uk-button { border-color: var(--yellow); box-shadow: 4px 4px 0 var(--yellow); }

  /* lists / accordion */
  .uk-list { list-style: none; padding-left: 0; }
  .uk-list > li { position: relative; padding-left: 1.6rem; margin-bottom: 0.6rem; }
  .uk-list > li::before {
    content: "";
    position: absolute; left: 0; top: 0.55em;
    width: 0.7rem; height: 0.7rem;
    background: var(--yellow);
    border: 2px solid var(--ink);
    transform: rotate(45deg);
  }
  .uk-list-large > li { margin-bottom: 0.9rem; font-size: 1.08rem; }
  .uk-list-striped > li { padding: 0.6rem 0.8rem 0.6rem 1.6rem; }
  .uk-list-striped > li:nth-child(odd) { background: var(--paper-2); border-radius: 4px; }
  .uk-list-divider > li:not(:first-child) { border-top: 2px solid var(--line); padding-top: 0.6rem; }

  .uk-accordion { list-style: none; }
  .uk-accordion-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-size: 1.15rem;
    padding: 0.8rem 0;
    border-bottom: 2px solid var(--ink);
    display: block;
  }
  .uk-accordion-content { padding: 0.6rem 0 1rem; }

  .uk-flex { display: flex; }
  .uk-flex-center { justify-content: center; }
  [uk-icon], .uk-icon { display: inline-block; }
  .tm-rotate-180 { transform: rotate(180deg); }
}

/* ------------------------------------------------------------------- footer */
@layer chrome {
  .site-footer {
    background: var(--ink);
    color: rgba(255,255,255,0.72);
    margin-top: clamp(2.5rem, 7vw, 4.5rem);
  }
  .footer-marquee { border-top: 0; }
  .footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.25rem;
    padding-block: clamp(2.5rem, 6vw, 3.75rem);
    background-image: var(--halftone);
    background-size: 16px 16px;
  }
  .footer-brand-mark { margin-bottom: 1.1rem; gap: 0.4rem; }
  .footer-brand-mark .brand-word { color: var(--white); font-size: clamp(2rem, 9vw, 3rem); }
  .footer-brand-mark .brand-mark { font-size: clamp(2rem, 9vw, 3rem); }
  .footer-brand p { color: rgba(255,255,255,0.6); max-width: 42ch; }

  .site-footer h2 {
    color: var(--yellow);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 1rem;
  }
  .footer-links ul { list-style: none; }
  .footer-links li { margin-bottom: 0.6rem; }
  .footer-links a, .footer-contact a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-weight: 600;
  }
  .footer-links a:hover, .footer-contact a:hover { color: var(--yellow); }
  .footer-contact p { color: rgba(255,255,255,0.6); }

  .footer-base {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-block: 1.25rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.5);
  }
  .footer-base p { margin: 0; }
}

/* --------------------------------------------------------------- responsive
   Mobile-first above; scale up here. */
@media (min-width: 600px) {
  @layer compat {
    .uk-child-width-1-2\@m > * { flex: 1 1 min(100%, calc(50% - 1rem)); }
    [class*="uk-width-1-2"] { flex: 1 1 min(100%, calc(50% - 1rem)); }
    [class*="uk-width-2-3"] { flex: 1 1 min(100%, calc(66.666% - 1rem)); }
    [class*="uk-width-3-5"] { flex: 1 1 min(100%, calc(60% - 1rem)); }
    [class*="uk-width-2-5"] { flex: 1 1 min(100%, calc(40% - 1rem)); }
    .uk-column-1-2\@s > *, [class*="uk-column-1-2"] { columns: 2; }
  }
}

@media (min-width: 860px) {
  @layer chrome {
    .brand-mark, .brand-word { font-size: 1.7rem; }
    .brand-sub { display: inline; }
    .nav-toggle-btn { display: none; }
    .site-nav {
      position: static;
      background: none;
      border: 0;
      display: block;
    }
    .site-nav ul {
      flex-direction: row;
      overflow: visible;
      padding: 0;
      min-height: auto;
    }
    .site-nav li { border: 0; }
    .site-nav a { padding: 0.55rem 0.85rem; font-size: 0.8rem; min-height: auto; }

    .footer-grid { grid-template-columns: 2.2fr 1fr 1.1fr; gap: 3rem; }
  }
  @layer compat {
    .uk-child-width-1-3\@m > * { flex: 1 1 min(100%, calc(33.333% - 1.4rem)); }
    [class*="uk-width-1-3"] { flex: 1 1 min(100%, calc(33.333% - 1.4rem)); }
    [class*="uk-width-1-4"] { flex: 1 1 min(100%, calc(25% - 1.5rem)); }
    [class*="uk-width-1-5"] { flex: 1 1 min(100%, calc(20% - 1.6rem)); }
    .uk-column-1-3\@m > *, [class*="uk-column-1-3"] { columns: 3; }
  }
}

/* --------------------------------------------------------------------- motion */
@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    .hero-inner > * { animation: rise 0.6s var(--ease) both; }
    .hero-kicker { animation-delay: 0.05s; }
    .page-hero h1 { animation-delay: 0.14s; }
    .hero-tag { animation-delay: 0.26s; }
    @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  }
  @media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; scroll-behavior: auto; }
    .hero-marquee-track, .footer-marquee-track { animation: none; }
  }
}

/* ==================================================================== article
   ARTICLE-BODY FLATTEN. The prose bodies were reconstructed from archived
   YOOtheme/UIkit page-builder markup: nested sections, grids, empty photo
   columns, cards and CSS multi-column blocks that fragment running prose into
   several columns, box it inside poster cards, and leave empty decorative
   bands. This layer (last in the cascade, so it beats `content` + `compat`)
   collapses that machinery to a single clean reading column while KEEPING the
   poster identity on the parts that carry meaning: charcoal ink, the red rule
   under H2s (from `content`), and readable Archivo body. CSS-only; the HTML is
   untouched. Scoped to `.page:not(.page--home) .page-body` so the loud poster home and
   the full-width landing pages are never affected. */
@layer article {

  /* one centred reading column */
  .page:not(.page--home) .page-body {
    max-width: 68ch;
    margin-inline: auto;
    text-align: left;
  }

  /* Collapse every structural wrapper to plain flow: no bands, boxes, grids,
     flex rows, min-heights or empty photo sections. The empty scraped hero
     band (a background-cover uk-section wrapping empty 1-5/3-5/1-5 columns)
     zeroes out here and collapses to nothing with no DOM surgery. */
  .page:not(.page--home) .page-body :is(
    .uk-section, .uk-section-default, .uk-section-muted, .uk-section-primary,
    .uk-section-secondary, .uk-section-large, .uk-container, .uk-container-small,
    .uk-grid, .uk-grid-margin, .uk-grid-item-match, .uk-panel, .uk-card,
    .uk-card-body, .uk-card-default, .uk-card-primary, .uk-card-secondary,
    .uk-tile, .uk-flex, .uk-inline, .uk-width-1-1, .uk-position-relative,
    .uk-background-cover, .uk-background-norepeat, .uk-background-center-center
  ) {
    display: block;
    background: none;
    background-image: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
    min-height: 0;
    color: inherit;
    columns: auto;
    column-rule: 0;
    transform: none;
    text-align: left;
  }

  /* kill the poster card's yellow kicker bar / red kicker bar pseudo-element */
  .page:not(.page--home) .page-body :is(.el-item, .uk-tile-primary)::before { content: none; }

  /* Never fragment running prose into CSS multi-columns. The scraped compat
     layer applies `columns:N` BOTH to the .uk-column-* element AND to its
     direct children (`.uk-column-1-3@m > *`), so the override must cover the
     children too or the inner <p> stays in 3 columns. */
  .page:not(.page--home) .page-body [class*="uk-column-"],
  .page:not(.page--home) .page-body [class*="uk-column-"] > * {
    columns: 1 !important;
    column-rule: 0 !important;
  }

  /* Keep prose left-aligned. YOOtheme centres whole section blocks via BOTH
     utility classes AND inline style="text-align:center" on individual
     elements, so !important is required to beat those inline styles. Images
     stay centred via their own margin auto below. */
  .page:not(.page--home) .page-body :is(
    p, h2, h3, h4, h5, h6, ul, ol, li, blockquote, dl, div, span, figcaption,
    .uk-text-center, .uk-text-right
  ) {
    text-align: left !important;
  }

  /* Column widths stop constraining; children take the full reading measure
     and stack in a single column */
  .page:not(.page--home) .page-body [class*="uk-width-"],
  .page:not(.page--home) .page-body [class*="uk-child-width-"] > * {
    width: auto;
    max-width: 100%;
    flex: none;
  }

  /* Restore readable vertical rhythm between the now-flattened blocks */
  .page:not(.page--home) .page-body > * + *,
  .page:not(.page--home) .page-body :is(.uk-grid, .uk-child-width-1-1) > * + * {
    margin-top: 1.4rem;
  }
  .page:not(.page--home) .page-body p { margin: 0 0 1.15em; }
  .page:not(.page--home) .page-body :is(h2, h3, h4) { margin-top: 1.7em; margin-bottom: 0.5em; }
  .page:not(.page--home) .page-body :is(ul, ol) { margin: 0 0 1.15em; padding-left: 1.3em; }

  /* Headings sized by their real tag, not YOOtheme display classes
     (e.g. an <h3 class="uk-h1"> should read as an h3). The red rule under H2
     from the content layer survives and keeps the poster accent. */
  .page:not(.page--home) .page-body h2 { font-size: clamp(1.7rem, 5vw, 2.6rem); }
  .page:not(.page--home) .page-body h3 { font-size: clamp(1.3rem, 3.4vw, 1.65rem); }
  .page:not(.page--home) .page-body h4 { font-size: 1.15rem; }
  .page:not(.page--home) .page-body :is(.el-meta, .uk-text-meta) {
    font-size: 0.9rem; color: var(--ink-soft); margin-bottom: 0.2rem;
  }

  /* No decorative drop cap mid-article */
  .page:not(.page--home) .page-body .uk-dropcap::first-letter,
  .page:not(.page--home) .page-body .uk-dropcap > p:first-of-type::first-letter {
    float: none; font-family: inherit; font-weight: inherit;
    font-size: inherit; line-height: inherit; padding: 0; color: inherit;
  }

  /* Body imagery: responsive, centred, self-contained (never full-bleed),
     keeping the poster's hard offset-shadow frame. */
  .page:not(.page--home) .page-body img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 1.6rem auto;
    border: 3px solid var(--ink);
    border-radius: 4px;
    box-shadow: var(--shadow-hard-y);
  }
  .page:not(.page--home) .page-body iframe { max-width: 100%; }

  /* Keep body links on-brand and legible on paper even when they sat inside a
     former dark primary band (where compat had recoloured them yellow). */
  .page:not(.page--home) .page-body a {
    color: var(--olive);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--yellow-deep);
    text-underline-offset: 3px;
    text-decoration-thickness: 2px;
  }
  .page:not(.page--home) .page-body a:hover {
    color: var(--olive-deep);
    text-decoration-color: var(--plate-red);
  }
}

/* ================================================================ editorial
   Components for the rewritten instructor-voice bodies. Declared UNLAYERED so they
   beat the compat + article-flatten layers predictably. Poster identity kept:
   charcoal ink, electric-yellow accents legible on dark, hard offset shadows,
   red L-plate signal. Readable Archivo body throughout. */

/* lead / drop paragraph */
.page-body .lead {
  font-family: var(--font-body);
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.35em;
}

/* figures + captions (self-hosted photos, poster frame) */
.page-body figure { margin: 1.9rem 0; }
.page-body figure img {
  width: 100%; height: auto; display: block;
  border: 3px solid var(--ink);
  border-radius: 4px;
  box-shadow: var(--shadow-hard-y);
  filter: grayscale(0.18) contrast(1.06);
}
.page-body figcaption {
  margin-top: 0.75rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--plate-red);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.45;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
}
/* article-flatten forces body img margin:auto + own frame; keep figure imgs
   full-measure and left-aligned within the reading column */
.page:not(.page--home) .page-body figure { margin-inline: 0; }
.page:not(.page--home) .page-body figure img { margin: 0; max-width: 100%; }
.page:not(.page--home) .page-body figcaption { text-align: left !important; }

/* pull-quote -- oversized Anton poster quote, yellow bar */
.page-body .pullquote {
  margin: 2.2rem 0;
  padding: 0.15rem 0 0.15rem 1.4rem;
  border-left: 7px solid var(--yellow);
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 1.1rem + 2.1vw, 2.6rem);
  line-height: 1.0;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.page-body .pullquote p { margin: 0; }

/* callout / key box -- charcoal poster panel, electric-yellow label */
.page-body .callout {
  margin: 2rem 0;
  padding: clamp(1.2rem, 3.5vw, 1.9rem);
  background: var(--ink);
  color: var(--white);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: var(--shadow-hard-y);
  background-image: var(--halftone);
  background-size: 14px 14px;
}
.page-body .callout .callout-label {
  display: block;
  margin-bottom: 0.6rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
}
.page-body .callout p { color: rgba(255,255,255,0.92); margin-bottom: 0.9em; }
.page-body .callout > :last-child { margin-bottom: 0; }
.page:not(.page--home) .page-body .callout p { text-align: left !important; }

/* home: guide-card grid -- poster tiles with hard shadow + yellow kicker */
.page--home .page-body { max-width: 62rem; margin-inline: auto; }
.page--home .guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: clamp(1rem, 2.5vw, 1.5rem);
  margin: 2rem 0;
}
.page--home .guide-card {
  position: relative;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: var(--shadow-hard);
  padding: clamp(1.2rem, 2.6vw, 1.7rem);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.page--home .guide-card::before {
  content: "";
  position: absolute;
  top: -3px; left: -3px;
  width: 44%; height: 8px;
  background: var(--yellow);
}
.page--home .guide-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--ink);
  text-decoration: none;
}
.page--home .guide-card .gc-idx {
  font-family: var(--font-display);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--plate-red);
}
.page--home .guide-card h3 {
  margin: 0.1rem 0 0;
  font-size: clamp(1.2rem, 3.2vw, 1.5rem);
}
.page--home .guide-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 400;
}
