/* AI for Careers
   All brand values live in :root. See brand-guide.md for how they map to print and social. */

:root {
  /* Brand colours (from the AI for Careers logo and AI in Schools brand guide) */
  --color-red: #FF1A3E;          /* Logo red. Accents, large text and graphics only */
  --color-red-strong: #D6102F;   /* Buttons and small red text. 5.3:1 with white */
  --color-red-deep: #B00D27;     /* Button hover */
  --color-purple: #231C3F;       /* Headings, body text, dark bands */
  --color-purple-soft: #3A3160;  /* Cards on dark bands */
  --color-green: #00CCAA;        /* Accent on dark backgrounds only */
  --color-lilac: #9C8BA5;        /* Decorative only, never text */
  --color-lilac-tint: #F4F1F7;   /* Soft section and card background */
  --color-grey: #999999;         /* Mono brand colour, decorative only */

  /* Neutrals */
  --color-white: #FFFFFF;
  --color-off-white: #FAF9FC;
  --color-text: #231C3F;
  --color-text-muted: #554E6B;   /* 7:1 on white */
  --color-border: #DCD6E4;
  --color-focus: #231C3F;

  /* Typography */
  --font-body: "Montserrat", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-heading: var(--font-body);
  --font-size-base: 1.125rem;    /* 18px */
  --font-size-small: 1rem;       /* 16px */
  --font-size-h1: clamp(1.75rem, 1.3rem + 2.6vw, 3rem);
  --font-size-h2: clamp(1.625rem, 1.3rem + 1.6vw, 2.375rem);
  --font-size-h3: 1.25rem;
  --font-size-lead: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --line-height-body: 1.65;
  --line-height-heading: 1.2;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;

  /* Spacing scale */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-s: 0.75rem;
  --space-m: 1rem;
  --space-l: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: clamp(3.5rem, 2.5rem + 4vw, 6rem);
  --gutter: 1rem;
  --max-width: 72rem;
  --max-width-text: 42rem;

  /* Shape */
  --radius-s: 0.5rem;
  --radius-m: 1rem;
  --radius-l: 1.5rem;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(35, 28, 63, 0.06), 0 8px 24px rgba(35, 28, 63, 0.07);

  /* Buttons */
  --button-min-height: 3rem;     /* 48px tap target */
  --button-padding: 0.75rem 1.5rem;
  --button-radius: var(--radius-pill);
  --button-font-weight: var(--font-weight-bold);
  --button-primary-bg: var(--color-red-strong);
  --button-primary-bg-hover: var(--color-red-deep);
  --button-primary-text: var(--color-white);
  --button-secondary-border: var(--color-purple);
  --button-secondary-text: var(--color-purple);
  --button-secondary-bg-hover: var(--color-lilac-tint);

  color-scheme: light;
}

@media (min-width: 40em) {
  :root { --gutter: 1.5rem; }
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-white);
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-red-strong); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--color-red-deep); text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-heading); line-height: var(--line-height-heading); font-weight: var(--font-weight-bold); letter-spacing: -0.01em; }
h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
p, li { max-width: var(--max-width-text); }
ul[role="list"] { list-style: none; padding: 0; }

