/* =========================
   KOSMOS — THEME.CSS (FINAL)
   ========================= */

/* Base reset */
html{
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*, *::before, *::after{
  -webkit-box-sizing: inherit;
  -moz-box-sizing: inherit;
  box-sizing: inherit;
}

/* Variables */
:root{
  --kosmos-bg: #F8F6F2;
  --kosmos-ink: #1E1F23;
  --kosmos-blue: #003CFF;
  --kosmos-muted: rgba(30,31,35,0.70);
  --kosmos-line: rgba(30,31,35,0.12);
}

html, body{
  margin: 0;
  padding: 0;
}

body{
  font-size: 1.0em;
  line-height: 1.65;
  font-weight: 400;
  font-family: "Noto Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--kosmos-bg);
  color: var(--kosmos-ink);
}

/* Typography */
h1, h2, h3, h4, h5, h6{
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-family: apparat-light, sans-serif;
  font-style: normal;
  font-weight: 100;
  letter-spacing: 0.02em;
}
h1{ font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.1; }
h2{ font-size: clamp(1.8rem, 3vw, 2.5rem); line-height: 1.2; }
h3{ font-size: 1.25rem; line-height: 1.3; }
h4{ font-size: 1.1rem; line-height: 1.35; }
h5{ font-size: 1.0rem; line-height: 1.5; }
h6{ font-size: 0.95rem; line-height: 1.6; }

p{ margin-top: 0; }

/* Links */
a{ color: var(--kosmos-ink); }
a:hover{ color: var(--kosmos-blue); }

img{
  width: 100%;
  height: auto;
  display: block;
}

/* IMPORTANTE: sin padding global para evitar espacios en hero */
section{ margin: 0; }

/* =========================
   Layout base (padding)
   ========================= */
.container{
  width: 100%;
  max-width: 76rem; /* coincide con tu grid */
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(18px, 4.5vw, 44px);
  padding-right: clamp(18px, 4.5vw, 44px);
}

/* En pantallas muy grandes, mantiene el look “editorial” */
@media (min-width: 64em){
  .container{
    padding-left: 0;
    padding-right: 0;
  }
}

/* En móvil: aseguramos padding cómodo */
@media (max-width: 480px){
  .container{
    padding-left: 22px;
    padding-right: 22px;
  }
}

/* Padding vertical solo en secciones normales (no hero) */
#about,
#systems,
#portfolio,
#approach,
#contact{
  padding: 6rem 0;
}

/* UI helpers */
hr{
  border: 0;
  border-top: 1px solid var(--kosmos-line);
  margin: 0;
}

