/* Tramontana Soluciones Digitales — hoja de estilos
   Paleta cálida monocroma + un único acento azul mar. Sin dependencias JS. */

:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --ink: #1a1d1f;
  --ink-2: #464b51;
  --muted: #76787b;
  --line: #e6e3dd;
  --line-strong: #d6d2ca;
  --accent: #1e4d6b;
  --accent-hover: #163b53;
  --accent-soft: #e4edf2;
  --on-accent: #ffffff;
  --shadow: 0 1px 2px rgba(40, 36, 28, .04), 0 8px 24px -12px rgba(40, 36, 28, .10);

  --tone-blue-bg: #e1ecf4;  --tone-blue-fg: #1f5a80;
  --tone-green-bg: #e7efe5; --tone-green-fg: #3a6a3f;
  --tone-sand-bg: #f4ecd9;  --tone-sand-fg: #855f12;

  --sans: "Geist", "Helvetica Neue", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", "SF Mono", ui-monospace, Consolas, monospace;
  --radius: 12px;
  --radius-sm: 6px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --surface: #181b1e;
    --surface-2: #1d2124;
    --ink: #ecebe8;
    --ink-2: #c2c1bc;
    --muted: #8e9093;
    --line: #2a2e32;
    --line-strong: #363b40;
    --accent: #8fb8d4;
    --accent-hover: #a9c9df;
    --accent-soft: #1c2a34;
    --on-accent: #0f1a22;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);

    --tone-blue-bg: #1c2b37;  --tone-blue-fg: #9cc3de;
    --tone-green-bg: #1f2b21; --tone-green-fg: #a5c7a0;
    --tone-sand-bg: #2e281b;  --tone-sand-fg: #d9bd7e;
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); text-wrap: balance; }
p { text-wrap: pretty; }
strong { font-weight: 600; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .wrap { padding: 0 16px; } }

.skip {
  position: absolute; left: 16px; top: -48px;
  background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--radius-sm);
  z-index: 20; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- Cabecera ---------- */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px 32px; min-height: 68px; padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--ink); text-decoration: none; line-height: 1.1;
}
.brand:hover { color: var(--ink); }
.brand-mark { width: 30px; height: 30px; flex: none; color: var(--accent); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 600; font-size: 1.06rem; letter-spacing: -.015em; }
.brand-sub {
  font-family: var(--mono); font-size: .66rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-top: 3px;
}
nav { display: flex; align-items: center; gap: 4px; }
nav a {
  color: var(--ink-2); text-decoration: none; font-size: .94rem; font-weight: 500;
  padding: 7px 12px; border-radius: var(--radius-sm);
  transition: background-color .2s ease, color .2s ease;
}
nav a:hover { background: var(--surface-2); color: var(--ink); }
nav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
nav a.nav-cta { background: var(--ink); color: var(--bg); margin-left: 8px; }
nav a.nav-cta:hover { background: var(--ink-2); color: var(--bg); }
nav a.nav-cta[aria-current="page"] { background: var(--ink); color: var(--bg); box-shadow: none; }
@media (max-width: 560px) {
  header.site nav { width: 100%; justify-content: space-between; }
  nav a.nav-cta { margin-left: 0; }
  .brand-sub { display: none; }
}

/* ---------- Tipografía y utilidades ---------- */
main { display: block; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 20px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--line-strong); }
h1 {
  font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.04;
  letter-spacing: -.035em; font-weight: 600; margin: 0 0 22px;
}
h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem); line-height: 1.15;
  letter-spacing: -.025em; font-weight: 600; margin: 0 0 14px;
}
h3 { font-size: 1.12rem; line-height: 1.3; letter-spacing: -.01em; font-weight: 600; margin: 0; }
.lead { color: var(--ink-2); font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.6; max-width: 58ch; margin: 0; }
.muted { color: var(--muted); }

.section { padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 8px; margin-bottom: 44px; max-width: 640px; }
.section-head p { margin: 0; color: var(--ink-2); }
.index { font-family: var(--mono); font-size: .78rem; color: var(--muted); letter-spacing: .04em; }

/* ---------- Botones ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: .96rem; text-decoration: none; line-height: 1.2;
  transition: background-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface); }
.btn-ghost:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); }
.btn svg { width: 16px; height: 16px; transition: transform .2s ease; }
.btn:hover svg { transform: translateX(2px); }

/* ---------- Portada: hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(64px, 10vw, 128px) 0 clamp(64px, 9vw, 112px); }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 0%, transparent 70%);
  mask-image: radial-gradient(ellipse 70% 80% at 85% 30%, #000 0%, transparent 70%);
  opacity: .55;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero-art { justify-self: end; width: 100%; max-width: 420px; color: var(--accent); }
.hero-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero-art { justify-self: start; max-width: 260px; }
}

.facts {
  display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 44px 0 0; padding: 0; list-style: none;
  font-family: var(--mono); font-size: .8rem; color: var(--muted);
}
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); opacity: .7; }

/* ---------- Portada: tecnología ---------- */
.split { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 56px; align-items: start; }
.split .section-head { margin-bottom: 0; position: sticky; top: 108px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split .section-head { position: static; }
}
ul.stack {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.stack-bar {
  display: flex; align-items: center; gap: 6px; padding: 12px 18px;
  border-bottom: 1px solid var(--line); background: var(--surface-2);
  font-family: var(--mono); font-size: .74rem; color: var(--muted);
}
.stack-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); display: inline-block; }
.stack-bar span { margin-left: 10px; }
.stack-frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.stack-frame ul.stack { border: 0; border-radius: 0; box-shadow: none; }
ul.stack li {
  display: grid; grid-template-columns: 150px 1fr; gap: 16px; align-items: baseline;
  padding: 20px 22px; border-top: 1px solid var(--line); color: var(--ink-2);
}
ul.stack li:first-child { border-top: 0; }
.layer {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
ul.stack strong {
  display: inline-block; font-family: var(--mono); font-size: .86rem; font-weight: 500;
  color: var(--ink); background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 7px; margin: 2px 0; line-height: 1.5;
}
@media (max-width: 560px) {
  ul.stack li { grid-template-columns: 1fr; gap: 6px; padding: 18px; }
}

/* ---------- Portada: servicios ---------- */
.services { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.service { padding: 32px 32px 8px 0; }
.service + .service { padding-left: 32px; border-left: 1px solid var(--line); }
.service-icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 28px;
}
.service-icon svg { width: 22px; height: 22px; }
.service .index { display: block; margin-bottom: 8px; }
.service p { color: var(--ink-2); margin: 10px 0 0; max-width: 34ch; }
@media (max-width: 860px) {
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0; border-left: 0; }
  .service + .service { border-top: 1px solid var(--line); }
}

