/* ========================================
   Riotec — Tecnología que conecta
   Brand-compliant styles
   ======================================== */

/* Custom Properties */
:root {
  --rt-primary: #00AACC;
  --rt-primary-dark: #008899;
  --rt-primary-darker: #006677;
  --rt-primary-light: #33CCDD;
  --rt-primary-pale: #E0F5FA;

  --rt-accent-mint: #7BE8C4;
  --rt-accent-blue: #5B9BD5;
  --rt-accent-lavender: #9B8EC4;

  --rt-black: #1A1E2E;
  --rt-dark-gray: #3A4050;
  --rt-medium-gray: #6B7280;
  --rt-light-gray: #D1D5DB;
  --rt-off-white: #F7F9FA;
  --rt-white: #FFFFFF;
  --rt-border: #E5E7EB;

  --font-display: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, .1);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, .14);

  --transition: .3s cubic-bezier(.4, 0, .2, 1);
  --transition-slow: .6s cubic-bezier(.4, 0, .2, 1);
  --container-max: 1200px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--rt-black);
  background: var(--rt-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { border: none; background: none; cursor: pointer; font: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.2; }

/* Section label */
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rt-primary);
  margin-bottom: 12px;
}
.section-label--light { color: var(--rt-primary-light); }

/* ========================================
   Navbar
   ======================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition), backdrop-filter var(--transition);
}
.navbar.scrolled {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
.navbar__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  transition: padding var(--transition);
}
.navbar.scrolled .navbar__inner { padding: 10px 24px; }

.navbar__logo { display: flex; align-items: center; }
.navbar__logo .logo-svg { height: 40px; width: auto; transition: height var(--transition); }
.navbar.scrolled .navbar__logo .logo-svg { height: 34px; }

/* Logo color states */
.navbar .logo-icon path { fill: var(--rt-white); transition: fill var(--transition); }
.navbar .logo-text path { fill: var(--rt-white); transition: fill var(--transition); }
.navbar .logo-tagline path { fill: rgba(255, 255, 255, .6); transition: fill var(--transition); }

.navbar.scrolled .logo-icon path { fill: var(--rt-primary); }
.navbar.scrolled .logo-text path { fill: var(--rt-black); }
.navbar.scrolled .logo-tagline path { fill: var(--rt-medium-gray); }

.navbar__links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.navbar__links a {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, .85);
  transition: color var(--transition);
  position: relative;
}
.navbar__links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rt-primary);
  transition: width var(--transition);
}
.navbar__links a:hover::after { width: 100%; }
.navbar.scrolled .navbar__links a { color: var(--rt-dark-gray); }
.navbar.scrolled .navbar__links a:hover { color: var(--rt-primary); }

.navbar__cta {
  background: var(--rt-primary) !important;
  color: var(--rt-white) !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition) !important;
}
.navbar__cta::after { display: none !important; }
.navbar__cta:hover { background: var(--rt-primary-dark) !important; transform: translateY(-1px); }

.navbar__toggle {
  display: none;
  color: var(--rt-white);
  transition: color var(--transition);
}
.navbar__toggle .material-symbols-outlined { font-size: 28px; }
.navbar.scrolled .navbar__toggle { color: var(--rt-black); }

/* ========================================
   Hero
   ======================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--rt-black);
  overflow: hidden;
  padding: 120px 24px 80px;
}
.hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .4;
  pointer-events: none;
}
.hero__blob--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--rt-primary), transparent 70%);
  top: -200px;
  right: -150px;
}
.hero__blob--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--rt-accent-mint), transparent 70%);
  bottom: -100px;
  left: -100px;
}
.hero__blob--3 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--rt-accent-blue), transparent 70%);
  top: 40%;
  left: 60%;
  opacity: .2;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}
.hero__logo {
  display: inline-block;
  margin-bottom: 40px;
  animation: heroFadeIn .8s ease-out;
}
.hero__logo svg {
  height: 120px;
  width: auto;
  max-width: 90vw;
}
.hero__tagline {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  color: var(--rt-white);
  margin-bottom: 24px;
  letter-spacing: -.02em;
  animation: heroFadeIn .8s ease-out .15s both;
}
.hero__description {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255, 255, 255, .7);
  max-width: 640px;
  margin: 0 auto 40px;
  line-height: 1.7;
  animation: heroFadeIn .8s ease-out .3s both;
}
.hero__cta {
  display: inline-block;
  background: var(--rt-primary);
  color: var(--rt-white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  animation: heroFadeIn .8s ease-out .45s both;
}
.hero__cta:hover {
  background: var(--rt-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 170, 204, .3);
}

.hero__scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, .3);
  animation: scrollBounce 2s ease-in-out infinite;
}
.hero__scroll-hint .material-symbols-outlined { font-size: 32px; }

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ========================================
   About
   ======================================== */
