/* ============================================================
   INTER-TELCO · Inter-Telco Design System
   DUAL THEME:
     · LIGHT (default) = 100% original look (Roboto, naranja #ef7f1a)
     · DARK (html[data-theme="dark"]) = redesign (Inter, verdes/lima, sin naranja)
   Same variable names, two value sets → components adapt by token.
   ============================================================ */

/* ---- Fonts: Roboto (light/original) + Inter (dark) + monos ---- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,400;0,500;0,700;1,400;1,500&family=Roboto+Serif:ital,wght@1,400;1,500&family=Roboto+Mono:wght@400;500&family=JetBrains+Mono:wght@400;500&display=swap');

@font-face {
  font-family: 'Inter';
  src: url('fonts/InterVariable.ttf') format('truetype-variations'),
       url('fonts/InterVariable.ttf') format('truetype');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/InterVariable-Italic.ttf') format('truetype-variations'),
       url('fonts/InterVariable-Italic.ttf') format('truetype');
  font-weight: 100 900; font-style: italic; font-display: swap;
}

/* ===================== LIGHT (default · original) ===================== */
:root {
  /* brand */
  --green:   #174822;  --green-d: #0d2e15;  --green-l: #1f6a32;
  --lime:    #b9ce2a;  --lime-l:  #dff196;
  --orange:  #ef7f1a;  --orange-d:#d96d0d;

  /* neutrals / surfaces */
  --cream:   #FCFBF7;  --sand:    #F5F1E6;
  --surface: #ffffff;  --surface-2:#ffffff;

  /* text */
  --ink:   #0E1A12;  --ink-2: #2C3A30;  --ink-3: #5A6660;  --ink-4: #8E988F;

  /* lines */
  --line:  rgba(14,26,18,.10);  --line-2: rgba(14,26,18,.16);

  /* role tokens (diverge by theme) */
  --heading:      #174822;
  --accent-text:  #174822;            /* structural accent (green) */
  --accent:       #ef7f1a;            /* energy accent (orange) */
  --accent-bg:    rgba(239,127,26,.10);
  --btn-fill:     #174822;  --btn-fill-text: #FCFBF7;  --btn-fill-hover: #0d2e15;  --btn-shadow: rgba(23,72,34,.32);
  --btn2-fill:    #ef7f1a;  --btn2-text: #ffffff;       --btn2-hover: #d96d0d;      --btn2-shadow: rgba(239,127,26,.5);
  --cta-bg:       #174822;
  --navtop-bg:    #174822;  --navtop-text: rgba(252,251,247,.85);
  --nav-sticky:   rgba(252,251,247,.88);
  --footer-bg:    #FCFBF7;
  --dots:         rgba(23,72,34,.10);
  --ticker-text:  rgba(23,72,34,.42);
  --shadow-card:  rgba(14,26,18,.16);
  --link-hover:   #174822;
  --chip-bg:      rgba(23,72,34,.06);  --chip-text: #174822;
  --field-bg:     #ffffff;
  --hl-bg:        #dff196;  --hl-text: #174822;
  --outline-text: #174822;  --outline-bg: #ffffff;
  --icon-tile:    rgba(23,72,34,.08);  --icon-fg: #174822;
  --heading-weight: 500;  --heading-weight-sm: 500;

  --font-sans:  "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Roboto Serif", Georgia, "Times New Roman", serif;
  --font-mono:  "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1340px;
}

