/* Landing page (site/index.html, site/pt-br/index.html). Ported by hand
   from the prototype (elos-landing-page/src/landing.css) onto the shared
   tokens in base.css: the same sections, colours and shapes, rebuilt on the
   spacing and type scales. Prototype parts that aren't ported (Instagram feed,
   the area accordion) have no rules here. Needs base.css first;
   templates/DESIGN.md has the rules. */

:root {
  /* Landing surfaces and accents (prototype landing.css). */
  --sage: #e8ecdf;          /* areas and featured posts background */
  --lilac: #bba8df;         /* decorative connector lines on purple */
  --on-purple: #eee9f4;     /* secondary text on purple (7.2:1) */
  --on-pine: #dce6db;       /* secondary text on pine (8.6:1) */
  --cream-a30: #fffdf74d;   /* outlines on purple */

  /* Display sizes used only here. */
  --text-hero: clamp(2.125rem, 1.5rem + 2.4vw, 3.375rem);      /* 34 → 54 */
  --text-display-landing: clamp(2.25rem, 1.5rem + 2.8vw, 3.5rem); /* 36 → 56 */
  --text-h2-compact: clamp(2rem, 1.5rem + 1.4vw, 2.5rem);     /* 32 → 40 */
  --text-hero-button: clamp(1rem, 0.95rem + 0.25vw, 1.125rem); /* 16 → 18 */

  /* The prototype's raised buttons and floating cards. */
  --shadow-ledge: 0 8px 0 var(--pine);
  --shadow-ledge-pressed: 0 3px 0 var(--pine);
  --shadow-ledge-raised: 0 10px 0 var(--pine);
  --text-follow-arrow: 1.875rem;            /* 30 */
  --shadow-card: inset 0 1px 0 var(--cream), 0 12px 30px #18382e1f;
  --shadow-soft: 0 5px 15px #18382e12;
  --shadow-squircle: 0 18px 42px #1b123229;

  /* "Apply to join" buttons (prototype sizes): hover glow and sparkles. */
  --pilot-height: 4.25rem;                  /* 68 */
  --pilot-padding: 1.125rem 1.375rem;       /* 18 22 */
  --pilot-gap: var(--space-4);
  --text-pilot: var(--text-md);             /* 14 */
  --text-pilot-arrow: 1.9375rem;            /* 31 */
  --text-pilot-form: 0.9375rem;             /* 15 */
  --radius-pilot-form: 20px;
  --shadow-pilot-hover: 0 12px 0 var(--pine), 0 0 26px #d9ff76b3, 0 0 66px #c4ed5780;
  --shadow-pilot-active: 0 3px 0 var(--pine), 0 0 35px #d9ff7699;
  --pilot-glint: #ffffffc7;
  --pilot-glint-core: #fffef2;
  --spark-core: #fff;
  --spark-mid: #f6ffd4;
  --spark-edge: #d9ff76;
  --spark-glow: #eaff99;

  /* Hero map: icon sizes, the pulsing centre and its rings. */
  --map-icon: 4.375rem;                     /* 70 */
  --map-icon-radius: 20px;
  --map-icon-glyph: 2rem;                   /* 32 */
  --map-gap: var(--space-2);
  --text-map: var(--text-xs);
  --map-glow: #b6d34c14;
  --map-ring-lime: #b6d34c38;
  --map-ring-lilac: #bba8df57;

  /* Section dots (the "Page sections" navigation). */
  --dots-surface: linear-gradient(110deg, #fffdf79e, #d3dba38a);
  --dots-border: #24423626;
  --dots-shadow: inset 0 1px 0 #ffffff80, 0 8px 24px #18382e12;

  /* Areas of work: media frame, notes, the "more to come" card. */
  --area-icon: 3.5rem;                      /* 56 */
  --radius-area-icon: 18px;
  --area-frame: 0.625rem;                   /* 10 */
  --area-media-height: 13.75rem;            /* 220 */
  --radius-area-media: 23px;
  --radius-area-photo: 16px;
  --area-overlap: calc(-1 * var(--space-6) - var(--space-4)); /* 32 over the frame */
  --area-notes-gap: var(--space-3);
  --text-area-active: 1.3125rem;            /* 21 */
  --branch-line: #a091b5;
  --mini-idle: #e6ead7;
  --note-surface: #fffdf7e6;
  --note-surface-active: #fffdf7ed;
  --shadow-note: inset 0 1px 0 #ffffffed, 0 9px 24px #18382e1c;
  --shadow-note-active: inset 0 1px 0 #fff, 0 12px 30px #18382e1f;
  --continuation-height: 3.3125rem;         /* 53 */
  --continuation-card-height: 4rem;         /* 64 */
  --continuation-surface: #fffdf78c;
  --shadow-continuation: inset 0 1px 0 #ffffff9c, 0 8px 20px #18382e0b;
  --continuation-bar: #24423625;
  --mask-solid: #000;
  --mask-mid: #000b;
  --mini-icon: 1.75rem;                     /* 28 */
  --mini-icon-scale: 1.2258;
  --signup-origin: 3.5rem;                  /* 56: the arrow beside the form */
  --signup-line: #b6d34c99;
  --linkedin-width: 16.25rem;               /* 260 */
  --linkedin-tilt: 2deg;
  --linkedin-cover: 6.25rem;                /* 100 */
  --linkedin-outline: #fffdf75c;
  --shadow-linkedin: 0 14px 28px #18382e1c;
  --linkedin-outline-x: -68px;              /* cover shapes: decorative offsets */
  --linkedin-square-y: -20px;                /* 31 → 38 px when active */
  --card-ratio: 3 / 2;
}

@media (max-width: 379px) {
  :root {
    --map-icon: 3.6875rem;                  /* 59 */
    --map-icon-radius: 18px;
    --map-icon-glyph: 1.75rem;              /* 28 */
  }
}

@media (min-width: 768px) {
  :root {
    --linkedin-width: 15.3125rem;           /* 245 */
    --linkedin-tilt: 3deg;
    --linkedin-cover: 8.4375rem;            /* 135 */
    --area-icon: 4rem;                      /* 64 */
    --radius-area-icon: 21px;
    --area-frame: var(--space-3);           /* 12 */
    --area-media-height: 21.25rem;          /* 340 */
    --radius-area-media: 25px;
    --area-overlap: calc(-1 * var(--space-7) - var(--space-4)); /* 48 over the frame */
    --area-notes-gap: var(--space-4);
    --mini-icon: 1.9375rem;                 /* 31 */
    --pilot-height: 4.75rem;                /* 76 */
    --pilot-padding: 1.25rem 1.875rem;      /* 20 30 */
    --pilot-gap: var(--space-5);
    --text-pilot: 1.125rem;                 /* 18 */
    --text-pilot-arrow: 1.625rem;           /* 26 */
    --map-icon: 4.0625rem;                  /* 65 */
    --map-icon-radius: 19px;
    --map-icon-glyph: 1.9375rem;            /* 31 */
  }
}

@media (min-width: 1024px) {
  :root {
    --map-icon: 4.75rem;                    /* 76 */
  }
}

@media (min-width: 1280px) {
  :root {
    --text-pilot-arrow: 1.9375rem;
    --linkedin-width: 17.1875rem;           /* 275 */
    --map-icon: 5.5rem;                     /* 88 */
    --map-icon-radius: 24px;
    --map-icon-glyph: 2.375rem;             /* 38 */
    --map-gap: var(--space-3);
    --text-map: var(--text-sm);
  }
}

/* Headings break between words only: auto-hyphenation split the
   Portuguese headings mid-word ("quere-mos"). Long words still wrap. */
.hero h1,
.band h2,
.band h3,
.band h4 {
  hyphens: manual;
}

/* Shared section rhythm: every band uses --section-space top and bottom. */
.band {
  padding-block: var(--section-space);
}

.section-eyebrow {
  display: block;
  margin-bottom: var(--space-3);
  color: var(--purple);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.section-head {
  display: grid;
  gap: var(--space-3);
  max-width: var(--measure);
  margin-bottom: var(--space-7);
}

.section-head h2 {
  color: var(--ink);
}

.section-head p {
  max-width: var(--measure);
}

/* Links with an arrow, used across the page. */
.arrow-link {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  min-height: var(--target-min);
  padding-block: var(--space-2);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color var(--duration-fast) var(--ease);
}

.arrow-link:hover {
  text-decoration-thickness: 2px;
}

/* The raised cream button of the hero and the Instagram section. */
.button-raised {
  gap: var(--space-4);
  min-height: var(--target-min);
  padding: var(--space-4) var(--space-5);
  border: var(--border-strong);
  border-radius: var(--radius-xl);
  background: var(--cream);
  color: var(--pine);
  box-shadow: var(--shadow-ledge);
  font-size: var(--text-hero-button);
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition:
    box-shadow var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease),
    background-color var(--duration-fast) var(--ease);
}

.button-raised > span {
  font-size: var(--text-icon);
}

.button-raised:hover {
  background: var(--lime-hover);
  transform: translateY(-2px);
}

.button-raised:active {
  box-shadow: var(--shadow-ledge-pressed);
  transform: translateY(5px);
}

/* --- "Apply to join" buttons (hero and form submit) ----------------------------
   The prototype's sizes. With a mouse or keyboard focus they lift and tilt,
   sweep from lime through purple, glint and sparkle. Touch screens keep only
   the press; reduced motion keeps only the lime hover colour. */
.button-raised.button-pilot {
  position: relative;
  isolation: isolate;
  gap: var(--pilot-gap);
  min-height: var(--pilot-height);
  padding: var(--pilot-padding);
  font-size: var(--text-pilot);
  letter-spacing: 0.045em;
}

.button-pilot > span:not(.pilot-glitter) {
  font-size: var(--text-pilot-arrow);
  line-height: 1;
}

.button-pilot.registration-button {
  --pilot-height: 3.75rem;                  /* 60 */
  --pilot-padding: 0.875rem 1.375rem;       /* 14 22 */
  --pilot-gap: var(--space-4);
  --text-pilot: var(--text-pilot-form);
  --text-pilot-arrow: 1.5rem;               /* 24 */
  border-radius: var(--radius-pilot-form);
}

.button-pilot::before,
.button-pilot::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: calc(var(--radius-xl) - 2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease);
}

