/* Aranjuez Technologies · estilos de aranjuez.dev
   Valores del manual de marca (paleta Atardecer, IBM Plex, estilo contundente).
   Las secciones claras usan la zona por defecto; las oscuras llevan la clase .zone-dark.
   Los componentes solo usan los tokens semánticos (--bg, --text, --frame…) y cambian solos de zona. */

@font-face { font-family: "IBM Plex Mono"; src: url(../fonts/ibm-plex-mono-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(../fonts/ibm-plex-mono-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(../fonts/ibm-plex-sans-400.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(../fonts/ibm-plex-sans-500.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(../fonts/ibm-plex-sans-600.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  /* Paleta */
  --navy: #13294B;
  --navy-2: #162F56;
  --navy-3: #1B3761;
  --navy-line: #2E4C7A;
  --navy-deep: #0C1C36;
  --ink: #0F1C33;
  --slate: #55607A;
  --mist: #BAC6DB;
  --cream: #FFF5F0;
  --coral: #FF6A4D;
  --coral-light: #FF8A70;
  --coral-text: #C23F26;
  --coral-detail: #E8553A;
  --sun: #FFC857;
  --blush: #FFF1EB;
  --blush-line: #F0E1DA;
  --white: #FFFFFF;
  --online: #1F9D55;

  /* Tipografía */
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Medidas */
  --maxw: 1160px;
  --gutter: 24px;
  --grid-gap: 26px;
  --head-gap: 52px;
  --section-y: 104px;
  --header-height: 78px;
  --tile-size: 48px;
  --icon-size: 24px;
  --frame-width: 2px;
  --focus-width: 3px;
  --r-card: 12px;
  --r-btn: 10px;
  --r-tile: 10px;
  --r-photo: 8px;
}

/* Zona clara (por defecto): servicios, proceso, nosotros */
:root, .zone-light {
  --bg: var(--white);
  --alt: var(--blush);
  --card: var(--white);
  --text: var(--ink);
  --muted: var(--slate);
  --line: var(--blush-line);
  --brand: var(--coral-text);
  --btn: var(--coral);
  --on-btn: var(--ink);
  --tile: var(--navy);
  --on-tile: var(--coral-light);
  --hl: var(--coral-text);
  --acc: var(--coral-detail);
  --frame: var(--ink);
  --focus: var(--ink);
  --shadow-btn: 4px 4px 0 var(--ink);
  --shadow-btn-hover: 2px 2px 0 var(--ink);
  --shadow-card: 6px 6px 0 var(--ink);
  --shadow-chat: 8px 8px 0 var(--ink);
}

/* Zona oscura: encabezado, portada, contacto, pie */
.zone-dark {
  --bg: var(--navy);
  --alt: var(--navy-2);
  --card: var(--navy-3);
  --text: var(--cream);
  --muted: var(--mist);
  --line: var(--navy-line);
  --brand: var(--sun);
  --btn: var(--coral);
  --on-btn: var(--ink);
  --tile: var(--coral);
  --on-tile: var(--navy);
  --hl: var(--coral-light);
  --acc: var(--sun);
  --frame: var(--cream);
  --focus: var(--sun);
  --shadow-btn: 4px 4px 0 var(--cream);
  --shadow-btn-hover: 2px 2px 0 var(--cream);
  --shadow-card: 6px 6px 0 var(--cream);
  --shadow-chat: 8px 8px 0 var(--cream);
}

.zone-light, .zone-dark { background: var(--bg); color: var(--text); }

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-sans); font-size: 16.5px; line-height: 1.6; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-mono); font-weight: 600; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: var(--focus-width) solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip { position: absolute; left: -9999px; top: 14px; z-index: 100; padding: 11px 16px; border: var(--frame-width) solid var(--ink); border-radius: var(--r-btn); background: var(--coral); color: var(--ink); font-weight: 600; text-decoration: none; }
.skip:focus { left: 16px; }

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

/* Íconos de línea: el dibujo es assets/icons/*.svg usado como máscara; el color es currentColor */
.ico { display: inline-block; flex: none; width: var(--icon-size); height: var(--icon-size); background-color: currentColor; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; -webkit-mask-size: contain; mask-size: contain; }
.ico-codigo { -webkit-mask-image: url(/assets/icons/codigo.svg); mask-image: url(/assets/icons/codigo.svg); }
.ico-agente-ia { -webkit-mask-image: url(/assets/icons/agente-ia.svg); mask-image: url(/assets/icons/agente-ia.svg); }
.ico-automatizacion { -webkit-mask-image: url(/assets/icons/automatizacion.svg); mask-image: url(/assets/icons/automatizacion.svg); }
.ico-integracion { -webkit-mask-image: url(/assets/icons/integracion.svg); mask-image: url(/assets/icons/integracion.svg); }
.ico-sitio-web { -webkit-mask-image: url(/assets/icons/sitio-web.svg); mask-image: url(/assets/icons/sitio-web.svg); }
.ico-soporte { -webkit-mask-image: url(/assets/icons/soporte.svg); mask-image: url(/assets/icons/soporte.svg); }
.ico-check { -webkit-mask-image: url(/assets/icons/check.svg); mask-image: url(/assets/icons/check.svg); }
.ico-correo { -webkit-mask-image: url(/assets/icons/correo.svg); mask-image: url(/assets/icons/correo.svg); }

/* Etiqueta superior */
.eyebrow { display: inline-flex; align-items: flex-start; gap: 10px; margin: 0; font-family: var(--font-mono); font-size: 12.5px; line-height: 20px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); }
.eyebrow::before { content: ""; width: 12px; height: 12px; margin-top: 4px; border-radius: 3px; background: var(--acc); flex: none; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-family: var(--font-sans); font-weight: 600; font-size: 16px; line-height: 1; padding: 15px 22px; border-radius: var(--r-btn); border: var(--frame-width) solid var(--frame); box-shadow: var(--shadow-btn); text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translate(2px, 2px); box-shadow: var(--shadow-btn-hover); }
.btn:active { transform: translate(4px, 4px); box-shadow: none; }
.btn-primary { background: var(--btn); color: var(--on-btn); }
.btn-ghost { background: transparent; color: var(--text); }
.btn .ico { width: 18px; height: 18px; }
.btn-sm { padding: 11px 16px; font-size: 15px; }

/* Encabezado */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: var(--frame-width) solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--gutter); height: calc(var(--header-height) - var(--frame-width)); }
.brand { display: inline-flex; align-items: center; flex: none; text-decoration: none; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; align-items: center; gap: 30px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; line-height: 1.6; transition: color .15s ease; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang { display: inline-flex; align-items: center; font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 1; color: var(--text); text-decoration: none; border: var(--frame-width) solid var(--line); border-radius: var(--r-btn); padding: 11px 11px; transition: border-color .15s ease; }
.lang:hover { border-color: var(--frame); }

/* Menú en pantallas angostas (sin JavaScript) */
.menu { position: relative; display: none; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 14px); display: flex; flex-direction: column; min-width: 220px; padding: 8px; background: var(--card); border: var(--frame-width) solid var(--frame); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.menu-panel a { padding: 11px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; }
.menu-panel a:hover { background: var(--alt); }

/* Portada */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; align-items: center; padding-top: 96px; padding-bottom: var(--section-y); }
.hero h1 { margin: 22px 0; font-size: clamp(2.15rem, 4.3vw, 3.5rem); line-height: 1.08; letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--hl); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.18rem); line-height: 1.6; color: var(--muted); max-width: 560px; }
.ctas { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 36px; }
.trust { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 26px; }
.trust li { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; line-height: 1.6; color: var(--text); }
.trust .ico { width: 20px; height: 20px; color: var(--acc); }

