:root {
  --ink: #1E3A5F;
  --ink-soft: #2E4A6B;
  --accent: #E8732C;
  --paper: #FAF7F2;
  --paper-deep: #F1ECE3;
  --text-muted: #6B6B63;
  --line: rgba(30, 58, 95, 0.12);

  --font-display: "Fraunces", serif;
  --font-body: "Inter", sans-serif;

  --container: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 400; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

a { color: var(--ink); text-decoration: none; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 1rem;
}
.eyebrow.center { text-align: center; }

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s;
}
.nav a:hover { color: var(--accent); }

.nav-cta {
  background: var(--ink);
  color: var(--paper) !important;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--accent); color: var(--paper) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  display: block;
}

/* ===== HERO ===== */
.hero {
  padding: 80px 0 100px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-text h1 { margin: 0 0 24px; }

.hero-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff !important;
}
.btn-primary:hover {
  background: #d2611c;
  transform: translateY(-1px);
}
.btn-ghost {
  border: 1px solid var(--ink);
  color: var(--ink) !important;
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper) !important;
}

.hero-portrait {
  position: relative;
}

.portrait-frame {
  aspect-ratio: 4/5;
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  position: relative;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.portrait-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}
.portrait-placeholder img { display: none; }
.portrait-placeholder::after {
  content: "Foto de Luis Tesolat";
  font-family: var(--font-display);
  color: var(--ink-soft);
  font-size: 1.1rem;
  opacity: 0.5;
}

.portrait-tag {
  position: absolute;
  bottom: -16px;
  left: 24px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ===== SHIFT / SIGNATURE SECTION ===== */
.shift {
  background: var(--ink);
  color: var(--paper);
  padding: 100px 0;
}

.shift h2 {
  color: var(--paper);
  max-width: 700px;
  margin: 0 auto 56px;
  text-align: center;
}

.shift .eyebrow { color: var(--accent); }

.shift-dialogue {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: center;
  max-width: 940px;
  margin: 0 auto;
}

.shift-before, .shift-after {
  padding: 32px;
  border-radius: 8px;
}

.shift-before {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.shift-after {
  background: rgba(232, 115, 44, 0.12);
  border: 1px solid rgba(232, 115, 44, 0.3);
}

.shift-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
  color: rgba(250,247,242,0.5);
}
.shift-after .shift-label { color: var(--accent); }

.shift-before p, .shift-after p {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
  color: var(--paper);
}

.shift-arrow {
  font-size: 1.8rem;
  color: var(--accent);
  text-align: center;
}

.shift-note {
  text-align: center;
  max-width: 600px;
  margin: 56px auto 0;
  color: rgba(250,247,242,0.7);
  font-size: 1rem;
}

/* ===== ABOUT ===== */
.about {
  padding: 100px 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
}

.about-text h2 { margin-bottom: 24px; max-width: 480px; }

.about-text p {
  color: var(--text-muted);
  max-width: 520px;
}

.credentials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  max-width: 520px;
}

.credential-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 8px;
}

.credential-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.about-history {
  background: var(--paper-deep);
  border-radius: 12px;
  padding: 40px;
  align-self: start;
}

.about-history h3 {
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.about-history p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.history-stats {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-left: 2px solid var(--accent);
  padding-left: 20px;
}
.history-stats li {
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.history-stats strong {
  font-family: var(--font-display);
  color: var(--ink);
}

/* ===== SERVICES ===== */
.services {
  padding: 100px 0;
}

.services-empresas {
  background: var(--paper-deep);
}

.services h2 { max-width: 600px; margin-bottom: 16px; }

.services-intro {
  color: var(--text-muted);
  max-width: 600px;
  font-size: 1.05rem;
  margin-bottom: 56px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-grid-edu {
  grid-template-columns: repeat(3, 1fr);
}

.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.services-empresas .service-card { background: var(--paper); }
.services-educacion .service-card { background: var(--paper-deep); border-color: transparent; }

.service-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.service-card h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ===== CONTACT ===== */
.contact {
  padding: 100px 0;
  background: var(--ink);
  color: var(--paper);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact h2 { color: var(--paper); margin-bottom: 16px; }
.contact .eyebrow { color: var(--accent); }
.contact-text p { color: rgba(250,247,242,0.75); max-width: 440px; }

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 32px;
}

.contact-link {
  color: var(--paper) !important;
  font-weight: 600;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(250,247,242,0.2);
  padding-bottom: 8px;
  width: fit-content;
}
.contact-link:hover { color: var(--accent) !important; }

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 32px;
}

.contact-form label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(250,247,242,0.7);
  margin-top: 12px;
}
.contact-form label:first-child { margin-top: 0; }

.contact-form input,
.contact-form textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  padding: 12px 14px;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.contact-form .btn { margin-top: 20px; align-self: flex-start; }

/* ===== FOOTER ===== */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
  .nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 24px;
  }
  .nav a { padding: 12px 0; width: 100%; }
  .nav-cta { margin-top: 8px; text-align: center; }
  .nav.nav-open { display: flex; }
  .nav-toggle { display: flex; }

  .hero-grid,
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero { padding: 48px 0 64px; }
  .hero-portrait { order: -1; max-width: 360px; margin: 0 auto; }

  .shift-dialogue {
    grid-template-columns: 1fr;
  }
  .shift-arrow { transform: rotate(90deg); }

  .credentials { grid-template-columns: 1fr 1fr; }

  .service-grid,
  .service-grid-edu {
    grid-template-columns: 1fr;
  }

  .about-history { padding: 28px; }

  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (max-width: 540px) {
  .credentials { grid-template-columns: 1fr; }
  h1 { font-size: 2.4rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .service-card:hover, .btn:hover { transform: none; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
