/* ==========================================================================
   Pearly Tales — stylesheet
   Tokens and type scale taken from the Figma export (css.md).
   Layout is fluid: the 1440px frame is the upper bound, not a fixed width.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */

:root {
  /* Surfaces, in the order the homepage uses them */
  --cream: #fffcf3;
  --amber: #fedd9e;
  --sand: #ffb480;
  --apricot: #fec98f;
  --butter: #fdf1ad;
  --peach: #ffa071;
  --coral: #fe9c80;

  /* Ink */
  --ink: #3a2318;
  --ink-soft: #4d2e1c;
  --muted: #6b4a38;
  --crimson: #b41e49;

  /* Card fills */
  --card: #fffcf3;
  --card-warm: #fef3ea;

  /* Hairlines and shadows, lifted from the export */
  --line: rgba(58, 35, 24, 0.12);
  --line-strong: rgba(58, 35, 24, 0.26);
  --drop: 0 2px 0 rgba(58, 35, 24, 0.14);
  --drop-lg: 0 3px 0 rgba(58, 35, 24, 0.14);
  /* Figma specifies 0 14px 30px -12px / 0.28; toned down on request. */
  --photo-shadow: 0 6px 14px -8px rgba(58, 35, 24, 0.22);

  /* Rhythm. Section padding collapses on small screens via the clamp. */
  --gutter: clamp(20px, 5vw, 72px);
  --band: clamp(64px, 9vw, 112px);
  --nav-h: 100px;
  --frame: 1296px; /* 1440 minus the 72px gutters */

  --r-card: 20px;
  --r-lg: 24px;
  --r-pill: 999px;

  --wave-h: clamp(24px, 3.2vw, 46px);
}

/* --- Reset -------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Anchor targets stop just under the sticky nav with a small breath above the
   heading. The section's own top padding is subtracted, otherwise that padding
   plus the nav offset would stack into a large empty gap. */
:target,
section[id] {
  scroll-margin-top: calc(var(--nav-h) + 20px - var(--band));
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
ul,
figure,
blockquote {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
}

/* Suppress the translucent blue box Android paints over anything tappable,
   and stop button labels being selected on a long press or double click.
   Keyboard users still get the :focus-visible ring below. */
a,
button,
summary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.btn,
.nav__links a,
.nav__toggle,
.dialog__close {
  -webkit-user-select: none;
  user-select: none;
}

:focus-visible {
  outline: 3px solid var(--crimson);
  outline-offset: 3px;
  border-radius: 4px;
}

/* --- Shared primitives -------------------------------------------------- */

.band {
  position: relative;
  padding: var(--band) var(--gutter);
  isolation: isolate;
}

.band--flush-top {
  padding-top: 0;
}

.inner {
  width: 100%;
  max-width: var(--frame);
  margin: 0 auto;
}

/* Torn page edge. One authored wave, recoloured per section and flipped
   where the design flips it. It sits above the section it precedes. */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--wave-h) * -1 + 1px);
  height: var(--wave-h);
  width: 100%;
  z-index: 2;
  pointer-events: none;
}

.wave svg {
  width: 100%;
  height: 100%;
  display: block;
}

.wave--flip svg {
  transform: scaleX(-1);
}

/* Eyebrow: a squashed rounded bar, then spaced caps. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  letter-spacing: 0.19em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 26px;
  height: 8px;
  border-radius: 4px;
  background: var(--muted);
  opacity: 0.55;
  transform: rotate(-3deg);
}

.h2 {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.lede {
  max-width: 62ch;
  margin-top: 14px;
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
  color: var(--muted);
}

.section-head {
  margin-bottom: clamp(32px, 4vw, 52px);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn--primary {
  background: var(--ink);
  color: var(--butter);
  box-shadow: var(--drop-lg);
}

.btn--ghost {
  background: var(--cream);
  color: var(--ink);
  border: 2px solid var(--ink);
  box-shadow: var(--drop);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 0 rgba(58, 35, 24, 0.18);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(58, 35, 24, 0.18);
}

/* --- 01 Nav ------------------------------------------------------------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--nav-h);
  padding: 18px var(--gutter);
  background: var(--cream);
  border-bottom: 2px solid var(--line);
}

.nav__logo img {
  width: clamp(190px, 19vw, 275px);
  height: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.2vw, 30px);
}

.nav__links a {
  position: relative;
  padding: 6px 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}

/* The active marker is a hand-drawn squiggle, not a straight rule — the
   stroke is an inline SVG data URI so it can stretch with the label. */
