/* Styles copied verbatim from the Home; keep synchronized with index.html. */

  :root {
    --bg-dark: #070B14;
    --bg-panel: rgba(18, 25, 43, 0.6);
    --border-glass: rgba(255, 255, 255, 0.08);
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --brand-cyan: #00E5FF;
    --brand-blue: #2F8ED8;
    --brand-deep: #11528F;
    --glow: 0 0 40px rgba(47, 142, 216, 0.3);
    --btn-text: #000;
  }

  html[data-theme="light"] {
    --bg-dark: #F8FAFC;
    --bg-panel: rgba(255, 255, 255, 0.7);
    --border-glass: rgba(0, 0, 0, 0.1);
    --text-main: #0F172A;
    --text-muted: #475569;
    --brand-cyan: #00B1C7;
    --brand-blue: #237FCA;
    --brand-deep: #11528F;
    --glow: 0 10px 40px rgba(35, 127, 202, 0.15);
    --btn-text: #FFF;
  }

  /* Language Switcher Logic */
  html[lang="es"] [lang="en"] { display: none !important; }
  html[lang="en"] [lang="es"] { display: none !important; }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    position: relative;
    transition: background-color 0.4s ease, color 0.4s ease;
  }

  .backdrop {
    position: fixed;
    inset: 0;
    overflow: clip;
    contain: paint;
    pointer-events: none;
    z-index: 0;
  }

  /* Cyber Grid Background. Clipped inside the decorative layer. */
  .backdrop::before {
    content: '';
    position: absolute;
    inset: -25%;
    background-image:
      linear-gradient(var(--border-glass) 1px, transparent 1px),
      linear-gradient(90deg, var(--border-glass) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.15;
    pointer-events: none;
    transform: perspective(500px) rotateX(60deg) translateY(-100px) scale(1.6);
    animation: gridMove 20s linear infinite;
  }

  @keyframes gridMove {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
  }

  /* Glow Orbs */
  .glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    transition: background 0.4s ease;
  }
  .orb-1 {
    top: -10%; left: 10%; width: 40vw; height: 40vw;
    background: rgba(47, 142, 216, 0.25);
  }
  .orb-2 {
    bottom: -10%; right: -5%; width: 50vw; height: 50vw;
    background: rgba(0, 229, 255, 0.15);
  }

  html[data-theme="light"] .orb-1 { background: rgba(35, 127, 202, 0.1); }
  html[data-theme="light"] .orb-2 { background: rgba(0, 177, 199, 0.08); }

  .wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 24px;
    position: relative;
    z-index: 1;
  }

  .skip-link {
    position: fixed;
    left: 16px;
    top: 12px;
    z-index: 5;
    padding: 10px 14px;
    background: var(--bg-dark);
    color: var(--text-main);
    border: 2px solid var(--brand-cyan);
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-200%);
  }
  .skip-link:focus {
    transform: none;
  }

  .visually-hidden {
    position: absolute;
    left: 0;
    top: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: clip;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  a:focus-visible,
  button:focus-visible {
    outline: 3px solid var(--brand-cyan);
    outline-offset: 3px;
  }

  #contenido:focus,
  #services:focus,
  #contact:focus {
    outline: 3px solid var(--brand-cyan);
    outline-offset: 4px;
  }

  /* Navigation */
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 80px;
    flex-wrap: wrap;
    gap: 20px;
  }

  .nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex-wrap: wrap;
  }

  .brand {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 0 20px rgba(255,255,255,0.1);
    max-width: 100%;
  }
  .brand img {
    height: 40px;
    width: auto;
    max-width: min(180px, 42vw);
  }

  .controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-panel);
    padding: 8px;
    border-radius: 100px;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
  }

  .ctrl-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 100px;
    transition: background 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
  }
  .ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.1);
  }
  html[data-theme="light"] .ctrl-btn:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  .nav-right {
    display: flex;
    align-items: center;
  }

  .btn {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
    color: var(--btn-text);
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
    border: none;
    cursor: pointer;
    display: inline-block;
    line-height: 1.25;
    text-align: center;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
  }
  .btn-lg {
    padding: 18px 40px;
    font-size: 18px;
  }

  /* Hero Section */
  .hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 120px;
  }

  .badge {
    display: inline-block;
    background: rgba(0, 229, 255, 0.1);
    color: var(--brand-cyan);
    border: 1px solid rgba(0, 229, 255, 0.3);
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: 1px;
    text-transform: uppercase;
    animation: pulse 2s infinite;
  }

  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0, 229, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
  }

  h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(32px, 6vw, 84px);
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0 0 24px;
    color: var(--text-main);
    overflow-wrap: break-word;
  }

  .text-gradient {
    background: linear-gradient(135deg, var(--text-main) 20%, var(--brand-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .hero p {
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.6;
    color: var(--text-muted);
    margin: 0 auto 40px;
    max-width: 650px;
  }

  /* Services Glassmorphism Grid */
  .services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
    gap: 30px;
    margin-bottom: 100px;
    min-width: 0;
  }

  .card {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 40px 30px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    min-width: 0;
    overflow: hidden;
  }

  .card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: left 0.7s ease;
  }
  html[data-theme="light"] .card::before {
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.02), transparent);
  }

  .card:hover::before {
    left: 150%;
  }

  .card:hover {
    transform: translateY(-10px);
    border-color: rgba(0, 229, 255, 0.4);
    box-shadow: var(--glow);
  }

  .card-icon {
    font-size: 40px;
    margin-bottom: 20px;
    background: -webkit-linear-gradient(var(--brand-cyan), var(--brand-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    margin: 0 0 16px;
    color: var(--text-main);
    overflow-wrap: break-word;
  }

  .card p {
    color: var(--text-muted);
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    overflow-wrap: break-word;
  }

  .b2b {
    max-width: 760px;
    margin: 0 auto 100px;
    min-width: 0;
    text-align: center;
  }

  .b2b h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(28px, 5vw, 36px);
    margin: 0 0 20px;
    overflow-wrap: break-word;
  }

  .b2b p,
  .b2b li {
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1.6;
    overflow-wrap: break-word;
  }

  .b2b p {
    margin: 0 auto 24px;
    max-width: 680px;
  }

  .b2b ul {
    list-style: none;
    padding: 0;
    margin: 0 auto 28px;
    max-width: 640px;
    text-align: left;
  }

  .b2b li {
    margin: 0 0 10px;
    padding-left: 1.1em;
    position: relative;
  }

  .b2b li::before {
    content: "–";
    position: absolute;
    left: 0;
  }

  .b2b-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin: 0;
  }

  .b2b-actions .btn {
    white-space: normal;
  }

  /* Stack Section */
  .tech-stack {
    text-align: center;
    padding: 80px 0;
    border-top: 1px solid var(--border-glass);
  }

  .tech-stack h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(28px, 5vw, 36px);
    margin-bottom: 40px;
    overflow-wrap: break-word;
  }

  .stack-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
  }

  .stack-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 12px 24px;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 18px;
    color: var(--text-main);
    transition: all 0.3s ease;
  }
  html[data-theme="light"] .stack-item {
    background: rgba(0, 0, 0, 0.03);
  }

  .stack-item:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: var(--brand-cyan);
    color: var(--brand-cyan);
    transform: scale(1.05);
  }

  /* CTA */
  .cta-section {
    background: linear-gradient(180deg, transparent, rgba(17, 82, 143, 0.2));
    border: 1px solid var(--border-glass);
    border-radius: 32px;
    padding: 80px 40px;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
  }

  .cta-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(28px, 6vw, 42px);
    margin: 0 0 20px;
    overflow-wrap: break-word;
  }

  footer {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
    border-top: 1px solid var(--border-glass);
  }

  @media (max-width: 768px) {
    .wrap { padding: 24px 16px; }
    header { flex-direction: column; gap: 20px; align-items: stretch; margin-bottom: 40px; }
    .nav-left { justify-content: space-between; }
    .nav-right { justify-content: center; width: 100%; }
    .nav-right .btn { display: block; }
    h1 { font-size: clamp(32px, 10vw, 48px); }
    .hero { margin-bottom: 64px; }
    .hero p { font-size: 18px; }
    .card { padding: 30px 20px; }
    .cta-section { padding: 48px 16px; }
    .services { gap: 16px; }
  }

  @media (max-width: 480px) {
    .btn,
    .btn-lg { font-size: 13px; letter-spacing: 0.02em; padding: 12px 14px; }
    .brand { padding: 8px 12px; }
  }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation: none !important;
      transition: none !important;
      scroll-behavior: auto !important;
    }
    .btn:hover,
    .card:hover,
    .stack-item:hover {
      transform: none;
    }
  }
  .contact-form{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
    margin:32px auto;max-width:760px;text-align:left;
  }
  .contact-field{display:flex;flex-direction:column;gap:8px;min-width:0}
  .contact-field label{font-weight:700}
  .contact-field input,.contact-field textarea{
    width:100%;padding:12px;border:1px solid #7793aa;border-radius:10px;
    font:inherit;color:var(--text-main);background:var(--bg-dark);
  }
  .contact-field textarea{min-height:150px;resize:vertical}
  .contact-field input:focus-visible,.contact-field textarea:focus-visible{
    outline:3px solid var(--brand-blue);outline-offset:3px;
  }
  .contact-wide{grid-column:1/-1}
  .contact-form .contact-help{font-size:16px;line-height:1.5;margin:0}
  .contact-form button{font:inherit;font-weight:700;border:0;justify-self:start}
  .contact-form button:disabled{background:#526a7e;cursor:not-allowed}
  @media(max-width:640px){.contact-form{grid-template-columns:1fr}}