/* ===================== DARK (redesign) ===================== */
html[data-theme="dark"] {
  --green:   #174822;  --green-d: #0c2223;  --green-l: #2a7d3f;
  --lime:    #b9ce2a;  --lime-l:  #dff196;
  --orange:  #b9ce2a;  --orange-d:#a8bd1e;

  --cream:   #0c2223;  --sand:    #102a2b;
  --surface: #13332a;  --surface-2:#0f2a26;

  --ink:   #eef3ec;
  --ink-2: rgba(238,243,236,.82);  --ink-3: rgba(238,243,236,.60);  --ink-4: rgba(238,243,236,.40);

  --line:  rgba(255,255,255,.10);  --line-2: rgba(255,255,255,.16);

  --heading:      #eef3ec;
  --accent-text:  #b9ce2a;
  --accent:       #b9ce2a;
  --accent-bg:    rgba(185,206,42,.16);
  --btn-fill:     #b9ce2a;  --btn-fill-text: #0c2223;  --btn-fill-hover: #c8de3c;  --btn-shadow: rgba(185,206,42,.55);
  --btn2-fill:    #b9ce2a;  --btn2-text: #0c2223;       --btn2-hover: #c8de3c;       --btn2-shadow: rgba(185,206,42,.55);
  --cta-bg:       #102a2b;
  --navtop-bg:    #0f2a26;  --navtop-text: rgba(238,243,236,.60);
  --nav-sticky:   rgba(12,34,35,.82);
  --footer-bg:    #0f2a26;
  --dots:         rgba(255,255,255,.07);
  --ticker-text:  rgba(255,255,255,.30);
  --shadow-card:  rgba(0,0,0,.55);
  --link-hover:   #ffffff;
  --chip-bg:      rgba(255,255,255,.06);  --chip-text: rgba(238,243,236,.82);
  --field-bg:     #0f2a26;
  --hl-bg:        rgba(185,206,42,.16);  --hl-text: #b9ce2a;
  --outline-text: #eef3ec;  --outline-bg: rgba(255,255,255,.03);
  --icon-tile:    rgba(185,206,42,.18);  --icon-fg: #ffffff;
  --heading-weight: 700;  --heading-weight-sm: 600;

  --font-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:  "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Disable all transitions during theme switch (avoids var()-transition sticking) */
html.theme-switching, html.theme-switching * { transition: none !important; }

h1, h2, h3, h4 { color: var(--heading); margin: 0; font-weight: var(--heading-weight); letter-spacing: -0.025em; }
h1 { font-size: clamp(36px, 5vw, 72px); line-height: 1.04; letter-spacing: -0.035em; }
h2 { font-size: clamp(28px, 3.4vw, 48px); line-height: 1.1; letter-spacing: -0.03em; }
h3 { font-size: 22px; line-height: 1.2; font-weight: var(--heading-weight-sm); }
h4 { font-size: 17px; line-height: 1.3; font-weight: var(--heading-weight-sm); }
p  { margin: 0; color: var(--ink-3); }
.lead { font-size: 18px; color: var(--ink-2); line-height: 1.65; }

.serif-it { font-family: var(--font-serif); font-style: italic; font-weight: 500; font-feature-settings: "ss01" on; }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }

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

/* ---- Backgrounds ---- */
.bg-sand { background: var(--sand); }
.bg-cream { background: var(--cream); }
.bg-green { background: var(--green); color: #fff; }
.bg-green h1, .bg-green h2, .bg-green h3, .bg-green h4 { color: #fff; }
.bg-green p, .bg-green .lead { color: rgba(255,255,255,.78); }

.dots-bg {
  background-image: radial-gradient(circle, var(--dots) 1.2px, transparent 1.4px);
  background-size: 22px 22px;
}

/* ---- Eyebrow ---- */
.eb {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3);
}
.eb .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pulse 2.4s infinite; }
.eb-orange { color: var(--accent); }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 9999px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  cursor: pointer;
  transition: background .2s cubic-bezier(.2,.8,.2,1), border-color .2s, color .2s, box-shadow .2s, transform .12s;
  border: 1px solid transparent; white-space: nowrap; text-decoration: none; font-family: inherit;
}
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }

/* secondary / green */
.btn-green { background: var(--btn-fill); color: var(--btn-fill-text); border-color: var(--btn-fill); }
.btn-green:hover {
  background: var(--btn-fill-hover); border-color: var(--btn-fill-hover);
  box-shadow: 0 12px 30px -12px var(--btn-shadow); transform: translateY(-1px);
}
.btn-green:active { transform: translateY(1px); }