.button-pilot::before {
  background-image: linear-gradient(110deg, var(--lime) 0%, var(--cream) 20%, var(--lime) 32%,
    var(--purple-bright) 44%, var(--purple-bright) 55%, var(--purple) 66%, var(--purple-bright) 77%,
    var(--lime) 90%, var(--lime) 100%);
  background-size: 400% 100%;
}

.button-pilot::after {
  background-image: linear-gradient(110deg, transparent 30%, var(--pilot-glint) 46%,
    var(--pilot-glint-core) 50%, transparent 65%);
  background-size: 250% 100%;
  background-position: 150% 0;
  mix-blend-mode: soft-light;
}

.pilot-glitter {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.pilot-glitter i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  opacity: 0;
  filter: drop-shadow(0 0 4px var(--spark-glow));
  transform: translateY(8px) scale(0.3);
}

.pilot-glitter i::before {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--spark-core) 0 20%, var(--spark-mid) 38%, var(--spark-edge) 80%);
  clip-path: polygon(50% 0, 62% 37%, 100% 50%, 62% 63%, 50% 100%, 38% 63%, 0 50%, 38% 37%);
}

.pilot-glitter i:nth-child(1) { --x: 7%; --y: 10%; --delay: 0s; --drift: -10px; --size: 12px; }
.pilot-glitter i:nth-child(2) { --x: 25%; --y: 90%; --delay: 0.35s; --drift: 8px; --size: 8px; }
.pilot-glitter i:nth-child(3) { --x: 44%; --y: 0%; --delay: 0.7s; --drift: -6px; --size: 10px; }
.pilot-glitter i:nth-child(4) { --x: 63%; --y: 97%; --delay: 1s; --drift: 12px; --size: 12px; }
.pilot-glitter i:nth-child(5) { --x: 86%; --y: 5%; --delay: 0.2s; --drift: 13px; --size: 14px; }
.pilot-glitter i:nth-child(6) { --x: 98%; --y: 62%; --delay: 0.55s; --drift: 15px; --size: 8px; }
.pilot-glitter i:nth-child(7) { --x: 2%; --y: 70%; --delay: 1.15s; --drift: -15px; --size: 7px; }
.pilot-glitter i:nth-child(8) { --x: 73%; --y: 45%; --delay: 0.85s; --drift: 5px; --size: 7px; }

@media (hover: hover) {
  .button-raised.button-pilot:is(:hover, :focus-visible):not(:disabled) {
    background: var(--lime);
    color: var(--pine);
    box-shadow: var(--shadow-pilot-hover);
    transform: translateY(-4px) rotate(-0.7deg) scale(1.035);
    transition:
      transform var(--duration-slow) cubic-bezier(0.2, 0.8, 0.2, 1.25),
      box-shadow var(--duration-slow) var(--ease),
      color var(--duration-base) var(--ease);
    animation: pilot-ink 8s ease-in-out infinite;
  }

  .button-pilot:is(:hover, :focus-visible):not(:disabled)::before {
    opacity: 1;
    animation: pilot-sweep 8s ease-in-out infinite;
  }

  .button-pilot:is(:hover, :focus-visible):not(:disabled)::after {
    opacity: 0.85;
    animation: pilot-glint 2.2s ease-in-out infinite;
  }

  .button-pilot:is(:hover, :focus-visible):not(:disabled) .pilot-glitter i {
    animation: pilot-sparkle 1.9s ease-out var(--delay) infinite;
  }

  .button-raised.button-pilot:active:not(:disabled) {
    box-shadow: var(--shadow-pilot-active);
    transform: translateY(4px) scale(1.015);
  }
}

@media (hover: none) {
  .pilot-glitter,
  .button-pilot::before,
  .button-pilot::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button-raised.button-pilot:is(:hover, :focus-visible, :active) {
    box-shadow: var(--shadow-ledge);
    transform: none;
  }

  .pilot-glitter,
  .button-pilot::before,
  .button-pilot::after {
    display: none;
  }
}

html.reduce-motion .button-raised.button-pilot:is(:hover, :focus-visible, :active) {
  box-shadow: var(--shadow-ledge);
  transform: none;
}

html.reduce-motion .pilot-glitter,
html.reduce-motion .button-pilot::before,
html.reduce-motion .button-pilot::after {
  display: none;
}

.button-pilot:disabled .pilot-glitter {
  display: none;
}

@keyframes pilot-sweep {
  0%, 8%, 30%, 80%, 100% { background-position: 0 50%; }
  22% { background-position: 18% 50%; }
  43%, 49% { background-position: 65% 50%; }
  60%, 66% { background-position: 70% 50%; }
}

@keyframes pilot-ink {
  0%, 32%, 80%, 100% { color: var(--pine); }
  43%, 66% { color: var(--cream); }
}