/* Utilities */
.container { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.stack > * + * { margin-top: var(--space-m); }
.placeholder { background: #FFF3C4; color: #4A3B00; padding: 0 0.25em; border-radius: 3px; font-weight: var(--font-weight-medium); }

/* Skip link */
.skip-link {
  position: absolute; left: var(--space-m); top: -100px; z-index: 100;
  background: var(--color-purple); color: var(--color-white); padding: var(--space-s) var(--space-m);
  border-radius: var(--radius-s); font-weight: var(--font-weight-bold);
}
.skip-link:focus { top: var(--space-m); color: var(--color-white); }

/* Buttons */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: var(--button-min-height); padding: var(--button-padding);
  border-radius: var(--button-radius); border: 2px solid transparent;
  font: inherit; font-weight: var(--button-font-weight); line-height: 1.2;
  text-decoration: none; text-align: center; cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.button--primary { background: var(--button-primary-bg); color: var(--button-primary-text); }
.button--primary:hover { background: var(--button-primary-bg-hover); color: var(--button-primary-text); }
.button--secondary { background: transparent; color: var(--button-secondary-text); border-color: var(--button-secondary-border); }
.button--secondary:hover { background: var(--button-secondary-bg-hover); color: var(--button-secondary-text); }
.button--small { min-height: 2.75rem; padding: 0.5rem 1.125rem; font-size: var(--font-size-small); }
.button-row { display: flex; flex-wrap: wrap; gap: var(--space-s); }
.button-row .button { flex: 1 1 14rem; }
@media (min-width: 40em) { .button-row .button { flex: 0 0 auto; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}
.site-header__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-s); min-height: 4.5rem; }
.site-header__logo { display: block; flex-shrink: 0; margin-left: -0.6rem; }
.site-header__logo img { width: 10.5rem; height: auto; }
.site-header__actions { display: flex; align-items: center; gap: var(--space-xs); }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  min-height: 2.75rem; min-width: 2.75rem; padding: 0 var(--space-s);
  background: transparent; border: 2px solid var(--color-border); border-radius: var(--radius-pill);
  color: var(--color-purple); font: inherit; font-size: var(--font-size-small); font-weight: var(--font-weight-bold); cursor: pointer;
}
.nav-toggle__icon, .nav-toggle__icon::before, .nav-toggle__icon::after {
  display: block; width: 1.125rem; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.nav-toggle__icon::before, .nav-toggle__icon::after { content: ""; position: absolute; left: 0; }
.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { top: 0; transform: rotate(-45deg); }

/* On small screens the nav drops onto its own row under the logo and actions */
.site-nav { order: 3; flex-basis: 100%; border-top: 1px solid var(--color-border); }
.site-nav[hidden] { display: none; }
.site-nav ul { list-style: none; padding: var(--space-xs) 0 var(--space-m); }
.site-nav a {
  display: block; padding: var(--space-s) 0; color: var(--color-purple);
  text-decoration: none; font-weight: var(--font-weight-medium); border-bottom: 1px solid var(--color-lilac-tint);
}
.site-nav a:hover { color: var(--color-red-strong); }

@media (max-width: 26em) {
  .site-header__logo img { width: 9rem; }
  .nav-toggle__label { display: none; }
}

@media (max-width: 22em) {
  .site-header__logo img { width: 7.75rem; }
  .site-header .button--small { padding-inline: 0.875rem; }
}

@media (min-width: 75em) {
  .nav-toggle { display: none; }
  .site-header__inner { gap: var(--space-l); }
  .site-nav, .site-nav[hidden] { display: block; order: 2; flex: 1 1 auto; border: 0; }
  .site-header__actions { order: 3; }
  .site-nav ul { display: flex; justify-content: flex-end; gap: var(--space-l); padding: 0; }
  .site-nav a { padding: var(--space-xs) 0; border: 0; font-size: var(--font-size-small); white-space: nowrap; }
  .site-header__inner { flex-wrap: nowrap; }
}

/* Sections */
.section { padding-block: var(--space-3xl); }
.section--tint { background: var(--color-lilac-tint); }
.section--off-white { background: var(--color-off-white); }
.section__header { margin-bottom: var(--space-xl); max-width: var(--max-width-text); }
.section__header > * + * { margin-top: var(--space-s); }
.eyebrow {
  display: inline-block; font-size: var(--font-size-small); font-weight: var(--font-weight-bold);
  color: var(--color-red-strong); letter-spacing: 0.04em; text-transform: uppercase;
}
.lead { font-size: var(--font-size-lead); color: var(--color-text-muted); }

/* Hero */
.hero { background: var(--color-purple); color: var(--color-white); padding-block: var(--space-2xl) var(--space-3xl); position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--color-red);
}
.hero { --color-focus: var(--color-green); }
.hero__inner { display: grid; gap: var(--space-xl); }
.hero h1 { color: var(--color-white); max-width: 22ch; }
.hero h1 .accent { color: var(--color-green); }
.hero__lead { font-size: var(--font-size-lead); max-width: 38rem; color: #E9E6F2; }
.hero__facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs); }
.hero__facts li {
  display: inline-flex; align-items: center; gap: var(--space-xs);
  padding: 0.375rem 0.875rem; border-radius: 1.25rem; /* not a full pill, so wrapped tags stay tidy */
  background: var(--color-purple-soft); color: var(--color-white);
  font-size: var(--font-size-small); font-weight: var(--font-weight-medium); line-height: 1.4;
}
.hero__facts li::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--color-green); flex-shrink: 0; }
.hero .button--secondary { color: var(--color-white); border-color: var(--color-white); }
.hero .button--secondary:hover { background: var(--color-white); color: var(--color-purple); }
.hero__note { font-size: var(--font-size-small); color: #CFC9DE; }
/* Illustration sits on the hero's red bottom line and runs to the right edge of the screen,
   so its cropped right side lines up with the page edge. Its background is the brand purple,
   so the top and left edges disappear into the hero. */
.hero__art { max-width: 36rem; margin: 0 calc(-1 * var(--gutter)) calc(-1 * var(--space-3xl)) auto; }
.hero__art img { width: 100%; height: auto; }
@media (min-width: 56em) {
  .hero { padding-block: var(--space-2xl) var(--space-3xl); --hero-art-width: min(50vw, 40rem); }
  /* Headline runs the full width of the page; the rest of the text sits beside the illustration */
  .hero h1 { font-size: clamp(2.25rem, 1.2rem + 1.8vw, 2.75rem); max-width: none; width: calc(min(100vw, var(--max-width)) - 2 * var(--gutter)); }
  /* Text stops 2rem short of the illustration: page width minus image, minus the container's left offset */
  .hero .stack { max-width: min(38rem, calc(100vw - var(--hero-art-width) - max(var(--gutter), (100vw - var(--max-width)) / 2 + var(--gutter)) - 2rem)); }
  .hero__art { position: absolute; right: 0; bottom: 0; width: var(--hero-art-width); max-width: none; margin: 0; }
}

/* Cards */
.card-grid { display: grid; gap: var(--space-m); list-style: none; padding: 0; }
@media (min-width: 40em) { .card-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-l); } }
@media (min-width: 64em) { .card-grid--4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-m);
  padding: var(--space-l); box-shadow: var(--shadow-card);
}
.card h3 { margin-bottom: var(--space-xs); }
.card p { color: var(--color-text-muted); }
.card__mark {
  width: 2.75rem; height: 2.75rem; border-radius: var(--radius-s); margin-bottom: var(--space-m);
  display: grid; place-items: center; background: var(--color-lilac-tint); color: var(--color-red-strong);
}
.card__mark svg { width: 1.5rem; height: 1.5rem; }