.nav__links a::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: -5px;
  height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5.4c11-3.2 20 1.8 31-.4 11-2.2 19 2.6 30 .2 5-1 9-1.6 35-2' fill='none' stroke='%23FE9C80' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat center / 100% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.18s ease;
}

.nav__links a:hover::after,
.nav__links a[aria-current]::after {
  transform: scaleX(1);
}

/* The drawer carries its own CTA; on desktop the bar's copy is the one shown. */
.nav__links .btn {
  display: none;
}

.nav__links .btn::after {
  display: none;
}

/* Hamburger — hidden until the links no longer fit */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  margin-right: -10px;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav.is-open .nav__toggle span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav.is-open .nav__toggle span:nth-child(2) {
  opacity: 0;
}

.nav.is-open .nav__toggle span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* --- 02 Hero ------------------------------------------------------------ */

.hero {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding: clamp(48px, 7vw, 96px) var(--gutter) clamp(48px, 6.5vw, 88px);
}

.hero--alt {
  background: var(--butter);
}

/* Opens the Meet Muthu view, directly under the nav. */
.hero--meet {
  position: relative;
  isolation: isolate;
}

.hero__copy {
  flex: 1 1 57.7%;  /* 748 of the 1296 content width */
  min-width: 0;
}

.hero__title {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(38px, 5.6vw, 70px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink);
  max-width: 717px;
}

.hero__body {
  max-width: 52ch;
  margin-top: 22px;
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.72;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.hero__note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.hero__note::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
}

.hero__art {
  flex: 1 1 42.3%;
  min-width: 0;
}

.hero__art img {
  width: 100%;
  height: auto;
}

/* Page-2 hero: bulleted facts + framed portrait */
.hero__facts {
  margin-top: 26px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.75;
  color: var(--ink-soft);
}

/* 530x541 frame in the design, filled by the photo and capped at that size. */
.hero__portrait {
  position: relative;
  /* Hold the design's 530px rather than letting the copy squeeze it; the copy
     column absorbs the difference, which is what the design does too. */
  flex: 0 0 auto;
  width: min(530px, 45%);
  min-width: 0;
  aspect-ratio: 530 / 541;
  overflow: hidden;
  border: 3px solid rgba(58, 35, 24, 0.14);
  border-radius: 32px;
  box-shadow: var(--photo-shadow);
}

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

/* Both lines are blocks with explicit line-heights: left inline, the second
   line would inherit the parent's larger strut and push the caption open. */
.hero__portrait figcaption {
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 19px;
  z-index: 2;
  line-height: 18px;
  letter-spacing: 0.03em;
  color: var(--butter);
  text-shadow: 0 1px 3px rgba(58, 35, 24, 0.45);
}

/* Soft scrim so the caption stays legible wherever the photo crops to — on a
   phone it lands on the pale dress rather than the dark pavement. */
.hero__portrait::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 46%;
  pointer-events: none;
  background: linear-gradient(
    to top,
    rgba(58, 35, 24, 0.62),
    rgba(58, 35, 24, 0.28) 45%,
    rgba(58, 35, 24, 0) 100%
  );
}

.hero__portrait strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}

.hero__portrait small {
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 15px;
}

/* --- 03 Stats ----------------------------------------------------------- */

.stats {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  padding: clamp(34px, 4vw, 52px) var(--gutter);
  background: var(--amber);
}

.stats__inner {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  max-width: var(--frame);
  margin: 0 auto;
}

.stat {
  flex: 1 1 200px;
  padding: 0 clamp(16px, 2.4vw, 34px);
  border-left: 2px solid rgba(58, 35, 24, 0.16);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat__value {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(26px, 2.8vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.stat__label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--muted);
}

/* --- Generic card ------------------------------------------------------- */

.card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--card);
  border: 2px solid rgba(58, 35, 24, 0.1);
  border-radius: var(--r-lg);
  box-shadow: var(--drop);
}

.card__title {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.18;
  color: var(--ink);
}

