/* =================================================================
   GOOD ROBOTS CLUB — styles.css
   Vanilla. Cero frameworks. El peso ligero es parte del flex.
   ================================================================= */

:root {
  /* ---- palette (extraída del branding) ---- */
  --forest:      #14211c;   /* fondo profundo */
  --forest-2:    #1b2b25;   /* paneles */
  --forest-3:    #223a31;   /* bordes / hover */
  --sage:        #5b8a72;   /* verde primario */
  --sage-light:  #8fbfa8;   /* menta acento / glow */
  --cream:       #f4eedd;   /* texto principal */
  --cream-dim:   #c9c6b6;   /* texto secundario */
  --ink:         #0c1512;   /* contornos */

  --glow: 0 0 24px rgba(143, 191, 168, .35);

  /* ---- type ---- */
  --display: "Fredoka", system-ui, sans-serif;
  --serif:   "Fraunces", Georgia, serif;
  --mono:    "Space Mono", ui-monospace, "SF Mono", monospace;
  --body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 18px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  font-family: var(--body);
  background: var(--forest);
  color: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* soft radial atmosphere */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60% 50% at 78% 8%, rgba(91,138,114,.22), transparent 60%),
    radial-gradient(50% 60% at 8% 90%, rgba(143,191,168,.10), transparent 60%),
    var(--forest);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--sage-light); color: var(--ink); }

[data-mono] { font-family: var(--mono); }

/* =================================================================
   CRT OVERLAYS
   ================================================================= */
.crt {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  background: repeating-linear-gradient(
    to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px,
    rgba(0,0,0,.05) 3px, rgba(0,0,0,.05) 3px);
  mix-blend-mode: multiply; opacity: .5;
}
.crt::after { /* vignette */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 120% at 50% 50%, transparent 62%, rgba(0,0,0,.45));
}
.grain {
  position: fixed; inset: -50%; z-index: 9001; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 6s steps(6) infinite;
}
@keyframes grain {
  0%{transform:translate(0,0)} 20%{transform:translate(-4%,2%)} 40%{transform:translate(3%,-3%)}
  60%{transform:translate(-2%,4%)} 80%{transform:translate(4%,1%)} 100%{transform:translate(0,0)}
}

/* =================================================================
   BOOT / POWER-ON
   ================================================================= */
.is-booting { overflow: hidden; }
.boot {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--forest);
  display: grid; place-items: center;
  transition: opacity .5s var(--ease), visibility .5s;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__screen { width: min(420px, 80vw); color: var(--sage-light); font-size: 13px; }
.boot__line { opacity: 0; transform: translateY(4px); }
.boot.run .boot__line { animation: bootln .4s var(--ease) forwards; }
.boot.run .boot__line:nth-child(2) { animation-delay: .35s; }
@keyframes bootln { to { opacity: 1; transform: none; } }
.boot__bar { margin-top: 14px; height: 6px; border: 1px solid var(--forest-3); border-radius: 4px; overflow: hidden; }
.boot__bar > span { display: block; height: 100%; width: 0; background: var(--sage-light); box-shadow: var(--glow); }
.boot.run .boot__bar > span { animation: bootbar 1.1s .3s var(--ease) forwards; }
@keyframes bootbar { to { width: 100%; } }
.dots::after { content: ""; animation: dots 1s steps(4) infinite; }
@keyframes dots { 0%{content:""} 25%{content:"."} 50%{content:".."} 75%{content:"..."} }

/* the screen-collapse flash when boot finishes */
.boot.collapse { animation: tvoff .45s var(--ease) forwards; }
@keyframes tvoff {
  0% { transform: scaleY(1); opacity: 1; }
  60% { transform: scaleY(.006); opacity: 1; background: var(--cream); }
  100% { transform: scaleY(.006) scaleX(0); opacity: 0; }
}

/* =================================================================
   SKIP LINK
   ================================================================= */