/* ---------- Portada: documentación ---------- */
.docs-intro { margin: 0 0 28px; color: var(--ink-2); max-width: 60ch; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.doc {
  position: relative; display: flex; align-items: center; gap: 18px;
  padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.doc:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.doc-file {
  flex: none; width: 42px; height: 52px; border-radius: 4px 12px 4px 4px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  display: grid; place-items: end center; padding-bottom: 7px;
  font-family: var(--mono); font-size: .62rem; font-weight: 600; color: var(--accent); letter-spacing: .04em;
}
.doc-body { min-width: 0; }
.doc a { color: var(--ink); font-weight: 600; text-decoration: none; }
.doc a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.doc-meta { display: block; font-size: .86rem; color: var(--muted); margin-top: 2px; }
.doc-arrow { margin-left: auto; color: var(--muted); width: 18px; height: 18px; flex: none; }
@media (max-width: 720px) { .docs { grid-template-columns: 1fr; } }

/* ---------- Banda de llamada a la acción ---------- */
.cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
  padding: clamp(32px, 5vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
}
.cta h2 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
.cta p { margin: 6px 0 0; color: var(--ink-2); }
.cta .actions { margin-top: 0; }

/* ---------- Cabecera de páginas interiores ---------- */
.page-head { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 5vw, 56px); }
.page-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }

/* ---------- Equipo ---------- */
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: clamp(64px, 9vw, 112px); }
@media (max-width: 900px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .team { grid-template-columns: 1fr; } }
.person {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; transition: border-color .2s ease, box-shadow .2s ease;
}
.person:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.avatar {
  position: relative; width: 64px; height: 64px; border-radius: 18px; margin-bottom: 28px;
  display: grid; place-items: center; overflow: hidden;
  font-weight: 600; font-size: 1.3rem; letter-spacing: -.02em;
}
.avatar::after {
  content: ""; position: absolute; width: 46px; height: 46px; border-radius: 50%;
  right: -18px; bottom: -18px; background: currentColor; opacity: .12;
}
.avatar.tone-blue { background: var(--tone-blue-bg); color: var(--tone-blue-fg); }
.avatar.tone-green { background: var(--tone-green-bg); color: var(--tone-green-fg); }
.avatar.tone-sand { background: var(--tone-sand-bg); color: var(--tone-sand-fg); }
.person h3 { font-size: 1.25rem; letter-spacing: -.02em; }
.person h3 a { color: var(--ink); text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s ease; }
.person h3 a:hover { background-size: 100% 1px; }
.role { margin: 6px 0 0; color: var(--ink-2); font-weight: 500; }
.dept {
  margin: auto 0 0; padding-top: 22px; color: var(--muted); font-size: .88rem;
  border-top: 1px solid var(--line); margin-top: 24px;
}
.badge {
  display: inline-block; margin-bottom: 10px;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted);
}
.note {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: clamp(64px, 9vw, 112px); padding: 22px 26px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); color: var(--ink-2);
}
.note p { margin: 0; }

/* ---------- Contacto ---------- */
.mailboxes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .mailboxes { grid-template-columns: 1fr; } }
.mailbox {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.mailbox:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.mailbox .service-icon { margin-bottom: 18px; }
.mailbox .desc { margin: 0 0 18px; color: var(--ink-2); font-size: .95rem; }
.mailbox .addr { margin: auto 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.mailbox .addr a { font-family: var(--mono); font-size: .86rem; word-break: break-all; }

.office { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 40px; align-items: center; }
.office address { font-style: normal; color: var(--ink-2); font-size: 1.08rem; line-height: 1.7; margin: 0; }
.map {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); color: var(--accent);
}
.map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 760px) { .office { grid-template-columns: 1fr; } }

/* ---------- Pie ---------- */
footer.site { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .9rem; }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; padding-top: 44px; padding-bottom: 32px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 8px; width: auto; }
.foot-nav a { color: var(--ink-2); text-decoration: none; }
.foot-nav a:hover { color: var(--ink); }
.foot-legal { padding-bottom: 28px; font-size: .84rem; }
.foot-legal::before { content: ""; display: block; border-top: 1px solid var(--line); margin-bottom: 20px; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
