/* =========================================================
   ÉKOLE — Creative Lab
   Dark mode • Neural patterns • Logo accents
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,300;12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Geist+Mono:wght@300;400;500&family=Manrope:wght@300;400;500;600;700&display=swap');

:root {
  /* Logo palette */
  --c-blue:    #2B7FE0;
  --c-red:     #E63946;
  --c-yellow:  #F4C430;
  --c-sky:     #4DB5E3;
  --c-green:   #5CB339;

  /* Foundations — DAY (default) */
  --bg-0:      #FAFAF7;
  --bg-1:      #F2F1EC;
  --bg-2:      #E8E6DE;
  --line:      rgba(7,9,14,0.08);
  --line-2:    rgba(7,9,14,0.16);
  --ink:       #07090E;
  --ink-mute:  #4A5060;
  --ink-soft:  #6F7689;
  --nav-bg:    rgba(250,250,247,0.72);
  --term-bg:   #FFFFFF;
  --term-body: #FBFAF6;

  /* Type */
  --f-display: 'Bricolage Grotesque', 'Times New Roman', serif;
  --f-body:    'Manrope', system-ui, sans-serif;
  --f-mono:    'Geist Mono', ui-monospace, monospace;

  /* Motion */
  --ease: cubic-bezier(.2,.7,.1,1);
}

:root[data-theme="dark"] {
  --bg-0:      #07090E;
  --bg-1:      #0C1018;
  --bg-2:      #131826;
  --line:      rgba(255,255,255,0.08);
  --line-2:    rgba(255,255,255,0.14);
  --ink:       #F2F1EC;
  --ink-mute:  #A6ADBE;
  --ink-soft:  #6F7689;
  --nav-bg:    rgba(7,9,14,0.65);
  --term-bg:   #0C1018;
  --term-body: #07090E;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background: var(--bg-0);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

/* Subtle global grain + neural mesh */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background-image:
    radial-gradient(800px 500px at 12% -5%, rgba(43,127,224,.18), transparent 60%),
    radial-gradient(700px 500px at 95% 8%, rgba(230,57,70,.10), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(92,179,57,.10), transparent 60%);
  mix-blend-mode: multiply;
}

:root[data-theme="dark"] body::before { mix-blend-mode: screen; }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.06 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.18;
}

:root[data-theme="dark"] body::after { opacity: 0.5; }

main, header, footer { position: relative; z-index: 3; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

::selection { background: var(--c-yellow); color: var(--bg-0); }

/* =========================================================
   LAYOUT PRIMITIVES
   ========================================================= */
.shell {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.025em;
}

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  font-size: 26px;
  line-height: 1;
}
.brand-mark span:nth-child(1) { color: var(--c-blue); }
.brand-mark span:nth-child(2) { color: var(--c-red); }
.brand-mark span:nth-child(3) { color: var(--c-yellow); }
.brand-mark span:nth-child(4) { color: var(--c-sky); }
.brand-mark span:nth-child(5) { color: var(--c-green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mute);
  position: relative;
  transition: color .25s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 0; height: 1px;
  background: var(--c-yellow);
  transition: width .3s var(--ease);
}
.nav-links a:hover::after { width: 100%; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.lang-toggle button {
  background: transparent;
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink-mute);
  transition: all .25s var(--ease);
}
.lang-toggle button.active {
  background: var(--ink);
  color: var(--bg-0);
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-mute);
  margin-left: 4px;
  transition: color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--c-yellow);
  transform: rotate(15deg);
}
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun  { display: inline-block; }
:root[data-theme="dark"] .theme-toggle .icon-sun  { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: inline-block; }

/* mobile nav */
.nav-burger { display: none; }

