/* ==========================================================================
   Latitud Virtual — Applied AI · Data · Agents  (static, bilingual ES/EN)
   Signature: a wireframe globe with a glowing equator + amber pin at 0° (Quito).
   Type: Space Grotesk (display) · IBM Plex Sans (body) · IBM Plex Mono (coords)
   ========================================================================== */

:root {
  --abyss:    #06090f;   /* page base — deep blue-black */
  --abyss-2:  #090e18;   /* alt band */
  --panel:    #0d1525;   /* cards */
  --panel-2:  #111d31;   /* raised */
  --line:     rgba(125,160,220,.12);
  --line-2:   rgba(125,160,220,.24);
  --fg:       #e9eef9;
  --muted:    #8b98b5;
  --faint:    #5f6c89;
  --aqua:     #34e2c9;   /* signal / equator */
  --azimuth:  #5b8cff;   /* blue partner */
  --amber:    #ffb454;   /* coordinate marker — used sparingly */
  --grad:     linear-gradient(105deg, var(--azimuth), var(--aqua));

  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 64px);

  --fd: "Space Grotesk", system-ui, sans-serif;          /* display */
  --fb: "IBM Plex Sans", system-ui, -apple-system, sans-serif; /* body */
  --fm: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; /* labels/coords */
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: var(--fb); font-size: 1.0625rem; line-height: 1.7; font-weight: 400;
  color: var(--fg); background: var(--abyss);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(64px, 9vw, 130px); position: relative; }
.section--alt { background: var(--abyss-2); }

/* ---- bilingual visibility ---------------------------------------------- */
html[data-lang="es"] .en { display: none; }
html[data-lang="en"] .es { display: none; }

/* ---- type -------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--fd); font-weight: 600; line-height: 1.08; letter-spacing: -.02em; color: var(--fg); }
.eyebrow { font-family: var(--fm); font-size: .76rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--aqua); display: inline-flex; align-items: center; gap: .6em; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--aqua); opacity: .7; }
.section-head { max-width: 60ch; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-top: 1rem; }
.section-head p { color: var(--muted); margin-top: 1rem; font-size: 1.08rem; max-width: 56ch; }
.lead { color: var(--muted); }

/* ---- buttons ----------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; gap: .55em; font-family: var(--fb); font-weight: 600; font-size: .98rem;
  padding: .8em 1.5em; border-radius: 9px; border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s, border-color .25s, color .25s; }
.btn svg { width: 1.05em; height: 1.05em; }
.btn--primary { background: var(--grad); color: #04121b; box-shadow: 0 8px 30px -10px rgba(52,226,201,.55); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(52,226,201,.7); }
.btn--ghost { border-color: var(--line-2); color: var(--fg); }
.btn--ghost:hover { border-color: var(--aqua); color: var(--aqua); }

/* ============================ HEADER =================================== */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 100; transition: background .35s var(--ease), border-color .35s, backdrop-filter .35s; border-bottom: 1px solid transparent; }
.site-header.is-stuck { background: rgba(6,9,15,.78); backdrop-filter: blur(14px); border-bottom-color: var(--line); }
.header-bar { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.brand { display: flex; align-items: center; flex: none; margin-right: auto; }
.brand img { height: 30px; width: auto; }
.brand .txt { font-family: var(--fd); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
.brand .txt b { color: var(--aqua); font-weight: 700; }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.nav a { font-size: .96rem; font-weight: 500; color: var(--muted); transition: color .2s; position: relative; padding: .3rem 0; }
.nav a:hover { color: var(--fg); }
.nav a::after { content:""; position:absolute; left:0; right:100%; bottom:-2px; height:1px; background: var(--aqua); transition: right .25s var(--ease); }
.nav a:hover::after { right: 0; }

.header-tools { display: flex; align-items: center; gap: 1rem; flex: none; }
.lang { display: inline-flex; font-family: var(--fm); font-size: .78rem; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; }
.lang button { padding: .35rem .6rem; color: var(--muted); letter-spacing: .05em; transition: background .2s, color .2s; }
.lang button.active { background: var(--grad); color: #04121b; font-weight: 600; }
.nav-lang { display: none; }   /* only shown inside the mobile menu */

.burger { display:none; width:44px; height:44px; border:1px solid var(--line-2); border-radius:8px; position:relative; flex:none; }
.burger span, .burger span::before, .burger span::after { content:""; position:absolute; left:50%; top:50%; width:18px; height:2px; background: var(--fg); transform: translate(-50%,-50%); transition:.25s var(--ease); }
.burger span::before { top:-6px; } .burger span::after { top:6px; }
body.nav-open .burger span { background: transparent; }
body.nav-open .burger span::before { top:0; transform: rotate(45deg); }
body.nav-open .burger span::after  { top:0; transform: rotate(-45deg); }

/* ============================ HERO ===================================== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding-top: 76px; overflow: hidden; }
.hero::before { /* ambient glow */
  content:""; position:absolute; right:-10%; top:8%; width:60vw; height:60vw; max-width:760px; max-height:760px;
  background: radial-gradient(circle at center, rgba(91,140,255,.18), rgba(52,226,201,.06) 45%, transparent 70%);
  filter: blur(10px); pointer-events:none; z-index:0;
}
.hero .wrap { position: relative; z-index: 2; width: 100%; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.hero-copy { padding-block: clamp(2rem, 6vw, 4rem); }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.7rem); font-weight: 600; margin-top: 1.4rem; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.22rem); margin-top: 1.5rem; max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: .5rem .65rem; margin-top: 2.6rem; }
.hero-tags span { font-family: var(--fm); font-size: .76rem; letter-spacing: .08em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: .32rem .8rem; }
.hero-tags span::before { content: "· "; color: var(--aqua); }

