@font-face { font-family: "Familjen Grotesk"; font-weight: 500; font-display: swap; src: url("/fonts/familjen-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Familjen Grotesk"; font-weight: 700; font-display: swap; src: url("/fonts/familjen-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 400; font-display: swap; src: url("/fonts/instrument-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Sans"; font-weight: 600; font-display: swap; src: url("/fonts/instrument-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-display: swap; src: url("/fonts/dm-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 500; font-display: swap; src: url("/fonts/dm-mono-latin-500-normal.woff2") format("woff2"); }

/* Cuaderno de obra con los colores del logo: papel gris frío, tinta azul marino
   y el azul petróleo del escudo como acento (en oscuro, el fondo del logo y el plata). */
:root {
  --paper: #f1f3f4;
  --sheet: #fbfcfc;
  --ink: #0b161c;
  --muted: #56636b;
  --line: #d3dadf;
  --accent: #0e3a50;
  --accent-ink: #ffffff;
  --accent-soft: #e0e8ed;
  --live: #b4531f;
  --off: #8a9298;
  --shadow: 0 1px 2px rgba(4, 21, 29, .05), 0 14px 34px -18px rgba(14, 58, 80, .38);
  --display: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  color-scheme: only light;
}
/* Oscuro: el del sistema, salvo que se haya elegido claro con el botón; o elegido a mano. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #04151d; --sheet: #0a202a; --ink: #e3e7e9; --muted: #95a3aa; --line: #1c3441;
    --accent: #b9cfdb; --accent-ink: #04151d; --accent-soft: #10303e; --live: #f0915a; --off: #6f7f87;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -18px rgba(0, 0, 0, .7);
    color-scheme: only dark;
  }
}
:root[data-theme="dark"] {
    --paper: #04151d; --sheet: #0a202a; --ink: #e3e7e9; --muted: #95a3aa; --line: #1c3441;
    --accent: #b9cfdb; --accent-ink: #04151d; --accent-soft: #10303e; --live: #f0915a; --off: #6f7f87;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 14px 34px -18px rgba(0, 0, 0, .7);
    color-scheme: only dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 20px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--ink); color: var(--paper); padding: 8px 12px; text-decoration: none; }
.skip:focus { top: 12px; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; }
.mark img { width: 34px; height: 34px; border-radius: 8px; flex-shrink: 0; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }
nav { display: flex; align-items: center; gap: 22px; font-size: .95rem; margin-left: auto; }
nav a { text-decoration: none; color: var(--muted); transition: color 150ms ease; }
nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 6px; }
nav a.nav-cta { color: var(--ink); border: 1px solid var(--ink); padding: 7px 12px; border-radius: 999px; }
@media (hover: hover) and (pointer: fine) { nav a:hover { color: var(--ink); } nav a.nav-cta:hover { background: var(--ink); color: var(--paper); } }
.lang { margin-left: 8px; }
.theme-btn { margin-left: 18px; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; transition: border-color 150ms ease, transform 160ms var(--ease-out); }
.theme-btn:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .theme-btn:hover { border-color: var(--ink); } }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .sun { display: none; }
:root[data-modo="dark"] .theme-btn .sun { display: block; }
:root[data-modo="dark"] .theme-btn .moon { display: none; }
@media (max-width: 680px) {
  /* Fila 1: marca (se recorta si no cabe) + modo + idioma. Fila 2: menú. */
  .top-in { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 8px; row-gap: 0; padding-top: 12px; }
  .mark { min-width: 0; }
  .mark span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .theme-btn { grid-row: 1; grid-column: 2; margin: 0; }
  .lang { grid-row: 1; grid-column: 3; margin: 0; }
  .lang-btn { gap: 5px; padding: 0 8px; }
  .lang-menu { max-width: calc(100vw - 32px); }
  nav { grid-row: 2; grid-column: 1 / -1; width: 100%; margin: 0; gap: 20px; padding-block: 10px 12px; overflow-x: auto; scrollbar-width: none; }
  nav::-webkit-scrollbar { display: none; }
  nav a { white-space: nowrap; }
  nav a.nav-cta { border: 0; padding: 0; color: var(--muted); }
  .mark span { font-size: .98rem; }
  html { scroll-padding-top: 120px; }
}
@media (max-width: 400px) { .lang-btn .chev { display: none; } .mark { gap: 8px; } }
@media (max-width: 360px) { nav { gap: 14px; font-size: .9rem; } }

/* Selector de idioma */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 500 .8rem/1 var(--mono); letter-spacing: .04em; cursor: pointer; transition: border-color 150ms ease, transform 160ms var(--ease-out); }
.lang-btn:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .lang-btn:hover { border-color: var(--ink); } }
.flag { width: 22px; height: 16px; object-fit: cover; border-radius: 3px; flex-shrink: 0; box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 12%, transparent); }
.chev { color: var(--muted); transition: transform 200ms var(--ease-out); }
.lang.open .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 164px; margin: 0; padding: 5px; list-style: none; background: var(--sheet); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; transform-origin: top right; opacity: 0; transform: scale(.96) translateY(-4px); visibility: hidden; transition: opacity 150ms ease, transform 180ms var(--ease-out), visibility 0s linear 180ms; }
.lang.open .lang-menu { opacity: 1; transform: none; visibility: visible; transition: opacity 150ms ease, transform 180ms var(--ease-out), visibility 0s; }
.lang-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 500 .95rem/1.2 var(--body); text-align: left; cursor: pointer; }
.lang-menu button[aria-current="true"] { background: var(--accent-soft); font-weight: 600; }
@media (hover: hover) and (pointer: fine) { .lang-menu button:hover { background: var(--accent-soft); } }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-weight: 600; font-size: 1rem; line-height: 1; padding: 14px 20px; border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform 160ms var(--ease-out), background-color 160ms ease, color 160ms ease; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.small { padding: 11px 16px; font-size: .95rem; }
@media (hover: hover) and (pointer: fine) { .btn:hover { filter: brightness(1.08); } .btn.ghost:hover { border-color: var(--ink); filter: none; } }

