/* Palette from the páramo above Quito: snow, andesite rock, ichu grass, lichen. */
:root {
  --snow: #F4F6F5;
  --rock: #1E2A2F;
  --scree: #56636A;
  --rule: #D3DAD7;
  --ichu: #A8711A;
  --ichu-text: #7E5310;
  --lichen: #34563A;
  --lichen-hover: #26422B;
  --on-lichen: #FFFFFF;
  --ridge-fill: #ECEBE2;
  --band: #1E2A2F;
  --band-text: #E3E8E6;
  --band-muted: #A9B5B9;
  --band-accent: #D9A441;
  --maxw: 1080px;
  --font: "Archivo", ui-sans-serif, system-ui, "Segoe UI", Roboto, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --snow: #12191C;
    --rock: #E3E8E6;
    --scree: #9AA7AB;
    --rule: #2A3539;
    --ichu: #D9A441;
    --ichu-text: #E0B050;
    --lichen: #A3C79A;
    --lichen-hover: #BDD9B5;
    --on-lichen: #12191C;
    --ridge-fill: #1A2225;
    --band: #1A2326;
    --band-text: #E3E8E6;
    --band-muted: #9AA7AB;
    --band-accent: #D9A441;
  }
}

*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--snow);
  color: var(--rock);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--lichen); }
a:hover { color: var(--lichen-hover); }
:focus-visible { outline: 2px solid var(--ichu); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--rock); color: var(--snow); padding: 8px 14px; border-radius: 6px; z-index: 20; }
.skip:focus { top: 12px; color: var(--snow); }

h1, h2, h3 { margin: 0; font-weight: 750; }
h1 { font-size: clamp(36px, 7vw, 76px); font-stretch: 125%; line-height: 1.02; letter-spacing: -0.015em; max-width: 15ch; }
@media (max-width: 480px) { h1 { font-stretch: 112%; max-width: none; } }
h2 { font-size: clamp(30px, 4.2vw, 46px); font-stretch: 118%; line-height: 1.08; letter-spacing: -0.01em; margin-bottom: 14px; }
h3 { font-size: 21px; font-stretch: 108%; line-height: 1.25; margin-bottom: 8px; }
.sub { color: var(--scree); max-width: 58ch; margin: 0 0 48px; font-size: 19px; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--snow) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.wordmark { text-decoration: none; color: var(--rock); font-weight: 800; font-stretch: 125%; font-size: 20px; white-space: nowrap; }
.wordmark:hover { color: var(--rock); }
.wordmark .ai { color: var(--ichu); }
.wordmark .rest { font-weight: 500; font-stretch: 100%; color: var(--scree); margin-left: 6px; }
nav.main { display: flex; align-items: center; gap: 26px; font-size: 15px; }
nav.main a { color: var(--scree); text-decoration: none; }
nav.main a:hover { color: var(--rock); }
nav.main a.btn { color: var(--on-lichen); }
nav.main a.lang { color: var(--rock); font-weight: 600; text-decoration: underline; text-decoration-color: var(--ichu); text-underline-offset: 4px; }
@media (max-width: 760px) { nav.main a:not(.btn):not(.lang) { display: none; } }
@media (max-width: 480px) { header.site .wordmark .rest { display: none; } nav.main { gap: 18px; } }

.btn {
  display: inline-block;
  background: var(--lichen);
  color: var(--on-lichen);
  text-decoration: none;
  font-weight: 650;
  font-size: 16px;
  padding: 11px 20px;
  border-radius: 6px;
  border: 1px solid var(--lichen);
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--lichen-hover); border-color: var(--lichen-hover); color: var(--on-lichen); }
.btn.ghost { background: transparent; color: var(--rock); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--rock); color: var(--rock); background: transparent; }
nav.main .btn { font-size: 15px; padding: 8px 16px; }

/* Hero */
.hero { padding: 64px 0 88px; }
.hero h1 { margin-bottom: 26px; }
.lead { font-size: clamp(19px, 2.2vw, 22px); color: var(--scree); max-width: 52ch; margin: 0 0 34px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }
.facts { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 36px; font-size: 16px; color: var(--rock); max-width: 900px; }

/* Ridge: an elevation profile of Pichincha, the mountain above Quito */
.ridge { margin: 40px 0 0; }
.ridge-plot { position: relative; height: clamp(220px, 30vw, 380px); }
.ridge-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; overflow: visible; }
.ridge-fill { fill: var(--ridge-fill); }
.ridge-line { fill: none; stroke: var(--ichu); stroke-width: 2.5; stroke-linejoin: round; }
.contour { position: absolute; left: 0; right: 0; top: var(--y); border-top: 1px dashed var(--rule); z-index: 0; }
.contour span {
  position: absolute; bottom: 4px;
  left: max(20px, calc((100% - var(--maxw)) / 2 + 20px));
  font-size: 13px; color: var(--scree); font-variant-numeric: tabular-nums;
}
.peak { position: absolute; left: var(--x); top: var(--y); z-index: 2; }
.peak::before {
  content: ""; position: absolute; left: -5px; top: -5px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--ichu); box-shadow: 0 0 0 3px var(--snow);
}
.peak span {
  position: absolute; bottom: 14px; left: 0; transform: translateX(-50%);
  white-space: nowrap; text-align: center; font-size: 14px; line-height: 1.3; font-weight: 650;
}
.peak small { display: block; font-weight: 400; color: var(--scree); font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) { .peak.rucu span { display: none; } }
@media (max-width: 560px) { .peak.guagua span { transform: translateX(calc(-100% + 12px)); text-align: right; } }
.ridge figcaption { border-top: 1px solid var(--rule); }
.ridge figcaption p { margin: 0; padding: 14px 0 0; font-size: 15px; color: var(--scree); max-width: 70ch; }