.skip-link {
  position: fixed; top: -100px; left: 12px; z-index: 11000;
  background: var(--sage-light); color: var(--ink); padding: 10px 14px;
  border-radius: 10px; font-family: var(--mono); font-size: 13px;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* =================================================================
   LOGO
   ================================================================= */
.logo { display: inline-flex; align-items: baseline; gap: .28em; line-height: 1; }
.logo__word {
  font-family: var(--display); font-weight: 700; letter-spacing: .01em;
  font-size: 1.4rem; color: var(--cream);
  display: inline-flex; align-items: center;
}
.logo__word--2 { color: var(--cream); }
.logo .eye {
  width: .62em; height: .62em; border-radius: 50%;
  background: var(--cream);
  border: .14em solid var(--ink);
  display: inline-block; position: relative;
  margin: 0 .02em; transform: translateY(.04em);
}
.logo .eye::after { /* pupil */
  content: ""; position: absolute; width: 42%; height: 42%; border-radius: 50%;
  background: var(--ink); top: 26%; left: 28%;
}
.logo__club {
  font-family: var(--serif); font-style: italic; font-weight: 600;
  color: var(--sage-light); font-size: 1.15rem; margin-left: .15em;
}

/* =================================================================
   NAV
   ================================================================= */
.nav {
  position: sticky; top: 0; z-index: 8000;
  display: flex; align-items: center; gap: 1.4rem;
  padding: .85rem clamp(1rem, 4vw, 2.4rem);
  background: color-mix(in srgb, var(--forest) 72%, transparent);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--sage) 24%, transparent);
}
.nav__logo { margin-right: auto; }
.nav__logo .logo__word { font-size: 1.2rem; }
.nav__logo .logo__club { font-size: 1rem; }
.nav__links { display: flex; gap: 1.4rem; }
.nav__links a {
  font-family: var(--mono); font-size: .82rem; color: var(--cream-dim);
  position: relative; padding: 4px 0; transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--sage-light); transition: width .25s var(--ease);
}
.nav__links a:hover { color: var(--cream); }
.nav__links a:hover::after { width: 100%; }
.nav__actions { display: flex; align-items: center; gap: .8rem; }

.langtoggle {
  font-family: var(--mono); font-size: .8rem; background: none; border: none;
  color: var(--cream-dim); cursor: pointer; display: inline-flex; gap: .35em;
  padding: 6px; border-radius: 8px;
}
.langtoggle__opt { transition: color .2s; }
.langtoggle__opt.is-active { color: var(--sage-light); font-weight: 700; }
.langtoggle__sep { opacity: .4; }

/* =================================================================
   BUTTONS
   ================================================================= */
.btn {
  --bg: var(--sage-light);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  color: var(--ink); background: var(--bg);
  padding: .8em 1.5em; border: 2px solid var(--ink); border-radius: 999px;
  cursor: pointer; position: relative; transition: transform .15s var(--ease), box-shadow .2s, background .2s;
  box-shadow: 4px 4px 0 var(--ink);
  will-change: transform;
}
.btn:hover { background: var(--cream); transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--ink); }
.btn:active { transform: translate(2px,2px); box-shadow: 1px 1px 0 var(--ink); }
.btn--ghost { background: transparent; color: var(--cream); border-color: var(--sage); box-shadow: none; }
.btn--ghost:hover { background: color-mix(in srgb, var(--sage) 22%, transparent); color: var(--cream); transform: translateY(-2px); box-shadow: none; }
.btn--sm { font-size: .85rem; padding: .55em 1.1em; box-shadow: 3px 3px 0 var(--ink); }
.btn--xs { font-size: .8rem; padding: .45em .9em; box-shadow: 2px 2px 0 var(--ink); }
.btn--block { width: 100%; }

/* =================================================================
   LAYOUT / SECTIONS
   ================================================================= */
main { display: block; }
section { padding: clamp(3.5rem, 9vw, 7rem) clamp(1.1rem, 5vw, 3rem); max-width: var(--maxw); margin-inline: auto; }
.section-head { max-width: 760px; margin-bottom: 2.6rem; }
.section-eyebrow { color: var(--sage-light); font-size: .82rem; letter-spacing: .06em; margin-bottom: .8rem; }
.section-title {
  font-family: var(--display); font-weight: 600; line-height: 1.04;
  font-size: clamp(1.8rem, 5vw, 3.1rem); letter-spacing: -.01em;
}
.section-sub { color: var(--cream-dim); font-size: 1.05rem; margin-top: .9rem; max-width: 620px; }
.hl { color: var(--sage-light); }

/* reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* =================================================================
   HERO
   ================================================================= */
.hero { padding-top: clamp(2rem, 6vw, 4rem); padding-bottom: 0; }
.hero__grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
}
.eyebrow { color: var(--sage-light); font-size: .85rem; letter-spacing: .05em; margin-bottom: 1.1rem; }
.hero__title {
  font-family: var(--display); font-weight: 600; line-height: 1.02;
  font-size: clamp(2.3rem, 6.6vw, 4.4rem); letter-spacing: -.02em;
  display: flex; flex-direction: column;
}
.hero__title .hl { text-shadow: 0 0 30px rgba(143,191,168,.35); }
.hero__title-sub {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.1rem, 2.6vw, 1.7rem); color: var(--cream-dim);
  letter-spacing: 0; margin-top: .4rem;
}
.hero__lead { font-size: clamp(1rem, 1.4vw, 1.18rem); color: var(--cream-dim); max-width: 30ch; margin: 1.6rem 0 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; }
.hero__hint { margin-top: 1.6rem; color: var(--cream-dim); opacity: .7; font-size: .78rem; }
kbd {
  font-family: var(--mono); background: var(--forest-2); border: 1px solid var(--forest-3);
  border-bottom-width: 3px; border-radius: 6px; padding: 1px 7px; font-size: .85em; color: var(--sage-light);
}

/* mascot */
.hero__bot { display: grid; place-items: center; }
.bot { width: clamp(260px, 34vw, 420px); height: auto; overflow: visible; }
.bot__caption { margin-top: .4rem; color: var(--cream-dim); opacity: .55; font-size: .72rem; }