.card__body {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.58;
  color: var(--muted);
}

/* --- 04 Pathways -------------------------------------------------------- */

.pathways {
  background: var(--cream);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 26px);
}

/* Icon art is cropped 1:1 from the wireframe, backgrounds included. */
.pathway__art {
  margin-bottom: 18px;
}

.pathway__art img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

/* --- 05 Programmes ------------------------------------------------------ */

.programmes {
  background: var(--apricot);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 26px);
}

.programme {
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
}

.programme__art {
  flex: none;
  width: clamp(84px, 11vw, 140px);
}

.programme__art img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.programme__tag {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--amber);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

/* --- 06 Storyteller ----------------------------------------------------- */

.storyteller {
  background: var(--sand);
}

.storyteller__inner {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 46px);
  width: 100%;
  max-width: var(--frame);
  margin: 0 auto;
}

.storyteller__photo {
  flex: 1 1 40.9%;  /* 530 of 1296 */
  min-width: 0;
  overflow: hidden;
  border: 3px solid rgba(58, 35, 24, 0.14);
  border-radius: 32px;
  box-shadow: var(--photo-shadow);
}

.storyteller__photo img {
  width: 100%;
  height: auto;
}

.storyteller__copy {
  flex: 1 1 55.6%;  /* 720 of 1296 */
  min-width: 0;
}

/* A full-width hairline across the copy column, not a short dark bar. */
.storyteller__rule {
  width: 100%;
  height: 2px;
  margin: 26px 0 24px;
  border: 0;
  background: rgba(58, 35, 24, 0.18);
}

.facts li {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.facts svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 3px;
}

/* --- 07 Experience ------------------------------------------------------ */

.experience {
  background: var(--butter);
}

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(12px, 1.4vw, 18px);
}

.step {
  padding: 20px 18px 22px;
  background: var(--card);
  border: 2px solid rgba(58, 35, 24, 0.1);
  border-radius: var(--r-card);
  box-shadow: var(--drop);
}

/* Plain peach numeral on the card, as the design draws it — not a filled pill. */
.step__num {
  display: block;
  margin-bottom: 12px;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--peach);
}

/* Wide icon banner, as in the design — not a small square glyph. */
.step__icon {
  margin-bottom: 14px;
}

.step__icon img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.step__title {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.15;
}

.step__body {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

/* --- 08 Theme chips ----------------------------------------------------- */

.themes {
  background: var(--cream);
}

.themes--tight {
  padding-top: 0;
}

.chips {
  display: grid;
  gap: clamp(12px, 1.4vw, 18px);
}

.chips--3 {
  grid-template-columns: repeat(3, 1fr);
}

.chips--4 {
  grid-template-columns: repeat(4, 1fr);
}

.chip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--card);
  border: 2px solid rgba(58, 35, 24, 0.1);
  border-radius: 16px;
  box-shadow: var(--drop);
}

.chip__glyph {
  flex: none;
  width: 52px;
}

.chip__glyph img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.chip__label {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
}

/* --- 09 Impact ---------------------------------------------------------- */

.impact {
  background: var(--amber);
}

/* Partner logos — an auto-scrolling strip. Slots keep the design's dashed
   placeholder look until real logo files replace them. */
.partners {
  position: relative;
  margin-bottom: clamp(28px, 3.4vw, 42px);
  overflow: hidden;
}

/* Fade the strip into the section at both ends. Done with overlays rather
   than mask-image: a mask puts the strip on a compositing path that
   rasterises the logos below device resolution, which reads as blur. */
.partners::before,
.partners::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: clamp(28px, 6%, 80px);
  pointer-events: none;
}

.partners::before {
  left: 0;
  background: linear-gradient(to right, var(--amber), rgba(254, 221, 158, 0));
}

.partners::after {
  right: 0;
  background: linear-gradient(to left, var(--amber), rgba(254, 221, 158, 0));
}

.partners__track {
  display: flex;
  width: max-content;
  animation: partners-scroll 46s linear infinite;
  /* Rasterise the animated layer at full device resolution. */
  will-change: transform;
}

.partners:hover .partners__track,
.partners:focus-within .partners__track {
  animation-play-state: paused;
}

.partners__row {
  display: flex;
  gap: 18px;
  padding-right: 18px;
}