@media (max-width: 800px) {
  .nav-links a:not(.lang-wrap) { display: none; }
  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: 1px solid var(--line-2);
    padding: 10px;
    border-radius: 8px;
  }
  .nav-burger span { width: 16px; height: 1.5px; background: var(--ink); }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
  padding: 100px 0 80px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(48px, 7vw, 96px);
  margin-top: 24px;
  margin-bottom: 28px;
}
.hero h1 .accent-1 { color: var(--c-blue); font-style: italic; font-family: var(--f-display); }
.hero h1 .accent-2 { color: var(--c-red); }
.hero h1 .accent-3 { color: var(--c-yellow); }
.hero h1 .accent-4 { color: var(--c-green); }
.hero h1 .underline {
  position: relative;
  display: inline-block;
}
.hero h1 .underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 14px;
  background: var(--c-yellow);
  opacity: 0.35;
  z-index: -1;
  transform: skewX(-8deg);
}

.hero-lede {
  font-size: 18px;
  color: var(--ink-mute);
  max-width: 540px;
  margin-bottom: 36px;
}
.hero-lede strong { color: var(--ink); font-weight: 500; }

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--bg-0);
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 0;
  transition: all .3s var(--ease);
}
.hero-cta:hover {
  background: var(--c-yellow);
  transform: translateY(-2px);
}
.hero-cta .arrow { transition: transform .3s var(--ease); }
.hero-cta:hover .arrow { transform: translate(3px, -3px); }

.hero-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: 20px;
  color: var(--ink-mute);
  font-family: var(--f-mono);
  font-size: 13px;
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 4px;
  transition: all .25s var(--ease);
}
.hero-cta-secondary:hover { color: var(--ink); border-color: var(--c-yellow); }

/* Hero visual — illustration of kid + neural net */
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line-2);
}
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(43,127,224,.4), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(244,196,48,.25), transparent 50%);
}
.hero-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: luminosity;
  opacity: 0.85;
  filter: contrast(1.05) saturate(1.1);
}

/* tag chips floating on hero visual */
.hero-tags {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-tag {
  position: absolute;
  background: rgba(7,9,14,0.75);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: floatBob 6s ease-in-out infinite;
}
.hero-tag .dot { width: 6px; height: 6px; border-radius: 50%; }
.hero-tag.t1 { top: 12%; left: -4%; animation-delay: 0s; }
.hero-tag.t1 .dot { background: var(--c-blue); }
.hero-tag.t2 { top: 50%; right: -10%; animation-delay: 1.2s; }
.hero-tag.t2 .dot { background: var(--c-red); }
.hero-tag.t3 { bottom: 8%; left: 8%; animation-delay: 2.4s; }
.hero-tag.t3 .dot { background: var(--c-green); }

@keyframes floatBob {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 50px; }
  .hero-visual { aspect-ratio: 4/3; }
  .hero { padding: 60px 0 40px; }
}

/* =========================================================
   SECTION FRAMING
   ========================================================= */
section { padding: 100px 0; position: relative; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 60px;
}
.section-head h2 {
  font-size: clamp(36px, 5vw, 60px);
  max-width: 720px;
}
.section-head .meta {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
}

/* =========================================================
   PARTNERS — Marquee
   ========================================================= */
.partners {
  background: linear-gradient(180deg, transparent, rgba(43,127,224,0.03) 50%, transparent);
}
.partner-card {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, var(--bg-1), rgba(19,24,38,0.4));
  transition: all .4s var(--ease);
  position: relative;
  overflow: hidden;
}
.partner-card:hover {
  border-color: var(--line-2);
  transform: translateY(-4px);
}
.partner-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(244,196,48,0.08), transparent 40%);
  opacity: 0;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.partner-card:hover::before { opacity: 1; }