/* Hero */
.hero { padding-block: clamp(56px, 10vw, 112px) 28px; }
.kicker { font-family: var(--mono); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 18px; }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(2.6rem, 7.4vw, 5.4rem); line-height: .98; letter-spacing: -.035em; margin: 0; max-width: 15ch; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); background-image: linear-gradient(var(--accent-soft), var(--accent-soft)); background-size: 100% .32em; background-position: 0 88%; background-repeat: no-repeat; }
.hero-foot { margin-top: clamp(32px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1.3fr) auto; gap: 24px 48px; align-items: end; border-top: 1px solid var(--ink); padding-top: 22px; }
@media (max-width: 760px) { .hero-foot { grid-template-columns: 1fr; } }
.now-t { font-family: var(--mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.now ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.now li { font-size: 1.05rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }

/* Páginas interiores */
.page-hero { padding-block: clamp(48px, 8vw, 96px) 32px; }
.page-hero h1 { font-size: clamp(2.6rem, 7vw, 4.6rem); }
.lead { margin: 20px 0 0; max-width: 60ch; font-size: 1.15rem; color: var(--muted); }

/* Bloques */
.block { padding-block: clamp(64px, 9vw, 104px) 0; }
.page-hero + .block { padding-top: 8px; }
.block-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 48px; align-items: end; margin-bottom: 28px; }
@media (max-width: 760px) { .block-head { grid-template-columns: 1fr; } }
h2 { font-family: var(--display); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1; letter-spacing: -.03em; margin: 0; }
.block-head p { margin: 0; color: var(--muted); max-width: 54ch; }
h3 { font-family: var(--display); font-weight: 700; font-size: 1.2rem; margin: 0 0 12px; letter-spacing: -.01em; }
.more { margin: 22px 0 0; }
.more a { color: var(--accent); font-weight: 600; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .more a:hover { text-decoration: underline; } }

/* Chips de estado */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.chip.live { border-color: color-mix(in srgb, var(--live) 50%, var(--line)); color: var(--live); }
.chip.ok { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); }
.chip.off { border-style: dashed; color: var(--off); }

