/* ============================================================
   REALA.IO — Option 3: "Kinetic"
   Swiss poster. Grounds swap as you scroll; type carries the page.
   Dark-first; light theme is a full re-cut, not an inversion.
   ============================================================ */

/* ============================================================
   REALA.IO — "Kinetic", orange cut
   Two colours only: ORANGE ground / brand, WHITE text / highlight.
   Default is the orange design; the theme toggle offers a
   white-ground inversion (headings + accents go orange).
   ============================================================ */

:root {
  color-scheme: dark;

  /* page ground — ORANGE is the brand */
  --bg:        #E4501B;   /* orange */
  --bg-2:      #C7440F;   /* deeper orange — panels */
  --fg:        #FFFFFF;   /* white — text / highlight */
  --fg-soft:   rgba(255, 255, 255, .82);
  --fg-mute:   rgba(255, 255, 255, .58);
  --line:      rgba(255, 255, 255, .24);

  /* accent tokens kept for the existing rules; here they resolve
     to the same two colours */
  --cobalt:    #FFFFFF;
  --cobalt-bg: #C7440F;   /* deeper-orange full-bleed ground */
  --cobalt-on: #FFFFFF;
  --flare:     #FFFFFF;   /* highlight */
  --flare-bg:  #FFFFFF;   /* white full-bleed ground */
  --flare-on:  #E4501B;   /* orange on white */

  /* per-section stage tokens (defaults = page ground) */
  --stage:     var(--bg);
  --stage-fg:  var(--fg);

  --f-d: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-b: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --pad: clamp(1.1rem, 4vw, 3.5rem);
  --max: 1440px;
}

/* explicit dark = the default orange design */
:root[data-theme="dark"] {
  --bg:        #E4501B;
  --bg-2:      #C7440F;
  --fg:        #FFFFFF;
  --fg-soft:   rgba(255, 255, 255, .82);
  --fg-mute:   rgba(255, 255, 255, .58);
  --line:      rgba(255, 255, 255, .24);
  --cobalt:    #FFFFFF;
  --cobalt-bg: #C7440F;
  --cobalt-on: #FFFFFF;
  --flare:     #FFFFFF;
  --flare-bg:  #FFFFFF;
  --flare-on:  #E4501B;
}

/* opt-in inversion: white ground, orange headings + accents.
   The cobalt / flare full-bleed stages stay orange so the page
   still reads in just two colours. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg:        #FFFFFF;
  --bg-2:      #FFF1EB;
  --fg:        #E4501B;
  --fg-soft:   rgba(228, 80, 27, .74);
  --fg-mute:   rgba(228, 80, 27, .5);
  --line:      rgba(228, 80, 27, .24);
  --cobalt:    #E4501B;
  --cobalt-bg: #E4501B;
  --cobalt-on: #FFFFFF;
  --flare:     #E4501B;
  --flare-bg:  #E4501B;
  --flare-on:  #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-b);
  font-size: clamp(1rem, .95rem + .25vw, 1.1rem);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
p { margin: 0; }
a { color: inherit; }
::selection { background: var(--flare); color: var(--flare-on); }
:where(a, button, [tabindex]):focus-visible { outline: 3px solid var(--flare); outline-offset: 2px; }

h1, h2, h3 { margin: 0; font-family: var(--f-d); text-wrap: balance; }

/* display type: Archivo's width axis does the shouting */
.xl {
  font-family: var(--f-d);
  font-weight: 800;
  font-variation-settings: "wdth" 118;
  text-transform: uppercase;
  line-height: .82;
  letter-spacing: -.035em;
}
.tag {
  font-family: var(--f-b); font-weight: 600; font-size: .7rem;
  letter-spacing: .2em; text-transform: uppercase;
}

.skip { position: absolute; left: -9999px; background: var(--flare); color: var(--flare-on); padding: .6rem 1rem; z-index: 99; font-weight: 700; }
.skip:focus { left: 1rem; top: 1rem; }

