/* ============================================================
   KINGDOM TECHNOLOGY — Design tokens
   Palette: deep navy + royal gold, lit by "circuit" blue traces
   Type: Cinzel (regal display) + Manrope (body) + JetBrains Mono (utility)
   Signature: circuit-battlement divider — a castle skyline drawn
   as a printed-circuit trace, with lit nodes at the towers.
   ============================================================ */

:root{
  --navy-950: #0a0e24;
  --navy-900: #0d1330;
  --navy-800: #131b45;
  --navy-700: #1c2a5e;
  --navy-600: #2a3a78;
  --circuit-blue: #5b7bff;
  --circuit-blue-soft: rgba(91,123,255,0.35);
  --gold: #d4af37;
  --gold-light: #f1d990;
  --gold-dim: #9c812f;
  --cream: #f7f3e8;
  --cream-2: #efe8d6;
  --ink: #181c36;
  --ink-soft: #4a5078;
  --line-dark: rgba(255,255,255,0.10);
  --line-light: rgba(24,28,54,0.12);

  --font-display: "Cinzel", serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --container: 1140px;
  --radius: 14px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a{ color: inherit; text-decoration: none; }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 28px;
}

/* ============================================================
   Focus visibility
   ============================================================ */
a:focus-visible,
button:focus-visible{
  outline: 2px solid var(--circuit-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   NAV
   ============================================================ */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy-950);
  border-bottom: 1px solid var(--line-dark);
}

.nav{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  max-width: var(--container);
  margin: 0 auto;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--cream);
}

.brand img{
  width: 44px;
  height: 44px;
  border-radius: 9px;
}

.brand-text{
  font-family: var(--font-display);
  line-height: 1.1;
}

.brand-text .k1{
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-light);
}

.brand-text .k2{
  display: block;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  color: var(--circuit-blue);
  margin-top: 3px;
}

.nav-links{
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.nav-links a{
  color: var(--cream-2);
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
}

.nav-links a::after{
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0%;
  height: 2px;
  background: var(--gold);
  transition: width 0.25s ease;
}

.nav-links a:hover,
.nav-links a.active{
  color: var(--gold-light);
}

.nav-links a:hover::after,
.nav-links a.active::after{
  width: 100%;
}

.nav-toggle{
  display: none;
  background: none;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.nav-toggle span{
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold-light);
  margin: 4px 0;
}

@media (max-width: 760px){
  .nav-toggle{ display: block; }
  .nav-links{
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--navy-950);
    border-bottom: 1px solid var(--line-dark);
    padding: 18px 28px 24px;
    gap: 16px;
    display: none;
  }
  .nav-links.open{ display: flex; }
}

/* ============================================================
   HERO (home)
   ============================================================ */
.hero{
  position: relative;
  background:
    linear-gradient(115deg, rgba(10,14,36,0.92) 35%, rgba(10,14,36,0.55) 100%),
    url("assets/cover.png");
  background-size: cover;
  background-position: center;
  color: var(--cream);
  padding: 110px 0 90px;
  overflow: hidden;
}

.hero .container{
  max-width: 760px;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.32em;
  color: var(--circuit-blue);
  text-transform: uppercase;
  margin-bottom: 22px;
}

.hero h1{
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5.6vw, 4rem);
  line-height: 1.18;
  letter-spacing: 0.01em;
  margin: 0 0 22px;
  color: var(--cream);
}

.hero h1 .accent{
  color: var(--gold-light);
}

.slogan{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold-light);
  margin: 0 0 26px;
}

.hero p.lead{
  font-size: 1.05rem;
  color: var(--cream-2);
  max-width: 620px;
  margin: 0 0 36px;
}

.cta-row{
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: 1px solid transparent;
}

.btn-gold{
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: var(--navy-950);
  box-shadow: 0 8px 24px -10px rgba(212,175,55,0.6);
}

.btn-gold:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -10px rgba(212,175,55,0.75);
}

.btn-outline{
  border-color: var(--line-dark);
  color: var(--cream);
}

.btn-outline:hover{
  border-color: var(--circuit-blue);
  color: var(--circuit-blue);
  transform: translateY(-2px);
}

/* ============================================================
   SIGNATURE: circuit-battlement divider
   A castle skyline rendered as a PCB trace; some nodes "lit".
   ============================================================ */
.circuit-divider{
  display: block;
  width: 100%;
  height: 46px;
  background: var(--navy-950);
}

.circuit-divider svg{
  display: block;
  width: 100%;
  height: 100%;
}

.circuit-divider .trace{
  fill: none;
  stroke: var(--gold-dim);
  stroke-width: 2;
  stroke-linejoin: miter;
}

.circuit-divider .node{
  fill: var(--gold-dim);
}

.circuit-divider .node.lit{
  fill: var(--circuit-blue);
  animation: pulse 3.2s ease-in-out infinite;
}

.circuit-divider .node.lit:nth-child(3n){ animation-delay: 0.6s; }
.circuit-divider .node.lit:nth-child(5n){ animation-delay: 1.4s; }

@keyframes pulse{
  0%, 100% { opacity: 0.45; r: 3; }
  50% { opacity: 1; r: 4.5; }
}

@media (prefers-reduced-motion: reduce){
  .circuit-divider .node.lit{ animation: none; opacity: 0.9; }
}

/* ============================================================
   PAGE BANNER (secondary pages)
   ============================================================ */
.page-banner{
  background: var(--navy-950);
  color: var(--cream);
  padding: 86px 0 70px;
  position: relative;
}