.partner-logo {
  font-family: var(--f-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.partner-logo .tilde { color: var(--c-yellow); }
.partner-body p {
  color: var(--ink-mute);
  margin-top: 6px;
  font-size: 15px;
  max-width: 540px;
}
.partner-body .partner-name {
  font-family: var(--f-display);
  font-size: 22px;
  color: var(--ink);
  font-weight: 600;
}
.partner-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13px;
  font-family: var(--f-mono);
  letter-spacing: 0.05em;
  transition: all .25s var(--ease);
  white-space: nowrap;
}
.partner-link:hover {
  background: var(--ink);
  color: var(--bg-0);
  border-color: var(--ink);
}

@media (max-width: 800px) {
  .partner-card { grid-template-columns: 1fr; gap: 20px; padding: 28px; }
}

/* =========================================================
   FUNDING
   ========================================================= */
.funding {
  position: relative;
}
.funding-banner {
  font-family: var(--f-display);
  font-size: clamp(60px, 9vw, 140px);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 60px;
  font-weight: 700;
}
.funding-banner .amount {
  background: linear-gradient(120deg, var(--c-yellow), var(--c-red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  display: inline-block;
  padding: 0 0.08em 0.04em 0;
  overflow: visible;
}

.funding-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.funding-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 32px;
  background: var(--bg-1);
  transition: all .35s var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 220px;
}
.funding-card:hover {
  border-color: var(--c-yellow);
  background: linear-gradient(180deg, var(--bg-1), rgba(244,196,48,0.04));
}
.funding-card .num {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: auto;
}
.funding-card .name {
  font-family: var(--f-display);
  font-size: 26px;
  font-weight: 600;
  margin-top: 60px;
  margin-bottom: 8px;
}
.funding-card .desc {
  font-size: 14px;
  color: var(--ink-mute);
  margin-bottom: 20px;
}
.funding-card .arrow-link {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-mute);
  transition: color .25s var(--ease), gap .25s var(--ease);
}
.funding-card:hover .arrow-link {
  color: var(--c-yellow);
  gap: 14px;
}

@media (max-width: 800px) {
  .funding-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact {
  border-top: 1px solid var(--line);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
}
.contact-intro h2 {
  font-size: clamp(36px, 5vw, 60px);
  margin: 24px 0 20px;
}
.contact-intro p {
  color: var(--ink-mute);
  max-width: 460px;
  margin-bottom: 28px;
}
.contact-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--ink-mute);
}
.contact-meta a:hover { color: var(--c-yellow); }

form.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.field input, .field textarea, .field select {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-2);
  padding: 12px 0;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  transition: border-color .25s var(--ease);
  resize: vertical;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-bottom-color: var(--c-yellow);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }

.submit-btn {
  align-self: flex-start;
  margin-top: 12px;
  background: var(--c-yellow);
  color: var(--bg-0);
  padding: 16px 32px;
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all .3s var(--ease);
}
.submit-btn:hover { background: var(--ink); transform: translateY(-2px); }

@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .field-row { grid-template-columns: 1fr; gap: 18px; }
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.05em;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* =========================================================
   /maimo-ai PAGE
   ========================================================= */
.page-hero {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--line);
}
.page-crumb {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.page-crumb a { color: var(--ink-mute); }
.page-crumb a:hover { color: var(--c-yellow); }
.page-hero h1 {
  font-size: clamp(48px, 8vw, 110px);
  font-weight: 700;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
}
.page-hero h1 em {
  font-style: italic;
  color: var(--c-blue);
}
.page-hero .lede {
  font-size: 19px;
  color: var(--ink-mute);
  max-width: 680px;
}

.curriculum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.video-shell {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line-2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-shell--short {
  aspect-ratio: 9/16;
  max-width: 380px;
  margin-inline: auto;
  width: 100%;
}
.video-shell iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 30% 30%, rgba(43,127,224,.3), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(230,57,70,.2), transparent 50%);
}
.video-placeholder {
  position: relative;
  text-align: center;
  z-index: 2;
}
.play-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--c-yellow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  cursor: pointer;
  transition: transform .3s var(--ease);
  box-shadow: 0 0 0 0 rgba(244,196,48,0.4);
  animation: pulseRing 2.4s infinite;
}
.play-btn:hover { transform: scale(1.08); }
.play-btn svg { color: var(--bg-0); margin-left: 4px; }
@keyframes pulseRing {
  0%   { box-shadow: 0 0 0 0 rgba(244,196,48,0.5); }
  70%  { box-shadow: 0 0 0 24px rgba(244,196,48,0); }
  100% { box-shadow: 0 0 0 0 rgba(244,196,48,0); }
}
.video-placeholder p {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.curriculum-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.curriculum-list li {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.curriculum-list li:first-child { padding-top: 0; }
.curriculum-list .step-num {
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.1em;
}
.curriculum-list h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}
.curriculum-list h3 .dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: middle;
}
.curriculum-list p {
  color: var(--ink-mute);
  font-size: 15px;
}