/* globe signature */
.globe-wrap { position: relative; justify-self: center; width: 100%; max-width: 520px; aspect-ratio: 1; }
.globe { width: 100%; height: 100%; overflow: visible; }
.globe .grid-line { fill: none; stroke: var(--line-2); stroke-width: 1; }
.globe .outline { fill: none; stroke: rgba(125,160,220,.32); stroke-width: 1.2; }
.globe .equator { fill: none; stroke: var(--aqua); stroke-width: 1.8; filter: drop-shadow(0 0 6px rgba(52,226,201,.8)); }
.globe .pin { fill: var(--amber); filter: drop-shadow(0 0 5px rgba(255,180,84,.9)); }
.globe .pin-ring { fill: none; stroke: var(--amber); stroke-width: 1.5; transform-origin: center; transform-box: fill-box; }
.globe .pin-label { font-family: var(--fm); font-size: 13px; fill: var(--amber); letter-spacing: .1em; }
.globe-glow { position:absolute; inset:0; background: radial-gradient(circle at 50% 50%, rgba(52,226,201,.10), transparent 62%); border-radius:50%; z-index:-1; }

@keyframes spin   { to { transform: rotate(360deg); } }
@keyframes pulse  { 0%{ transform: scale(1); opacity:.9 } 70%{ transform: scale(2.4); opacity:0 } 100%{ opacity:0 } }
@keyframes drift  { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-10px) } }
.globe-wrap { animation: drift 9s var(--ease) infinite; }
.globe .meridians { transform-origin: center; animation: spin 80s linear infinite; }
.globe .pin-ring { animation: pulse 3.2s ease-out infinite; }

/* ============================ CAPABILITIES ============================= */
.cap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1rem, 2vw, 1.4rem); }
.cap { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: clamp(1.4rem, 2.4vw, 1.9rem); transition: transform .3s var(--ease), border-color .3s, background .3s; position: relative; overflow: hidden; }
.cap::after { content:""; position:absolute; inset:0 0 auto 0; height:1px; background: var(--grad); opacity:0; transition: opacity .3s; }
.cap:hover { transform: translateY(-4px); border-color: var(--line-2); background: var(--panel-2); }
.cap:hover::after { opacity:.9; }
.cap .ico { width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; color: var(--aqua); background: rgba(52,226,201,.08); border: 1px solid rgba(52,226,201,.18); margin-bottom: 1.1rem; }
.cap .ico svg { width: 23px; height: 23px; }
.cap h3 { font-size: 1.22rem; }
.cap .tag { font-family: var(--fm); font-size: .72rem; letter-spacing: .12em; color: var(--faint); display:block; margin-bottom:.4rem; }
.cap p { color: var(--muted); font-size: .97rem; margin-top: .55rem; }

/* ============================ METHOD (sequence) ======================== */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(1.2rem, 2.5vw, 2rem); }
.steps::before { content:""; position:absolute; left:0; right:0; top:34px; height:1px; background: linear-gradient(90deg, transparent, var(--line-2) 12%, var(--line-2) 88%, transparent); }
.step { position: relative; }
.step .num { font-family: var(--fm); font-size: 1rem; color: #04121b; background: var(--aqua); width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; position: relative; z-index: 1; box-shadow: 0 0 0 6px var(--abyss); }
.section--alt .step .num { box-shadow: 0 0 0 6px var(--abyss-2); }
.step h3 { font-size: 1.18rem; margin-top: 1.3rem; }
.step p { color: var(--muted); font-size: .96rem; margin-top: .5rem; }

/* ============================ ABOUT ==================================== */
.about-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.about-copy p { color: var(--muted); }
.about-copy p + p { margin-top: 1rem; }
.about-figure { position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 4/3; }
.about-figure img { width: 100%; height: 100%; object-fit: cover; }
.about-figure::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(6,9,15,.05), rgba(6,9,15,.55)), linear-gradient(120deg, rgba(91,140,255,.22), transparent 60%); mix-blend-mode: normal; }
.about-figure .coord { position:absolute; left:14px; bottom:12px; z-index:2; font-family: var(--fm); font-size:.72rem; letter-spacing:.14em; color: var(--fg); opacity:.9; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem,2.5vw,2rem); margin-top: clamp(2.4rem,5vw,3.6rem); }
.principle .k { font-family: var(--fm); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--aqua); }
.principle h4 { font-size: 1.12rem; margin: .5rem 0; }
.principle p { color: var(--muted); font-size: .95rem; }

