/* ==========================================================================
   potashev.com — hoja de estilos única
   Tokens → base → layout → componentes → responsive → dark → print
   ========================================================================== */

/* ---------- Fuentes (autoalojadas, sin peticiones a terceros) ---------- */
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/plex-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/plex-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/plex-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/plex-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --paper:      #FCFBF8;
  --paper-soft: #F7F5F0;
  --card:       #FFFFFF;
  --card-soft:  #FBFAF6;
  --ink:        #1A1815;
  --ink-2:      #2C2823;
  --body:       #45403A;
  --muted:      #55504A;
  --subtle:     #726A5E;
  --faint:      #C9C1B2;
  --line:       #EAE5DC;
  --line-2:     #DDD7CC;
  --line-dash:  #D8D1C3;
  --accent:     #2F5FD0;
  --accent-ink: #FCFBF8;
  --ok-ink:     #1F6B3E;
  --ok-bg:      #E8F3EB;
  --shot-bg:    #F1EEE7;

  --sans: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1080px;
  --gutter: 32px;
  --radius: 11px;
  --radius-lg: 13px;
  --section-y: 84px;
  --ring: 0 0 0 3px rgba(47, 95, 208, 0.35);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--sans); text-wrap: balance; }
p { text-wrap: pretty; }
img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: rgba(47, 95, 208, 0.16); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  font-size: 15px;
}
.skip:focus { left: 0; color: var(--paper); }

/* ---------- Tipografía de apoyo ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 0 0 18px;
}
.eyebrow--tight { margin-bottom: 16px; font-size: 12px; letter-spacing: 0.08em; }

.h2 {
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 44px;
  max-width: 26ch;
}

/* ---------- Cabecera ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-block: 14px;
}
.brand {
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14.5px;
  color: var(--muted);
}
.nav a { color: inherit; }
.header__actions { display: flex; align-items: center; gap: 10px; }

.lang {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 7px 11px;
  border: 1px solid var(--line-2);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.lang:hover { border-color: var(--ink); color: var(--ink); }

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.menu-btn svg { width: 17px; height: 17px; }
.menu-btn__close { display: none; }
.menu-btn[aria-expanded='true'] .menu-btn__open { display: none; }
.menu-btn[aria-expanded='true'] .menu-btn__close { display: block; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 500;
  padding: 13px 22px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn--sm { font-size: 15px; padding: 11px 18px; border-radius: 8px; }
.btn--xs { font-size: 14.5px; padding: 9px 16px; border-radius: 8px; }

/* ---------- Secciones ---------- */
.section { border-top: 1px solid var(--line); padding-block: var(--section-y); }
.section--last { padding-bottom: calc(var(--section-y) + 12px); }

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-block: 96px 88px;
}
.hero__eyebrow { margin-bottom: 26px; }
.hero h1 {
  font-weight: 700;
  font-size: clamp(36px, 5.2vw, 62px);
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin: 0 0 22px;
}
.hero__lead {
  font-size: clamp(17px, 1.6vw, 18.5px);
  line-height: 1.6;
  color: var(--body);
  max-width: 56ch;
  margin: 0 0 32px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }
.hero__facts { margin: 0; font-family: var(--mono); font-size: 13px; color: var(--subtle); }

.portrait {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--paper-soft);
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--card) 70%, transparent), transparent 70%),
    repeating-linear-gradient(135deg, var(--paper-soft) 0 6px, var(--paper) 6px 12px);
}
.portrait__monogram {
  font-size: clamp(48px, 7vw, 76px);
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--faint);
  user-select: none;
}


/* Retrato ilustrado: círculo sobre el papel, sin marco */
.portrait--circle {
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  align-self: center;
  justify-self: center;
  width: min(100%, 440px);
}
.portrait--circle img { transform: scale(1.04); }

/* ---------- Sobre mí ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.about__text { display: flex; flex-direction: column; gap: 22px; font-size: clamp(16.5px, 1.5vw, 18px); line-height: 1.62; color: var(--ink-2); }
.about__text p { margin: 0; }

.factcard {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.factcard__label {
  margin: 0 0 7px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}
.factcard__value { margin: 0; font-size: 15.5px; line-height: 1.6; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- Tarjetas de servicios ---------- */
.cards { display: grid; grid-template-columns: 1fr; gap: 18px; }
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 28px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--faint); }
.card h3 { font-weight: 600; font-size: 21px; line-height: 1.28; margin: 0 0 12px; }
.card p { font-size: 16px; line-height: 1.6; color: var(--body); margin: 0; }

