/* Software Chile — landing styles */

:root {
  --bg: oklch(0.985 0.005 90);
  --bg-soft: oklch(0.965 0.008 88);
  --bg-card: oklch(0.99 0.003 90);
  --ink: oklch(0.22 0.012 80);
  --ink-2: oklch(0.38 0.012 80);
  --ink-3: oklch(0.55 0.01 80);
  --line: oklch(0.88 0.008 85);
  --line-strong: oklch(0.78 0.01 85);
  --honey: oklch(0.86 0.17 92);
  --honey-deep: oklch(0.78 0.18 78);
  --honey-soft: oklch(0.94 0.09 95);
  --black: oklch(0.16 0.005 80);

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --maxw: 1240px;
  --gutter: 32px;

  --font-display: "Inter Tight", "Inter", system-ui, sans-serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

button { font-family: inherit; cursor: pointer; }

::selection { background: var(--honey); color: var(--black); }

/* ---------- Layout primitives ---------- */

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

.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.section:first-of-type { border-top: 0; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 18px;
}
.section-eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--ink-3);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 0 0 18px;
  text-wrap: balance;
}

.section-lede {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 64ch;
  margin: 0 0 40px;
  text-wrap: pretty;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark { width: 28px; height: 28px; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.005em;
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .brand-word .since { display: none; }
}
.brand-word b { font-weight: 700; }
.brand-word .since {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
  letter-spacing: 0.1em;
}
.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav a {
  text-decoration: none;
  color: var(--ink-2);
  font-size: 14px;
  letter-spacing: -0.005em;
  transition: color .15s;
}
.nav a:hover { color: var(--ink); }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--ink);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  text-decoration: none;
}
.nav a.nav-cta { color: var(--bg); }
.nav a.nav-cta:hover { background: var(--black); color: var(--bg); }

@media (max-width: 860px) {
  .nav .nav-link { display: none; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .12s, background .15s, border-color .15s;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn-primary:hover { background: var(--black); }
.btn-honey {
  background: var(--honey);
  color: var(--black);
  border-color: var(--honey);
}
.btn-honey:hover { background: var(--honey-deep); border-color: var(--honey-deep); color: var(--black); }
.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover { background: var(--bg-soft); border-color: var(--ink-3); }

.btn .ic { width: 16px; height: 16px; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 96px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 28px;
}
.hero-meta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--honey-deep);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--honey) 35%, transparent);
}

h1.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5.2vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 0 0 26px;
  text-wrap: balance;
}
h1.hero-title .accent {
  background: linear-gradient(180deg, transparent 62%, var(--honey) 62%, var(--honey) 92%, transparent 92%);
  padding: 0 4px;
}

.hero-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 38px;
  text-wrap: pretty;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-strip {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.hero-strip .stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.hero-strip .stat-label {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

/* hero visual — honeycomb */
.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Honeycomb (decorative) ---------- */
.honeycomb-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--honeycomb-opacity, 0.5);
  background-image:
    radial-gradient(circle at 50% 50%, color-mix(in oklab, var(--honey) 22%, transparent) 0 0.6px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
  display: var(--honeycomb-display, block);
}

/* ---------- Service cards ---------- */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 900px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .svc-grid { grid-template-columns: 1fr; } }

.svc-card {
  background: var(--bg-card);
  padding: 28px 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: background .15s;
  min-height: 220px;
}
.svc-card:hover { background: var(--bg); }
.svc-card .hex-icon { width: 40px; height: 40px; }
.svc-card h3 {
  font-family: var(--font-display);
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--ink);
}
.svc-card p {
  font-size: 14px;
  color: var(--ink-2);
  margin: 0;
  line-height: 1.55;
  text-wrap: pretty;
}
.svc-card .svc-num {
  position: absolute;
  top: 22px;
  right: 22px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
}

/* ---------- SAP section ---------- */

.sap-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) { .sap-grid { grid-template-columns: 1fr; gap: 32px; } }

.sap-cap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 560px) { .sap-cap-list { grid-template-columns: 1fr; } }
.sap-cap-list li {
  background: var(--bg-card);
  padding: 18px 18px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}
.sap-cap-list li .dot {
  width: 6px; height: 6px; margin-top: 8px; border-radius: 50%;
  background: var(--honey-deep);
  flex-shrink: 0;
}

.sap-diagram {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(var(--bg-card), var(--bg-card)),
    repeating-linear-gradient(45deg, transparent 0 8px, color-mix(in oklab, var(--honey) 10%, transparent) 8px 9px);
  padding: 24px;
}

/* ---------- Legacy block ---------- */

