/* ============================================================
   RICHP0.05 — FRAMEWORK LAYER v3
   Editorial cream system. Structure adapted from a reference
   personal site, re-skinned to RICHP0.05 brand.
   Load AFTER css/main.css. Additive only: it overrides, never
   replaces, the design system in main.css.
   ============================================================ */

:root {
  --cream:     #f6f2e8;
  --cream-2:   #efe9db;
  --line-soft: #e7e0cf;
  --glass:     rgba(255, 255, 255, 0.80);
  --nav-r:     22px;
}

/* Warm off-white ground for the page. */
body { background: var(--cream); }

/* ---------- FLOATING GLASS NAV PILL ---------- */
.nav {
  position: sticky; top: 14px; z-index: 200;
  background: transparent; border-bottom: none;
  backdrop-filter: none; -webkit-backdrop-filter: none;
  padding: 0;
}
.nav--scrolled { box-shadow: none; }
.nav__in {
  max-width: var(--max); margin: 0 auto; padding: 0 20px;
  height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.92);
  border-radius: var(--nav-r);
  box-shadow: 0 12px 34px rgba(17, 17, 17, 0.10),
              0 4px 12px rgba(17, 17, 17, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: box-shadow 0.35s var(--ease), background 0.35s var(--ease);
}
.nav--scrolled .nav__in {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(17, 17, 17, 0.16),
              0 6px 16px rgba(17, 17, 17, 0.07),
              inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.nav__brand img { height: 38px; }
.nav__menu a { color: #3d3d3d; font-weight: 500; }
/* code style: monospace nav labels */
.nav__menu a:not(.nav__cta) {
  font-family: var(--mono); font-size: 13.5px; font-weight: 500;
  letter-spacing: -0.3px; color: #111111;
}
.nav__menu a:hover { color: var(--teal-deep); background: var(--cream-2); }
.nav__menu a.is-active { color: var(--teal-deep); background: var(--cream-2); font-weight: 600; }
.nav__cta { background: var(--orange) !important; color: #fff !important; }
.nav__cta:hover { background: var(--amber) !important; }
.nav__cta.is-active { background: var(--orange) !important; }

@media (max-width: 940px) {
  /* Phone: links collapse behind the burger and drop down when tapped.
     Desktop keeps them always visible. */
  .nav { top: 10px; }
  .nav__in {
    padding: 0 14px; height: 64px;
    flex-wrap: nowrap; justify-content: space-between;
  }
  .nav__brand img { height: 32px; }
  .nav__menu {
    position: fixed; inset: 84px 14px auto 14px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-radius: var(--nav-r);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 24px 54px rgba(17, 17, 17, 0.16);
    flex-direction: column; flex-wrap: nowrap; align-items: stretch;
    justify-content: flex-start;
    padding: 12px; gap: 2px;
    width: auto;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: all 0.3s var(--ease); max-height: calc(100vh - 120px); overflow-y: auto;
  }
  .nav__menu.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__menu a {
    padding: 14px 14px; font-size: 15px; border-radius: 14px;
    font-family: var(--mono); font-weight: 500; letter-spacing: -0.3px;
  }
  .nav__cta { text-align: center; margin: 8px 0 0; padding: 14px !important; }
  .nav__burger { display: block; }
  .nav__burger span { background: var(--teal-deep); }
  /* burger animates to an X while the menu is open */
  .nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- EDITORIAL HERO (two column) ---------- */
.ehero {
  position: relative; overflow: hidden;
  background: var(--cream);
  padding: clamp(48px, 7vw, 86px) 0 clamp(56px, 8vw, 96px);
}
/* soft abstract curve behind the content */
.ehero__wave {
  position: absolute; left: 50%; bottom: -38%; transform: translateX(-46%);
  width: min(1500px, 165vw); aspect-ratio: 2 / 1;
  background: radial-gradient(ellipse at 50% 100%, var(--cream-2) 0%, rgba(239, 233, 219, 0.55) 46%, transparent 72%);
  border-radius: 50% 50% 0 0 / 62% 62% 0 0;
  pointer-events: none;
}
.ehero__in {
  position: relative; z-index: 2;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(38px, 6vw, 82px); align-items: center;
}
.ehero__badge {
  display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600;
  letter-spacing: 0.3px; color: var(--teal-deep);
  background: #fff; border: 1px solid var(--line-soft);
  padding: 9px 17px; border-radius: 100px; margin-bottom: 26px;
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.05);
}
.ehero__badge i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--orange);
  box-shadow: 0 0 0 4px rgba(248, 147, 31, 0.20); animation: pulse 2.4s infinite;
}
.ehero h1 {
  font-size: clamp(37px, 5.6vw, 64px); font-weight: 800; line-height: 1.04;
  letter-spacing: -2.1px; color: #111827; max-width: 15ch;
}
.ehero__lead {
  margin: 26px 0 36px; max-width: 52ch;
  font-size: clamp(16px, 1.65vw, 18.5px); color: var(--gray); line-height: 1.74;
}
.ehero__btns { display: flex; gap: 13px; flex-wrap: wrap; }
.btn--glow {
  background: #fff; color: var(--teal-deep); border-color: var(--line-soft);
  box-shadow: 0 10px 30px rgba(0, 87, 94, 0.12);
}
.btn--glow:hover { border-color: var(--teal); transform: translateY(-3px); box-shadow: 0 16px 40px rgba(0, 87, 94, 0.20); }

/* hero right: avatar + caption + capability ticker */
.ehero__side { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.ehero__avatar {
  position: relative; width: min(360px, 74vw); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 118%, var(--cream-2), rgba(239, 233, 219, 0.25) 62%, transparent 78%);
  display: block;
}
.ehero__avatar img {
  position: absolute; inset: 0; margin: auto;
  width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%;
  filter: drop-shadow(0 22px 34px rgba(17, 17, 17, 0.20));
}
/* ring: a conic arc that sweeps around the portrait, plus a faint full track */
.ehero__ring {
  position: absolute; inset: -9px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(0, 136, 133, 0.16);
}
.ehero__ring::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(
    rgba(0, 136, 133, 0) 0deg,
    rgba(0, 136, 133, 0) 205deg,
    rgba(0, 136, 133, 0.85) 300deg,
    rgba(248, 147, 31, 0.95) 348deg,
    rgba(248, 147, 31, 0) 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2.5px));
  animation: eheroSpin 3.6s linear infinite;
}
@keyframes eheroSpin { to { transform: rotate(360deg); } }
.ehero__who { text-align: center; }
.ehero__who b { display: block; font-size: 17px; font-weight: 800; color: #111827; letter-spacing: -0.3px; }
.ehero__who small { display: block; margin-top: 5px; font-size: 13px; color: var(--gray); }

/* Glossy tagline lockup that reveals under the logo when it appears */
.codebox__tag {
  position: absolute; left: 50%; bottom: 13%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  z-index: 3; pointer-events: none;
  opacity: 0; transition: opacity 0.4s ease;
}
.codebox__tag.is-in { opacity: 1; }
.codebox__rule {
  width: 0; height: 1px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  transition: width 0.7s cubic-bezier(0.22,1,0.36,1);
}
.codebox__tag.is-in .codebox__rule { width: 108px; }
.codebox__words {
  position: relative;
  display: inline-flex; gap: 0.42em;
  font-size: 13px; font-weight: 800; letter-spacing: 2.4px;
  text-transform: uppercase; white-space: nowrap;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.55))
          drop-shadow(0 2px 8px rgba(0,138,133,0.28));
}
/* Gradient lives on EACH word span, not the parent, or background-clip:text
   leaves child spans with no gradient to paint and they render invisible. */