.section-title{
  margin-bottom: 3.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.flex{ display: flex; }

.margin-bottom{ margin-bottom: 5rem; }
.margin-bottom-small{ margin-bottom: 1rem; }
.padding-small{ padding: 1rem; }

/* Buttons */
button{
  background-color: #000;
  border: none;
  border-radius: 3px;
  color: #fff;
  height: auto;
  padding: 8px 37px;
  font-weight: 400;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  vertical-align: middle;
  transition: all 0.5s ease;
  cursor: pointer;
  font-size: 0.8rem;
}
button:hover, button:focus{
  background-color: #fff;
  color: #000;
}

/* “light” en Kosmos = azul */
button.light{
  background-color: var(--kosmos-blue);
  color: #fff;
  border: none;
}
button.light:hover, button.light:focus{
  background-color: var(--kosmos-ink);
  color: #fff;
}

/* =========================
   NAV
   ========================= */
.navigation-bar{
  position: absolute;
  z-index: 999;
  width: 100%;
  left: 0;
  top: 0;
}
.navigation-bar .logo{
  max-width: 180px;
  display: inline-block;
  padding: 1rem;
}
.navigation-bar nav{
  display: inline-block;
  width: 100%;
}
.navigation-bar nav ul{
  margin: 0;
  padding: 0;
}
.navigation-bar nav ul li{
  display: inline-block;
}
.navigation-bar nav a{
  color: #fff;
  text-decoration: none;
  margin-right: 1rem;
  opacity: 0.9;
}
.navigation-bar nav a:hover{
  color: #fff;
  opacity: 1;
}

/* =========================
   HERO INTRO (NEGRO)
   ========================= */
.hero-intro{
  background: #000;
  color: #fff;
  padding: clamp(80px, 14vh, 140px) 0 clamp(40px, 8vh, 80px);
  margin: 0;
}

.hero-text{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: clamp(32px, 8vw, 140px);
  padding-right: clamp(24px, 4vw, 80px);
  text-align: left;
  position: relative;
  z-index: 2;
}

.hero-headline{ margin-bottom: 1.5rem; }

.hero-static{
  font-family: apparat-light, sans-serif;
  font-weight: 100;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.hero-dynamic{
  font-family: apparat-light, sans-serif;
  font-weight: 100;
  color: var(--kosmos-blue);
  min-height: 1.2em;
  transition: opacity 0.3s ease;
}

/* Rotating word */
.rw-fade-out{ opacity: 0; }
.rw-fade-in{ opacity: 1; }

.hero-subtitle{
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  font-size: 0.85rem;
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.hero-copy{
  max-width: 620px;
  opacity: 0.85;
  margin-bottom: 1.25rem;
}

/* =========================
   HERO VIDEO SECTION
   ========================= */
.hero-video-section{
  margin: 0;
  padding: 0;
  background: var(--kosmos-bg);
}

.hero-video-wrap{
  position: relative;
  width: 100%;
  height: clamp(340px, 60vh, 720px);
  overflow: hidden;
  background: #000;
}

.hero-video{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-video-overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(rgba(0,0,0,0.10), rgba(0,0,0,0.20));
}

/* =========================
   SERVICES
   ========================= */
.services .icon-row{ padding: 30px 0; }
.services .icon{ max-width: 64px; }

/* =========================
   KOSMOS — Sistemas (icono + título)
   ========================= */

.system-title{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0.75rem; /* ajusta si lo quieres más pegado */
  line-height: 1.2;
}

/* Tamaño del icono */
.system-icon{
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-block;
}


/* =========================
   CTA
   ========================= */
.cta{
  background-color: #000;
  padding: 60px 0;
  color: #fff;
}

/* =========================
   BLURBS
   ========================= */
.blurbs .icon{ max-width: 64px; }
.blurbs h3{ margin-bottom: 1rem; }

/* =========================
   FORMS
   ========================= */
input, textarea{
  background-color: #eee;
  width: 100%;
  padding: 1rem;
  border: 0;
  border-radius: 3px;
  box-sizing: border-box;
}

[type="button"], [type="reset"], [type="submit"]{
  -webkit-appearance: button;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  transition: background 0.5s ease;
}
[type="button"]:hover, [type="reset"]:hover, [type="submit"]:hover{
  background-color: #fff;
  color: #000;
}

/* =========================
   PORTFOLIO — REEL MOSAIC
   ========================= */
.case-card{
  display: block;
  width: 100%;
}

.case-media{
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 4 / 3;
  background: var(--kosmos-ink);
  transform: translateY(0);
  transition: transform 200ms ease;
}

/* Fallback para navegadores sin aspect-ratio */
@supports not (aspect-ratio: 4 / 3){
  .case-media{
    height: 0;
    padding-top: 75%;
  }
  .reel{
    position: absolute;
    inset: 0;
  }
}

.reel{
  position: relative;
  width: 100%;
  height: 100%;
}

.reel-frame{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 250ms ease;
}

.reel-frame:first-child{ opacity: 1; }

.case-card:hover .case-media{
  transform: translateY(-2px);
}

.case-card:focus-visible{
  outline: 2px solid var(--kosmos-blue);
  outline-offset: 4px;
}

/* =========================
   KOSMOS — Footer (centrado + redes debajo)
   ========================= */

.kosmos-footer{
  background-color: #eee; /* o var(--kosmos-bg) */
  padding: 3.5rem 0;
}

.footer-brand{
  text-align: center;
}

.footer-logo{
  width: 210px;      /* un poco más grande */
  max-width: 55vw;   /* responsive */
  height: auto;
  display: inline-block;
}

.footer-copy{
  margin: 1rem 0 0;
  font-size: 0.9rem;
  opacity: 0.75;
}

/* Redes centradas y con “inherit color” */
.footer-social{
  margin-top: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-social a{
  color: var(--kosmos-ink); /* hereda al SVG por currentColor */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .25s ease, transform .2s ease, opacity .2s ease;
  opacity: 0.9;
}

.footer-social a:hover{
  color: var(--kosmos-blue);
  transform: translateY(-2px);
  opacity: 1;
}

.social-icon{
  width: 22px;
  height: 22px;
  display: block;
}


/* =========================
   Mediaqueries (nav)
   ========================= */
@media (max-width: 1280px){
  .navigation-bar .logo{ margin: 0 auto; }
  .navigation-bar nav{ display: none; }

  .row{
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* =========================
   Fade-in del template
   ========================= */
@-webkit-keyframes fade-in{
  0%{ opacity: 0; }
  100%{ opacity: 1; }
}
@keyframes fade-in{
  0%{ opacity: 0; }
  100%{ opacity: 1; }
}
.fade-in{
  -webkit-animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
  animation: fade-in 1.2s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}