@keyframes pilot-glint {
  0%, 15% { background-position: 150% 0; }
  75%, 100% { background-position: -150% 0; }
}

@keyframes pilot-sparkle {
  0% { opacity: 0; transform: translate(0, 8px) rotate(0) scale(0.3); }
  25% { opacity: 0.95; }
  60% { opacity: 0.7; }
  100% { opacity: 0; transform: translate(var(--drift), -29px) rotate(75deg) scale(1.15); }
}

/* --- Hero ---------------------------------------------------------------------
   Phones and tablets: lime copy band, the button on the lime/purple seam,
   the purple map band. From 1280 px: lime left half, purple right half, the
   button on the vertical seam. The bands reach the screen edges through
   ::before, so the content stays on the container grid. */

.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  background: var(--purple);
}

.hero-grid {
  display: grid;
  grid-template-areas: 'copy' 'actions' 'art';
}

.hero-copy,
.hero-actions {
  position: relative;
}

.hero-copy::before,
.hero-actions::before {
  content: '';
  position: absolute;
  inset: 0 -100vmax;
  z-index: -1;
  background: var(--lime);
}

.hero-actions::before {
  bottom: 50%;
}

.hero-copy {
  grid-area: copy;
  display: grid;
  gap: var(--space-5);
  padding-top: var(--header-clearance);
  padding-bottom: var(--space-6);
  color: var(--pine);
}

.hero h1 {
  max-width: 14em;
  color: var(--pine);
  font-size: var(--text-hero);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.hero-wordmark {
  display: inline-block;
  width: 2.7em;
  height: auto;
  margin-right: var(--space-1);
  vertical-align: -0.12em;
  filter: var(--logo-filter);
}

.hero-subtitle {
  max-width: 34ch;
  font-size: var(--text-lead);
  line-height: var(--leading-body);
}

.hero-actions {
  grid-area: actions;
  display: flex;
  justify-content: center;
  padding-bottom: var(--space-2);
}

.hero-art {
  grid-area: art;
  display: flex;
  justify-content: center;
  min-width: 0;
  padding-block: var(--space-7) var(--space-8);
}

/* The map: four links around the pulsing elOS mark, laid out as in the
   prototype. The icons float gently; landing.js redraws the connector lines
   (a 0–100 grid stretched over the map) so they stay attached. The paths in
   the HTML are the resting positions, for when the script doesn't run. */
.hero-map {
  position: relative;
  isolation: isolate;
  width: min(100%, 26.25rem);
  aspect-ratio: 1.12;
  /* Tall enough for both rows (icon, gap, up to three label lines, padding)
     inside the top 8 % and bottom 7 %, however narrow the map gets. */
  min-height: calc((var(--map-icon) + var(--map-gap) + var(--space-4) + 4.2 * var(--text-map)) * 2 / 0.85);
  min-width: 0; /* else aspect-ratio turns that min-height into a min-width */
}

.map-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.map-lines path {
  fill: none;
  stroke: var(--lilac);
  stroke-width: 2.5px;
  stroke-linecap: round;
  opacity: 0.64;
  vector-effect: non-scaling-stroke;
  transition: stroke var(--duration-base) var(--ease), opacity var(--duration-base) var(--ease);
}

.hero-map:has(.top-left:is(:hover, :focus-visible)) .map-lines path:nth-child(1),
.hero-map:has(.top-right:is(:hover, :focus-visible)) .map-lines path:nth-child(2),
.hero-map:has(.bottom-left:is(:hover, :focus-visible)) .map-lines path:nth-child(3),
.hero-map:has(.bottom-right:is(:hover, :focus-visible)) .map-lines path:nth-child(4) {
  stroke: var(--lime);
  opacity: 1;
}

.map-centre {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 32%;
  aspect-ratio: 1;
  border-radius: 30%;
  background: var(--lime);
  color: var(--pine);
  box-shadow: var(--shadow-squircle), 0 0 0 8px var(--map-glow);
  translate: -50% -50%;
  animation: map-pulse 12s cubic-bezier(0.34, 1.2, 0.36, 1) infinite;
}

.map-centre::before,
.map-centre::after {
  content: '';
  position: absolute;
  inset: -14%;
  border: 2px solid var(--map-ring-lime);
  border-radius: 30%;
  pointer-events: none;
  animation: map-ring 12s ease-out infinite;
}

.map-centre::after {
  border-color: var(--map-ring-lilac);
  animation-delay: -5s;
}

.map-centre svg {
  width: 55%;
  height: auto;
}

.map-centre rect {
  stroke-width: 2.2px;
  vector-effect: non-scaling-stroke;
}

.map-area {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--map-gap);
  width: 35%;
  padding: var(--space-2);
  border-radius: var(--radius-pilot-form);
  color: var(--cream);
  font-size: var(--text-map);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.025em;
  text-align: center;
  text-decoration: none;
  transition: transform var(--duration-base) var(--ease);
  animation: map-float 12s ease-in-out infinite;
}

.map-area.top-left { top: 8%; left: 0; }
.map-area.top-right { top: 8%; right: 0; animation-duration: 14s; animation-delay: -4s; }
.map-area.bottom-left { bottom: 7%; left: 0; animation-duration: 13s; animation-delay: -7s; }
.map-area.bottom-right { bottom: 7%; right: 0; animation-duration: 15s; animation-delay: -2s; }

.map-icon {
  display: grid;
  place-items: center;
  width: var(--map-icon);
  height: var(--map-icon);
  border: 1px solid var(--cream);
  border-radius: var(--map-icon-radius);
  background: var(--cream);
  color: var(--pine);
  transition: background-color var(--duration-base) var(--ease), border-color var(--duration-base) var(--ease);
}

.map-icon svg {
  width: var(--map-icon-glyph);
  height: var(--map-icon-glyph);
}

.map-label {
  max-width: 9.375rem;
}

.map-area:hover {
  transform: translateY(-4px);
}

.map-area:hover .map-icon {
  border-color: var(--lime);
  background: var(--lime);
}

/* Keyboard focus: a lime ring hugging the icon square (the site's purple ring
   would vanish on the purple hero). The extra .hero-map outranks the shared
   focus rule in base.css. */
.hero-map .map-area:focus-visible {
  outline: none;
}

.map-area:focus-visible .map-icon {
  outline: var(--focus-width) solid var(--focus-ring-on-dark);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  .hero-map {
    width: min(100%, 30.625rem);
    aspect-ratio: 1.04;
  }
}

/* Reduced motion: still icons, no rings (base.css stops the animations). */
@media (prefers-reduced-motion: reduce) {
  .map-centre::before,
  .map-centre::after {
    display: none;
  }
}

html.reduce-motion .map-centre::before,
html.reduce-motion .map-centre::after {
  display: none;
}

@keyframes map-pulse {
  0%, 100% { border-radius: 30%; scale: 1; }
  42% { border-radius: 36%; scale: 0.96; }
  62% { border-radius: 24%; scale: 1.08; }
}

@keyframes map-ring {
  0% { opacity: 0; transform: scale(0.82) rotate(0deg); }
  32% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.18) rotate(12deg); }
}

@keyframes map-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -9px; }
}

/* The split layout needs 1280 px at the default text size. It is a container
   query in rem (80rem = 1280 px), so with enlarged text the hero keeps the
   stacked layout instead of squeezing the headline. The lime/purple split is
   drawn by .hero-grid::before, because a container can't style itself. */
.hero {
  container: hero / inline-size;
}