@keyframes partners-scroll {
  from {
    transform: translateX(0);
  }
  to {
    /* One full row plus its trailing gap, so the seam is invisible. */
    transform: translateX(-50%);
  }
}

/* The card and its dashed edge are drawn here rather than baked into the
   bitmap, so the stroke stays crisp at any pixel density. */
/* content-box so the artwork keeps its exported 201x75 size — the SVG already
   carries its own margin, and rendering it 1:1 is what keeps it sharp. */
.partner-slot {
  box-sizing: content-box;
  flex: none;
  width: 201px;
  height: 75px;
  padding: 0;
  background: #fff;
  border: 2px dashed var(--line-strong);
  border-radius: 18px;
}

.partner-slot img {
  width: 201px;
  height: 75px;
}

/* Case-study cards draw the dashed box themselves and hold an unframed mark. */
.case__logo {
  display: grid;
  place-items: center;
  min-height: 118px;
  margin-bottom: 18px;
  padding: 12px;
  background: #fff;
  border: 3px dashed var(--line-strong);
  border-radius: 18px;
}

/* The design draws the mark at 231px wide here — larger than in the strip. */
.case__logo img {
  width: 100%;
  max-width: 231px;
  height: auto;
}

.case__meta {
  margin: 8px 0 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink);
}

.case__tags {
  margin-top: auto;
  padding-top: 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

/* Full width in the design, with only the opening sentence set heavier. */
.impact__note {
  margin-top: clamp(24px, 3vw, 36px);
  font-size: clamp(16px, 1.4vw, 18px);
  line-height: 1.65;
  color: var(--muted);
}

/* The opening sentence sits on its own line, as in the design. */
.impact__note b {
  display: block;
  font-weight: 800;
}

/* --- 10 Testimonials ---------------------------------------------------- */

.testimonials {
  background: var(--peach);
}

.testimonials .eyebrow,
.testimonials .lede {
  color: var(--ink-soft);
}

.testimonials .eyebrow::before {
  background: var(--ink-soft);
}

.quote {
  display: flex;
  flex-direction: column;
  padding: 26px 24px 24px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--drop);
}

.quote__mark {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: 40px;
  font-weight: 800;
  line-height: 0.6;
  color: var(--coral);
}

.quote__text {
  margin: 22px 0 auto;
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(18px, 1.7vw, 21px);
  line-height: 1.36;
  color: var(--ink);
}

.quote__by {
  margin-top: 22px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --- 11 Gallery --------------------------------------------------------- */

.gallery {
  background: var(--butter);
}

/* Three explicit columns, each holding a tall photo and a short one in the
   order the design sets: tall/short, short/tall, tall/short. The photos are
   already cropped to 416x340 and 416x220, so aspect-ratio locks the stagger. */
.gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.85vw, 24px);
}

.gallery__col {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.85vw, 24px);
}

.gallery__item {
  margin: 0;
  overflow: hidden;
  border: 2.5px solid rgba(58, 35, 24, 0.1);
  border-radius: var(--r-lg);
  box-shadow: var(--drop);
}

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

.gallery__item--tall {
  aspect-ratio: 416 / 340;
}

.gallery__item--short {
  aspect-ratio: 416 / 220;
}

.gallery__more {
  margin-top: clamp(24px, 3vw, 34px);
}

/* --- 12 CTA ------------------------------------------------------------- */

.cta {
  /* Positioned so the torn edge anchors to this section, not to the page. */
  position: relative;
  padding: clamp(48px, 6vw, 72px) var(--gutter);
  background: var(--peach);
  isolation: isolate;
}

.cta__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: clamp(28px, 4vw, 40px);
  width: 100%;
  max-width: var(--frame);
  margin: 0 auto;
}

.cta__copy {
  flex: 1 1 520px;
}