/* Chat de ejemplo */
.chat-figure { margin: 0; justify-self: end; width: 100%; max-width: 440px; }
.chat { background: var(--white); border: var(--frame-width) solid var(--frame); border-radius: var(--r-card); box-shadow: var(--shadow-chat); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: var(--frame-width) solid var(--line); }
.chat-av { width: 38px; height: 38px; border-radius: var(--r-tile); background: var(--tile); color: var(--on-tile); display: grid; place-items: center; flex: none; }
.chat-av .ico { width: 20px; height: 20px; }
.chat-name { font-family: var(--font-mono); font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text); }
.chat-status { display: flex; align-items: center; gap: 7px; font-size: 13px; line-height: 1.35; color: var(--muted); }
.chat-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--online); flex: none; }
.chat-log { list-style: none; margin: 0; padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: var(--r-card); font-size: 15px; line-height: 1.5; color: var(--text); }
.msg-client { align-self: flex-end; background: var(--blush); border-bottom-right-radius: 4px; }
.msg-agent { align-self: flex-start; background: var(--white); border: var(--frame-width) solid var(--line); border-bottom-left-radius: 4px; }
.chat-caption { margin-top: 22px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 1.6; color: var(--muted); }

/* Secciones */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--alt); }
.section-head { max-width: 720px; margin-bottom: var(--head-gap); }
.section-head h2 { margin: 18px 0 16px; font-size: clamp(1.72rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -.03em; }
.section-head .intro { color: var(--muted); }

/* Tarjetas de servicio y de paso */
.grid-3, .steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--grid-gap); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--card); color: var(--text); border: var(--frame-width) solid var(--frame); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 28px 26px 30px; }
.card h3 { margin: 0 0 10px; font-size: 1.13rem; line-height: 1.25; letter-spacing: -.02em; }
.card p { color: var(--muted); font-size: .97rem; }
.tile { width: var(--tile-size); height: var(--tile-size); border-radius: var(--r-tile); background: var(--tile); color: var(--on-tile); display: grid; place-items: center; margin-bottom: 20px; }
.tile .ico { width: var(--icon-size); height: var(--icon-size); }
.num { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px; font-family: var(--font-mono); font-weight: 600; font-size: 14px; line-height: 1.6; color: var(--brand); font-variant-numeric: tabular-nums; }
.num::after { content: ""; width: 18px; height: 3px; border-radius: 2px; background: var(--acc); }