@media (prefers-reduced-motion: no-preference) {
  .ridge-plot svg { animation: climb 1.8s cubic-bezier(.3,.1,.2,1) both .2s; }
  .peak { animation: appear .5s ease-out both; }
  .peak.quito { animation-delay: .5s; }
  .peak.rucu { animation-delay: 1.3s; }
  .peak.guagua { animation-delay: 1.6s; }
  @keyframes climb { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes appear { from { opacity: 0; } to { opacity: 1; } }
}

/* Sections */
section { padding: 104px 0; }
section + section { border-top: 1px solid var(--rule); }

/* Problems */
.problems { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px 56px; }
.problems .said { font-size: 21px; font-weight: 650; font-stretch: 104%; line-height: 1.3; margin: 0 0 8px; text-indent: -0.4em; }
.problems .said::before { content: "\201C"; color: var(--ichu); }
.problems .said::after { content: "\201D"; color: var(--ichu); }
:lang(es) .problems .said::before { content: "\00AB"; }
:lang(es) .problems .said::after { content: "\00BB"; }
.problems p { margin: 0; color: var(--scree); max-width: 46ch; }

/* Work */
.case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); gap: 20px 56px; padding: 44px 0; border-top: 1px solid var(--rule); }
.case:last-child { padding-bottom: 0; }
.case > div:first-child { position: sticky; top: 96px; align-self: start; }
.case h3 { font-size: 25px; margin-bottom: 10px; }
.case .client { margin: 0 0 22px; color: var(--scree); font-size: 15px; }
.case .result { margin: 0; font-size: 19px; font-weight: 650; line-height: 1.4; padding-left: 16px; border-left: 3px solid var(--ichu); }
.case .result strong { font-stretch: 125%; font-weight: 800; color: var(--ichu-text); }
.case dl { margin: 0; }
.case dt { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.case dd { margin: 0 0 20px; }
.case dd ul { margin: 12px 0 0; padding-left: 20px; }
.case dd li { margin-bottom: 10px; }
.case .tools { margin: 0; font-size: 14px; color: var(--scree); }
.case .short { margin: 0; }
@media (max-width: 760px) {
  .case { grid-template-columns: 1fr; }
  .case > div:first-child { position: static; }
}

/* Services */
.services { display: grid; grid-template-columns: 1fr; gap: 56px; }
@media (min-width: 760px) { .services { grid-template-columns: repeat(2, 1fr); gap: 64px 56px; } }
.service { border-top: 2px solid var(--rock); padding-top: 22px; }
.service h3 { font-size: 24px; }
.service .intro { margin: 0 0 18px; color: var(--scree); }
.service ul { list-style: none; margin: 0; padding: 0; }
.service li { position: relative; padding-left: 24px; margin-bottom: 10px; }
.service li::before {
  content: ""; position: absolute; left: 2px; top: 8px; width: 11px; height: 9px;
  background: var(--ichu); clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.tech-note { margin: 64px 0 0; padding-top: 22px; border-top: 1px solid var(--rule); color: var(--scree); font-size: 16px; max-width: 72ch; }

/* How we work: a trail with four stops */
.trail { list-style: none; padding: 0; margin: 0 0 48px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.trail li { position: relative; }
.trail li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: 32px; right: -32px; border-top: 2px dotted var(--ichu); }
.trail .stop {
  position: relative; display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 20px;
  border-radius: 50%; background: var(--snow); border: 2px solid var(--ichu);
  font-weight: 750; font-size: 15px; color: var(--ichu-text);
}
.trail p { margin: 0; color: var(--scree); }
@media (max-width: 860px) {
  .trail { grid-template-columns: 1fr; gap: 28px; }
  .trail li:not(:last-child)::after { top: 32px; bottom: -28px; left: 15px; right: auto; border-top: 0; border-left: 2px dotted var(--ichu); }
  .trail li { padding-left: 56px; }
  .trail .stop { position: absolute; left: 0; top: 0; margin: 0; }
}
.engage { margin: 0; font-size: 18px; max-width: 62ch; }

/* Contact */
section.contact { background: var(--band); color: var(--band-text); border-top: 0; }
.contact h2 { max-width: 18ch; }
.contact p { color: var(--band-muted); max-width: 54ch; margin: 0 0 32px; font-size: 19px; }
.contact .btn { font-size: 18px; padding: 14px 26px; background: var(--band-accent); border-color: var(--band-accent); color: #1E2A2F; }
.contact .btn:hover { background: #E8B95A; border-color: #E8B95A; color: #1E2A2F; }
.contact .btn.ghost { background: transparent; border-color: var(--band-muted); color: var(--band-text); }
.contact .btn.ghost:hover { background: transparent; border-color: var(--band-text); color: var(--band-text); }
.contact .small { font-size: 15px; margin: 28px 0 0; }
.contact .small a { color: var(--band-text); text-underline-offset: 3px; }
.contact .small a:hover { color: var(--band-accent); }

footer.site { padding: 36px 0 48px; font-size: 14px; color: var(--scree); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px 32px; }
footer.site p { margin: 0; }
footer.site .wordmark { font-size: 16px; }