.cta__title {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cta__body {
  max-width: 56ch;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.cta__contact {
  flex: 0 1 320px;
}

.cta__contact strong {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-size: clamp(20px, 2vw, 25px);
}

.cta__contact a:not(.btn) {
  display: block;
  font-weight: 700;
  color: var(--ink);
}

.cta__contact .btn {
  margin-top: 16px;
}

/* --- 13 Footer ---------------------------------------------------------- */

.footer {
  position: relative;
  isolation: isolate;
  padding: clamp(56px, 7vw, 84px) var(--gutter) 40px;
  background: var(--ink);
  color: var(--amber);
}

.footer__cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(28px, 3.6vw, 48px);
  width: 100%;
  max-width: var(--frame);
  margin: 0 auto;
}

/* Same full-colour mark as the top bar — the design keeps it unchanged on
   the dark footer, only smaller. */
.footer__logo img {
  width: 200px;
  height: auto;
}

.footer__blurb {
  max-width: 42ch;
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--apricot);
}

.footer__head {
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--apricot);
}

.footer__list li + li {
  margin-top: 9px;
}

.footer__list a {
  font-size: 15px;
  color: var(--amber);
  transition: color 0.15s ease;
}

.footer__list a:hover {
  color: var(--cream);
}

.footer__bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: var(--frame);
  margin: clamp(32px, 4vw, 48px) auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(254, 201, 143, 0.22);
  font-size: 13px;
  color: var(--apricot);
}

.footer__bar .tamil {
  font-family: "Baloo Thambi 2", "Nunito", sans-serif;
}

/* --- Page 2 — narrative columns ---------------------------------------- */

.narrative {
  background: var(--cream);
}

.narrative__cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 56px);
  margin-top: clamp(24px, 3vw, 34px);
}

.narrative__cols p {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.72;
  color: var(--muted);
}

.narrative__cols p + p {
  margin-top: 20px;
}

.pullquote {
  margin-top: 26px;
  padding: 22px 26px;
  background: var(--butter);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-lg);
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.35;
  color: var(--ink);
}

/* --- Page 2 — training timeline ---------------------------------------- */

.training {
  background: var(--sand);
}

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(14px, 1.8vw, 22px);
}

.tl-card {
  padding: 22px 20px 24px;
  background: var(--cream);
  border: 2.5px solid var(--ink);
  border-radius: var(--r-lg);
}