/* Benefits list */
.benefits { display: grid; gap: var(--space-m); list-style: none; padding: 0; }
@media (min-width: 40em) { .benefits { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .benefits { grid-template-columns: repeat(3, 1fr); } }
.benefit {
  display: grid; grid-template-columns: auto 1fr; gap: var(--space-m); align-items: start;
  background: var(--color-white); border-radius: var(--radius-m); padding: var(--space-l);
  border: 1px solid var(--color-border);
}
.benefit__tick {
  width: 2rem; height: 2rem; border-radius: 50%; background: var(--color-purple); color: var(--color-white);
  display: grid; place-items: center; flex-shrink: 0; margin-top: 0.125rem;
}
.benefit__tick svg { width: 1rem; height: 1rem; }
.benefit h3 { font-size: 1.125rem; margin-bottom: var(--space-2xs); }
.benefit p { color: var(--color-text-muted); font-size: var(--font-size-small); }

/* Four days */
.days { list-style: none; padding: 0; display: grid; gap: var(--space-m); }
@media (min-width: 48em) { .days { grid-template-columns: repeat(2, 1fr); gap: var(--space-l); } }
@media (min-width: 72em) { .days { grid-template-columns: repeat(4, 1fr); } }
.day {
  position: relative; background: var(--color-white); border-radius: var(--radius-m);
  padding: var(--space-l); border: 1px solid var(--color-border); border-top: 5px solid var(--color-red);
}
.day__number { display: block; font-size: var(--font-size-small); font-weight: var(--font-weight-bold); color: var(--color-red-strong); margin-bottom: var(--space-2xs); }
.day h3 { margin-bottom: var(--space-xs); }
.day p { color: var(--color-text-muted); font-size: var(--font-size-small); }
.callout {
  margin-top: var(--space-xl); padding: var(--space-l); border-radius: var(--radius-m);
  background: var(--color-white); border-left: 5px solid var(--color-green);
}
.callout > * + * { margin-top: var(--space-xs); }
.callout p { color: var(--color-text-muted); }

/* Who it is for */
.split { display: grid; gap: var(--space-xl); }
@media (min-width: 56em) { .split { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); align-items: start; } }
.check-list { list-style: none; padding: 0; display: grid; gap: var(--space-s); }
.check-list li { position: relative; padding-left: 2.25rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 1.375rem; height: 1.375rem; border-radius: 50%;
  background: var(--color-red-strong) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E") center / 0.875rem no-repeat;
}
.reassure { background: var(--color-lilac-tint); border-radius: var(--radius-m); padding: var(--space-l); }
.reassure > * + * { margin-top: var(--space-s); }
.reassure p { color: var(--color-text-muted); }

/* Dates and location */
.info-grid { display: grid; gap: var(--space-m); }
@media (min-width: 48em) { .info-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-l); } }
.info-card { background: var(--color-white); border-radius: var(--radius-m); padding: var(--space-l); border: 1px solid var(--color-border); }
.info-card > * + * { margin-top: var(--space-s); }
.info-card dl { display: grid; gap: var(--space-s); }
.info-card dt { font-size: var(--font-size-small); font-weight: var(--font-weight-bold); color: var(--color-text-muted); }
.info-card dd { margin: 0; }
.info-card address { font-style: normal; }