.codebox__words .w {
  display: inline-block;
  background: linear-gradient(180deg, #4FE6DF 0%, #008a85 52%, #00575E 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.22,1,0.36,1);
}
.codebox__words .w.w--in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .codebox__words .w { opacity: 1; transform: none; transition: none; }
}
/* shimmer sweep across the words once revealed */
.codebox__words::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,0.85) 50%, transparent 70%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  background-size: 260% 100%; background-position: 160% 0;
  opacity: 0;
}
.codebox__tag.is-in .codebox__words::after { animation: wordShimmer 1.5s ease 0.35s 1; }
@keyframes wordShimmer {
  0% { background-position: 160% 0; opacity: 1; }
  100% { background-position: -60% 0; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .codebox__tag { opacity: 1; }
  .codebox__rule { width: 108px; transition: none; }
  .codebox__tag.is-in .codebox__words::after { animation: none; }
}

/* vertical capability ticker */
.captick {
  width: 100%; max-width: 330px; height: 132px; overflow: hidden; position: relative;
  mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 22%, #000 78%, transparent);
}
.captick__track { display: flex; flex-direction: column; animation: captick 26s linear infinite; }
.captick:hover .captick__track { animation-play-state: paused; }
.captick__i {
  display: flex; align-items: center; justify-content: center; gap: 9px; height: 44px;
  font-size: 14px; font-weight: 600; color: var(--teal-deep); white-space: nowrap;
}
.captick__i svg { color: var(--orange); flex-shrink: 0; }
@keyframes captick { from { transform: translateY(0); } to { transform: translateY(-50%); } }

@media (max-width: 980px) {
  .ehero__in { grid-template-columns: 1fr; }
  .ehero__side { order: -1; }
  .ehero__avatar {
    width: min(268px, 60vw);
    /* column flow: portrait first, chip below it inside the same box.
       aspect-ratio stays 1 so the ring (inset:-9px) remains concentric. */
    display: flex; flex-direction: column;
    align-items: center;
    justify-content: flex-end;
  }
  /* The portrait must leave absolute positioning here: inset:0 resolves against
     a parent whose height comes from aspect-ratio, and the image vanished when
     it was still absolute. Static flow gives it its intrinsic aspect ratio. */
  .ehero__avatar img {
    position: static; inset: auto;
    width: 100%; height: auto;
    object-fit: contain; object-position: 50% 100%;
  }
  /* tagline scales down on small screens */
  .codebox__tag {
    font-size: 11px; letter-spacing: 1.1px; bottom: 6%;
  }
  .captick { display: none; }
  .ehero h1 { max-width: none; }
}

/* ---------- RULE-DIVIDED STAT ROW ---------- */
.erow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.erow__i { padding: 30px 34px 30px 0; border-right: 1px solid var(--line); }
.erow__i:last-child { border-right: none; }
.erow__i:not(:first-child) { padding-left: 34px; }
.erow__i b {
  display: block; font-size: clamp(30px, 4.2vw, 46px); font-weight: 800;
  letter-spacing: -1.7px; line-height: 1; color: #111827;
}
.erow__i b em { color: var(--orange); font-style: normal; }
.erow__i small { display: block; margin-top: 11px; font-size: 13.5px; color: var(--gray); letter-spacing: 0.2px; }
@media (max-width: 780px) {
  .erow { grid-template-columns: 1fr; }
  .erow__i { border-right: none; border-bottom: 1px solid var(--line); padding: 24px 0; }
  .erow__i:not(:first-child) { padding-left: 0; }
  .erow__i:last-child { border-bottom: none; }
}

/* ---------- BROWSER-FRAME WORK CARDS ---------- */
.browser {
  border-radius: 16px; overflow: hidden; background: #fff;
  border: 1px solid var(--line-soft);
  box-shadow: 0 18px 46px rgba(17, 17, 17, 0.12), 0 4px 12px rgba(17, 17, 17, 0.05);
}
.browser__bar {
  display: flex; align-items: center; gap: 7px; padding: 11px 14px;
  background: var(--cream-2); border-bottom: 1px solid var(--line-soft);
}
.browser__bar i { width: 10px; height: 10px; border-radius: 50%; }
.browser__bar i:nth-child(1) { background: #ff6058; }
.browser__bar i:nth-child(2) { background: #ffbd2e; }
.browser__bar i:nth-child(3) { background: #28c840; }
.browser__url {
  margin-left: 10px; flex: 1; background: #fff; border-radius: 100px;
  padding: 4px 13px; font-family: var(--mono); font-size: 11px;
  color: var(--gray-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.browser__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--mist); }
.browser__img img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform 0.7s var(--ease); }
.pcard:hover .browser__img img { transform: scale(1.045); }

.pcard {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: all 0.45s var(--ease);
}
.pcard:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: transparent; }
.pcard > .browser { border-radius: 0; border: none; box-shadow: none; }
.pcard__body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; }
.pcard h3 { font-size: 20px; font-weight: 800; color: #111827; letter-spacing: -0.5px; margin: 14px 0 10px; line-height: 1.24; }
.pcard p { font-size: 14.5px; color: var(--gray); line-height: 1.72; }
.pcard__link { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-size: 14px; font-weight: 700; color: var(--orange); transition: gap 0.3s var(--ease); }
.pcard:hover .pcard__link { gap: 13px; }
.pcard .proof__metric { margin-top: auto; }

/* ---------- SOCIAL GRID ---------- */
.socg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.socg a {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 26px 24px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  transition: all 0.4s var(--ease);
}
.socg a:hover { transform: translateY(-5px); box-shadow: var(--sh-md); border-color: transparent; }
.socg h3 { font-size: 16.5px; font-weight: 700; color: #111827; margin: 0; }
.socg span { font-size: 12.5px; color: var(--gray-soft); display: block; margin-top: 3px; }
.socg svg { color: var(--teal-deep); flex-shrink: 0; transition: color 0.3s var(--ease); }
.socg a:hover svg { color: var(--orange); }
/* official brand marks */
.socg__logo {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line-soft);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.socg a:hover .socg__logo { transform: scale(1.06); box-shadow: 0 8px 20px rgba(17, 17, 17, 0.10); }
.socg__logo svg { color: inherit; }
.socg [data-brand="instagram"] .socg__logo,
.socg__logo[data-brand="instagram"] { border-color: rgba(228, 64, 95, 0.22); }
@media (max-width: 940px) { .socg { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .socg { grid-template-columns: 1fr; } }

/* ---------- FOUNDER / CEO CARD ---------- */
.founder { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(30px, 5vw, 64px); align-items: center; }
.founder__media {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 26px 60px rgba(0, 87, 94, 0.20); background: var(--teal-deep);
}
.founder__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 22%; }
.founder__quote {
  font-size: clamp(19px, 2.2vw, 26px); font-weight: 600; line-height: 1.45;
  color: #111827; letter-spacing: -0.5px; margin: 16px 0 20px;
}
.founder__sig { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.founder__sig b { display: block; font-size: 16px; font-weight: 800; color: #111827; }
.founder__sig small { display: block; font-size: 13px; color: var(--gray); margin-top: 3px; }
@media (max-width: 940px) { .founder { grid-template-columns: 1fr; } }

/* ---------- CONTACT CARD ---------- */
.ccard {
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: 0 22px 54px rgba(17, 17, 17, 0.09);
}
.ccard__row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(26px, 4vw, 48px); align-items: start; }
@media (max-width: 940px) { .ccard__row { grid-template-columns: 1fr; } }

/* ---------- SECTION GROUND HELPERS ---------- */
.g-cream { background: var(--cream); }
.g-white { background: #fff; }
.g-line { border-top: 1px solid var(--line-soft); }
/* ============================================================
   RICHP0.05 — FRAMEWORK LAYER v3 (continued)
   Light editorial page hero for inner pages, replacing the
   dark gradient .phero. Appended in its own file so main.css
   is never modified.
   ============================================================ */

/* ---------- LIGHT PAGE HERO (inner pages) ---------- */
.lhero {
  position: relative; overflow: hidden;
  background: var(--cream);
  padding: clamp(44px, 6vw, 74px) 0 clamp(40px, 5.5vw, 66px);
  border-bottom: 1px solid var(--line-soft);
}
.lhero__wave {
  position: absolute; left: 50%; bottom: -52%; transform: translateX(-46%);
  width: min(1400px, 160vw); aspect-ratio: 2 / 1;
  background: radial-gradient(ellipse at 50% 100%, var(--cream-2) 0%, rgba(239, 233, 219, 0.5) 46%, transparent 70%);
  border-radius: 50% 50% 0 0 / 62% 62% 0 0;
  pointer-events: none;
}
.lhero .wrap { position: relative; z-index: 2; }
.lhero .eyebrow { color: var(--orange); }
.lhero h1 {
  font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; line-height: 1.06;
  letter-spacing: -1.9px; color: #111827; max-width: 19ch; margin-top: 16px;
}
.lhero p {
  max-width: 58ch; margin-top: 20px;
  font-size: clamp(16px, 1.65vw, 18.5px); color: var(--gray); line-height: 1.74;
}
/* narrow measure for article heroes */
.lhero .wrap--post { max-width: 860px; }
.lhero .article__meta { margin: 20px 0 0; color: var(--gray-soft); }
.lhero .article__meta strong { color: var(--teal-deep); }

/* ---------- NOT FOUND (404) ---------- */
.nf-light {
  position: relative; overflow: hidden; background: var(--cream);
  padding: clamp(72px, 11vw, 130px) 0 clamp(80px, 12vw, 140px);
}
.nf-light__in { position: relative; z-index: 2; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.nf-light__code {
  font-family: var(--mono); font-size: clamp(64px, 14vw, 150px); font-weight: 700;
  line-height: 1; letter-spacing: -4px; color: var(--cream-2);
  -webkit-text-stroke: 2px rgba(0, 87, 94, 0.18);
}
.nf-light h1 { margin-top: 18px; }
.nf-light p { max-width: 52ch; margin: 18px auto 32px; }
/* reduced-motion: keep the arc visible but stop it spinning */
@media (prefers-reduced-motion: reduce) {
  .ehero__ring::before { animation: none; }
}

/* ---------- TOOLS & CAPABILITY RAIL (full-width, two opposing rows) ---------- */
.techrail {
  position: relative; width: 100%; padding: 30px 0 34px;
  overflow: hidden;
  background: transparent;
  /* soft dissolve at both edges */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.techrail__row { overflow: hidden; }
.techrail__row + .techrail__row { margin-top: 14px; }
.techrail__track {
  display: flex; width: max-content;
  animation: techrailL 46s linear infinite;
}
.techrail__track--rev { animation-name: techrailR; }
.techrail:hover .techrail__track { animation-play-state: paused; }
.techrail__g { display: flex; flex-shrink: 0; }
.techrail__i {
  display: inline-flex; align-items: center; gap: 10px;
  flex-shrink: 0; margin-right: 14px;
  background: #fff; border: 1px solid var(--line-soft);
  border-radius: 100px; padding: 9px 18px 9px 10px;
  box-shadow: 0 4px 14px rgba(17, 17, 17, 0.045);
}
.techrail__i b {
  font-size: 13.5px; font-weight: 700; color: #111827;
  letter-spacing: -0.2px; white-space: nowrap;
}
.techrail__glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: #f7f5f0; flex-shrink: 0;
}
.techrail__glyph svg { display: block; }
@keyframes techrailL { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes techrailR { from { transform: translateX(-50%); } to { transform: translateX(0); } }

@media (max-width: 640px) {
  .techrail { padding: 22px 0 26px; }
  .techrail__i { padding: 7px 14px 7px 8px; gap: 8px; }
  .techrail__i b { font-size: 12.5px; }
  .techrail__glyph { width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .techrail__track { animation: none; }
}


/* ---------- HERO CODE TERMINAL (replaces the portrait) ---------- */
/* The circle now runs a fast Python build animation that resolves into the
   RICHP0.05 logo. Ring stays unchanged so the sweep still circles the centre. */
.ehero__code {
  overflow: hidden;
  background: radial-gradient(circle at 50% 118%, var(--cream-2), rgba(239,233,219,0.25) 62%, transparent 78%);
}
.codebox {
  position: absolute; inset: 0; border-radius: 50%;
  background: #10161c;
  border: 1px solid rgba(255,255,255,0.10);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.55);
  z-index: 1;
  opacity: 1; visibility: visible;
  transition: opacity 0.55s ease, transform 0.55s ease, visibility 0.55s;
}
/* JS toggles .is-out on the terminal to clear it */
.codebox.is-out { opacity: 0; transform: scale(0.96); visibility: hidden; }
.codebox__bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 12px 0 10px; justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.codebox__bar i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.codebox__bar i:nth-child(1) { background: #ff5f57; }
.codebox__bar i:nth-child(2) { background: #febc2e; }
.codebox__bar i:nth-child(3) { background: #28c840; }
.codebox__bar span {
  font-family: var(--mono); font-size: 9.5px; color: rgba(255,255,255,0.45);
  margin-left: 6px; letter-spacing: 0.2px;
}
.codebox__pre {
  flex: 1 1 auto; margin: 0; padding: 0 16px;
  display: flex; flex-direction: column; justify-content: center;
  font-family: var(--mono); font-size: 10.5px; line-height: 1.62;
  color: #cfe8e6; white-space: pre; overflow: hidden;
  text-align: left;
}
.codebox__pre b { font-weight: 500; }
.codebox__pre .k { color: #ff9d3f; }   /* keyword  */
.codebox__pre .s { color: #7ee0b8; }   /* string   */
.codebox__pre .f { color: #4FE6DF; }   /* function */
.codebox__pre .c { color: #6b7b86; }   /* comment  */
.codebox__pre .n { color: #f8931f; }   /* number   */
.codebox__pre .v { color: #cfe8e6; }   /* variable */
.codebox__pre .cursor {
  display: inline-block; width: 6px; height: 12px;
  background: #4FE6DF; vertical-align: -2px;
  animation: caret 0.7s steps(1) infinite;
}
@keyframes caret { 0%,50% { opacity: 1; } 50.01%,100% { opacity: 0; } }
@keyframes codeFade { to { opacity: 0; transform: scale(0.96); visibility: hidden; } }

/* the logo resolves in as the code clears */
/* Higher specificity than `.ehero__avatar img` so the terminal logo keeps its
   own sizing/centring instead of inheriting the portrait rules. */
.ehero__avatar img.codebox__logo {
  position: absolute; left: 50%; top: 50%;
  width: 56%; height: auto;
  object-fit: contain;
  object-position: 50% 50%;
  right: auto; bottom: auto;
  margin: 0;
  transform: translate(-50%,-64%) scale(0.86);
  opacity: 0;
  z-index: 0;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22,1,0.36,1);
  filter: drop-shadow(0 0 18px rgba(0,138,133,0.45))
          drop-shadow(0 6px 16px rgba(0,0,0,0.22));
}
/* JS toggles .is-in on the logo to bring it forward, bright and centred */
.ehero__avatar img.codebox__logo.is-in {
  opacity: 1;
  transform: translate(-50%,-64%) scale(1);
  animation: logoShine 3.2s ease-in-out infinite;
}
@keyframes logoShine {
  0%, 100% {
    filter: drop-shadow(0 0 14px rgba(79,230,223,0.45))
            drop-shadow(0 0 24px rgba(248,147,31,0.28))
            drop-shadow(0 8px 18px rgba(0,0,0,0.30));
    transform: translate(-50%,-64%) scale(1);
  }
  50% {
    filter: drop-shadow(0 0 26px rgba(79,230,223,0.85))
            drop-shadow(0 0 44px rgba(248,147,31,0.55))
            drop-shadow(0 8px 20px rgba(0,0,0,0.28));
    transform: translate(-50%,-64%) scale(1.045);
  }
}

/* ---------- FOUNDER PORTRAIT WITH RING ---------- */
.founder__portrait { position: relative; }
.poring {
  position: absolute; inset: -14px; border-radius: 50%;
  pointer-events: none; z-index: 2;
}
.poring::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(
    rgba(0,138,133,0) 0deg,
    rgba(0,138,133,0) 205deg,
    rgba(0,138,133,0.90) 300deg,
    rgba(248,147,31,0.95) 348deg,
    rgba(248,147,31,0) 360deg
  );
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  animation: eheroSpin 4.2s linear infinite;
}
.founder__portrait img { border-radius: 50%; }

/* keep the animation calm for anyone who asked for less motion */
@media (prefers-reduced-motion: reduce) {
  .codebox { opacity: 0; visibility: hidden; transition: none; }
  .ehero__avatar img.codebox__logo { opacity: 1; transform: translate(-50%,-64%); transition: none; animation: none; }
  .poring::before { animation: none; }
}