.tl-card__year {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 14px;
  border-radius: var(--r-pill);
  background: var(--amber);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.tl-card__title {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
}

.tl-card__body {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

/* --- Page 2 — venues ---------------------------------------------------- */

.venues {
  background: var(--cream);
}

.venue {
  padding: 24px 26px 26px;
  border: 2.5px solid var(--ink);
  border-radius: var(--r-lg);
}

.venue--butter {
  background: var(--butter);
}
.venue--amber {
  background: var(--amber);
}
.venue--apricot {
  background: var(--apricot);
}
.venue--peach {
  background: var(--peach);
}

.venue__title {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(19px, 1.7vw, 22px);
  line-height: 1.2;
}

.venue__sub {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ink-soft);
}

.venue__list {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.venue--peach .venue__list,
.venue--peach .venue__sub {
  color: var(--ink-soft);
}

/* ==========================================================================
   Responsive. The design only exists at 1440px, so everything below is a
   faithful scale-down: same sections, same order, fewer columns.
   ========================================================================== */

@media (max-width: 1100px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }


  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  :root {
    --nav-h: 84px;
  }

  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--cream);
    border-bottom: 2px solid var(--line);
    box-shadow: 0 14px 22px rgba(58, 35, 24, 0.1);
    /* Collapsed by default; .is-open reveals it. */
    display: none;
  }

  .nav.is-open .nav__links {
    display: flex;
  }

  .nav__links a {
    padding: 13px 0;
    font-size: 17px;
    border-bottom: 1px solid var(--line);
  }

  .nav__links a::after {
    display: none;
  }

  .nav__links a[aria-current] {
    color: var(--crimson);
  }

  .nav__toggle {
    display: flex;
  }

  /* The nav CTA moves into the drawer rather than crowding the bar. */
  .nav > .btn {
    display: none;
  }

  .nav__links .btn {
    display: inline-flex;
    justify-content: center;
    margin-top: 16px;
    border-bottom: 0;
  }

  .hero,
  .storyteller__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero__art,
  .hero__portrait,
  .storyteller__photo,
  .storyteller__copy,
  .hero__copy {
    flex: 1 1 100%;
    width: 100%;
  }

  /* Illustration leads on the homepage hero; portrait follows the copy. */
  .hero--home .hero__art {
    order: -1;
    max-width: 440px;
    margin: 0 auto;
  }

  .grid-3,
  .grid-2,
  .chips--3,
  .chips--4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* One column from here down: two columns of 416px photos on a phone-width
     screen leaves them too small to read. Full width keeps faces legible. */
  /* Let the logo strip run edge to edge rather than sitting inside the
     gutter, where the clipped card at each end reads as a mistake. */
  .partners {
    margin-left: calc(var(--gutter) * -1);
    margin-right: calc(var(--gutter) * -1);
  }

  .gallery__grid {
    grid-template-columns: 1fr;
  }

  .gallery__col {
    display: contents;
  }

  .gallery__item {
    margin-bottom: clamp(14px, 1.85vw, 24px);
  }

  /* Source order is column-by-column; on one column the design's visual
     order is restored by interleaving tall and short. */
  .gallery__col:nth-child(1) .gallery__item:nth-child(1) { order: 1; }
  .gallery__col:nth-child(2) .gallery__item:nth-child(1) { order: 2; }
  .gallery__col:nth-child(3) .gallery__item:nth-child(1) { order: 3; }
  .gallery__col:nth-child(1) .gallery__item:nth-child(2) { order: 4; }
  .gallery__col:nth-child(2) .gallery__item:nth-child(2) { order: 5; }
  .gallery__col:nth-child(3) .gallery__item:nth-child(2) { order: 6; }

  .narrative__cols {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  :root {
    --wave-h: 22px;
  }

  .stat {
    flex: 1 1 calc(50% - 1px);
    padding: 12px 14px;
    border-left: 0;
    border-top: 2px solid rgba(58, 35, 24, 0.16);
  }

  .stat:first-child,
  .stat:nth-child(2) {
    border-top: 0;
  }

  .stat:nth-child(odd) {
    padding-left: 0;
  }

  .grid-3,
  .grid-2,
  .steps,
  .chips--3,
  .chips--4,
  .timeline {
    grid-template-columns: 1fr;
  }

  .programme {
    flex-direction: column;
  }

  /* Brand spans the top, then the three link lists sit two-up. Collapsing
     everything to one column makes the footer very tall. */
  .footer__cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__cols > :first-child {
    grid-column: 1 / -1;
  }

  /* Roomier touch targets: 20px text links are hard to hit accurately. */
  .footer__list a,
  .cta__contact a:not(.btn) {
    display: block;
    padding: 11px 0;
  }

  .footer__list li + li {
    margin-top: 0;
  }

  .footer__bar {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .hero__actions {
    width: 100%;
  }

  .cta__contact .btn {
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .partners__track {
    animation: none;
  }

  .partners {
    overflow-x: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Session request dialog
   ========================================================================== */

.dialog {
  --dialog-pad: clamp(24px, 4vw, 36px);
  display: flex;
  flex-direction: column;
  width: min(540px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  /* The panel itself never scrolls, so the title, close button and rounded
     border stay put; only .dialog__body moves. */
  overflow: hidden;
  padding: 0;
  border: 2px solid var(--ink);
  border-radius: var(--r-lg);
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 18px 40px -16px rgba(58, 35, 24, 0.45);
}

.dialog::backdrop {
  background: rgba(58, 35, 24, 0.55);
}

/* Freeze the page behind the dialog. The padding replaces the scrollbar's
   width so the layout does not jump sideways when it disappears. */
html.dialog-open,
html.dialog-open body {
  overflow: hidden;
}

html.dialog-open body {
  padding-right: var(--scrollbar-w, 0px);
}

.dialog__head {
  flex: none;
  /* A hairline appears only once the body is scrolled, so the cut edge reads
     as "there is more" rather than as a mistake. */
  box-shadow: 0 1px 0 rgba(58, 35, 24, 0);
  transition: box-shadow 0.18s ease;
  /* Right padding clears the close button. */
  padding: var(--dialog-pad) calc(var(--dialog-pad) + 28px) 0 var(--dialog-pad);
}

.dialog.is-scrolled .dialog__head {
  box-shadow: 0 1px 0 rgba(58, 35, 24, 0.14);
}

.dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 var(--dialog-pad) var(--dialog-pad);
}

/* Stop a scroll gesture inside the dialog from chaining to the page. */
.dialog__body {
  overscroll-behavior: contain;
}

/* A slim, themed scrollbar. The default one is heavy and sits awkwardly
   against the panel's rounded border. */
.dialog__body {
  scrollbar-width: thin;
  scrollbar-color: rgba(107, 74, 56, 0.3) transparent;
}

.dialog__body::-webkit-scrollbar {
  width: 8px;
}

.dialog__body::-webkit-scrollbar-track {
  background: transparent;
}

.dialog__body::-webkit-scrollbar-thumb {
  background: rgba(107, 74, 56, 0.26);
  border: 2px solid transparent;
  border-radius: 99px;
  background-clip: content-box;
}

.dialog__body::-webkit-scrollbar-thumb:hover {
  background: rgba(107, 74, 56, 0.45);
  background-clip: content-box;
}

/* Only animate when the browser actually supports the entry transition. */
@media (prefers-reduced-motion: no-preference) {
  .dialog[open] {
    animation: dialog-in 0.22s ease-out;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

.dialog__close {
  position: absolute;
  top: 12px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 26px;
  line-height: 1;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.dialog__close:hover {
  background: var(--amber);
  color: var(--ink);
}

.dialog__title {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.dialog__intro {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
}

.dialog__form {
  padding-top: 22px;
}

.field + .field {
  margin-top: 16px;
}

.field__label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field__input {
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  font-size: 16px; /* 16px stops iOS zooming the page on focus */
  color: var(--ink);
  background: #fff;
  border: 2px solid rgba(58, 35, 24, 0.22);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Selects and the textarea share the input's shell so the form reads as one
   set of controls; each only overrides what it genuinely needs. */
.field__select {
  /* Room for the chevron, and no native arrow competing with it. */
  padding-right: 42px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1.5 1.75 6 6.25l4.5-4.5' stroke='%236B4A38' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 8px;
  cursor: pointer;
}

/* Until something is picked, the placeholder option reads as placeholder. */
.field__select:invalid {
  color: rgba(107, 74, 56, 0.55);
}

.field__select option {
  color: var(--ink);
}

.field__textarea {
  min-height: 104px;
  line-height: 1.55;
  resize: vertical;
}

/* "optional" sits beside the label without borrowing its shouty styling. */
.field__opt {
  margin-left: 6px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: none;
  opacity: 0.7;
}

.field__input::placeholder {
  color: rgba(107, 74, 56, 0.55);
}

.field__input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 4px rgba(254, 156, 128, 0.3);
}

.field__input[aria-invalid="true"] {
  border-color: var(--crimson);
}

.field__error {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--crimson);
}

/* Off-screen rather than display:none, so bots still see and fill it. */
.field__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dialog__error {
  margin-top: 16px;
}

.dialog__submit {
  width: 100%;
  justify-content: center;
  margin-top: 18px;
}

.dialog__submit[disabled] {
  opacity: 0.6;
  cursor: progress;
}

/* Success replaces the whole panel rather than stacking under the title. */
.dialog.is-done .dialog__head {
  display: none;
}

.dialog.is-done .dialog__body {
  padding-top: var(--dialog-pad);
}

.dialog__done {
  padding: 8px 0 2px;
  text-align: center;
}

.dialog__tick {
  display: block;
  width: 62px;
  margin: 0 auto 20px;
}

.dialog__tick svg {
  width: 100%;
  height: auto;
}

.dialog__done-title {
  font-family: "Baloo 2", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.dialog__done-body {
  max-width: 30ch;
  margin: 10px auto 26px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

/* Caption reads a touch larger on the side-by-side hero; the phone keeps the
   smaller size, which suits the narrower frame. */
@media (min-width: 901px) {
  .hero__portrait figcaption {
    line-height: 20px;
  }

  .hero__portrait strong {
    font-size: 16px;
    line-height: 20px;
  }

  .hero__portrait small {
    font-size: 12.5px;
    line-height: 16px;
  }
}

/* ==========================================================================
   Views — one file, two pages
   ========================================================================== */

.view[hidden] {
  display: none !important;
}

/* The Meet Muthu page sets its eyebrows without the little leading bar,
   as the design draws them. */
#view-meet .eyebrow::before {
  display: none;
}

#view-meet .eyebrow {
  gap: 0;
}