@media (max-width: 900px) {
  .curriculum-grid { grid-template-columns: 1fr; }
}

/* Demo embed */
.demo-section {
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.demo-callout {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px;
  border: 1px solid rgba(244,196,48,0.3);
  background: rgba(244,196,48,0.06);
  border-radius: 16px;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--ink);
}
.demo-callout .icon {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--c-yellow);
  color: var(--bg-0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--f-mono);
}
.demo-callout strong { font-weight: 600; }
.demo-callout a {
  color: var(--c-yellow);
  border-bottom: 1px solid currentColor;
}
.demo-callout a:hover { color: var(--ink); }

.demo-frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--bg-0);
  height: min(82vh, 900px);
}
.demo-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* =========================================================
   ANIMATIONS — On scroll reveal
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* lang visibility — JS populates textContent from data-fr/data-en */

/* =========================================================
   HERO TERMINAL — Ékole Assistant (chat / cream aesthetic)
   ========================================================= */

/* Terminal owns its own warm-cream palette regardless of page theme */
.hero-terminal {
  --t-bg:        #ECE8D6;        /* outer cream */
  --t-surface:   #ECE8D6;        /* body */
  --t-bubble:    #DEDAC7;        /* slightly darker cream bubbles */
  --t-bubble-edge: rgba(35, 30, 18, 0.10);
  --t-ink:       #1A1611;        /* near-black warm */
  --t-mute:      #5C564A;
  --t-soft:      #8E8775;
  --t-line:      rgba(35, 30, 18, 0.12);
  --t-accent:    #4F8A2E;        /* terminal green */
  --t-yellow:    #D4A82C;
  --t-red:       #C2433B;

  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--t-bg);
  border: 1px solid rgba(35, 30, 18, 0.18);
  box-shadow:
    0 30px 80px -30px rgba(7,9,14,0.55),
    0 8px 24px -8px rgba(7,9,14,0.35),
    inset 0 1px 0 rgba(255,255,255,0.5);
  display: flex;
  flex-direction: column;
  min-height: 520px;
  font-family: var(--f-mono);
  color: var(--t-ink);
}