.bot__head { transform-box: fill-box; transform-origin: center bottom; }
.bot__shadow { fill: rgba(0,0,0,.35); }
.bot__tv, .bot__cap path, .bot__knob, .bot__hand { fill: var(--sage); stroke: var(--ink); stroke-width: 6; }
.bot__brim { fill: var(--forest-2) !important; }
.bot__badge { fill: var(--forest-2); stroke: var(--ink); stroke-width: 4; }
.bot__badge-g { fill: var(--sage-light); font-family: var(--display); font-weight: 700; font-size: 15px; }
.bot__antenna { stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.bot__antenna-tip { fill: var(--sage-light); stroke: var(--ink); stroke-width: 4; }
.bot__vent { fill: var(--ink); }
.bot__screen { fill: var(--cream); stroke: var(--ink); stroke-width: 6; }
.bot__sclera { fill: #fff; stroke: var(--ink); stroke-width: 4; }
.bot__iris { fill: var(--sage); }
.bot__dot { fill: var(--ink); }
.bot__shine { fill: #fff; }
.bot__brow { fill: none; stroke: var(--ink); stroke-width: 6; stroke-linecap: round; }
.bot__mouth { fill: var(--ink); }
.bot__pupil { transition: transform .12s ease-out; }
.bot__lid { fill: var(--cream); }
.bot__limb { stroke: var(--sage); stroke-width: 14; stroke-linecap: round; }
.bot__arm { transform-box: fill-box; transform-origin: 324px 300px; }
.bot.wave .bot__arm { animation: wave 1s var(--ease); }
@keyframes wave { 0%,100%{transform:rotate(0)} 25%{transform:rotate(-16deg)} 75%{transform:rotate(8deg)} }
.bot__scan {
  fill: url(#none); fill: rgba(143,191,168,.10);
  animation: screenscan 4s linear infinite;
}
@keyframes screenscan { 0%{transform:translateY(-150px)} 100%{transform:translateY(150px)} }
.bot:not(.idle) { /* float */ animation: float 6s ease-in-out infinite; }
@keyframes float { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-10px)} }

/* ticker */
.ticker { margin-top: clamp(2rem, 5vw, 3.5rem); overflow: hidden; border-block: 2px solid color-mix(in srgb, var(--sage) 30%, transparent); padding: .7rem 0; }
.ticker__track { display: flex; gap: 0; width: max-content; animation: tick 28s linear infinite; }
.ticker__track span { font-family: var(--display); font-weight: 600; color: var(--sage-light); white-space: nowrap; font-size: 1rem; letter-spacing: .04em; }
@keyframes tick { to { transform: translateX(-50%); } }
.ticker:hover .ticker__track { animation-play-state: paused; }

/* =================================================================
   MANIFESTO
   ================================================================= */
.manifesto { text-align: center; max-width: 900px; }
.manifesto__lead {
  font-family: var(--display); font-weight: 600; line-height: 1.06;
  font-size: clamp(1.9rem, 6vw, 3.6rem); letter-spacing: -.02em;
  display: flex; flex-direction: column; gap: .1em; margin-bottom: 1.6rem;
}
.manifesto__body { font-size: clamp(1.02rem, 1.6vw, 1.25rem); color: var(--cream-dim); max-width: 60ch; margin-inline: auto; }
.manifesto__body em { font-family: var(--serif); font-style: italic; color: var(--cream); }

/* =================================================================
   WORK / CARDS
   ================================================================= */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.card {
  position: relative; background: var(--forest-2);
  border: 2px solid var(--forest-3); border-radius: var(--radius);
  padding: 1.8rem; overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.card::before { /* CRT sweep on hover */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(143,191,168,.10) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .6s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--sage); box-shadow: 0 18px 40px -22px rgba(0,0,0,.8); }
.card:hover::before { transform: translateX(120%); }
.card__num { font-family: var(--mono); color: var(--sage-light); font-size: .85rem; opacity: .7; margin-bottom: 1.4rem; }
.card h3 { font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1.12; margin-bottom: .6rem; }
.card p { color: var(--cream-dim); font-size: 1rem; }

/* =================================================================
   THE WAY / STEPS
   ================================================================= */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: s; }
.step { border-top: 2px solid var(--sage); padding-top: 1.1rem; }
.step__k { font-family: var(--mono); font-size: .76rem; color: var(--sage-light); letter-spacing: .08em; display: block; margin-bottom: .7rem; }
.step p { color: var(--cream-dim); }

/* =================================================================
   CREW
   ================================================================= */
.crew { text-align: center; }
.crew .section-head { margin-inline: auto; }
.units { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 2.4rem 0 1.6rem; }
.unit { background: var(--forest-2); border: 2px solid var(--forest-3); border-radius: var(--radius); padding: 1.6rem .8rem; transition: transform .2s var(--ease), border-color .2s; }
.unit:hover { transform: translateY(-5px) rotate(-1deg); border-color: var(--sage-light); }
.unit__face { font-size: 1.7rem; color: var(--sage-light); letter-spacing: .12em; margin-bottom: .9rem; }
.unit figcaption { font-size: .76rem; color: var(--cream-dim); }
.crew__note { color: var(--cream-dim); max-width: 50ch; margin: 0 auto; }
.crew__note code, .manifesto code { font-family: var(--mono); color: var(--sage-light); background: var(--forest-2); padding: 1px 6px; border-radius: 6px; }

/* =================================================================
   CONTACT
   ================================================================= */
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.6rem, 5vw, 4rem); align-items: start; }
.mail {
  display: inline-flex; align-items: center; margin-top: 1.6rem;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: var(--cream);
  border-bottom: 2px dashed var(--sage); padding-bottom: 4px; transition: color .2s, border-color .2s;
}
.mail:hover { color: var(--sage-light); border-color: var(--sage-light); }
.contact__joke { color: var(--cream-dim); opacity: .7; font-size: .8rem; margin-top: .8rem; }
.socials { display: flex; gap: 1.4rem; margin-top: 2rem; }
.socials a { font-family: var(--mono); font-size: .9rem; color: var(--sage-light); transition: transform .2s; }
.socials a:hover { transform: translateX(3px); }