.page-banner .eyebrow{ margin-bottom: 16px; }

.page-banner h1{
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0;
  color: var(--cream);
}

.page-banner h1 .accent{ color: var(--gold-light); }

.page-banner p{
  color: var(--cream-2);
  max-width: 620px;
  margin-top: 18px;
  font-size: 1.02rem;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section{
  padding: 86px 0;
}

.section-dark{
  background: var(--navy-900);
  color: var(--cream);
}

.section-dark .section-title,
.section-dark h2{
  color: var(--cream);
}

.section-title{
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}

.section-kicker{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 14px;
}

.section-dark .section-kicker{ color: var(--circuit-blue); }

.two-col{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

@media (max-width: 800px){
  .two-col{ grid-template-columns: 1fr; gap: 32px; }
}

.lead-text{
  font-size: 1.08rem;
  color: var(--ink-soft);
}

.section-dark .lead-text{ color: var(--cream-2); }

/* ============================================================
   Pillar / feature cards (crenellated top edge)
   ============================================================ */
.pillars{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 50px;
}

@media (max-width: 800px){
  .pillars{ grid-template-columns: 1fr; }
}

.pillar-card{
  background: var(--navy-800);
  border: 1px solid var(--line-dark);
  padding: 38px 26px 30px;
  position: relative;
  clip-path: polygon(
    0% 16px, 12% 16px, 12% 0%, 24% 0%, 24% 16px,
    36% 16px, 36% 0%, 48% 0%, 48% 16px,
    52% 16px, 52% 0%, 64% 0%, 64% 16px,
    76% 16px, 76% 0%, 88% 0%, 88% 16px,
    100% 16px, 100% 100%, 0% 100%
  );
}

.pillar-icon{
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
  color: var(--gold-light);
}

.pillar-card h3{
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  margin: 0 0 12px;
  color: var(--gold-light);
}

.pillar-card p{
  color: var(--cream-2);
  font-size: 0.96rem;
  margin: 0;
}

/* ============================================================
   Service cards (Que ofrecemos)
   ============================================================ */
.services-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 48px;
}

@media (max-width: 900px){
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px){
  .services-grid{ grid-template-columns: 1fr; }
}

.service-card{
  background: #ffffff;
  border: 1px solid var(--line-light);
  padding: 34px 24px 28px;
  position: relative;
  clip-path: polygon(
    0% 14px, 14% 14px, 14% 0%, 28% 0%, 28% 14px,
    42% 14px, 42% 0%, 58% 0%, 58% 14px,
    72% 14px, 72% 0%, 86% 0%, 86% 14px,
    100% 14px, 100% 100%, 0% 100%
  );
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -22px rgba(13,19,48,0.35);
}

.service-icon{
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: var(--gold-dim);
}

.service-card h3{
  font-family: var(--font-display);
  font-size: 1.08rem;
  letter-spacing: 0.02em;
  margin: 0 0 10px;
  color: var(--ink);
}

.service-card p{
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ============================================================
   CTA band
   ============================================================ */
.cta-band{
  background: var(--navy-950);
  color: var(--cream);
  padding: 70px 0;
  text-align: center;
}

.cta-band h2{
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 2.3rem);
  margin: 0 0 14px;
  color: var(--cream);
}

.cta-band p{
  color: var(--cream-2);
  max-width: 560px;
  margin: 0 auto 30px;
}

.cta-band .cta-row{
  justify-content: center;
}

/* ============================================================
   Team section (Quienes somos)
   ============================================================ */
.team-image{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-dark);
}

.values-row{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}

@media (max-width: 760px){
  .values-row{ grid-template-columns: 1fr; }
}

.value-card{
  text-align: left;
  padding: 0;
}

.value-card .tag{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  color: var(--gold-dim);
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.value-card h3{
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 8px;
}

.value-card p{
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.96rem;
}

/* ============================================================
   Contact page
   ============================================================ */
.contact-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: stretch;
}

@media (max-width: 800px){
  .contact-grid{ grid-template-columns: 1fr; }
}

.contact-card{
  background: var(--navy-950);
  color: var(--cream);
  padding: 46px 38px;
  border-radius: var(--radius);
  position: relative;
}

.contact-list{
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.contact-list li{
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-list .icon{
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--gold-light);
  margin-top: 2px;
}

.contact-list .label{
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--circuit-blue);
  display: block;
  margin-bottom: 4px;
}

.contact-list a,
.contact-list span.value{
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cream);
}

.contact-list a:hover{ color: var(--gold-light); }

.contact-panel{
  background: var(--navy-800);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 46px 38px;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.contact-panel h3{
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0;
  color: var(--gold-light);
}

.contact-panel p{
  color: var(--cream-2);
  margin: 0;
}

.contact-panel .crest{
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer{
  background: var(--navy-950);
  color: var(--cream-2);
  padding: 56px 0 28px;
}

.footer-grid{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

@media (max-width: 760px){
  .footer-grid{ grid-template-columns: 1fr; gap: 32px; }
}

.footer-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand img{
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.footer-brand .brand-text .k1{ font-size: 1rem; }

.site-footer p{
  font-size: 0.92rem;
  color: var(--cream-2);
  max-width: 320px;
}

.footer-heading{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 16px;
}

.footer-links{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 0.94rem;
}

.footer-links a:hover{ color: var(--gold-light); }

.footer-bottom{
  border-top: 1px solid var(--line-dark);
  margin-top: 48px;
  padding-top: 22px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom span{ color: var(--gold-dim); }