@container hero (min-width: 80rem) {
  .hero-copy::before,
  .hero-actions::before {
    content: none;
  }

  .hero-grid {
    position: relative;
    grid-template-areas: 'copy actions art';
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    min-height: min(100svh, 46rem);
    padding-top: var(--header-clearance);
    padding-bottom: var(--space-8);
  }

  .hero-grid::before {
    content: '';
    position: absolute;
    inset: 0 -100vmax;
    z-index: -1;
    background: linear-gradient(90deg, var(--lime) 50%, var(--purple) 50%);
  }

  .hero-copy {
    padding: 0 var(--space-6) 0 0;
  }

  .hero-actions {
    padding: 0;
  }

  .hero-art {
    justify-content: flex-end;
    padding: 0 0 0 var(--space-6);
  }
}

/* --- Areas of work (#contexts) ----------------------------------------------- */

.contexts {
  background: var(--sage);
}

.contexts .section-head {
  max-width: none;
}

.contexts .section-head p {
  color: var(--purple);
}

.contexts-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.pill-button {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  padding: var(--space-2) var(--space-4);
  border: var(--border-hairline);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--pine);
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color var(--duration-fast) var(--ease),
    border-color var(--duration-fast) var(--ease),
    color var(--duration-fast) var(--ease);
}

.pill-button:hover {
  border-color: var(--pine);
  background: var(--pine);
  color: var(--cream);
}

.pill-button:active {
  transform: translateY(1px);
}

.pill-button[aria-pressed='true'] {
  border-color: var(--pine);
  background: var(--cream);
}

.pill-button[aria-pressed='true']:hover {
  background: var(--pine);
}

/* The four areas, as in the prototype. One area is active at a time: the
   first, then whichever is hovered, focused or tapped. It shows its photo in
   colour and plays its clip while the pointer or focus is on it; the others
   are toned lime and pine (purple for business) and their note icons are
   sage. From 1280 px the four sit in a row and the active column widens.
   Subgrid rows keep titles, media, notes and links level across a row.
   landing.js adds .is-enhanced and .is-active and draws the branch lines;
   without it every photo stays in colour. */
.area-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: var(--space-5);
  row-gap: var(--space-8);
  overflow-anchor: none;
}

.area-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: var(--space-4);
  min-width: 0;
}

.area-heading {
  display: grid;
  align-content: end;
  gap: var(--space-1);
  text-align: center;
}

.area-type {
  color: var(--purple);
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.area-heading h3 {
  color: var(--ink);
  font-size: var(--text-h4);
  font-weight: 600;
  line-height: 1.3;
}

/* The media frame: lime for nonprofits, purple for business, with the icon
   on its top edge. The notes overlap its lower edge. */
.area-media {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--area-icon) / 2);
  padding: var(--area-frame);
  border-radius: var(--radius-area-media);
  background: var(--lime);
}

.area-card.is-business .area-media {
  background: var(--purple);
}

.area-media picture,
.area-media img,
.area-video {
  display: block;
  width: 100%;
  border-radius: var(--radius-area-photo);
}

.area-media img,
.area-video {
  height: var(--area-media-height);
  object-fit: cover;
  object-position: 50% 50%;
}

#example-animal-rescue .area-media :is(img, video) { object-position: 50% 30%; }
#example-environmental-work .area-media :is(img, video) { object-position: 50% 58%; }
#example-community-initiatives .area-media :is(img, video) { object-position: 50% 62%; }
#example-small-business .area-media :is(img, video) { object-position: 50% 72%; }