.term-chrome {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--t-line);
  background: var(--t-bg);
  gap: 14px;
}
.term-dots {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.term-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: inset 0 0 0 0.5px rgba(0,0,0,0.18);
}
.term-dot.d1 { background: #ED6A5E; }   /* red */
.term-dot.d2 { background: #F4BF50; }   /* yellow */
.term-dot.d3 { background: #61C554; }   /* green */

.term-title-mono {
  flex: 1;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--t-mute);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  overflow: hidden;
}
.term-title-mono .term-tilde { color: var(--t-soft); }
.term-title-mono .term-lang-indicator {
  color: var(--t-mute);
  font-weight: 500;
}

.term-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: transparent;
  border: 0;
  color: var(--t-mute);
  flex-shrink: 0;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.term-close:hover {
  background: rgba(35, 30, 18, 0.06);
  color: var(--t-ink);
}

/* Body — chat surface */
.term-body {
  position: relative;
  flex: 1;
  padding: 22px 22px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.55;
  background: var(--t-surface);
  scrollbar-width: thin;
  scrollbar-color: rgba(35,30,18,0.18) transparent;
  max-height: 460px;
  color: var(--t-ink);
}
.term-body::-webkit-scrollbar { width: 6px; }
.term-body::-webkit-scrollbar-thumb {
  background: rgba(35,30,18,0.18);
  border-radius: 3px;
}

/* Each chat exchange */
.term-msg {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 88%;
}
.term-msg-bot  { align-self: flex-start; }
.term-msg-user { align-self: flex-end; align-items: flex-end; }

.term-msg-label {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.term-msg-bot  .term-msg-label { color: var(--t-accent); }
.term-msg-user .term-msg-label { color: #B07A1F; }
.term-msg-err  .term-msg-label { color: var(--t-red); }
.term-msg-sys  .term-msg-label { color: var(--t-soft); }

.term-msg-bubble {
  background: var(--t-bubble);
  border: 1px solid var(--t-bubble-edge);
  border-radius: 10px;
  padding: 14px 16px;
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.55;
  color: var(--t-ink);
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset;
}
.term-msg-user .term-msg-bubble {
  background: rgba(212, 168, 44, 0.14);
  border-color: rgba(212, 168, 44, 0.32);
}
.term-msg-err .term-msg-bubble {
  background: rgba(194, 67, 59, 0.10);
  border-color: rgba(194, 67, 59, 0.32);
  color: #8B2620;
}
.term-msg-sys .term-msg-bubble {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--t-soft);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* Inline blinking caret used during typewriter */
.term-cursor-inline {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  vertical-align: -0.12em;
  margin-left: 1px;
  background: var(--t-accent);
  animation: termBlock 1s steps(2, start) infinite;
}
@keyframes termBlock { to { opacity: 0; } }

/* Typing indicator (3 dots) */
.term-typing {
  display: inline-flex;
  gap: 5px;
  padding: 6px 2px;
}
.term-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--t-accent);
  animation: termBlink 1.2s infinite ease-in-out;
}
.term-typing span:nth-child(2) { animation-delay: 0.15s; }
.term-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes termBlink {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40%           { opacity: 1;   transform: translateY(-3px); }
}

/* Input bar */
.term-input-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--t-line);
  background: var(--t-bg);
}
.term-prompt-dollar {
  font-family: var(--f-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--t-accent);
  flex-shrink: 0;
  line-height: 1;
}
.term-input {
  flex: 1;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--t-ink);
  font-family: var(--f-mono);
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 6px 0;
  caret-color: var(--t-accent);
}
.term-input::placeholder {
  color: var(--t-soft);
  font-family: var(--f-mono);
}
.term-input:disabled { opacity: 0.55; }

.term-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border-radius: 7px;
  background: var(--t-bubble);
  border: 1px solid var(--t-bubble-edge);
  color: var(--t-mute);
  flex-shrink: 0;
  transition: all .2s var(--ease);
}
.term-submit:hover {
  background: var(--t-yellow);
  color: var(--t-ink);
  border-color: rgba(35,30,18,0.2);
  transform: translateY(-1px);
}
.term-submit:active { transform: translateY(0); }
.term-submit:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Slightly tweaked dark page boost: terminal stays cream but gets a subtle warm halo */
:root[data-theme="dark"] .hero-terminal {
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.7),
    0 8px 24px -8px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255, 220, 150, 0.04),
    inset 0 1px 0 rgba(255,255,255,0.5);
}

.contact-form .form-status {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  margin-top: 8px;
  min-height: 1.3em;
}
.contact-form .form-status.ok    { color: var(--c-green); }
.contact-form .form-status.err   { color: var(--c-red); }
.contact-form .form-status.info  { color: var(--ink-mute); }

@media (max-width: 900px) {
  .hero-terminal { min-height: 440px; }
  .term-body { max-height: 340px; }
  .term-title-mono { font-size: 11px; letter-spacing: 0.12em; }
}
