/* Sistema de diseño común de kavanasystems.com (boceto D, aprobado el 2026-10-30).
   Claro y sobrio: un acento azul, el naranja solo en la K del logo, fuente Inter. */

:root {
  --bg: #f3f5f8;
  --card: #fff;
  --fg: #14202e;
  --muted: #5a6676;
  --line: #dde3ea;
  --acc: #1f5f9e;
  --acc-dark: #174a7c;
  --acc-soft: #e6eef7;
  --dark: #14202e;
  --dark-text: #c3ccd6;
  --dark-line: #3a4858;
  --k: #e8590c;
  --radius: 10px;
  --max: 1120px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--fg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }

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

/* Cabecera */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.logo .k-img { display: block; width: 30px; height: 30px; border-radius: 6px; }
.logo .k { display: inline-grid; place-items: center; width: 30px; height: 30px; background: var(--k); color: #fff; border-radius: 6px; font-weight: 700; }
.site-nav { display: flex; gap: 4px; font-size: .9rem; }
.site-nav a { text-decoration: none; color: var(--muted); padding: 6px 10px; border-radius: 6px; }
.site-nav a:hover { background: var(--acc-soft); color: var(--acc); }
.lang-switch { display: flex; gap: 4px; }
.lang-switch button { background: transparent; border: 1px solid var(--line); color: var(--muted); font: inherit; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.lang-switch button:hover { border-color: var(--acc); color: var(--acc); }
.lang-switch button.active { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); }

/* Tipografía */
.label { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); }
h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; font-weight: 700; letter-spacing: -.02em; margin: 10px 0 16px; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); line-height: 1.25; font-weight: 700; letter-spacing: -.01em; margin: 6px 0 18px; max-width: 820px; }
h3 { font-size: 1.08rem; line-height: 1.35; font-weight: 600; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 64ch; }
.prose { max-width: 70ch; color: #2c3a4a; }
.prose p + p { margin-top: 14px; }
.muted { color: var(--muted); }
.link { color: var(--acc); font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* Botones */
.cta { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .93rem; border: 1px solid var(--line); background: var(--card); color: var(--fg); transition: background .15s, border-color .15s, color .15s; }
.btn:hover { border-color: var(--acc); color: var(--acc); }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn.primary:hover { background: var(--acc-dark); border-color: var(--acc-dark); color: #fff; }

/* Bloques */
section { padding: 24px 0 56px; scroll-margin-top: 72px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.tag { display: inline-block; align-self: flex-start; background: var(--acc-soft); color: var(--acc); font-size: .75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 16px 0 40px; }
.strip .card { padding: 16px 18px; }
.strip strong { display: block; font-size: 1.75rem; line-height: 1.2; color: var(--acc); white-space: nowrap; }
.strip span { font-size: .86rem; color: var(--muted); }
.warn { border-left: 4px solid var(--acc); }
.dark { background: var(--dark); color: #eef2f6; border-color: var(--dark); }
.dark .label { color: #8fb8e3; }
.dark p, .dark .muted { color: var(--dark-text); }
.dark .btn:not(.primary) { background: transparent; color: #fff; border-color: var(--dark-line); }
.dark .btn:not(.primary):hover { border-color: #8fb8e3; color: #8fb8e3; }

/* Portada: franja oscura con foto */
.hero { max-width: var(--max); margin: 24px auto 0; border-radius: 12px; overflow: hidden; display: grid; grid-template-columns: 1.3fr 1fr; min-height: 440px; }
.hero .txt { padding: 44px 40px; display: flex; flex-direction: column; justify-content: center; }
.hero h1 .mark { color: #8fb8e3; }
.hero .seeking { margin-top: 18px; border-left: 3px solid #8fb8e3; padding: 6px 0 6px 14px; color: #eef2f6; max-width: 60ch; }
.hero .photo { background: #1d2b3b; }
.hero .photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }

/* Filtros y tarjetas de proyecto */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 13px; cursor: pointer; font: inherit; font-size: .82rem; color: var(--fg); }
.chip:hover { border-color: var(--acc); }
.chip.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.pcard { display: flex; flex-direction: column; text-decoration: none; padding: 0; overflow: hidden; transition: border-color .15s, transform .15s; }
.pcard:hover { border-color: var(--acc); transform: translateY(-2px); }
.pcard .img { aspect-ratio: 16 / 7; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--dark); }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.pcard .img.plain { display: flex; align-items: flex-end; padding: 18px 20px; background: linear-gradient(135deg, #14202e 0%, #1f3550 100%); background-image: linear-gradient(rgba(143,184,227,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(143,184,227,.08) 1px, transparent 1px), linear-gradient(135deg, #14202e 0%, #1f3550 100%); background-size: 24px 24px, 24px 24px, auto; }
.pcard .img.plain span { color: #8fb8e3; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pcard .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard h3 { margin: 4px 0 6px; }
.pcard .k { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 6px; }
.pcard p { font-size: .93rem; color: #2c3a4a; }
.pcard .go { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); color: var(--acc); font-size: .88rem; font-weight: 600; }
.group-title { margin: 28px 0 12px; font-size: 1.05rem; }
.group-title:first-of-type { margin-top: 8px; }
.others-title { margin: 22px 0 10px; font-size: .9rem; color: var(--muted); font-weight: 600; }
/* Mini cards with thumbnails */
.mini { display: flex; flex-direction: column; text-decoration: none; padding: 0; overflow: hidden; transition: border-color .15s, transform .15s; }
.mini:hover { border-color: var(--acc); transform: translateY(-2px); }
.mini .img { aspect-ratio: 16 / 7; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--dark); }
.mini .img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.mini .body { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mini b { display: block; font-size: .95rem; }
.mini span { font-size: .84rem; color: var(--muted); }
.hide { display: none !important; }

/* Experiencia */
.timeline { list-style: none; }
.job { display: grid; grid-template-columns: 150px 1fr; gap: 4px 18px; padding: 12px 0; border-top: 1px solid var(--line); }
.job:first-child { border-top: 0; }
.job-date { font-size: .85rem; color: var(--muted); }
.job-head { font-weight: 600; }
.job-co { color: var(--muted); font-weight: 500; }
.job-desc { grid-column: 2; font-size: .92rem; color: #2c3a4a; }

/* Página de proyecto */
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 28px; }
.crumbs a { color: var(--acc); text-decoration: none; }
.phead { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; padding: 14px 0 8px; align-items: start; }
.sheet { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; font-size: .9rem; align-content: start; }
.sheet dt { color: var(--muted); }
.sheet dd { font-weight: 600; }
.feature { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; padding: 28px 0; border-top: 1px solid var(--line); }
.feature:nth-child(even) .media { order: 2; }
.media { margin: 0; }
.media button { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; cursor: zoom-in; }
.media img { width: 100%; display: block; transition: transform .3s; }
.media button:hover img { transform: scale(1.02); }
.media figcaption { font-size: .84rem; color: var(--muted); margin-top: 8px; }
.feature p { color: #2c3a4a; margin-top: 8px; }
.todo { list-style: none; display: grid; gap: 10px; margin-top: 8px; }
.todo li { padding-left: 22px; position: relative; color: #2c3a4a; }
.todo li::before { content: "→"; position: absolute; left: 0; color: var(--acc); font-weight: 700; }
.diagram { font-family: var(--mono); font-size: .88rem; line-height: 1.9; color: #2c3a4a; overflow-x: auto; white-space: pre; }

/* Ampliación de capturas */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(10,16,24,.9); display: none; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox.on { display: grid; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; }

/* Pie */
.site-foot { border-top: 1px solid var(--line); background: var(--card); margin-top: 16px; }
.site-foot .wrap { padding: 26px 24px; font-size: .85rem; color: var(--muted); text-align: center; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--acc); }

/* Plantilla de las páginas de proyecto anteriores (Manufacturing, Steelworks,
   Calculadora, Warehouse): mismas clases, aspecto nuevo. Los alias de color
   cubren los style="" que esas páginas llevan en el marcado. */
:root {
  --bg2: #fff; --bg3: #f3f5f8; --border: var(--line); --text: var(--fg); --text1: var(--fg); --text2: var(--muted);
  --acc2: var(--acc-dark); --acc-s: var(--acc-soft); --rsm: 8px;
  --green: var(--acc); --green2: var(--acc-dark); --green-s: var(--acc-soft);
  --blue: var(--acc); --blue2: var(--acc-dark); --blue-s: var(--acc-soft); --amber: #b45309;
}
.w { max-width: 960px; margin: 0 auto; padding: 0 24px; }
body > section, main > section { padding: 56px 0; }
section[style*="--bg2"] { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sl { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); margin-bottom: 8px; }
.st { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.25; margin-bottom: 14px; }
h1.st { font-size: clamp(1.8rem, 4.5vw, 2.6rem); line-height: 1.15; }
.ss { color: var(--muted); max-width: 64ch; }
.hero-badge { display: block; font-size: .75rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--acc); margin-bottom: 10px; }
.links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.b1, .b2 { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: .93rem; border: 1px solid var(--acc); background: var(--acc); color: #fff; transition: background .15s, border-color .15s, color .15s; }
.b1:hover { background: var(--acc-dark); border-color: var(--acc-dark); }
.b2 { background: var(--card); border-color: var(--line); color: var(--fg); }
.b2:hover { border-color: var(--acc); color: var(--acc); }
.tc { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.fi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.fi h3 { font-size: 1.02rem; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.fi p { color: var(--muted); font-size: .92rem; }
.fi a.mas { display: inline-block; margin-top: 10px; font-size: .86rem; font-weight: 600; text-decoration: none; color: var(--acc); }
.ficon { font-size: 1.25rem; }
.mg { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 24px; }
.mc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.mv { font-size: 1.75rem; font-weight: 700; line-height: 1.2; color: var(--acc); }
.ml { font-size: .86rem; color: var(--muted); margin-top: 4px; }
.card:hover { border-color: var(--line); }
.todo { list-style: none; display: grid; gap: 10px; margin-top: 16px; max-width: 64ch; }
code { background: var(--acc-soft); color: var(--fg); padding: 1px 6px; border-radius: 4px; font-family: var(--mono); font-size: .86em; }
main a:not([class]), section a:not([class]) { color: var(--acc); }
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav .w { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 12px; padding-bottom: 12px; max-width: var(--max); }
.nb { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); font-weight: 700; }
.nl { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.nav-links { display: flex; gap: 4px; list-style: none; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .9rem; padding: 6px 10px; border-radius: 6px; }
.nav-links a:hover { background: var(--acc-soft); color: var(--acc); }
.ham { display: none; background: none; border: none; cursor: pointer; }
.ham span { display: block; width: 22px; height: 2px; background: var(--muted); margin: 4px 0; }
.lang-switch .flag { width: 18px; height: 12px; border-radius: 2px; display: inline-block; flex-shrink: 0; }
.lang-switch button { display: inline-flex; align-items: center; gap: 6px; }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 24px; }
.shots figure { margin: 0; }
.shots img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; }
.shots figcaption { color: var(--muted); font-size: .86rem; margin-top: 8px; line-height: 1.45; }
.gal { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.gal a { display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gal img { width: 100%; display: block; border-bottom: 1px solid var(--line); }
.gal p { color: var(--muted); font-size: .86rem; padding: 10px 14px; }

/* Chat flotante (asistente técnico de algunas páginas) */
#chat-fab { position: fixed; bottom: 22px; right: 22px; width: 54px; height: 54px; border-radius: 50%; background: var(--acc); border: none; font-size: 24px; cursor: pointer; box-shadow: 0 4px 18px rgba(20,32,46,.25); z-index: 999; transition: transform .2s; }
#chat-fab:hover { transform: scale(1.08); }
#chat-box { position: fixed; bottom: 88px; right: 22px; width: min(380px, calc(100vw - 32px)); height: 480px; max-height: calc(100vh - 120px); background: #fff; border: 1px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; z-index: 998; box-shadow: 0 12px 40px rgba(20,32,46,.18); overflow: hidden; }
#chat-box[hidden] { display: none !important; }
#chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--acc-soft); border-bottom: 1px solid var(--line); font-weight: 700; font-size: .9rem; }
#chat-close { background: none; border: none; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; }
#chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
#chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
#chat-input { flex: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; color: var(--fg); font: inherit; font-size: .86rem; outline: none; }
#chat-input:focus { border-color: var(--acc); }
#chat-form button { background: var(--acc); border: none; border-radius: 8px; width: 40px; color: #fff; cursor: pointer; }
.msg { max-width: 85%; padding: 8px 12px; border-radius: 10px; font-size: .84rem; line-height: 1.5; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--acc-soft); border: 1px solid #c9daee; }
.msg.bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--line); }
.msg.src { font-size: .72rem; color: var(--muted); margin-top: -4px; align-self: flex-start; }

@media (max-width: 860px) {
  .w { padding: 0 16px; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 58px; left: 0; right: 0; background: #fff; padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .nav-links.show { display: flex; }
  .ham { display: block; }
  .mv { font-size: 1.5rem; }
}
@media (max-width: 480px) {
  .nav .w { gap: 10px; }
  .nb span { display: none; }
}

@media (max-width: 860px) {
  .site-nav { display: none; }
  .wrap { padding: 0 16px; }
  .hero { grid-template-columns: 1fr; margin: 16px 16px 0; min-height: 0; }
  .hero .photo { order: -1; height: 280px; }
  .hero .txt { padding: 28px 22px; }
  .grid-2, .grid-3, .phead, .feature { grid-template-columns: 1fr; }
  .feature { gap: 16px; }
  .feature:nth-child(even) .media { order: 0; }
  .job { grid-template-columns: 1fr; }
  .job-desc { grid-column: 1; }
  .btn { flex: 1 1 auto; }
}

/* Portada: foto de la app de 2023 dentro de «Lo que vi en Kimer» */
.origen-card { display: flex; gap: 22px; align-items: center; margin-top: 16px; }
.origen-foto { flex: 0 0 48%; margin: 0; }
.origen-foto img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.origen-card.tall .origen-foto { flex: 0 0 170px; }
.origen-txt { flex: 1; }
.origen-txt h3 { margin: 0 0 8px; }
.origen-txt p { font-size: .95rem; color: #2c3a4a; margin-bottom: 12px; }
.origen-txt .go { color: var(--acc); font-size: .88rem; font-weight: 600; text-decoration: none; margin-right: 14px; }
@media (max-width: 760px) { .origen-card { flex-direction: column; align-items: stretch; } .origen-card.tall .origen-foto { flex-basis: auto; width: 200px; margin: 0 auto; } .origen-foto { flex-basis: auto; } }
.kimer::after { content: ""; display: block; clear: both; }
.kimer-foto { float: right; width: 170px; margin: 0 0 10px 18px; }
.kimer-foto img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
@media (max-width: 480px) {
  .kimer-foto { float: none; width: 200px; margin: 0 auto 14px; }
}

/* Portada: del parte en papel a la Calculadora, en la entrada de THU */
.job-img { grid-column: 1 / -1; display: block; width: 100%; height: auto; margin-top: 10px; border-radius: 8px; border: 1px solid var(--line); }