.area-grid.is-enhanced .area-card:not(.is-active) .area-media :is(img, video) {
  filter: url(#area-tone-nonprofit);
}

.area-grid.is-enhanced .area-card.is-business:not(.is-active) .area-media :is(img, video) {
  filter: url(#area-tone-business);
}

html.high-contrast .area-grid.is-enhanced .area-card .area-media :is(img, video) {
  filter: none;
}

.area-video {
  position: absolute;
  inset: var(--area-frame);
  width: calc(100% - 2 * var(--area-frame));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease);
}

.area-video.is-playing {
  opacity: 1;
}

.area-icon {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: var(--area-icon);
  height: var(--area-icon);
  border-radius: var(--radius-area-icon);
  background: var(--cream);
  color: var(--pine);
  box-shadow: var(--shadow-soft);
  transform: translate(-50%, -50%);
}

.area-icon svg {
  width: 45%;
  height: auto;
}

/* Branch lines (drawn by landing.js): from behind the photo down a rail at
   the card's left edge, curving into each note. */
.area-split-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.area-split-lines path {
  fill: none;
  stroke: var(--branch-line);
  stroke-width: 1px;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* Two glass notes per area, then a fading "more to come" card. */
.area-branches {
  position: relative;
  z-index: 3;
  display: grid;
  align-content: start;
  margin-top: var(--area-overlap);
  padding-left: var(--space-5);
}

/* Packed to the top: a taller neighbouring column must not stretch these
   notes (the shared subgrid row gives every column the same height). */
.area-notes {
  display: grid;
  align-content: start;
  gap: var(--area-notes-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.area-notes li {
  display: grid;
  grid-template-columns: var(--mini-icon) minmax(0, 1fr);
  align-content: start;
  column-gap: var(--space-3);
  row-gap: var(--space-1);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--note-surface);
  box-shadow: var(--shadow-note);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition:
    background-color var(--duration-slow) var(--ease),
    box-shadow var(--duration-slow) var(--ease),
    padding 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.area-card.is-active .area-notes li {
  background: var(--note-surface-active);
  box-shadow: var(--shadow-note-active);
}

html.high-contrast .area-notes li {
  background: var(--cream);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.mini-icon {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: var(--mini-icon);
  height: var(--mini-icon);
  border-radius: var(--radius-sm);
  background: var(--lime);
  color: var(--pine);
  transform-origin: 0 0;
  transition:
    background-color var(--duration-slow) var(--ease),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.area-grid.is-enhanced .area-card:not(.is-active) .mini-icon {
  background: var(--mini-idle);
}

.mini-icon svg {
  width: 65%;
  height: auto;
}

.area-notes h4 {
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.area-notes p {
  color: var(--muted);
  font-size: var(--text-base);
  line-height: 1.5;
}

.branch-continuation {
  display: block;
  height: var(--continuation-height);
  margin-top: var(--space-2);
  pointer-events: none;
  user-select: none;
  -webkit-mask-image: linear-gradient(var(--mask-solid), transparent 95%);
  mask-image: linear-gradient(var(--mask-solid), transparent 95%);
}

.continuation-card {
  display: block;
  height: var(--continuation-card-height);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  background: var(--continuation-surface);
  box-shadow: var(--shadow-continuation);
  -webkit-mask-image: linear-gradient(var(--mask-solid) 0, var(--mask-mid) 24%, transparent 88%);
  mask-image: linear-gradient(var(--mask-solid) 0, var(--mask-mid) 24%, transparent 88%);
}

.continuation-card i {
  display: block;
  width: 70%;
  height: 5px;
  margin-bottom: var(--space-2);
  border-radius: 4px;
  background: var(--continuation-bar);
  opacity: 0.5;
}

.continuation-card i + i {
  width: 45%;
}

html.high-contrast .branch-continuation {
  display: none;
}

.area-resources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 var(--space-2);
  padding-left: var(--space-5);
  font-size: var(--text-base);
}

.area-resources > span:first-child {
  flex-basis: 100%;
}

.area-resources a {
  display: inline-flex;
  align-items: center;
  min-width: var(--target-min);
  min-height: var(--target-min);
  font-weight: 600;
  text-decoration-thickness: 1px;
}

.area-resources a:hover {
  color: var(--purple);
  text-decoration-thickness: 2px;
}

.areas-invitation {
  display: grid;
  justify-items: center;
  gap: var(--space-1);
  margin-top: var(--space-8);
  text-align: center;
}

.areas-invitation p {
  color: var(--muted);
}

.areas-invitation a:hover {
  color: var(--purple);
}

@media (min-width: 1024px) {
  .contexts .section-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .contexts .section-head > :not(.contexts-tools) {
    grid-column: 1;
  }

  .contexts-tools {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: end;
    justify-content: flex-end;
  }
}

/* From 768 px the note icons sit above the text, as in the prototype. */
@media (min-width: 768px) {
  .area-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .area-notes li {
    display: block;
    padding: var(--space-5) var(--space-4);
  }

  .area-card.is-active .area-notes li {
    padding-inline: var(--space-5);
  }

  .mini-icon {
    margin-bottom: var(--space-3);
  }

  /* Scaled, not resized, so the active icon never changes a note's height. */
  .area-card.is-active .mini-icon {
    transform: scale(var(--mini-icon-scale));
  }

  .area-notes p {
    margin-top: var(--space-2);
  }
}

/* Four in a row: the active column takes 1.7 shares (the accordion). */
@media (min-width: 1280px) {
  .area-grid {
    /* Four tracks written out in every state: columns only animate between
       track lists of the same shape (no repeat()). */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    column-gap: var(--space-6);
    transition: grid-template-columns 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .area-grid.is-enhanced:has(> .area-card:nth-child(1).is-active) {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .area-grid.is-enhanced:has(> .area-card:nth-child(2).is-active) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr);
  }

  .area-grid.is-enhanced:has(> .area-card:nth-child(3).is-active) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr);
  }

  .area-grid.is-enhanced:has(> .area-card:nth-child(4).is-active) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.7fr);
  }

  .area-card.is-active .area-heading h3 {
    font-size: var(--text-area-active);
  }

  /* Each note's tallest height in any of the four layouts (landing.js). */
  .area-notes li {
    min-height: var(--note-min, 0px);
  }

  .area-grid.is-measuring,
  .area-grid.is-measuring * {
    transition: none !important;
  }

  /* Room for the label and a two-line title at the active size, so the
     titles rewrapping while columns change width never move the photos. */
  .area-heading {
    min-height: calc(1.5 * var(--text-xs) + var(--space-1) + 2 * 1.3 * var(--text-area-active));
  }
}

/* --- About: principles and security (#about-elos) ------------------------------ */

.about {
  background: var(--purple);
  color: var(--cream);
}

.principles h2 {
  margin-bottom: var(--space-6);
  color: var(--lime);
}

.principles-grid {
  display: grid;
  gap: var(--space-6);
}

.principles-grid h3 {
  margin-bottom: var(--space-2);
  color: var(--cream);
  font-size: var(--text-h4);
}

.principles-grid p {
  max-width: 40ch;
  color: var(--on-purple);
}

.security-layout {
  position: relative;
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-9);
}

.security-links {
  display: none;
}

.security-centre {
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  text-align: center;
}

.security-emblem {
  position: relative;
  display: grid;
  place-items: center;
  width: 7rem;
  margin-bottom: var(--space-3);
  color: var(--cream);
}

.security-emblem::before {
  content: '';
  position: absolute;
  inset: calc(-1 * var(--space-4));
  border: 1px solid var(--cream-a30);
  border-radius: 34%;
  transform: rotate(-8deg);
}

.security-emblem svg {
  width: 100%;
  height: auto;
}

.security-emblem .lock {
  stroke: var(--lime);
}

.security-centre h2 {
  color: var(--cream);
  font-size: var(--text-h2-compact);
}

.security-centre p {
  max-width: 26ch;
  color: var(--on-purple);
}

.security-card {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: var(--space-3);
  padding: var(--space-6);
  border-radius: var(--radius-dialog);
  background: var(--cream);
  color: var(--pine);
}

.security-card.security-care {
  background: var(--lime);
}

.security-card-number {
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.09em;
}

.security-card h3 {
  color: var(--pine);
  font-size: var(--text-h3);
}

.security-card p {
  max-width: 42ch;
}

.security-card .arrow-link {
  justify-self: start;
  color: var(--pine);
}

.security-card .arrow-link:hover {
  color: var(--purple);
}

.about :focus-visible {
  outline-color: var(--focus-ring-on-dark);
}

.about .security-card :focus-visible {
  outline-color: var(--focus-ring);
}

@media (min-width: 768px) {
  .principles-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .security-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .security-centre {
    grid-column: 1 / -1;
  }
}

/* From 1024 px: card, mark, card, with the cards offset like the prototype
   and joined to the mark by lines that landing.js draws. */
@media (min-width: 1024px) {
  .security-layout {
    grid-template-areas: 'work centre care';
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    gap: var(--space-6);
  }

  .security-centre {
    grid-area: centre;
    grid-column: auto;
  }

  .security-work {
    grid-area: work;
    align-self: start;
  }

  .security-care {
    grid-area: care;
    align-self: end;
  }

  .security-links {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
  }

  .security-links path {
    fill: none;
    stroke: var(--branch);
    stroke-width: 2px;
  }
}

/* --- Mission (#mission) -------------------------------------------------------- */

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

.mission-grid {
  display: grid;
  gap: var(--space-8);
}

.mission-intro {
  display: grid;
  align-content: start;
  gap: var(--space-4);
}

.mission-intro h2 {
  color: var(--pine);
  font-size: var(--text-h2);
  letter-spacing: -0.02em;
}

.mission-intro > p {
  max-width: 46ch;
  color: var(--muted);
  font-size: var(--text-lead);
}

.team-locations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.team-flags {
  display: inline-flex;
  gap: var(--space-2);
  font-size: var(--text-h4);
  line-height: 1;
}

.team-locations p {
  font-weight: 600;
}

.team-introduction {
  max-width: 46ch;
  color: var(--muted);
}

.microsoft-affiliation {
  justify-self: start;
  margin-top: var(--space-2);
  border-radius: var(--radius-md);
}

.microsoft-programme {
  display: block;
  width: 13rem;
  height: auto;
  border-radius: var(--radius-md);
  transition: transform var(--duration-fast) var(--ease);
}

.microsoft-affiliation:hover .microsoft-programme {
  transform: translateY(-2px);
}

.mission-purpose {
  display: grid;
  align-content: start;
  gap: var(--space-5);
}

.mission-purpose > p {
  max-width: var(--measure);
  color: var(--muted);
}

.mission-goals {
  display: grid;
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mission-goals li {
  display: flex;
  min-width: 0;
}

.mission-goal {
  position: relative;
  display: grid;
  grid-template-rows: auto auto auto auto 1fr;
  align-content: start;
  gap: var(--space-2);
  width: 100%;
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  background: var(--lime);
  color: var(--pine);
  text-decoration: none;
  transition: transform var(--duration-fast) var(--ease), box-shadow var(--duration-fast) var(--ease);
}

.mission-goals li:nth-child(2) .mission-goal {
  background: var(--pine);
  color: var(--cream);
}

.mission-goals li:nth-child(3) .mission-goal {
  background: var(--purple);
  color: var(--cream);
}

.mission-goal:hover {
  box-shadow: var(--shadow-panel);
  transform: translateY(-3px);
}

.mission-goal:hover h3 {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.mission-icon {
  display: grid;
  place-items: center;
  width: var(--target-min);
  height: var(--target-min);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-button);
  background: var(--cream);
  color: var(--pine);
}

.mission-icon svg {
  width: 60%;
  height: auto;
}

.mission-goal-arrow {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  font-size: var(--text-icon);
  line-height: 1;
}

.mission-goal-number {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
}

.mission-targets {
  font-size: var(--text-md);
}

.mission-goal h3 {
  color: inherit;
  font-size: var(--text-h4);
}

.mission-goal p {
  font-size: var(--text-base);
  line-height: 1.5;
}

.mission-agenda {
  justify-self: start;
  color: var(--purple);
}

.mission-agenda:hover {
  color: var(--purple-bright);
}

@media (min-width: 768px) {
  .mission-goals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .mission-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-7);
  }
}