/* primary / orange (lime in dark) */
.btn-orange { background: var(--btn2-fill); color: var(--btn2-text); border-color: var(--btn2-fill); }
.btn-orange:hover {
  background: var(--btn2-hover); border-color: var(--btn2-hover);
  box-shadow: 0 12px 30px -12px var(--btn2-shadow); transform: translateY(-1px);
}
.btn-orange:active { transform: translateY(1px); }

.btn-outline { color: var(--outline-text); border-color: var(--line-2); background: var(--outline-bg); }
.btn-outline:hover { border-color: var(--accent-text); color: var(--accent-text); }
.btn-outline-d { color: #fff; border-color: rgba(255,255,255,.30); background: transparent; }
.btn-outline-d:hover { border-color: var(--lime); color: var(--lime); }

/* ---- Chips ---- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 9999px;
  background: var(--chip-bg);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--chip-text);
}
.chip-orange { background: var(--accent-bg); color: var(--accent); }
.chip-lime { background: rgba(185,206,42,.16); color: var(--accent-text); }
.chip-light { background: rgba(255,255,255,.12); color: #fff; }
.chip-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--lime); }
.chip-orange .chip-dot { background: var(--accent); }

/* ---- Cards ---- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 28px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s, border-color .35s;
}
.card.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px -28px var(--shadow-card);
  border-color: var(--line-2);
}

/* ---- Icon tile (theme-aware fallback; light cards carry inline original colors) ---- */
.icon-wrap, .vert-icon { background: var(--icon-tile); color: var(--icon-fg); }
.icon-wrap svg, .vert-icon svg { color: inherit; }
/* DARK: force white icons on lime tile regardless of original inline color */
html[data-theme="dark"] .cap-card .icon-wrap,
html[data-theme="dark"] .vert-icon { background: rgba(185,206,42,.18) !important; color: #fff !important; }
html[data-theme="dark"] .cap-card.green-card .icon-wrap { background: rgba(255,255,255,.14) !important; }

/* ---- Top utility bar ---- */
.nav-top { background: var(--navtop-bg); color: var(--navtop-text); font-size: 12px; border-bottom: 1px solid var(--line); }
.nav-top-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 8px 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono); letter-spacing: .06em;
}
.nav-top a:hover { color: var(--lime); }
@media (max-width: 768px) { .nav-top { display: none; } }

/* ---- Nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
}
.nav.sticky {
  background: var(--nav-sticky);
  backdrop-filter: saturate(160%) blur(14px);
  border-color: var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 34px; }
.brand .logo-dark { display: none; }
html[data-theme="dark"] .brand .logo-light { display: none; }
html[data-theme="dark"] .brand .logo-dark { display: block; }

.nav-links { display: none; gap: 28px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 1024px) { .nav-links { display: flex; } }
.nav-links a { position: relative; padding: 4px 0; font-size: 15px; color: var(--ink-2); transition: color .25s; }
.nav-links a:hover, .nav-links a.active { color: var(--link-hover); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--accent-text);
  transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 12px; }

.lang-toggle { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); }
.lang-toggle button { padding: 4px 8px; background: transparent; border: 0; color: var(--ink-4); font: inherit; cursor: pointer; }
.lang-toggle button.on { color: var(--accent-text); font-weight: 500; }

/* ---- Theme toggle (sun/moon) ---- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9999px;
  background: transparent; border: 1px solid var(--line-2); color: var(--ink-2);
  cursor: pointer; transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--accent-text); border-color: var(--accent-text); }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: block; }
html[data-theme="dark"] .theme-toggle .ico-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

.burger { display: inline-flex; padding: 8px; background: transparent; border: 0; color: var(--ink); cursor: pointer; }
@media (min-width: 1024px) { .burger { display: none; } }
.mobile-nav { display: none; border-top: 1px solid var(--line); background: var(--cream); }
.mobile-nav.open { display: block; }
.mobile-nav nav { padding: 16px 24px; display: flex; flex-direction: column; }
.mobile-nav nav a { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }

/* ---- Footer ---- */
.footer { background: var(--footer-bg); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.7fr repeat(4, 1fr); gap: 36px; padding: 64px 0 36px; }
@media (max-width: 920px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 20px; padding: 40px 0 24px; } }
.footer h5 {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-text); margin: 0 0 14px; font-weight: 500;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer a { color: var(--ink-3); font-size: 14px; transition: color .2s; }
.footer a:hover { color: var(--link-hover); }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 20px 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); letter-spacing: .08em;
}