.about {
  padding: 120px 24px;
  background: var(--rt-white);
}
.about__container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: start;
}
.about__text h2 {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--rt-black);
  margin-bottom: 24px;
}
.about__lead {
  font-size: 18px;
  font-weight: 500;
  color: var(--rt-dark-gray);
  margin-bottom: 20px;
  line-height: 1.7;
}
.about__text p {
  color: var(--rt-medium-gray);
  margin-bottom: 16px;
  line-height: 1.7;
}
.about__text strong { color: var(--rt-black); font-weight: 600; }

.about__values {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-top: 48px;
}
.value {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: var(--radius-md);
  background: var(--rt-off-white);
  border: 1px solid var(--rt-border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.value:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.value .material-symbols-outlined {
  font-size: 28px;
  color: var(--rt-primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.value h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--rt-black);
  margin-bottom: 4px;
}
.value p {
  font-size: 14px;
  color: var(--rt-medium-gray);
  line-height: 1.5;
}

/* ========================================
   Stats
   ======================================== */
.stats {
  padding: 64px 24px;
  background: linear-gradient(135deg, var(--rt-primary-dark), var(--rt-primary), var(--rt-accent-mint));
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,.1), transparent 70%);
  border-radius: 50%;
}
.stats__container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}
.stat { text-align: center; color: var(--rt-white); }
.stat__number {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  display: inline;
}
.stat__suffix {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 32px);
  font-weight: 700;
  opacity: .8;
}
.stat__label {
  display: block;
  font-size: 14px;
  opacity: .85;
  margin-top: 4px;
  font-weight: 400;
}

/* ========================================
   Solutions
   ======================================== */
.solutions {
  padding: 120px 24px;
  background: var(--rt-off-white);
}
.solutions__container { max-width: var(--container-max); margin: 0 auto; }
.solutions__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}
.solutions__header h2 {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--rt-black);
  margin-bottom: 16px;
}
.solutions__header p {
  font-size: 17px;
  color: var(--rt-medium-gray);
  line-height: 1.7;
}

.solutions__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.solution-card {
  background: var(--rt-white);
  padding: 36px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--rt-border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.solution-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.solution-card__icon {
  font-size: 36px;
  color: var(--rt-primary);
  margin-bottom: 20px;
  display: block;
}
.solution-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--rt-black);
  margin-bottom: 12px;
}
.solution-card p {
  font-size: 14px;
  color: var(--rt-medium-gray);
  line-height: 1.7;
}

/* ========================================
   Technology
   ======================================== */
.technology {
  padding: 120px 24px;
  background: var(--rt-black);
  position: relative;
  overflow: hidden;
}
.technology__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .2;
  pointer-events: none;
}
.technology__blob--1 {
  width: 500px;
  height: 500px;
  background: var(--rt-primary);
  top: -150px;
  left: -150px;
}
.technology__blob--2 {
  width: 400px;
  height: 400px;
  background: var(--rt-accent-mint);
  bottom: -100px;
  right: -100px;
}
.technology__container {
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.technology__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}
.technology__header h2 {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--rt-white);
  margin-bottom: 16px;
}
.technology__header p {
  font-size: 17px;
  color: rgba(255, 255, 255, .6);
  line-height: 1.7;
}

.technology__pillars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}
.tech-pillar {
  text-align: center;
  padding: 32px 16px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  transition: background var(--transition), border-color var(--transition);
}
.tech-pillar:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(0, 170, 204, .3);
}
.tech-pillar .material-symbols-outlined {
  font-size: 32px;
  color: var(--rt-primary-light);
  margin-bottom: 16px;
}
.tech-pillar h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--rt-white);
  margin-bottom: 16px;
}
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}
.tech-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--rt-primary-light);
  background: rgba(0, 170, 204, .12);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 170, 204, .2);
  white-space: nowrap;
}

/* ========================================
   Projects
   ======================================== */
.projects {
  padding: 120px 24px;
  background: var(--rt-white);
}
.projects__container { max-width: var(--container-max); margin: 0 auto; }
.projects__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 64px;
}
.projects__header h2 {
  font-size: clamp(28px, 4vw, 40px);
  color: var(--rt-black);
  margin-bottom: 16px;
}
.projects__header p {
  font-size: 17px;
  color: var(--rt-medium-gray);
  line-height: 1.7;
}

.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.project-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rt-border);
  background: var(--rt-white);
  transition: transform var(--transition), box-shadow var(--transition);
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.project-card__body {
  padding: 24px;
}
.project-card__body h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--rt-black);
  margin-bottom: 10px;
}
.project-card__body p {
  font-size: 14px;
  color: var(--rt-medium-gray);
  line-height: 1.6;
  margin-bottom: 16px;
}
.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.project-card__tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--rt-primary-dark);
  background: var(--rt-primary-pale);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
}