/* Tarjetas */
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.cards.fit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 720px) { .cards.fit { grid-template-columns: 1fr; } }
.cards > li { display: flex; min-width: 0; }
.card { display: flex; flex-direction: column; width: 100%; background: var(--sheet); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-decoration: none; color: inherit; transition: transform 240ms var(--ease-out), box-shadow 240ms ease; }
a.card { box-shadow: 0 1px 2px rgba(4, 21, 29, .04); }
@media (hover: hover) and (pointer: fine) { a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); } a.card:hover .go { transform: translateX(3px); } }
.card-img { aspect-ratio: 16 / 10; max-width: 100%; border-bottom: 1px solid var(--line); background: var(--accent-soft); overflow: hidden; display: grid; place-items: center; }
.card-img img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card-img .initial { font-family: var(--display); font-weight: 700; font-size: 4rem; color: var(--accent); opacity: .5; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 20px; flex: 1; }
.card-body h3 { font-size: 1.45rem; line-height: 1.1; letter-spacing: -.02em; margin: 2px 0 0; }
.card-body > p { margin: 0; color: var(--muted); }
.go { margin-top: auto; padding-top: 6px; font-weight: 600; color: var(--accent); transition: transform 200ms var(--ease-out); align-self: flex-start; }
.card.svc .card-body { padding: 22px 22px 24px; gap: 12px; }
.inc-t { margin: 4px 0 0; font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.inc { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.inc li { position: relative; padding-left: 20px; }
.inc li::before { content: ""; position: absolute; left: 1px; top: .72em; width: 10px; height: 2px; background: var(--accent); }
.price { margin: 0; font-family: var(--mono); font-size: .9rem; color: var(--accent); }
.svc-btns { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.svc.is-off { background: transparent; border-style: dashed; }
.svc.is-off h3, .svc.is-off .card-body > p, .svc.is-off .inc li { color: var(--muted); }
.svc.is-off .inc li::before { background: var(--off); }

/* Aviso */
.note { margin: 0 0 22px; padding: 14px 18px; border-radius: 12px; background: var(--accent-soft); border-left: 3px solid var(--live); }

/* Pasos (orden real) */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: paso; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 32px; border-top: 1px solid var(--ink); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: paso; display: grid; gap: 6px; align-content: start; padding-block: 18px; border-bottom: 1px solid var(--line); }
.steps li::before { content: "Paso " counter(paso); font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
:root:lang(en) .steps li::before { content: "Step " counter(paso); }
.steps b { font-family: var(--display); font-size: 1.2rem; letter-spacing: -.01em; }
.steps span { color: var(--muted); }

/* Sobre mí */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px 48px; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.about-text { display: grid; gap: 14px; align-content: start; font-size: 1.12rem; max-width: 60ch; }
.about-text p { margin: 0; }
.stack ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.stack li { display: flex; justify-content: space-between; gap: 16px; padding-block: 11px; border-bottom: 1px solid var(--line); }
.stack b { font-weight: 600; }
.stack span { color: var(--muted); text-align: right; }

/* Bitácora */
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); max-width: 820px; }
.log li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px 24px; padding-block: 14px; border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .log li { grid-template-columns: 1fr; } }
.log time { font-family: var(--mono); font-size: .85rem; color: var(--muted); padding-top: 2px; }
.log a { color: var(--accent); }

/* Contacto */
.contact h2 { font-size: clamp(2.6rem, 7vw, 4.8rem); }
.contact > p { color: var(--muted); margin: 18px 0 10px; }
.mail-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.mail { font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 3.8vw, 2.2rem); letter-spacing: -.02em; user-select: all; overflow-wrap: anywhere; min-width: 0; }
.copied { margin: 10px 0 0; font-size: .92rem; color: var(--accent); min-height: 1.4em; }
.links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 18px 0 0; color: var(--muted); }
.links a { color: var(--muted); }

/* Páginas legales */
.legal { max-width: 68ch; padding-block: 56px 0; display: grid; gap: 26px; }
.legal h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
.legal h2 { font-size: 1.35rem; letter-spacing: -.01em; margin-bottom: 8px; }
.legal section { border-top: 1px solid var(--line); padding-top: 18px; min-width: 0; }
.legal > * { min-width: 0; }
.legal p { margin: 0 0 10px; }
.legal .upd { font-family: var(--mono); font-size: .82rem; color: var(--muted); margin-top: 12px; }
.legal a { color: var(--accent); }

footer.foot { margin-top: clamp(72px, 10vw, 120px); padding-block: 20px 36px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: .88rem; color: var(--muted); }
footer.foot p { margin: 0; }

/* Aviso de cookies */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px)); background: var(--sheet); border-top: 1px solid var(--line); box-shadow: 0 -14px 34px -20px rgba(4, 21, 29, .35); }
.cookie-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.cookie-in p { margin: 0; flex: 1 1 420px; min-width: 0; font-size: .95rem; color: var(--muted); }
.cookie-in a { color: var(--accent); white-space: nowrap; }
.cookie-btns { display: flex; gap: 10px; }
@media (max-width: 520px) { .cookie-btns { width: 100%; } .cookie-btns .btn { flex: 1; } }
.link-btn { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .link-btn:hover { color: var(--ink); } }
footer.foot a { color: inherit; }

/* Tabla de cookies */
.table-wrap { overflow-x: auto; margin: 6px 0 14px; border: 1px solid var(--line); border-radius: 10px; }
table.cookies { width: 100%; min-width: 460px; border-collapse: collapse; font-size: .92rem; }
table.cookies th, table.cookies td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
table.cookies th { font-family: var(--mono); font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--sheet); }
table.cookies tr:last-child td { border-bottom: 0; }
table.cookies code { font-family: var(--mono); font-size: .85rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pulse { animation: none; }
  .card, .go, .btn, .lang-btn, .theme-btn, .lang-menu, .lang.open .lang-menu, .chev { transition: none; }
}