/* ---------- Producto destacado ---------- */
.product {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  overflow: hidden;
  margin-bottom: 44px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.product__body { padding: 36px; }
.product__tags { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.badge {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ok-ink);
  background: var(--ok-bg);
  border-radius: 20px;
  padding: 5px 11px;
}
.product__platform { font-family: var(--mono); font-size: 12px; color: var(--subtle); }
.product h3 { font-weight: 600; font-size: clamp(26px, 3vw, 30px); line-height: 1.15; margin: 0 0 14px; }
.product p { font-size: 16.5px; line-height: 1.6; color: var(--body); margin: 0 0 24px; }
.product__note { font-size: 15.5px; margin-bottom: 26px; }
.product__links { display: flex; gap: 12px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat { border-top: 1px solid var(--line); padding-top: 12px; }
.stat__value { margin: 0; font-weight: 600; font-size: 25px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat__label { margin: 0; font-size: 13.5px; color: var(--subtle); line-height: 1.4; }

.shot {
  border-left: 1px solid var(--line);
  background: var(--shot-bg);
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.shot--empty {
  align-items: flex-end;
  padding: 18px;
  background: repeating-linear-gradient(135deg, var(--paper-soft) 0 6px, var(--card-soft) 6px 12px);
}
.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--subtle);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 8px;
}

/* ---------- Productos en desarrollo ---------- */
.wip { display: grid; grid-template-columns: 1fr; gap: 18px; }
.wip__card {
  border: 1px dashed var(--line-dash);
  border-radius: var(--radius);
  padding: 26px;
  background: var(--card-soft);
}
.wip__card h3 { font-weight: 600; font-size: 20px; margin: 0 0 10px; }
.wip__card p { font-size: 15.5px; line-height: 1.6; color: var(--body); margin: 0; }

/* ---------- Método ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 34px; }
.step__num { font-weight: 600; font-size: 34px; color: var(--faint); line-height: 1; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.step p { font-size: 17px; line-height: 1.6; color: var(--ink-2); margin: 0; }

/* ---------- Contacto ---------- */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.contact h2 {
  font-weight: 700;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0 0 18px;
}
.contact__text { font-size: 17.5px; line-height: 1.6; color: var(--body); margin: 0 0 14px; max-width: 46ch; }
.contact__note { font-size: 15.5px; color: var(--subtle); margin: 0; max-width: 46ch; }
.contact__list { display: flex; flex-direction: column; gap: 14px; }
.contact__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 20px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  transition: border-color 0.15s ease;
}
.contact__item:hover { border-color: var(--ink); color: var(--ink); }
.contact__label {
  display: block;
  margin: 0 0 5px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
}
.contact__value { font-size: clamp(15px, 2.4vw, 17px); word-break: break-word; }
.contact__arrow { color: var(--subtle); flex: none; }
.contact__item:hover .contact__arrow { color: var(--accent); }

/* ---------- Pie ---------- */
.footer { border-top: 1px solid var(--line); background: var(--paper-soft); }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  padding-block: 26px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--subtle);
}

/* Cuatro tarjetas → dos columnas equilibradas, no 3 + 1 huérfana */
@media (min-width: 720px) {
  .cards, .wip { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 40px; padding-block: 72px 64px; }
  .hero__media { max-width: 360px; justify-self: start; }
  .about { grid-template-columns: 1fr; gap: 36px; }
  .product { grid-template-columns: 1fr; }
  .shot { border-left: 0; border-top: 1px solid var(--line); min-height: 0; aspect-ratio: 16 / 11; }
  .shot img { object-position: top center; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 760px) {
  :root { --gutter: 20px; --section-y: 60px; }
  .header__inner { gap: 12px; }
  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin: 0;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 6px 0 12px;
    font-size: 16px;
  }
  .nav[hidden] { display: none; }
  .nav a { padding: 12px var(--gutter); }
  .header__actions { margin-left: auto; }
  .product__body { padding: 26px 22px; }
  .card { padding: 24px 22px; }
  .wip__card { padding: 22px; }
  .hero h1 { font-size: clamp(32px, 8vw, 42px); }
  .btn { width: 100%; }
  .btn--sm, .btn--xs, .header .btn { width: auto; }
  .steps { gap: 26px; }
}

@media (max-width: 380px) {
  .header .btn--xs { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- Modo oscuro ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #15140F;
    --paper-soft: #1B1A15;
    --card:       #1D1C17;
    --card-soft:  #1A1914;
    --ink:        #F3F0E8;
    --ink-2:      #E6E2D8;
    --body:       #C6C0B4;
    --muted:      #B3ADA1;
    --subtle:     #948D80;
    --faint:      #5A544A;
    --line:       #2E2C26;
    --line-2:     #3A372F;
    --line-dash:  #3E3A32;
    --accent:     #8FB0FF;
    --accent-ink: #14130F;
    --ok-ink:     #7FD1A0;
    --ok-bg:      #17301F;
    --shot-bg:    #201E19;
    --ring: 0 0 0 3px rgba(143, 176, 255, 0.35);
  }
  .btn--primary { background: var(--ink); color: var(--paper); }
  .btn--primary:hover { background: var(--accent); color: var(--accent-ink); }
  .shot img { filter: brightness(0.94); }
  img { color-scheme: dark; }
}

/* ---------- Impresión ---------- */
@media print {
  .header, .skip, .hero__cta, .menu-btn, .lang { display: none !important; }
  body { background: #fff; color: #000; }
  .section { border-color: #ddd; padding-block: 24px; }
  a::after { content: ' (' attr(href) ')'; font-size: 11px; color: #555; }
  a[href^='#']::after { content: ''; }
}

/* ---------- Sección activa en la navegación ---------- */
.nav a[aria-current='true'] { color: var(--ink); }
@media (min-width: 761px) {
  .nav a { position: relative; }
  .nav a[aria-current='true']::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 1px;
    background: currentColor;
  }
}