/* ---- Marquee slogan ---- */
.ticker { overflow: hidden; background: var(--sand); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ticker-track { display: flex; gap: 24px; align-items: center; padding: 18px 0; animation: scroll-x 38s linear infinite; width: max-content; white-space: nowrap; }
.ticker-track .serif-it { color: var(--ticker-text); font-size: 22px; }
@keyframes scroll-x { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* ---- Forms ---- */
.field { display: block; margin-bottom: 16px; }
.field label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%; background: var(--field-bg);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px;
  color: var(--ink); font-family: inherit; font-size: 14px; outline: none;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-4); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
.field textarea { resize: vertical; min-height: 100px; }
.field select option { color: #111; background: #ffffff; }
html[data-theme="dark"] .field select option { color: #ffffff; background: #102a2b; }

/* ---- CTA section (shared) ---- */
.cta-section { background: var(--cta-bg); position: relative; overflow: hidden; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.cta-section h2 { color: #fff; }
.cta-section p, .cta-section .lead { color: rgba(255,255,255,.82); }
/* CTA corner decoration: shown in light (original), hidden in dark */
.cta-section .deco-1, .cta-section .deco-2 { position: absolute; pointer-events: none; }
html[data-theme="dark"] .cta-section .deco-1, html[data-theme="dark"] .cta-section .deco-2 { display: none; }

/* ---- Pattern divider (light=original colors / dark=lime) ---- */
.pattern-divider { display: grid; place-items: center; padding: 42px 0; }
.pattern-divider img { height: 36px; opacity: .85; }
.pattern-divider .dv-dark { display: none; }
html[data-theme="dark"] .pattern-divider img { opacity: .55; }
html[data-theme="dark"] .pattern-divider .dv-light { display: none; }
html[data-theme="dark"] .pattern-divider .dv-dark { display: block; }

/* ---- Timeline ---- */
.timeline-row { display: grid; grid-template-columns: 100px 1fr; gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.timeline-row .year { font-family: var(--font-mono); font-size: 16px; color: var(--accent); letter-spacing: .04em; font-weight: 500; }
.timeline-row h4 { color: var(--heading); margin: 0 0 6px; font-size: 17px; }
.timeline-row p { color: var(--ink-3); font-size: 14px; }

/* ---- Tabs / filter ---- */
.filter-pill {
  padding: 8px 16px; border: 1px solid var(--line-2);
  background: var(--field-bg); color: var(--ink-2);
  font-size: 13px; border-radius: 9999px; cursor: pointer; font-family: inherit; transition: transform .2s, box-shadow .2s, border-color .2s;
}
.filter-pill:hover { border-color: var(--accent-text); color: var(--ink); }
.filter-pill.on { background: var(--btn-fill); color: var(--btn-fill-text); border-color: var(--btn-fill); }

/* ---- Lime highlight ---- */
.hl-lime { background: var(--hl-bg); color: var(--hl-text); padding: 0 .15em; border-radius: 3px; }

/* ---- Underline script (orange light / lime dark) ---- */
.underline-script {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'><path d='M2 8 C 30 2, 60 14, 90 6 S 160 0, 198 7' stroke='%23ef7f1a' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>");
  background-size: 100% 8px; background-repeat: no-repeat; background-position: 0 100%; padding-bottom: 8px;
}
html[data-theme="dark"] .underline-script {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12'><path d='M2 8 C 30 2, 60 14, 90 6 S 160 0, 198 7' stroke='%23b9ce2a' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>");
}