.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--pad); }

/* stage: full-bleed sections that carry their own ground */
.stage { background: var(--stage); color: var(--stage-fg); }
.stage--cobalt { --stage: var(--cobalt-bg); --stage-fg: var(--cobalt-on); --line: rgba(255,255,255,.22); --fg-soft: rgba(242,243,255,.78); --fg-mute: rgba(242,243,255,.55); }
.stage--flare  { --stage: var(--flare-bg);  --stage-fg: var(--flare-on); --line: rgba(228,80,27,.28); --fg-soft: rgba(228,80,27,.8); --fg-mute: rgba(228,80,27,.6); }
.stage--panel  { --stage: var(--bg-2); }

.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--f-b); font-weight: 700; font-size: .82rem;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  padding: 1.05rem 1.6rem;
  background: var(--fg); color: var(--bg); border: 2px solid var(--fg);
  transition: transform .18s cubic-bezier(.2,.7,.2,1), background .18s ease, color .18s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--flare); }
.btn:active { transform: none; box-shadow: none; }
.btn--flare { background: var(--flare); border-color: var(--flare); color: var(--flare-on); }
.btn--flare:hover { box-shadow: 4px 4px 0 var(--fg); }
.btn--out { background: transparent; color: currentColor; border-color: currentColor; }
.btn--out:hover { box-shadow: 4px 4px 0 var(--flare); }
.stage--cobalt .btn { background: var(--cobalt-on); border-color: var(--cobalt-on); color: var(--cobalt-bg); }
.stage--flare .btn { background: var(--flare-on); border-color: var(--flare-on); color: var(--flare-bg); }

/* reveals */
.js [data-r] { opacity: 0; transform: translateY(26px); }
@media (prefers-reduced-motion: no-preference) {
  .js [data-r] { transition: opacity .6s cubic-bezier(.2,.7,.2,1) var(--d,0ms), transform .7s cubic-bezier(.2,.7,.2,1) var(--d,0ms); }
}
.js [data-r].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-r] { opacity: 1; transform: none; } }

/* ============ header ============ */
.hdr { position: fixed; inset: 0 0 auto; z-index: 50; background: var(--stage, var(--bg)); border-bottom: 1px solid var(--line); }
.hdr__in { display: flex; align-items: center; gap: 1.5rem; height: 4.25rem; color: var(--fg); }
.hdr__in a, .hdr__in button { color: var(--fg); }
.brand { font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 112; font-size: 1.3rem; letter-spacing: -.03em; text-transform: uppercase; text-decoration: none; margin-right: auto; }
.nav { display: flex; gap: 1.4rem; }
@media (max-width: 900px) { .nav { display: none; } }
.nav a { font-family: var(--f-b); font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; opacity: .72; transition: opacity .2s ease; }
.nav a:hover { opacity: 1; }
.theme { background: transparent; border: 2px solid currentColor; color: inherit; font: 700 .68rem/1 var(--f-b); letter-spacing: .16em; text-transform: uppercase; padding: .5rem .7rem; cursor: pointer; }

/* ============ hero ============ */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding: 7rem 0 0; position: relative; overflow: hidden; }
.hero__blob {
  position: absolute; right: -12vw; top: 8vh; width: 46vw; aspect-ratio: 1;
  background: radial-gradient(circle at 35% 35%, var(--cobalt), transparent 62%);
  filter: blur(30px); opacity: .5; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) { .hero__blob { animation: wander 22s ease-in-out infinite alternate; } }
@keyframes wander { to { transform: translate(-10vw, 12vh) scale(1.25); } }