/* --- Featured posts --------------------------------------------------------------
   Stacked cards on phones. From 768 px a horizontal track (2 cards and a
   peek, 3 from 1024 px) with previous/next buttons, a position count and
   arrow keys; landing.js adds the controls. Card styles follow blog.css. */

.featured {
  background: var(--sage);
}

.featured-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.featured-head h2 {
  color: var(--ink);
}

.carousel-controls {
  display: none;
  align-items: center;
  gap: var(--space-2);
}

.carousel-status {
  margin-right: var(--space-3);
  color: var(--muted);
  font-size: var(--text-base);
}

.carousel-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: var(--target-min);
  min-height: var(--target-min);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--pine);
  border-radius: var(--radius-pill);
  background: var(--cream);
  color: var(--pine);
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.carousel-button svg {
  width: 20px;
  height: 20px;
}

.carousel-prev svg {
  transform: scaleX(-1);
}

.carousel-button:not(:disabled):hover {
  background: var(--lime);
}

.carousel-button:not(:disabled):active {
  transform: translateY(1px);
}

.carousel-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.carousel-track {
  display: grid;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
  list-style: none;
}

.carousel-track:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.card-item {
  display: flex;
  min-width: 0;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  overflow: hidden;
  border: var(--border-hairline);
  border-radius: var(--radius-xl);
  background: var(--cream);
  transition:
    border-color var(--duration-fast) var(--ease),
    box-shadow var(--duration-fast) var(--ease),
    transform var(--duration-fast) var(--ease);
}

.card:hover {
  border-color: var(--pine);
  box-shadow: var(--shadow-button);
  transform: translateY(-2px);
}

.card:has(.card-link:focus-visible) {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: calc(-1 * var(--focus-width));
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.card-link:focus-visible {
  outline: none;
}

.card:hover .card-link {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.card picture {
  display: block;
}

.card-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--card-ratio);
  object-fit: cover;
  background: var(--line);
}

.focus-brazil-pilot { object-position: 55% 52%; }
.focus-elos-questions { object-position: 50% 58%; }

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
}

.card-body .eyebrow {
  color: var(--pine);
  font-size: var(--text-sm);
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.card-title {
  color: var(--pine);
  font-size: var(--text-h3);
  font-weight: 650;
  line-height: var(--leading-heading);
  letter-spacing: -0.02em;
}

.card-summary {
  font-size: var(--text-base);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-4);
  margin-top: auto;
  padding-top: var(--space-2);
  color: var(--muted);
  font-size: var(--text-base);
}

.featured-all {
  margin-top: var(--space-5);
}

.featured-all a:hover {
  color: var(--purple);
}

@media (min-width: 768px) {
  .featured.has-carousel .carousel-controls {
    display: flex;
  }

  .featured.has-carousel .carousel-track {
    grid-auto-columns: calc((100% - 2 * var(--space-6)) / 2.3);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
    scrollbar-width: none;
    padding-bottom: var(--space-2);
    border-radius: var(--radius-xl);
  }

  .featured.has-carousel .carousel-track::-webkit-scrollbar {
    display: none;
  }

  .featured.has-carousel .card-item {
    scroll-snap-align: start;
  }
}

@media (min-width: 1024px) {
  .featured.has-carousel .carousel-track {
    grid-auto-columns: calc((100% - 3 * var(--space-6)) / 3.3);
  }
}

/* --- Application (#contact) ------------------------------------------------------ */

.contact {
  background: var(--pine);
  color: var(--cream);
}

.contact :focus-visible {
  outline-color: var(--focus-ring-on-dark);
}

.contact-grid {
  display: grid;
  gap: var(--space-8);
}

.contact-copy {
  display: grid;
  align-content: start;
  gap: var(--space-5);
}

.contact h2 {
  color: var(--cream);
  font-size: var(--text-display-landing);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.contact h2 span {
  display: block;
  color: var(--lime);
}

.contact-copy > p {
  max-width: 44ch;
  color: var(--on-pine);
  font-size: var(--text-lead);
}

.cohort-deadline {
  display: grid;
  gap: var(--space-1);
  max-width: 26rem;
  padding: var(--space-5);
  border: 1px solid var(--lime);
  border-radius: var(--radius-lg);
  background: var(--purple);
}

.cohort-deadline-label {
  color: var(--on-pine);
}

.cohort-deadline time {
  color: var(--lime);
  font-size: var(--text-h3);
  font-weight: 650;
}

.cohort-deadline .arrow-link,
.direct-contact a {
  color: var(--lime);
}

.cohort-deadline .arrow-link {
  justify-self: start;
  font-weight: 500;
}

.direct-contact {
  max-width: 44ch;
  color: var(--on-pine);
}

.direct-contact a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  text-decoration-thickness: 1px;
}

.direct-contact a:hover,
.cohort-deadline .arrow-link:hover {
  color: var(--lime-hover);
  text-decoration-thickness: 2px;
}

/* From 1024 px the text and the form sit side by side, 1.2 : 1 as in the
   prototype, with the form centred on the text. */
@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    gap: var(--space-9);
  }
}

/* The two-step form. With the script only the current step shows, so the
   form fits it, and the error line takes room only when there is an error.
   Without it, both steps show and the form posts straight to Brevo. */
.interest-form {
  position: relative;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-dialog);
  background: var(--lime);
  color: var(--ink);
}

.interest-form :focus-visible {
  outline-color: var(--focus-ring);
}

.interest-form h3 {
  color: var(--pine);
  font-size: var(--text-h3);
}

.interest-form .form-help {
  max-width: var(--measure);
  color: var(--pine);
  font-size: var(--text-base);
  line-height: 1.5;
}

.interest-form a {
  font-weight: 650;
}

.interest-form a:hover {
  color: var(--purple);
  text-decoration-thickness: 2px;
}

.application-progress {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.application-progress li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  overflow-wrap: normal;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 3px solid var(--pine-a20);
  color: var(--pine);
  font-size: var(--text-base);
  font-weight: 500;
}

.application-progress li[aria-current='step'] {
  border-top-color: var(--purple);
  color: var(--purple);
  font-weight: 700;
}

.application-progress li span {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--pine-a20);
  font-size: var(--text-xs);
  font-weight: 700;
}

.application-progress li[aria-current='step'] span {
  background: var(--purple);
  color: var(--cream);
}

.application-steps {
  display: grid;
  gap: var(--space-6);
}

/* With the script only the current step shows; the form fits it. */
.application-step[hidden] {
  display: none;
}

.application-step {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.application-notes {
  display: grid;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 1px solid var(--pine-a20);
}

.application-step h4 {
  color: var(--pine);
  font-size: var(--text-h4);
}

.field {
  display: grid;
  gap: var(--space-2);
}

.field label {
  color: var(--ink);
  font-size: var(--text-base);
  font-weight: 650;
}

.field input,
.field select {
  width: 100%;
  min-height: var(--control-min-height);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--pine-a20);
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--pine);
  font: inherit;
  font-size: var(--text-base);
  transition: border-color var(--duration-fast) var(--ease);
}