/* Project card image placeholder */
.project-card__placeholder {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--rt-off-white), #e8ecef);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--rt-light-gray);
  border-bottom: 1px solid var(--rt-border);
}
.project-card__placeholder .material-symbols-outlined {
  font-size: 40px;
  opacity: .5;
}
.project-card__placeholder span:last-child {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  opacity: .6;
}

/* Project card images */
.project-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--rt-off-white);
}
.project-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-slow);
}
.project-card:hover .project-card__image img {
  transform: scale(1.03);
}

/* Dual image layout: main + small overlay */
.project-card__image--dual {
  position: relative;
}
.project-card__image--dual > img:first-child {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-card__image--secondary {
  position: absolute !important;
  bottom: 8px;
  right: 8px;
  width: 40% !important;
  height: auto !important;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  border: 2px solid rgba(255, 255, 255, .9);
  object-fit: cover !important;
  z-index: 2;
  transition: transform var(--transition), box-shadow var(--transition) !important;
}
.project-card:hover .project-card__image--secondary {
  transform: scale(1.05) !important;
  box-shadow: var(--shadow-xl);
}

/* ========================================
   Footer
   ======================================== */
.footer {
  background: var(--rt-black);
  padding: 80px 24px 0;
}
.footer__container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.footer__logo {
  height: 44px;
  width: auto;
  margin-bottom: 16px;
}
.footer__tagline {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--rt-white);
  margin-bottom: 8px;
}
.footer__description {
  font-size: 14px;
  color: rgba(255, 255, 255, .5);
  line-height: 1.6;
  max-width: 320px;
}

.footer__contact h4,
.footer__links h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255, 255, 255, .4);
  margin-bottom: 20px;
}
.footer__link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: rgba(255, 255, 255, .75);
  margin-bottom: 14px;
  transition: color var(--transition);
}
.footer__link:hover { color: var(--rt-primary-light); }
.footer__link .material-symbols-outlined { font-size: 18px; color: var(--rt-primary); }
.footer__location {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: rgba(255, 255, 255, .5);
  margin-top: 14px;
}
.footer__location .material-symbols-outlined { font-size: 18px; color: var(--rt-primary); opacity: .6; }

.footer__links a {
  display: block;
  font-size: 15px;
  color: rgba(255, 255, 255, .6);
  margin-bottom: 12px;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--rt-primary-light); }

.footer__bottom {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 24px 0;
  text-align: center;
}
.footer__bottom p {
  font-size: 13px;
  color: rgba(255, 255, 255, .3);
}

/* ========================================
   Scroll Reveal
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s cubic-bezier(.4, 0, .2, 1), transform .7s cubic-bezier(.4, 0, .2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
  .about__container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about__values {
    padding-top: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .solutions__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .technology__pillars {
    grid-template-columns: repeat(3, 1fr);
  }
  .projects__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .navbar__links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 30, 46, .97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
    z-index: 998;
  }
  .navbar__links.open {
    opacity: 1;
    visibility: visible;
  }
  .navbar__links a {
    font-size: 20px;
    color: var(--rt-white) !important;
  }
  .navbar__links a::after { display: none; }
  .navbar__cta {
    font-size: 18px !important;
    padding: 12px 32px !important;
  }
  .navbar__toggle { display: block; z-index: 999; }

  .hero { padding: 100px 24px 60px; min-height: 90vh; }
  .hero__logo svg { height: 80px; }

  .about { padding: 80px 24px; }
  .about__values {
    grid-template-columns: 1fr;
  }

  .stats { padding: 48px 24px; }
  .stats__container {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .solutions { padding: 80px 24px; }
  .solutions__grid { grid-template-columns: 1fr; }
  .solutions__header { margin-bottom: 40px; }

  .technology { padding: 80px 24px; }
  .technology__pillars {
    grid-template-columns: repeat(2, 1fr);
  }
  .technology__header { margin-bottom: 40px; }

  .projects { padding: 80px 24px; }
  .projects__grid { grid-template-columns: 1fr; }
  .projects__header { margin-bottom: 40px; }

  .footer__container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero__tagline { letter-spacing: -.01em; }
  .hero__cta { width: 100%; text-align: center; }

  .stats__container {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .stat__number { font-size: 32px; }

  .technology__pillars {
    grid-template-columns: 1fr;
  }
  .tech-pillar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 20px;
  }
  .tech-pillar .material-symbols-outlined {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .tech-pillar h4 { margin-bottom: 8px; }
  .tech-tags { justify-content: flex-start; }

  .footer { padding: 48px 24px 0; }
}