.hero h1 { font-size: clamp(2.5rem, 11vw, 8.5rem); line-height: 1; font-variation-settings: "wdth" 100; }
.hero h1 .l { display: block; overflow: hidden; padding-block: .1em .16em; }
.hero h1 .l > span { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .js .hero h1 .l > span { transform: translateY(103%); animation: up 1s cubic-bezier(.16,1,.3,1) forwards; animation-delay: var(--d,0s); }
}
@keyframes up { to { transform: translateY(0); } }
.hero h1 .thin { font-weight: 400; font-variation-settings: "wdth" 74; font-style: italic; }
.hero h1 .hit { color: var(--flare); white-space: nowrap; }
.hero h1 .hit #typed { display: inline; }
.caret { display: inline-block; width: .07em; min-width: 3px; height: .78em; margin-left: .04em; background: currentColor; vertical-align: baseline; translate: 0 .04em; animation: blink 1.05s steps(1, end) infinite; }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }
@keyframes blink { 50% { opacity: 0; } }
.hero__meta { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 2rem; margin-top: clamp(1.75rem, 4vw, 3rem); align-items: end; }
@media (max-width: 800px) { .hero__meta { grid-template-columns: 1fr; } }
.hero__meta p { max-width: 40ch; color: var(--fg-soft); }
.hero__meta .es { font-family: var(--f-d); font-variation-settings: "wdth" 88; font-weight: 500; text-transform: uppercase; letter-spacing: .01em; color: var(--fg); font-size: clamp(.95rem, 1.8vw, 1.3rem); line-height: 1.15; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }

/* marquee bands */
.band { border-block: 2px solid currentColor; overflow: hidden; padding: .55rem 0; }
.band--flare { background: var(--flare-bg); color: var(--flare-on); border-color: var(--flare-on); }
.band__track { display: flex; width: max-content; }
.band__track > span { font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 108; text-transform: uppercase; font-size: clamp(1.4rem, 3.4vw, 2.6rem); letter-spacing: -.02em; padding-inline: 1.1rem; display: inline-flex; align-items: center; gap: 1.1rem; white-space: nowrap; }
.band__track > span::after { content: "◆"; font-size: .4em; opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .band__track { animation: run 34s linear infinite; }
  .band--rev .band__track { animation-direction: reverse; }
}
@keyframes run { to { transform: translateX(-50%); } }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .band--scrub .band__track { animation: run linear both; animation-timeline: scroll(root); animation-duration: auto; }
  }
}

/* ============ section scaffold ============ */
.sec { padding: clamp(4rem, 10vw, 8.5rem) 0; }
.sec__top { display: flex; align-items: baseline; gap: 1rem; padding-bottom: 1.25rem; border-bottom: 2px solid currentColor; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.sec__top .tag { color: inherit; }
.sec__top .n { margin-left: auto; font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 62; font-size: 1.1rem; }
.h2 { font-size: clamp(2.6rem, 8.5vw, 7.5rem); }
.h2 .thin { font-weight: 400; font-variation-settings: "wdth" 70; font-style: italic; }

/* split rows */
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--fg-soft); max-width: 46ch; }

/* the 24 number, scrubbed by scroll */
.big24 { display: flex; align-items: baseline; gap: 1rem; line-height: .74; }
.big24 b { font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 118; font-size: clamp(7rem, 26vw, 22rem); letter-spacing: -.06em; display: block; font-variant-numeric: tabular-nums; }
.big24 span { font-family: var(--f-d); font-weight: 700; font-variation-settings: "wdth" 70; text-transform: uppercase; font-size: clamp(1rem, 2.4vw, 1.9rem); writing-mode: vertical-rl; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .big24 b { animation: widen linear both; animation-timeline: view(); animation-range: entry 10% cover 55%; }
  }
}
@keyframes widen { from { font-variation-settings: "wdth" 62; opacity: .25; } to { font-variation-settings: "wdth" 125; opacity: 1; } }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: 3rem 1fr; gap: 1rem; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.steps li b { font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 62; font-size: .95rem; color: var(--flare); }
.steps h3 { font-family: var(--f-b); font-weight: 700; font-size: 1.02rem; }
.steps p { color: var(--fg-soft); font-size: .95rem; margin-top: .2rem; }