.field input::placeholder {
  color: var(--muted);
}

.field input:hover,
.field select:hover {
  border-color: var(--pine);
}

.field input:focus-visible,
.field select:focus-visible {
  border-color: var(--purple);
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: 1px;
}

.field [aria-invalid='true'],
.organization-choices[data-invalid] fieldset {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}

.organization-choices {
  border-radius: var(--radius-md);
  background: var(--cream);
}

.organization-choices summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--control-min-height);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.organization-choices summary::-webkit-details-marker {
  display: none;
}

.organization-choices summary span {
  font-size: var(--text-icon);
  line-height: 1;
  transition: transform var(--duration-base) var(--ease);
}

.organization-choices[open] summary span {
  transform: rotate(45deg);
}

.organization-choices fieldset {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0 var(--space-3) var(--space-3);
  border: 0;
  border-radius: var(--radius-md);
}

.choice,
.form-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  min-height: var(--target-min);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  line-height: 1.45;
  cursor: pointer;
}

.choice:hover {
  background: var(--pine-a7);
}

.choice input,
.form-consent input {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  margin-top: 2px;
  accent-color: var(--purple);
}

.form-consent {
  padding: 0;
  font-weight: 600;
}

.form-honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.application-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.application-back {
  margin-right: auto;
}

/* With the script: step 1 shows Continue on the right; step 2 shows Apply
   there and Back on the row above. Back moves next to them only where it and the Portuguese Apply button
   fit on one row: the full-width form from 768 px, and from 1280 px (from
   1024 to 1279 px the form beside the text is too narrow). */
.interest-form.is-phased .application-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.interest-form.is-phased .application-back {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.interest-form.is-phased .application-next,
.interest-form.is-phased .registration-button {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .interest-form.is-phased .application-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .interest-form.is-phased .application-next,
  .interest-form.is-phased .registration-button {
    grid-column: 2;
    grid-row: 1;
  }
}

@media (min-width: 1280px) {
  .interest-form.is-phased .application-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .interest-form.is-phased .application-next,
  .interest-form.is-phased .registration-button {
    grid-column: 2;
    grid-row: 1;
  }
}

.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--target-min);
  padding: var(--space-2) var(--space-5);
  border: 1px solid var(--pine);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--pine);
  font-size: var(--text-base);
  font-weight: 650;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.outline-button:hover {
  background: var(--pine);
  color: var(--cream);
}

.outline-button:active {
  transform: translateY(1px);
}

.outline-button:disabled,
.registration-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* One reserved line for errors, so a message doesn't move the buttons. */
.form-error {
  min-height: 3em;
  color: var(--purple);
  font-size: var(--text-base);
  font-weight: 650;
  line-height: 1.5;
}

/* No reserved line while there's no error (it stays in place for role="alert"). */
.form-error:empty {
  min-height: 0;
}

.form-status {
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--cream);
  color: var(--pine);
  font-weight: 600;
}

@media (min-width: 540px) {
  .button-raised {
    gap: var(--space-5);
    padding-inline: var(--space-6);
    letter-spacing: 0.045em;
  }

  .interest-form {
    padding: var(--space-6);
  }

  .organization-choices fieldset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- FAQ (#pilot-faq) -------------------------------------------------------------- */

.pilot-faq {
  background: var(--cream);
}

.faq-grid {
  display: grid;
  gap: var(--space-7);
}

.faq-intro {
  display: grid;
  align-content: start;
  gap: var(--space-3);
}

.faq-intro h2 {
  color: var(--pine);
}

.faq-intro p {
  max-width: 36ch;
}

.faq-intro a {
  text-decoration-thickness: 1px;
}

.faq-intro a:hover,
.faq-items a:hover {
  color: var(--purple);
  text-decoration-thickness: 2px;
}

.faq-items {
  border-top: 1px solid var(--line);
}

.faq-items details {
  border-bottom: 1px solid var(--line);
}

.faq-items summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--target-min);
  padding: var(--space-5) var(--space-7) var(--space-5) 0;
  color: var(--pine);
  font-weight: 650;
  line-height: 1.45;
  list-style: none;
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease);
}

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

.faq-items summary::after {
  content: '+';
  position: absolute;
  top: 50%;
  right: var(--space-2);
  color: var(--purple);
  font-size: var(--text-icon);
  font-weight: 600;
  line-height: 1;
  transform: translateY(-50%);
  transition: transform var(--duration-base) var(--ease);
}

.faq-items details[open] > summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq-items summary:hover {
  color: var(--purple);
}

.faq-items summary:focus-visible {
  outline-offset: 2px;
}

.faq-items details > :not(summary) {
  max-width: var(--measure);
  margin-bottom: var(--space-4);
}

.faq-links {
  display: grid;
  gap: var(--space-1);
  padding: 0;
  list-style: none;
}

.faq-links a {
  display: inline-flex;
  align-items: center;
  min-height: var(--target-min);
  color: var(--purple);
  font-weight: 600;
  text-decoration-thickness: 1px;
}

@media (min-width: 1024px) {
  .faq-grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-9);
  }
}

/* --- Stay in touch (#instagram) -------------------------------------------------------
   Static: links only. The prototype's live feed (/api/instagram) is deferred
   (plan §12). */

.instagram {
  background: var(--lime);
  color: var(--pine);
}

.social-heading {
  display: grid;
  justify-items: center;
  gap: var(--space-7);
  text-align: center;
}

.social-heading-copy {
  display: grid;
  justify-items: center;
  gap: var(--space-4);
}

.instagram .section-eyebrow {
  margin: 0;
  color: var(--pine);
}

.instagram h2 {
  color: var(--pine);
  font-size: var(--text-display-landing);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.social-wordmark {
  display: inline-block;
  width: 2.6em;
  height: auto;
  vertical-align: -0.1em;
}

.social-icon-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.social-icon-links a {
  display: grid;
  place-items: center;
  width: var(--target-min);
  height: var(--target-min);
  border: 1px solid var(--pine);
  border-radius: var(--radius-md);
  transition: background-color var(--duration-fast) var(--ease), color var(--duration-fast) var(--ease);
}

.social-icon-links a:hover {
  border-color: var(--purple-bright);
  background: var(--purple-bright);
  color: var(--cream);
}

.social-icon-links svg {
  width: 23px;
  height: 23px;
}

/* The LinkedIn card, as in the prototype: tilted, it straightens and lifts
   on hover or focus; the purple cover has an outlined squircle and a lime
   square behind the logo. Reduced motion keeps the tilt without the
   movement. */
.linkedin-profile {
  display: grid;
  width: var(--linkedin-width);
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius-area-media);
  background: var(--cream);
  color: var(--pine);
  box-shadow: var(--shadow-linkedin);
  text-align: left;
  text-decoration: none;
  transform: rotate(var(--linkedin-tilt));
  transition: transform 0.25s var(--ease);
}

.linkedin-profile:is(:hover, :focus-visible) {
  transform: rotate(0deg) translateY(-4px);
}

.linkedin-profile:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: 6px;
}

.linkedin-profile-top {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
}

.linkedin-profile-top img {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
}

.linkedin-profile-top span {
  display: grid;
  flex: 1;
}

.linkedin-profile-top strong {
  font-size: var(--text-base);
  line-height: 1.4;
}