.legacy-wrap {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  position: relative;
  overflow: hidden;
}
.legacy-wrap::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -60px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, color-mix(in oklab, var(--honey) 35%, transparent) 0 30%, transparent 65%);
  pointer-events: none;
  opacity: 0.22;
}
.legacy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  position: relative;
  z-index: 1;
}
@media (max-width: 860px) { .legacy-grid { grid-template-columns: 1fr; gap: 32px; } }
.legacy-wrap .section-eyebrow,
.legacy-wrap .section-eyebrow::before { color: color-mix(in oklab, var(--bg) 70%, transparent); background-color: color-mix(in oklab, var(--bg) 70%, transparent); }
.legacy-wrap .section-eyebrow::before { background: color-mix(in oklab, var(--bg) 70%, transparent); }
.legacy-wrap .section-title { color: var(--bg); }
.legacy-wrap .section-lede { color: color-mix(in oklab, var(--bg) 75%, transparent); }

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}
.tech-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 6px 11px;
  border: 1px solid color-mix(in oklab, var(--bg) 25%, transparent);
  border-radius: var(--radius-sm);
  color: color-mix(in oklab, var(--bg) 92%, transparent);
  letter-spacing: 0.02em;
}
.tech-tag.honey {
  background: var(--honey);
  border-color: var(--honey);
  color: var(--black);
}

.legacy-quote {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--bg);
  border-left: 2px solid var(--honey);
  padding-left: 20px;
  margin: 0 0 28px;
  text-wrap: balance;
}

.legacy-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.legacy-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: color-mix(in oklab, var(--bg) 88%, transparent);
}
.legacy-list .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--honey);
  letter-spacing: 0.05em;
  width: 24px;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ---------- Why us ---------- */

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .why-grid { grid-template-columns: 1fr; } }

.why-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 26px;
  background: var(--bg-card);
}
.why-card .num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--honey-deep);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.why-card h4 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  margin: 0 0 8px;
}
.why-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ---------- Industries ---------- */

.ind-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 800px) { .ind-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .ind-grid { grid-template-columns: 1fr; } }

.ind-card {
  background: var(--bg-card);
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 110px;
}
.ind-card .ic {
  width: 22px; height: 22px;
  color: var(--honey-deep);
}
.ind-card .label {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.ind-card .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
  margin-top: auto;
}

/* ---------- Brochure ---------- */

.brochure-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 48px;
}
@media (max-width: 860px) { .brochure-wrap { grid-template-columns: 1fr; padding: 32px; gap: 32px; } }

.brochure-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line);
  aspect-ratio: 8.5 / 11;
  position: relative;
  cursor: pointer;
  transition: transform .2s;
  box-shadow: 0 1px 0 0 var(--line);
}
.brochure-thumb:hover { transform: translateY(-2px); }

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 32px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  transition: color .15s;
}
.contact-row:first-of-type { border-top: 0; padding-top: 0; }
.contact-row:hover { color: var(--honey-deep); }
.contact-row .ic-wrap {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  color: var(--ink-2);
}
.contact-row:hover .ic-wrap { border-color: var(--honey-deep); color: var(--honey-deep); }
.contact-row .ic-wrap svg { width: 16px; height: 16px; }
.contact-row .label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.contact-row .value {
  font-size: 15px;
  letter-spacing: -0.005em;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 36px;
  margin-top: 32px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: color-mix(in oklab, var(--ink) 50%, transparent);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade .15s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 980px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}
.modal-body {
  overflow: auto;
  padding: 0;
  flex: 1;
}
.modal-close {
  border: 0;
  background: transparent;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
}
.modal-close:hover { background: var(--bg-soft); color: var(--ink); }

/* ---------- Brochure pages (PDF preview) ---------- */
.brochure-page {
  background: white;
  width: 100%;
  aspect-ratio: 8.5 / 11;
  padding: 56px 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
  font-family: var(--font-sans);
  color: var(--ink);
}

/* ---------- Email signature ---------- */
.email-sig-frame {
  background: white;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: Arial, Helvetica, sans-serif;
  color: #333;
  font-size: 13px;
  line-height: 1.5;
}

/* ---------- Copy block ---------- */
.copy-block {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.55;
  white-space: pre-wrap;
  font-family: var(--font-sans);
}

.tab-row {
  display: flex;
  gap: 4px;
  padding: 16px 24px 0;
  border-bottom: 1px solid var(--line);
}
.tab {
  padding: 10px 16px;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}
.tab.active { color: var(--ink); border-bottom-color: var(--honey-deep); }

.modal-section {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.modal-section h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}

/* --- Override: 8 service cards (4 columns on large screens) --- */
@media (min-width: 901px) {
  .svc-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- Hero strip responsive (3 cols → 2 → 1) --- */
@media (max-width: 560px) {
  .hero-strip {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}
@media (max-width: 360px) {
  .hero-strip {
    grid-template-columns: 1fr;
  }
}

/* --- Footer contact row wrapping --- */
.footer-contacts {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

/* --- Nav mobile: show only CTA + stack brand on tiny screens --- */
@media (max-width: 400px) {
  .topbar-inner {
    height: auto;
    padding: 12px 0;
  }
  .brand-word b {
    font-size: 14px;
  }
}

/* Hex cell hover effect */
.hex-cell {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.hex-cell:hover {
  transform: scale(1.07);
  filter: brightness(1.06);
}
