:root {
  /* Shared palette used throughout the site. */
  --blue: #073bd4;
  --blue-dark: #062d8e;
  --navy: #061e54;
  --orange: #ff8d4a;
  --paper: #f8f6ef;
  --ink: #112042;
  --muted: #61708d;
  --line: #d9ddd9;
  --white: #fff;
}

/* Base document defaults and reusable layout helpers. */
* { box-sizing: border-box; }
body { overflow-x: hidden; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.story-section, .work-section, .robot-section, .blog-section, #top { scroll-margin-top: 96px; }
.shell { width: min(1180px, calc(100% - 64px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 94%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); font-family: "Barlow Condensed", sans-serif; font-size: 1.45rem; font-weight: 800; letter-spacing: .05em; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
nav { display: flex; align-items: center; gap: 28px; color: #53627e; font-size: .82rem; font-weight: 700; }
nav a:not(.button):hover, .footer-links a:hover { color: var(--orange); }
.language-switcher { display: inline-flex; align-items: center; gap: 5px; margin-left: -8px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.language-option { padding: 5px 4px; color: inherit; background: transparent; border: 0; border-radius: 2px; font: inherit; cursor: pointer; }
.language-option:hover, .language-option.is-active { color: var(--navy); }
.language-option.is-active { background: #e5eaff; }
.menu-toggle { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.button { display: inline-flex; align-items: center; gap: 13px; padding: 14px 20px; color: var(--white); background: var(--blue); border: 0; border-radius: 2px; font-size: .78rem; font-weight: 700; transition: transform .2s ease, background .2s ease; }
.button:hover { background: var(--blue-dark); transform: translateY(-2px); }
.button-small { padding: 11px 16px; }

/* ------------------------------
   Hero and animated title
   ------------------------------ */
/* The hero title reserves space for rotating phrases so nearby content never shifts. */
.hero { padding: 48px 0 112px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(36px, 6vw, 80px); }
.hero-copy { min-width: 0; container-type: inline-size; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; color: var(--blue); font-size: .75rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { width: 28px; height: 2px; background: var(--orange); content: ""; }
h1, h2, h3 { margin: 0; font-family: "Barlow Condensed", sans-serif; text-transform: uppercase; }
h1 { max-width: 470px; color: var(--navy); font-size: clamp(5.2rem, 11vw, 9.6rem); font-size: clamp(5.2rem, 24cqw, 9.6rem); line-height: .79; letter-spacing: -.04em; text-wrap: balance; }
html[lang="es"] h1 { font-size: clamp(4.7rem, 9vw, 8.2rem); font-size: clamp(4.7rem, 22cqw, 8.2rem); }
h1 span { color: var(--orange); }
.phrase-cube { position: relative; display: block; width: 100%; font-size: .92em; overflow: visible; }
.phrase-cube-track { display: block; }
.phrase-cube-face { display: none; width: 100%; max-width: 100%; white-space: normal; overflow-wrap: normal; }
.phrase-cube-face.is-active { display: block; }
/* JavaScript adds one character at a time; this cursor provides the keyboard effect. */
.phrase-cube-face.is-active::after { display: inline-block; width: .06em; height: .82em; margin-left: .08em; vertical-align: -.04em; background: currentColor; content: ""; animation: typing-cursor .8s steps(1) infinite; }
@keyframes typing-cursor {
  50% { opacity: 0; }
}
.lede { max-width: 430px; margin: 30px 0 34px; color: var(--muted); font-size: 1.02rem; }
.actions { display: flex; align-items: center; gap: 24px; }
.underlined-link { display: inline-flex; align-items: center; gap: 9px; color: var(--navy); border-bottom: 1px solid var(--orange); padding-bottom: 5px; font-size: .8rem; font-weight: 800; }
.underlined-link:hover { color: var(--orange); }
.hero-art { position: relative; padding: 0 17px 17px 0; }
.hero-art::after { position: absolute; right: -25px; bottom: -5px; width: 130px; height: 130px; background: var(--orange); content: ""; z-index: -1; }
.hero-frame { position: absolute; inset: 28px 0 0 28px; border: 2px solid var(--orange); z-index: -1; }
.hero-art img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; box-shadow: 17px 17px 0 var(--navy); }
.hero-stamp { position: absolute; right: -10px; bottom: 46px; padding: 10px 14px; color: #fff; background: var(--orange); font-family: "Barlow Condensed", sans-serif; font-size: .85rem; letter-spacing: .1em; line-height: .9; text-align: center; transform: rotate(-4deg); }
.hero-stamp strong { font-size: 1.8rem; }

/* ------------------------------
   Stats and story sections
   ------------------------------ */
.stats { color: #fff; background: var(--navy); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { padding: 26px 30px; border-right: 1px solid rgba(255,255,255,.17); }
.stat:last-child { border: 0; }
.stat strong { display: block; color: var(--orange); font-family: "Barlow Condensed", sans-serif; font-size: 2.5rem; line-height: 1; }
.flag-panama { display: inline-block; width: 1.25em; height: .83em; margin-right: .3em; vertical-align: -.04em; border: 1px solid rgba(255,255,255,.65); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.stat span { color: #c2d0ef; font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
section { padding: 112px 0; }
.section-intro { display: grid; grid-template-columns: 1fr .6fr; align-items: end; gap: 40px; margin-bottom: 55px; }
.section-intro .eyebrow { grid-column: 1 / -1; margin-bottom: -20px; }
h2 { color: var(--navy); font-size: clamp(3.7rem, 7vw, 6.8rem); line-height: .82; letter-spacing: -.03em; }
h2 em { color: var(--orange); font-style: normal; }
.section-intro > p:last-child, .section-heading > p { max-width: 360px; margin: 0; color: var(--muted); }
.story-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 88px; }
.story-image { position: relative; }
.story-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 12% center; }
.story-image span { position: absolute; right: -14px; bottom: 20px; padding: 11px 15px; color: #fff; background: var(--blue); font-family: "Barlow Condensed", sans-serif; font-size: 1rem; letter-spacing: .06em; }
.story-copy p { margin: 0 0 18px; color: var(--muted); }
blockquote { margin: 30px 0 0; padding-left: 19px; border-left: 3px solid var(--orange); color: var(--navy); font-family: "Barlow Condensed", sans-serif; font-size: 1.65rem; line-height: 1.05; }

/* ------------------------------
   Work, robot, and season sections
   ------------------------------ */
.work-section { background: #fff; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 48px; }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.work-card { min-height: 225px; padding: 25px 29px 10px 0; border-right: 1px solid var(--line); }
.work-card:not(:first-child) { padding-left: 29px; }
.work-card:last-child { border: 0; }
.work-card > span { color: var(--orange); font-family: "Barlow Condensed", sans-serif; font-size: 1.3rem; }
.work-card h3 { margin: 32px 0 8px; color: var(--navy); font-size: 2rem; }
.work-card p { max-width: 280px; margin: 0; color: var(--muted); font-size: .9rem; }
.robot-section { padding: 52px 0 56px; background: var(--paper); }
.robot-heading { display: grid; grid-template-columns: .85fr 1fr; align-items: end; gap: 36px; max-width: 820px; margin: 0 auto 24px; }
.robot-heading h2 { font-size: clamp(3.2rem, 5vw, 4.8rem); }
.robot-heading > p { max-width: 440px; margin: 0 0 4px; color: var(--muted); }
.robot-viewer { width: min(100%, 820px); margin: 0 auto; overflow: hidden; background: #d9d9d9; border: 1px solid #c4c9d2; box-shadow: 16px 16px 0 var(--navy); }
.robot-viewer iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; background: #d9d9d9; }
.robot-viewer-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; color: #d9e5ff; background: var(--navy); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.robot-viewer-footer .underlined-link { color: #fff; font-size: .72rem; }
.robot-fallback { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: min(100%, 820px); margin: 14px auto 0; padding: 12px 16px; color: var(--muted); background: #fff; border-left: 3px solid var(--orange); font-size: .8rem; }
.robot-fallback a { display: inline-flex; flex: 0 0 auto; align-items: center; color: var(--blue); font-weight: 700; }
@media (max-width: 700px) {
  .robot-viewer { box-shadow: 8px 8px 0 var(--navy); }
  .robot-viewer-footer { align-items: flex-start; flex-direction: column; gap: 12px; padding: 15px 16px; }
}
.season-section { padding-top: 0; background: #fff; }
.season-card { display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; color: #fff; background: var(--blue); }
.season-content { padding: 66px 58px; }
.season-content h2 { color: #fff; }
.season-content > p:not(.eyebrow) { max-width: 340px; margin: 26px 0 30px; color: #d7e3ff; }
.light { color: #fff; }
.season-art { min-width: 0; min-height: 0; aspect-ratio: 4 / 3; background: var(--orange); overflow: hidden; }
.season-art img { width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: center; mix-blend-mode: multiply; }
.blog-section { background: var(--paper); }
.blog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.blog-card { display: grid; grid-template-rows: auto 1fr; min-width: 0; background: #fff; transition: transform .2s ease; }
.blog-card:hover { transform: translateY(-5px); }
.blog-image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--blue); }
.blog-1 .blog-image { aspect-ratio: 5 / 3; }
.blog-image img { width: 100%; height: 100%; object-fit: cover; }
.blog-2 .blog-image img { object-position: top; }
.blog-body { padding: 18px 18px 22px; }
.blog-body > span { color: var(--orange); font-size: .7rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.blog-body h3 { margin: 9px 0 7px; color: var(--navy); font-size: 1.7rem; line-height: .95; }
.blog-body p { margin: 0; color: var(--muted); font-size: .82rem; }

/* ------------------------------
   Sponsors and footer
   ------------------------------ */
.sponsors-section { padding-top: 0; background: var(--paper); }
.sponsor-card { display: grid; grid-template-columns: .65fr 1.35fr; align-items: center; gap: 48px; padding: 44px 48px; color: #fff; background: var(--navy); overflow: hidden; }
.sponsor-card-heading h2 { color: #fff; font-size: clamp(3rem, 5vw, 5rem); }
.sponsor-card-heading > p:last-child { max-width: 270px; margin: 18px 0 0; color: #c2d0ef; font-size: .85rem; }
.sponsor-carousel { position: relative; min-width: 0; overflow: hidden; }
.sponsor-carousel::before, .sponsor-carousel::after { position: absolute; top: 0; bottom: 0; z-index: 1; width: 48px; content: ""; pointer-events: none; }
.sponsor-carousel::before { left: 0; background: linear-gradient(90deg, var(--navy), transparent); }
.sponsor-carousel::after { right: 0; background: linear-gradient(270deg, var(--navy), transparent); }
/* The duplicated logo set makes this track loop continuously without a visible jump. */
.sponsor-track { display: flex; width: max-content; align-items: center; gap: 16px; animation: sponsor-scroll 28s linear infinite; }
.sponsor-logo { display: grid; width: 150px; height: 104px; place-items: center; padding: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: 2px; }
.sponsor-logo img { display: block; width: auto; max-width: 100%; height: auto; max-height: 65px; object-fit: contain; }
.sponsor-logo:nth-child(5n) img { max-height: 76px; }
.sponsor-logo:nth-child(6n) img { max-height: 58px; }
@keyframes sponsor-scroll { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 8px)); } }
footer { position: relative; padding: 36px 0 16px; color: #b6c6e7; background: linear-gradient(135deg, var(--navy), #082b72); overflow: hidden; }
footer::before { position: absolute; top: 0; right: 10%; width: 120px; height: 3px; background: var(--orange); content: ""; }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.brand-light { color: #fff; }
footer p { margin: 8px 0 0; font-size: .75rem; }
.footer-links { display: flex; align-items: center; gap: 6px; color: #fff; font-size: .72rem; font-weight: 700; }
.footer-links a { padding: 7px 9px; border: 1px solid rgba(255,255,255,.18); border-radius: 2px; }
.footer-links a:hover { background: rgba(255,255,255,.1); }
.footer-team { margin-top: 24px; padding-top: 16px; color: #fff; border-top: 1px solid rgba(255,255,255,.17); font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.footer-sponsor { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding-top: 14px; color: #b6c6e7; border-top: 1px solid rgba(255,255,255,.1); font-size: .65rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.footer-sponsor a { display: inline-flex; align-items: center; gap: 9px; color: #fff; }
.footer-sponsor a:hover { color: var(--orange); }
.footer-sponsor img { width: auto; height: 26px; max-width: 140px; object-fit: contain; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 12px; color: #8fa6d1; border-top: 1px solid rgba(255,255,255,.1); font-size: .6rem; letter-spacing: .05em; text-transform: uppercase; }
.noscript-message { min-height: 100vh; padding: 10vw; background: var(--paper); }
.noscript-message h1 { font-size: 5rem; }

/* ------------------------------
   Responsive layout
   ------------------------------ */
@media (max-width: 980px) {
  .hero-grid { gap: 42px; }
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sponsor-card { gap: 30px; padding-inline: 32px; }
}
@media (max-width: 860px) {
  .shell { width: min(100% - 34px, 560px); }
  .story-section, .work-section, .robot-section, .blog-section, #top { scroll-margin-top: 72px; }
  .nav-wrap { min-height: 70px; }
  .menu-toggle { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 0; color: var(--navy); background: transparent; border: 1px solid var(--line); border-radius: 2px; cursor: pointer; }
  .menu-toggle > span:not(.sr-only) { display: block; width: 18px; height: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease; }
  .menu-toggle[aria-expanded="true"] > span:nth-child(2) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] > span:nth-child(3) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] > span:nth-child(4) { transform: translateY(-7px) rotate(-45deg); }
  nav { position: absolute; top: 100%; right: 17px; left: 17px; display: none; align-items: stretch; flex-direction: column; gap: 0; padding: 8px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 12px 24px rgba(6, 30, 84, .12); }
  nav.is-open { display: flex; }
  nav a { padding: 13px 12px; }
  nav .language-switcher { margin: 4px 12px 8px; padding: 9px 12px; }
  nav .button { justify-content: center; margin-top: 4px; }
  .hero { padding: 38px 0 82px; }
  .hero-grid, .story-grid, .season-card { grid-template-columns: 1fr; gap: 50px; }
  h1 { font-size: clamp(4.4rem, 22vw, 7.6rem); font-size: clamp(4.4rem, 22cqw, 7.6rem); }
  .hero-art { margin-right: 8px; }
  .stats-grid, .work-grid, .blog-grid { grid-template-columns: 1fr; }
  .stat { padding: 18px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.17); }
  .stat:last-child { border-bottom: 0; }
  section { padding: 76px 0; }
  .section-intro { display: block; }
  .section-intro .eyebrow { margin-bottom: 18px; }
  .section-intro > p:last-child { margin-top: 22px; }
  .story-image img { aspect-ratio: 5 / 4; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 22px; }
  .robot-section { padding: 58px 0 70px; }
  .robot-heading { display: block; margin-bottom: 24px; }
  .robot-heading > p { margin-top: 22px; }
  .robot-viewer { box-shadow: 8px 8px 0 var(--navy); }
  .robot-viewer iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .robot-viewer-footer { align-items: flex-start; flex-direction: column; gap: 14px; }
  .robot-fallback { align-items: flex-start; flex-direction: column; gap: 8px; }
  .work-grid { border-top: 0; }
  .work-card, .work-card:not(:first-child) { min-height: 0; padding: 27px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .season-content { padding: 40px 28px; }
  .season-art { min-height: 0; aspect-ratio: 16 / 9; }
  .season-art img { min-height: 0; }
  .footer-grid { align-items: flex-start; flex-direction: column; }
  .footer-links { order: -1; flex-wrap: wrap; }
  .footer-team { margin-top: 20px; }
  .footer-sponsor { align-items: flex-start; flex-direction: column; gap: 9px; }
  .sponsor-card { grid-template-columns: 1fr; gap: 26px; padding: 34px 24px; }
  .sponsor-card-heading > p:last-child { max-width: 100%; }
  .sponsor-logo { width: 132px; height: 92px; }
  .sponsor-track { gap: 12px; }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: 6px; }
}
@media (max-width: 520px) {
  .shell { width: min(100% - 28px, 440px); }
  .brand { font-size: 1.25rem; }
  .brand img { width: 34px; height: 34px; }
  .hero { padding: 32px 0 64px; }
  .hero-copy .eyebrow { align-items: flex-start; }
  h1 { font-size: clamp(3.8rem, 20vw, 5.8rem); font-size: clamp(3.8rem, 22cqw, 5.8rem); }
  html[lang="es"] h1 { font-size: clamp(3.5rem, 18vw, 5.2rem); font-size: clamp(3.5rem, 20cqw, 5.2rem); }
  .lede { margin: 24px 0 28px; font-size: .95rem; }
  .actions { align-items: stretch; flex-direction: column; gap: 18px; }
  .actions .button { justify-content: center; }
  .hero-art { margin-right: 2px; padding-right: 9px; }
  .hero-art img { box-shadow: 9px 9px 0 var(--navy); }
  .hero-frame { inset: 16px 0 0 16px; }
  .hero-stamp { right: -5px; bottom: 22px; }
  .stat { padding: 16px 0; }
  .section-heading, .robot-heading { gap: 24px; }
  .section-heading h2, .robot-heading h2 { font-size: clamp(3.2rem, 17vw, 4.8rem); }
  .sponsor-card { padding: 30px 20px; }
}

/* Disable decorative motion for visitors who prefer reduced movement. */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } .sponsor-track { animation: none; } .phrase-cube-face.is-active::after { animation: none; } }

/* Header refinements are kept here so they override the base header rules above. */
.site-header { background: rgba(244, 247, 251, .86); border-bottom-color: rgba(220, 227, 239, .9); }
.site-header > .shell { width: min(1220px, calc(100% - 48px)); }
.nav-wrap { min-height: 76px; }
.brand { font-size: 1.35rem; letter-spacing: .02em; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 5px 14px rgba(8, 27, 73, .15); }
nav { gap: 22px; color: #667694; }
nav a:not(.button) { transition: color .2s ease; }
.site-header .button { border-radius: 8px; background: #1754e8; box-shadow: 0 8px 18px rgba(23, 84, 232, .2); }
.site-header .language-switcher { margin-left: 0; padding: 3px; background: #eaf0fb; border-radius: 8px; }
.site-header .language-option { padding: 6px 8px; }
.site-header .language-option.is-active { color: #0d328f; background: #fff; box-shadow: 0 2px 7px rgba(8, 27, 73, .1); }
footer { background: linear-gradient(135deg, #07183e, #123b91); }

@media (max-width: 860px) {
  .site-header > .shell { width: min(100% - 34px, 620px); }
}

@media (max-width: 520px) {
  .site-header > .shell { width: min(100% - 28px, 460px); }
}
