/* ============================================================
   rameseba.com — v2 · editorial dev brutalism
   negro cálido · off-white · lima eléctrica · Clash Display
   ============================================================ */

@font-face {
  font-family: "Clash";
  src: url("/assets/fonts/clash-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Clash";
  src: url("/assets/fonts/clash-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Clash";
  src: url("/assets/fonts/clash-700.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --bg: #0b0b09;
  --bg2: #111110;
  --ink: #f2f1ea;
  --mut: #a9a89e;
  --acc: #d2f34c;
  --line: #ffffff1f;
  --display: "Clash", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --monof: ui-monospace, "Cascadia Code", Consolas, "SF Mono", monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 86px; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* grano sutil */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--acc); color: #0b0b09; }

a { color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 2px; }

.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.mono { font-family: var(--monof); }
.dim { color: var(--mut); }

.skip-link {
  position: absolute; left: -9999px; top: 12px; z-index: 999;
  background: var(--acc); color: #0b0b09; padding: 10px 18px;
  font-family: var(--monof); font-size: 14px; text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* ---------------- nav ---------------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.is-scrolled {
  background: #0b0b09e6;
  backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.nav-inner {
  width: min(1180px, 92vw); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px;
}
.brand {
  font-family: var(--monof); font-size: 17px; font-weight: 600;
  color: var(--ink); text-decoration: none; letter-spacing: -.02em;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 0;
}
.brand-cursor { color: var(--acc); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.nav-links {
  display: flex; align-items: center; gap: 6px; list-style: none;
}
.nav-links a {
  font-family: var(--monof); font-size: 14px; color: var(--mut);
  text-decoration: none; padding: 12px 14px; display: inline-block;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links .nav-cta {
  color: #0b0b09; background: var(--acc); font-weight: 600;
  margin-left: 10px; padding: 11px 22px;
  transition: transform .2s, box-shadow .2s;
}
.nav-links .nav-cta:hover { color: #0b0b09; transform: translateY(-2px); box-shadow: 0 6px 22px #d2f34c40; }

.nav-burger {
  display: none; background: none; border: 1px solid var(--line);
  color: var(--ink); font-size: 20px; cursor: pointer;
  width: 48px; height: 48px; align-items: center; justify-content: center;
}

/* ---------------- hero ---------------- */
.hero { padding: 168px 0 76px; }

.kicker {
  font-size: 14px; letter-spacing: .02em; margin-bottom: 26px;
  /* aísla el tipeo del hero: cada tick recalcula solo este párrafo */
  contain: layout style paint; min-height: 1.5em;
}
.caret {
  display: inline-block; width: 9px; height: 1.1em; margin-left: 3px;
  background: var(--acc); vertical-align: text-bottom;
  animation: blink 1s steps(1) infinite;
}

.hero-title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(46px, 8.4vw, 104px);
  line-height: .98; letter-spacing: -.025em;
  margin-bottom: 48px;
  text-wrap: balance;
}
.hero-title em { font-style: normal; color: var(--acc); }
.outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
}

.hero-cols {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 70px);
  align-items: start; margin-bottom: 44px;
}
.hero-sub { color: var(--mut); font-size: clamp(16.5px, 1.9vw, 19px); max-width: 52ch; }
.hero-sub strong { color: var(--ink); }

.terminal { border: 1px solid var(--line); background: var(--bg2); }
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ffffff26; }
.terminal-bar span { margin-left: 8px; font-size: 12px; color: var(--mut); }
.terminal pre {
  padding: 18px 20px; font-size: 13.5px; line-height: 1.9;
  white-space: pre-wrap; word-break: break-word;
  min-height: 168px;
}
.terminal .ok { color: #7ee787; }
.terminal .acc { color: var(--acc); }

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }

.btn {
  font-family: var(--monof); font-size: 15px; font-weight: 600;
  text-decoration: none; padding: 16px 30px; display: inline-flex; gap: 10px; align-items: center;
  transition: transform .2s, box-shadow .2s, background .2s, color .2s;
}
.btn-solid { background: var(--acc); color: #0b0b09; }
.btn-solid:hover { transform: translateY(-3px); box-shadow: 0 10px 30px #d2f34c4d; }
.btn-line { border: 1px solid var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--acc); color: var(--acc); transform: translateY(-3px); }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.stats > div { padding: 22px 18px 4px 0; border-right: 1px solid var(--line); }
.stats > div:last-child { border-right: 0; }
.stats dt {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(30px, 4vw, 46px); line-height: 1; color: var(--acc);
}
.stats dd { color: var(--mut); font-size: 13.5px; margin-top: 8px; }

/* ---------------- marquee ---------------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  background: var(--bg2); padding: 14px 0;
}
.marquee-track {
  display: flex; width: max-content;
  animation: scroll 30s linear infinite;
  font-size: 14px; color: var(--mut); text-transform: uppercase; letter-spacing: .14em;
}
.marquee-track span { white-space: nowrap; padding-right: 1ch; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------------- secciones ---------------- */
.section { padding: 104px 0; }
.section-line { border-top: 1px solid var(--line); }

.section-head { margin-bottom: 48px; }
.section-head h2, .contact-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.02; letter-spacing: -.02em;
}
.section-sub { color: var(--mut); max-width: 56ch; margin-top: 18px; }

/* ---------------- filtros ---------------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 44px; }
.filter {
  font-family: var(--monof); font-size: 14px;
  background: none; border: 1px solid var(--line); color: var(--mut);
  padding: 12px 20px; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.filter::before { content: "[ "; color: var(--mut); }
.filter::after { content: " ]"; color: var(--mut); }
.filter:hover { color: var(--ink); border-color: var(--acc); }
.filter.is-active { background: var(--acc); color: #0b0b09; border-color: var(--acc); }
.filter.is-active::before, .filter.is-active::after { color: #0b0b0999; }

/* ---------------- proyectos ---------------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }

.card {
  border: 1px solid var(--line); background: var(--bg2);
  display: flex; flex-direction: column;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-5px); border-color: #d2f34c80; box-shadow: 0 24px 60px #00000080; }
.card.is-hidden { display: none; }

.card-wide { grid-column: 1 / -1; flex-direction: row; }
.card-wide .shot { flex: 1.25; border-right: 1px solid var(--line); }
.card-wide .card-body { flex: 1; }

.shot { display: block; position: relative; overflow: hidden; }
.shot-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg);
}
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ffffff21; }
.shot-bar b {
  margin-left: 8px; font-weight: 400; font-size: 12px; color: var(--mut);
  border: 1px solid var(--line); padding: 2px 12px;
}
.shot img {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  display: block; transition: transform .5s ease; filter: saturate(.92);
}
.card:hover .shot img { transform: scale(1.03); }

.card-body { padding: 26px 28px 28px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.idx { color: var(--acc); font-size: 13px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.card-head h3 { font-family: var(--display); font-weight: 600; font-size: 25px; letter-spacing: -.01em; }
.card-desc { color: var(--mut); font-size: 15px; }

.chip {
  font-family: var(--monof); font-size: 12px; white-space: nowrap;
  color: var(--acc); border: 1px solid #d2f34c59; padding: 4px 12px;
}
.chip-soon { color: #f5c97b; border-color: #f5c97b59; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.tags li {
  font-size: 12.5px; color: var(--mut);
  border: 1px solid var(--line); padding: 4px 11px;
}

.card-link {
  margin-top: auto; align-self: flex-start;
  font-size: 14.5px; font-weight: 600; color: var(--acc); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 0; border-bottom: 1px solid transparent;
  transition: gap .2s, border-color .2s;
}
.card-link:hover { gap: 14px; border-bottom-color: var(--acc); }
.card-link.is-soon { color: var(--mut); }

/* ---------------- proceso ---------------- */
.steps { list-style: none; margin-top: 10px; }
.step {
  display: grid; grid-template-columns: 140px 1fr; gap: 26px;
  padding: 36px 0; border-bottom: 1px solid var(--line);
}
.step:first-child { border-top: 1px solid var(--line); }
.step-num {
  font-size: clamp(26px, 3.4vw, 40px); color: var(--acc); line-height: 1.1;
}
.step h3 { font-family: var(--display); font-weight: 600; font-size: 23px; margin-bottom: 8px; }
.step p { color: var(--mut); max-width: 62ch; }

/* ---------------- stack ---------------- */
.stack {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px;
  border-top: 1px solid var(--line); padding-top: 40px;
}
.stack-col h3 { font-size: 14px; font-weight: 600; color: var(--acc); margin-bottom: 18px; }
.stack-col ul { list-style: none; }
.stack-col li {
  font-size: 14px; color: var(--mut); padding: 7px 0;
  border-bottom: 1px solid #ffffff0f;
}
.stack-col li::before { content: "+ "; color: var(--acc); }

/* ---------------- contacto ---------------- */
.contact-title { margin: 20px 0 22px; }
.contact-go {
  color: var(--acc); text-decoration: none;
  border-bottom: 3px solid var(--acc);
  transition: padding-left .25s;
  display: inline-block;
}
.contact-go:hover { padding-left: 14px; }
.contact-sub { color: var(--mut); max-width: 50ch; margin-bottom: 42px; }

.contact-links { list-style: none; display: flex; flex-wrap: wrap; gap: 14px 38px; }
.contact-links a {
  font-size: 15.5px; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding: 8px 0; display: inline-block;
  transition: color .2s, border-color .2s;
}
.contact-links a:hover { color: var(--acc); border-color: var(--acc); }

/* ---------------- footer ---------------- */
.footer { border-top: 1px solid var(--line); padding: 26px 0; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--mut);
}

/* ---------------- 404 ---------------- */
.e404 { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 20px; }
.e404-tag { color: var(--acc); font-size: 14px; margin-bottom: 18px; }
.e404-title {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(40px, 8vw, 84px); line-height: 1; letter-spacing: -.02em;
  margin-bottom: 22px;
}
.e404-sub { color: var(--mut); margin-bottom: 34px; }

/* ---------------- reveal (scroll-driven, sin JS) ---------------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .card, .step, .stack-col {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 55%;
    }
  }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------- responsive ---------------- */
@media (max-width: 980px) {
  .hero-cols { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .card-wide { flex-direction: column; }
  .card-wide .shot { border-right: 0; }
  .stack { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .hero { padding-top: 140px; }
  .nav-burger { display: flex; }
  .nav-links {
    position: fixed; top: 69px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #0b0b09f7; backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    padding: 10px 4vw 18px;
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav-links a { padding: 15px 10px; border-bottom: 1px solid #ffffff0f; }
  .nav-links .nav-cta { margin: 14px 0 0; text-align: center; justify-content: center; display: block; }

  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div { border-right: 0; border-bottom: 1px solid var(--line); padding-bottom: 18px; }
  .stats > div:nth-child(odd) { border-right: 1px solid var(--line); }
  .stats > div { padding-left: 0; }
  .stats > div:nth-child(even) { padding-left: 18px; }

  .step { grid-template-columns: 1fr; gap: 8px; padding: 28px 0; }
  .stack { grid-template-columns: 1fr; gap: 34px; }
  .card-body { padding: 22px 20px 24px; }
  .section { padding: 80px 0; }
}