/* service rows — big list, expands on hover */
.rows { border-top: 2px solid currentColor; }
.row {
  display: grid; grid-template-columns: 4.5rem minmax(0,1fr) minmax(0,1.15fr) 3rem;
  gap: 1rem; align-items: center;
  padding: clamp(1rem, 2.2vw, 1.6rem) 0; border-bottom: 1px solid var(--line);
  text-decoration: none; position: relative; transition: color .3s ease;
}
@media (max-width: 800px) { .row { grid-template-columns: 2.75rem 1fr; } .row p { grid-column: 2; } .row .arw { display: none; } }
/* hover fill painted as a background layer (a z-index:-1 pseudo would sit
   behind the section's own ground) */
.row {
  background-image: linear-gradient(var(--flare-bg), var(--flare-bg));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0%;
  transition: color .3s ease, background-size .35s cubic-bezier(.2,.7,.2,1), padding-inline .35s ease;
}
.row:hover { color: var(--flare-on); background-position: 0 0; background-size: 100% 100%; padding-inline: 1.25rem; }
.row .idx { font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 62; font-size: .9rem; opacity: .6; }
.row h3 { font-family: var(--f-d); font-weight: 800; font-variation-settings: "wdth" 100; text-transform: uppercase; font-size: clamp(1.6rem, 4.4vw, 3.2rem); letter-spacing: -.03em; line-height: .95; transition: font-variation-settings .35s ease; }
.row:hover h3 { font-variation-settings: "wdth" 118; }
.row p { color: var(--fg-soft); font-size: .95rem; max-width: 46ch; transition: color .3s ease; }
.row:hover p { color: inherit; opacity: .85; }
.row .arw { font-size: 1.6rem; justify-self: end; transition: transform .3s ease; }
.row:hover .arw { transform: translateX(6px); }

/* stat trio */
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.trio > div { background: var(--stage); padding: 1.75rem 1.5rem 2rem; }
.trio b { display: block; font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 112; font-size: clamp(2.6rem,6vw,4.5rem); line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.trio span { display: block; margin-top: .5rem; color: var(--fg-soft); font-size: .95rem; }

/* sticky stacked price cards */
.stack { display: flex; flex-direction: column; gap: clamp(1rem, 2vw, 1.5rem); }
.pcard {
  position: sticky; top: calc(5.5rem + var(--i, 0) * 1.1rem);
  background: var(--bg-2); border: 2px solid currentColor;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1.5rem; align-items: start;
}
.stage--cobalt .pcard { background: var(--cobalt-bg); }
@media (max-width: 720px) { .pcard { grid-template-columns: 1fr; position: static; } }
.pcard h3 { font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 108; text-transform: uppercase; font-size: clamp(1.7rem, 4vw, 2.8rem); letter-spacing: -.03em; }
.pcard p { color: var(--fg-soft); margin-top: .5rem; max-width: 44ch; }
.pcard ul { margin: 1rem 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; }
.pcard li { font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); padding: .35rem .6rem; }
.pcard .amt { font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 100; font-size: clamp(2.4rem, 6vw, 4rem); line-height: .9; letter-spacing: -.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pcard .amt small { display: block; font-family: var(--f-b); font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; margin-top: .5rem; color: var(--fg-soft); }
.pcard .amt i { font-style: normal; font-size: .45em; color: var(--flare); display: block; }

.mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(1rem,2vw,1.5rem); }
.mini > div { background: var(--stage); padding: 1.2rem 1.25rem 1.4rem; }
.mini b { font-family: var(--f-d); font-weight: 900; font-variation-settings: "wdth" 100; font-size: 1.7rem; letter-spacing: -.03em; display: block; }
.mini span { display: block; font-size: .84rem; color: var(--fg-soft); margin-top: .2rem; }