/* Nosotros */
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.person { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 26px; align-items: center; padding: 18px; background: var(--alt); border: var(--frame-width) solid var(--frame); border-radius: var(--r-card); box-shadow: var(--shadow-card); }
.person img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-photo); border: var(--frame-width) solid var(--frame); background: var(--line); }
.person h3 { font-size: 1.26rem; line-height: 1.25; letter-spacing: -.02em; }
.role { margin: 6px 0 12px; font-family: var(--font-mono); font-size: 13px; font-weight: 500; line-height: 1.6; color: var(--brand); }
.bio { color: var(--muted); font-size: .97rem; }

/* Contacto */
.contact .wrap { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; align-items: center; padding-top: var(--section-y); padding-bottom: var(--section-y); }
.contact h2 { margin: 18px 0 16px; font-size: clamp(1.72rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -.03em; }
.box { background: var(--card); border: var(--frame-width) solid var(--frame); border-radius: var(--r-card); box-shadow: var(--shadow-card); padding: 28px 26px 30px; }
.box-label { display: block; font-family: var(--font-mono); font-size: 12.5px; line-height: 20px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.mail { display: inline-block; margin: 10px 0 24px; font-family: var(--font-mono); font-weight: 600; font-size: clamp(1.2rem, 2.2vw, 1.5rem); line-height: 1.3; color: var(--text); text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 2px; text-underline-offset: 6px; overflow-wrap: anywhere; }
.box .btn { width: 100%; }
.note { margin-top: 18px; font-size: 14px; color: var(--muted); }

/* Pie */
.site-footer { background: var(--navy-deep); color: var(--mist); font-size: 14px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 40px; padding-top: 40px; padding-bottom: 40px; }
.foot-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.foot-brand .brand { margin-bottom: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--mist); text-decoration: none; transition: color .15s ease; }
.site-footer a:hover { color: var(--cream); }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }
.notfound .brand { justify-content: center; }
.notfound h1 { margin: 36px 0 14px; font-size: clamp(1.72rem, 5vw, 2.5rem); line-height: 1.08; letter-spacing: -.03em; }
.notfound p { color: var(--muted); margin-bottom: 32px; }

/* Responsive */
@media (max-width: 1060px) {
  .grid-3, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person { grid-template-columns: 160px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .menu { display: block; }
  .hero .wrap, .contact .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .wrap { padding-top: 64px; gap: 52px; }
  .chat-figure { justify-self: start; }
  .team { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  :root { --gutter: 16px; --section-y: 72px; --head-gap: 36px; }
  body { font-size: 16px; }
  .grid-3, .steps { grid-template-columns: minmax(0, 1fr); }
  .person { grid-template-columns: minmax(0, 1fr); padding: 14px; gap: 18px; }
  .person img { aspect-ratio: 1 / 1; }
  .site-header .btn-primary { display: none; }
  .hero .wrap { padding-top: 48px; }
  .ctas .btn { width: 100%; }
  .chat { box-shadow: 6px 6px 0 var(--frame); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .nav a, .lang, .site-footer a { transition: none; }
}