/* ============================ PRACTICE (gallery) ======================= */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1rem, 2vw, 1.4rem); }
.shot { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/10; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.shot:hover img { transform: scale(1.04); }
.shot::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, transparent 40%, rgba(6,9,15,.7)); }
.shot .cap-txt { position:absolute; left:16px; bottom:14px; z-index:2; font-family: var(--fm); font-size:.74rem; letter-spacing:.1em; color: var(--fg); }
.gallery-note { margin-top: 1.2rem; font-family: var(--fm); font-size: .76rem; letter-spacing: .08em; color: var(--faint); }

/* ============================ CTA band ================================= */
.cta { text-align: center; }
.cta h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.cta p { color: var(--muted); margin: 1rem auto 0; max-width: 50ch; }
.cta .btn { margin-top: 2rem; }

/* ============================ CONTACT ================================== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-info .row { display: flex; gap: .85rem; align-items: flex-start; margin-bottom: 1.5rem; }
.contact-info .ic { width: 42px; height: 42px; flex: none; border-radius: 10px; display: grid; place-items: center; color: var(--aqua); background: rgba(52,226,201,.08); border: 1px solid rgba(52,226,201,.18); }
.contact-info .ic svg { width: 18px; height: 18px; }
.contact-info .k { font-family: var(--fm); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); }
.contact-info .v { color: var(--fg); margin-top: .15rem; }
.contact-info .v a:hover { color: var(--aqua); }
.coords-card { margin-top: .5rem; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; font-family: var(--fm); font-size: .8rem; letter-spacing: .06em; color: var(--muted); background: var(--panel); }
.coords-card b { color: var(--aqua); font-weight: 500; }

.form-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: clamp(1.5rem, 3vw, 2.2rem); }
.field { margin-bottom: 1.05rem; }
.field label { display:block; font-family: var(--fm); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; }
.field .req { color: var(--aqua); }
.field input, .field textarea { width:100%; font-family: var(--fb); font-size: 1rem; color: var(--fg); background: var(--abyss); border: 1px solid var(--line-2); border-radius: 9px; padding: .75rem .85rem; transition: border-color .2s, box-shadow .2s; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--aqua); box-shadow: 0 0 0 3px rgba(52,226,201,.16); }
.field textarea { min-height: 130px; resize: vertical; }
.field-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.hp { position:absolute; left:-9999px; opacity:0; height:0; width:0; }
.form-note { font-size: .85rem; color: var(--faint); margin-top: .5rem; }
.form-status { margin-top: 1rem; font-size: .92rem; padding: .7rem .9rem; border-radius: 9px; display: none; }
.form-status.ok  { display:block; background: rgba(52,226,201,.12); color: #9af2e4; border: 1px solid rgba(52,226,201,.4); }
.form-status.err { display:block; background: rgba(255,120,120,.1); color: #ff9d9d; border: 1px solid rgba(255,120,120,.4); }

/* ============================ FOOTER =================================== */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(2.4rem, 5vw, 3.4rem); }
.footer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1.2rem 2rem; }
.footer-bar .brand { margin-right: auto; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-nav a { font-size: .92rem; color: var(--muted); }
.footer-nav a:hover { color: var(--fg); }
.footer-copy { width: 100%; margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; }
.footer-copy, .footer-copy span { font-family: var(--fm); font-size: .76rem; letter-spacing: .06em; color: var(--faint); }

/* ---- back to top ---- */
.to-top { position: fixed; right: 18px; bottom: 18px; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(13,21,37,.8); backdrop-filter: blur(8px); color: var(--aqua); display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s, transform .3s; z-index: 90; }
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { transform: translateY(-2px); border-color: var(--aqua); }
.to-top svg { width: 20px; height: 20px; }

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

/* ---- reveal ---- */
[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }

/* ============================ responsive =============================== */
@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .globe-wrap { max-width: 380px; grid-row: 1; margin-bottom: -1rem; }
  .hero-copy { padding-block: 1rem; }
  .cap-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; gap: 1.4rem; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-tools-desktop { display: none; }
  .burger { display: block; }
  .nav {
    position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(6,9,15,.97); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gut) 1.4rem; transform: translateY(-150%); transition: transform .4s var(--ease); max-height: calc(100svh - 76px); overflow-y: auto;
  }
  body.nav-open .nav { transform: translateY(0); }
  .nav a { padding: 1rem .2rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a::after { display: none; }
  .nav .nav-lang { display: flex; flex-direction: column; align-items: stretch; gap: 1rem; padding-top: 1.2rem; }
  .nav .nav-lang .lang { align-self: flex-start; }
  .nav .nav-lang .btn { justify-content: center; }
  .cap-grid { grid-template-columns: 1fr; }
  .field-2 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