.form { background: var(--forest-2); border: 2px solid var(--forest-3); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-family: var(--mono); font-size: .78rem; color: var(--sage-light); margin-bottom: .5rem; letter-spacing: .04em; }
.field input, .field textarea {
  width: 100%; background: var(--forest); color: var(--cream);
  border: 2px solid var(--forest-3); border-radius: 12px; padding: .8rem 1rem;
  font-family: var(--body); font-size: 1rem; transition: border-color .2s, box-shadow .2s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sage-light); box-shadow: var(--glow); }
.field input::placeholder, .field textarea::placeholder { color: color-mix(in srgb, var(--cream-dim) 60%, transparent); }
.hp { position: absolute; left: -9999px; opacity: 0; }
.form__status { margin-top: 1rem; font-size: .85rem; min-height: 1.2em; }
.form__status.ok { color: var(--sage-light); }
.form__status.err { color: #e8a07a; }

/* =================================================================
   FOOTER
   ================================================================= */
.footer { text-align: center; padding: clamp(2.5rem, 6vw, 4rem) 1.2rem; border-top: 1px solid color-mix(in srgb, var(--sage) 22%, transparent); }
.footer__logo { justify-content: center; margin-bottom: 1rem; }
.footer__tag { font-family: var(--serif); font-style: italic; color: var(--cream); font-size: 1.1rem; }
.footer__meta { color: var(--cream-dim); opacity: .55; font-size: .76rem; margin-top: .7rem; }

/* =================================================================
   TERMINAL
   ================================================================= */
.term { position: fixed; inset: 0; z-index: 9500; display: grid; place-items: center; background: rgba(0,0,0,.55); backdrop-filter: blur(4px); }
.term[hidden] { display: none; }
.term__win {
  width: min(620px, 92vw); background: #0a120f; border: 2px solid var(--sage);
  border-radius: 14px; box-shadow: 0 30px 80px -20px #000, var(--glow); overflow: hidden;
  animation: termin .3s var(--ease);
}
@keyframes termin { from { transform: translateY(20px) scale(.97); opacity: 0; } }
.term__bar { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; background: var(--forest-2); border-bottom: 1px solid var(--forest-3); }
.term__dot { width: 11px; height: 11px; border-radius: 50%; background: var(--forest-3); }
.term__dot:nth-child(1){ background:#e8a07a; } .term__dot:nth-child(2){ background:#e8cf7a; } .term__dot:nth-child(3){ background: var(--sage-light); }
.term__title { color: var(--cream-dim); font-size: .78rem; margin-left: .4rem; }
.term__close { margin-left: auto; background: none; border: 1px solid var(--forest-3); color: var(--cream-dim); border-radius: 6px; font-family: var(--mono); font-size: .72rem; padding: 2px 8px; cursor: pointer; }
.term__body { padding: 1rem; height: 280px; overflow-y: auto; font-size: .85rem; color: var(--sage-light); line-height: 1.5; white-space: pre-wrap; }
.term__body .u { color: var(--cream); }
.term__body .er { color: #e8a07a; }
.term__input { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; border-top: 1px solid var(--forest-3); }
.term__prompt { color: var(--sage-light); }
.term__input input { flex: 1; background: none; border: none; outline: none; color: var(--cream); font-size: .85rem; }

/* =================================================================
   CONSENT
   ================================================================= */
.consent {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 8500; width: min(560px, 92vw);
  background: var(--forest-2); border: 2px solid var(--sage); border-radius: 14px;
  padding: 1rem 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem;
  box-shadow: 0 20px 50px -18px #000; animation: termin .4s var(--ease);
}
.consent[hidden] { display: none; }
.consent p { font-size: .82rem; color: var(--cream-dim); flex: 1; min-width: 220px; }
.consent__btns { display: flex; gap: .6rem; }

/* =================================================================
   RESPONSIVE
   ================================================================= */
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__bot { order: -1; }
  .bot { width: clamp(220px, 60vw, 320px); }
  .hero__lead { max-width: 46ch; }
  .contact__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .nav__links { display: none; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .units { grid-template-columns: repeat(2, 1fr); }
  .socials { justify-content: flex-start; }
}
@media (max-width: 420px) {
  .nav { gap: .6rem; }
  .nav__logo .logo__club { display: none; }
}