/* quote block */
.quote { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.quote p { font-family: var(--f-d); font-weight: 800; font-variation-settings: "wdth" 96; text-transform: uppercase; font-size: clamp(1.8rem, 6vw, 5rem); line-height: .95; letter-spacing: -.035em; }
.quote p s { opacity: .45; text-decoration-thickness: .06em; }
.quote footer { margin-top: 1.75rem; color: var(--fg-soft); }

/* values / articles */
.grid4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 2rem 2.5rem; }
.grid4 h3 { font-family: var(--f-d); font-weight: 800; font-variation-settings: "wdth" 100; text-transform: uppercase; font-size: 1.4rem; letter-spacing: -.02em; padding-top: .8rem; border-top: 3px solid var(--flare); }
.grid4 p { color: var(--fg-soft); font-size: .95rem; margin-top: .5rem; }

.posts a { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1.5rem; align-items: center; padding: 1.4rem 0; border-top: 1px solid var(--line); text-decoration: none; }
.posts a:last-child { border-bottom: 1px solid var(--line); }
.posts h3 { font-family: var(--f-b); font-weight: 600; font-size: clamp(1.05rem, 2vw, 1.4rem); line-height: 1.25; transition: transform .3s cubic-bezier(.2,.7,.2,1); }
.posts a:hover h3 { transform: translateX(8px); color: var(--flare); }
.posts time { color: var(--fg-mute); font-size: .82rem; white-space: nowrap; }

/* closing */
.end { padding: clamp(4rem, 12vw, 9rem) 0; }
.end h2 { font-size: clamp(2.8rem, 11vw, 10rem); }
.end p { max-width: 44ch; margin-top: 1.5rem; font-size: 1.1rem; }

/* footer */
.ftr { padding: 2.5rem 0 3rem; border-top: 1px solid var(--line); }
.ftr__in { display: flex; flex-wrap: wrap; gap: 1.5rem 3rem; justify-content: space-between; align-items: flex-start; }
.ftr__nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.ftr__nav a { font-family: var(--f-b); font-weight: 600; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--fg-soft); }
.ftr__nav a:hover { color: var(--flare); }
.ftr small { display: block; color: var(--fg-mute); font-size: .8rem; line-height: 1.9; }
.ftr small a { color: var(--cobalt); text-decoration: none; }

/* contact section */
.cs { padding: clamp(4rem, 12vw, 9rem) 0; scroll-margin-top: 4rem; }
.cs__grid { display: grid; gap: clamp(2rem, 6vw, 5rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .cs__grid { grid-template-columns: 1fr 1.1fr; } }
.cs__title { font-size: clamp(3rem, 9vw, 8rem); line-height: .92; margin-top: 1rem; text-transform: uppercase; }
.cs__sub { max-width: 32ch; margin-top: 1.5rem; font-size: 1.2rem; }
.cs__alt { margin-top: 1rem; color: var(--fg-mute); }
.cs__alt a { color: inherit; }
.cform { display: grid; gap: 1.5rem; }
.cform label { display: grid; gap: .5rem; font-family: var(--f-b); font-weight: 600; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; }
.cform input, .cform textarea { font: 500 1.35rem/1.4 var(--f-b); letter-spacing: 0; text-transform: none; color: inherit; background: transparent; border: 0; border-bottom: 2px solid currentColor; border-radius: 0; padding: .6rem 0; width: 100%; }
.cform textarea { min-height: 9rem; resize: vertical; }
.cform input:focus, .cform textarea:focus { outline: 0; border-bottom-width: 6px; padding-bottom: calc(.6rem - 4px); }
.cform .btn { justify-self: start; cursor: pointer; font-size: 1.1rem; padding: 1.1rem 2.2rem; }
.cform .btn:disabled { opacity: .6; cursor: wait; }
.cform__hp { position: absolute; left: -9999px; }
.cform__status { min-height: 1.4em; margin: 0; font-weight: 600; }
.cform__status[data-state="error"] { text-decoration: underline; }