.linkedin-profile-top small {
  color: var(--muted);
  font-size: var(--text-xs);
  line-height: 1.5;
}

.linkedin-profile-top svg {
  width: 21px;
  height: 21px;
  color: var(--purple);
}

.linkedin-profile-cover {
  position: relative;
  display: grid;
  place-items: center;
  height: var(--linkedin-cover);
  overflow: hidden;
  background: var(--purple);
}

.linkedin-profile-cover img {
  position: relative;
  z-index: 1;
  width: 8.4375rem;
  height: auto;
}

.linkedin-outline {
  position: absolute;
  top: var(--space-3);
  left: var(--linkedin-outline-x);
  width: 145px;
  height: 145px;
  border: 1px solid var(--linkedin-outline);
  border-radius: 40px;
  transform: rotate(-18deg);
}

.linkedin-cover-square {
  position: absolute;
  top: var(--linkedin-square-y);
  right: calc(-1 * var(--space-4));
  width: 65px;
  height: 65px;
  border-radius: 20px;
  background: var(--lime);
  transform: rotate(15deg);
}

.linkedin-profile-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-md);
  font-weight: 650;
}

.linkedin-profile-bottom > span:last-child {
  font-size: var(--text-icon);
  font-weight: 400;
}

.linkedin-profile:hover .linkedin-profile-bottom span:first-child {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

html.reduce-motion .linkedin-profile:is(:hover, :focus-visible) {
  transform: rotate(var(--linkedin-tilt));
}

@media (prefers-reduced-motion: reduce) {
  .linkedin-profile:is(:hover, :focus-visible) {
    transform: rotate(var(--linkedin-tilt));
  }
}

.instagram-cta {
  display: grid;
  justify-items: center;
  gap: var(--space-5);
  margin-top: var(--space-8);
  text-align: center;
}

.instagram-cta p {
  color: var(--pine);
}

/* "Follow @elos.system": the hero button's size, with the prototype's
   purple hover and a deeper ledge. */
.button-raised.instagram-follow {
  gap: var(--pilot-gap);
  min-height: var(--pilot-height);
  padding: var(--pilot-padding);
  font-size: var(--text-pilot);
  letter-spacing: 0.045em;
}

.button-raised.instagram-follow:hover {
  background: var(--purple-bright);
  color: var(--cream);
  box-shadow: var(--shadow-ledge-raised);
}

.button-raised.instagram-follow:active {
  box-shadow: var(--shadow-ledge-pressed);
}

.instagram-follow > span {
  font-size: var(--text-follow-arrow);
  line-height: 1;
}

.instagram-follow svg {
  width: 23px;
  height: 23px;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .social-heading {
    grid-template-columns: auto auto;
    align-items: center;
    justify-content: center;
    gap: var(--space-9);
    text-align: left;
  }

  .social-heading-copy {
    justify-items: start;
  }

  .social-icon-links {
    justify-content: flex-start;
  }
}

/* "Stronger contrast": solid outlines where the page uses tints. */
html.high-contrast .area-notes li,
html.high-contrast .card,
html.high-contrast .pill-button,
html.high-contrast .field input,
html.high-contrast .field select {
  border: var(--border-strong);
}

html.high-contrast .area-media img {
  filter: none;
}

/* --- Section dots ("Page sections") -------------------------------------------
   A fixed row of dots, one per section, with the section's name on hover or
   focus; landing.js marks the one being read. Below 1024 px it sits at the
   bottom centre (the side gutters are too narrow for it) once the hero has
   scrolled away; from 1024 px it is always on the left edge. The page keeps scroll room under it, so a focused link never
   ends up behind it. */
.section-companion {
  position: fixed;
  bottom: max(var(--space-3), env(safe-area-inset-bottom));
  left: 50%;
  z-index: 9;
  display: grid;
  grid-auto-flow: column;
  padding: 0 var(--space-2);
  border: 1px solid var(--dots-border);
  border-radius: var(--radius-pill);
  background: var(--dots-surface);
  box-shadow: var(--dots-shadow);
  color: var(--pine);
  transform: translateX(-50%);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

html:has(.section-companion) {
  scroll-padding-bottom: var(--space-9);
}

/* Phones and tablets: hidden while the hero is on screen, so it never covers
   the hero's call to action or map (landing.js adds .is-shown). */
.section-companion:not(.is-shown) {
  visibility: hidden;
  opacity: 0;
}

.section-companion {
  transition: opacity var(--duration-base) var(--ease), visibility var(--duration-base) var(--ease);
}

.section-companion a {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.125rem;
  height: 2.25rem;
  border-radius: 50%;
  color: inherit;
  text-decoration: none;
}

.section-companion-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pine);
  opacity: 0.35;
  transition: opacity var(--duration-base) var(--ease), box-shadow var(--duration-base) var(--ease);
}

.section-companion [aria-current='location'] .section-companion-dot {
  opacity: 1;
  box-shadow: 0 0 0 4px var(--lime);
}

.section-companion a:hover .section-companion-dot {
  opacity: 1;
}

.section-companion-label {
  position: absolute;
  bottom: calc(100% + var(--space-2));
  left: 50%;
  width: max-content;
  max-width: min(15rem, 70vw);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--dots-border);
  border-radius: var(--radius-sm);
  background: var(--cream);
  color: var(--pine);
  font-size: var(--text-xs);
  font-weight: 600;
  line-height: 1.4;
  opacity: 0;
  clip-path: inset(50%);
  pointer-events: none;
  transform: translateX(-50%);
}

.section-companion a:is(:hover, :focus-visible) .section-companion-label {
  opacity: 1;
  clip-path: none;
}

.section-companion a:focus-visible {
  outline: var(--focus-width) solid var(--focus-ring);
  outline-offset: 2px;
}

@media (min-width: 1024px) {
  .section-companion {
    top: 50%;
    bottom: auto;
    left: var(--space-1);
    grid-auto-flow: row;
    padding: var(--space-1) 0;
    transform: translateY(-50%);
  }

  html:has(.section-companion) {
    scroll-padding-bottom: 0;
  }

  .section-companion:not(.is-shown) {
    visibility: visible;
    opacity: 1;
  }

  .section-companion a {
    width: 1.625rem;
    height: 2.125rem;
  }

  .section-companion-label {
    bottom: auto;
    left: calc(100% + var(--space-2));
    transform: none;
  }
}

html.high-contrast .section-companion {
  border-color: var(--pine);
  background: var(--cream);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

@supports not (backdrop-filter: blur(1px)) {
  .section-companion {
    background: var(--cream);
  }
}

@media print {
  .section-companion {
    display: none;
  }
}

/* The arrow in the gap beside the form (decorative), with a short line into
   the form's edge: only when the two sit side by side. */
.signup-origin {
  display: none;
}

@media (min-width: 1024px) {
  .signup-origin {
    position: absolute;
    top: 50%;
    left: calc(-0.5 * var(--space-9) - var(--signup-origin) / 2);
    display: grid;
    place-items: center;
    width: var(--signup-origin);
    height: var(--signup-origin);
    border-radius: var(--radius-lg);
    background: var(--lime);
    color: var(--pine);
    transform: translateY(-50%);
  }

  .signup-origin svg {
    width: 50%;
    height: 50%;
  }

  .signup-origin::after {
    content: '';
    position: absolute;
    top: calc(50% - 1px);
    left: 100%;
    width: calc(0.5 * var(--space-9) - var(--signup-origin) / 2);
    height: 2px;
    background: var(--signup-line);
  }
}