/* Team */
.team { display: grid; gap: var(--space-l); list-style: none; padding: 0; }
@media (min-width: 48em) { .team { grid-template-columns: repeat(2, 1fr); } }
.person { background: var(--color-white); border-radius: var(--radius-m); padding: var(--space-l); border: 1px solid var(--color-border); box-shadow: var(--shadow-card); }
.person__head { display: flex; align-items: center; gap: var(--space-m); margin-bottom: var(--space-m); }
.person__photo { width: 4rem; height: 4rem; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.person__role { font-size: var(--font-size-small); color: var(--color-red-strong); font-weight: var(--font-weight-bold); }
.person p { color: var(--color-text-muted); }
.track-record { margin-top: var(--space-xl); padding: var(--space-l); border-radius: var(--radius-m); background: var(--color-purple); color: var(--color-white); }
.track-record p { max-width: none; }
.track-record strong { color: var(--color-green); }

/* FAQ */
.faq { display: grid; gap: var(--space-s); max-width: 48rem; }
.faq details { background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-m); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--space-m);
  padding: var(--space-m) var(--space-l); min-height: 3.5rem; font-weight: var(--font-weight-bold); border-radius: var(--radius-m);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex-shrink: 0; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--color-lilac-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23231C3F' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E") center / 0.875rem no-repeat;
}
.faq details[open] summary::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23231C3F' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 8h10'/%3E%3C/svg%3E");
}
.faq summary:hover { color: var(--color-red-strong); }
.faq__answer { padding: 0 var(--space-l) var(--space-l); color: var(--color-text-muted); }
.faq__answer > * + * { margin-top: var(--space-s); }

/* Referrers */
.referrers { display: grid; gap: var(--space-l); }
@media (min-width: 56em) { .referrers { grid-template-columns: 1.2fr 1fr; gap: var(--space-2xl); } }

/* Register and book */
.register { display: grid; gap: var(--space-xl); }
.form-frame {
  background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-m);
  overflow: hidden; box-shadow: var(--shadow-card);
}
.form-frame { position: relative; }
.form-frame__loading { position: absolute; top: var(--space-l); left: var(--space-l); right: var(--space-l); color: var(--color-text-muted); }
/* Tall enough that the form does not scroll inside the frame on small phones */
.form-frame iframe { position: relative; display: block; width: 100%; height: 1350px; border: 0; background: transparent; }
@media (min-width: 40em) { .form-frame iframe { height: 1150px; } }
.form-fallback {
  background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: var(--space-l);
}
.form-fallback > * + * { margin-top: var(--space-m); }
.small { font-size: var(--font-size-small); color: var(--color-text-muted); }

.book {
  background: var(--color-purple); color: var(--color-white); border-radius: var(--radius-l);
  padding: var(--space-xl) var(--space-l); display: grid; gap: var(--space-l); --color-focus: var(--color-green);
}
.book h2 { color: var(--color-white); }
.book p { color: #E9E6F2; }
.book > div > * + * { margin-top: var(--space-s); }
@media (min-width: 56em) { .book { grid-template-columns: 1.5fr auto; align-items: center; padding: var(--space-2xl); } }

/* Footer */
.site-footer { background: var(--color-purple); color: #E9E6F2; padding-block: var(--space-2xl) var(--space-xl); --color-focus: var(--color-green); }
.site-footer a { color: var(--color-white); }
.site-footer a:hover { color: var(--color-green); }
.funders { background: var(--color-white); color: var(--color-text); border-radius: var(--radius-m); padding: var(--space-l); --color-focus: var(--color-purple); }
.funders__statement { font-weight: var(--font-weight-medium); margin-bottom: var(--space-l); }
.funders__logos { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xl) var(--space-2xl); list-style: none; padding: 0; }
.funders__logos li { max-width: none; }
.funders__logo--ynyca { width: 11.5rem; height: auto; margin: -1.25rem -0.75rem; } /* image file includes its own white margin */
.funders__logo--better-connect { width: 10.5rem; height: auto; }
.footer-bottom { display: grid; gap: var(--space-m); margin-top: var(--space-xl); font-size: var(--font-size-small); }
.footer-bottom p { max-width: 56rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-l); list-style: none; padding: 0; }
.footer-links a, .link-standalone { display: inline-block; padding-block: 0.625rem; }

/* Simple content pages (privacy, 404) */
.page { padding-block: var(--space-2xl) var(--space-3xl); }
.page .prose { max-width: var(--max-width-text); }
.prose > * + * { margin-top: var(--space-m); }
.prose h2 { margin-top: var(--space-2xl); font-size: 1.5rem; }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: var(--space-xs); }
.draft-banner {
  background: #FFF3C4; color: #4A3B00; border: 2px solid #E0B800; border-radius: var(--radius-m);
  padding: var(--space-m) var(--space-l); font-weight: var(--font-weight-medium);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
