/* ============================================================
   Creature Apps — Brand Styles
   Mobile-first, responsive, vanilla CSS (no frameworks)
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  --brand: #009de0;
  --brand-light: #56ccff;
  --gray-dark: #222;
  --gray: #777;
  --gray-light: #ccc;
  --gray-lighter: #eceeef;
  --gray-lightest: #f7f7f9;
  --white: #fff;
  --black: #000;
  --font-sans: "Raleway", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-slab: "Roboto Slab", Georgia, "Times New Roman", Times, serif;
  --font-mono: Menlo, Monaco, Consolas, "Courier New", monospace;
  --max-width: 1100px;
  --header-height: 4.5rem;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--gray);
  background: var(--white);
  line-height: 1.6;
  min-width: 320px;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  list-style: none;
}

/* --- Fluid Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  line-height: 1.2;
}

/* --- Utility Classes --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; }
.text-white { color: var(--white); }
.text-brand { color: var(--brand); }
.text-gray { color: var(--gray); }
.text-gray-dark { color: var(--gray-dark); }
.text-gray-light { color: var(--gray-light); }

.bg-white { background-color: var(--white); }
.bg-brand { background-color: var(--brand); }
.bg-gray-dark { background-color: var(--gray-dark); }
.bg-gray-lighter { background-color: var(--gray-lighter); }
.bg-gray-lightest { background-color: var(--gray-lightest); }

.fw-100 { font-weight: 100; }
.fw-300 { font-weight: 300; }
.fw-400 { font-weight: 400; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fw-900 { font-weight: 900; }

.ff-slab { font-family: var(--font-slab); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 2px solid transparent;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
  padding: 0.75rem 2rem;
  font-size: 0.9rem;
}

.btn-primary:hover {
  background: transparent;
  color: var(--brand);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
  padding: 0.75rem 2rem;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--brand);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.8rem;
}

/* --- Header / Navigation --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  height: var(--header-height);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-logo img {
  height: 2.5rem;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--gray);
  transition: color 0.3s ease;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
  margin-left: 0.5rem;
}

.lang-switch a {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  color: var(--gray);
  transition: all 0.3s ease;
}

.lang-switch a:hover,
.lang-switch a.active {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

/* Hamburger menu button */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1.5rem;
  color: var(--gray-dark);
}

/* --- Sections Shared --- */
.section {
  padding: 5rem 0;
}

@media (min-width: 768px) {
  .section {
    padding: 7rem 0;
  }
}

/* --- Hero Section (Section 1) --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-dark) url("../images/home/apps-ios-android-y-windows.jpg") center / cover no-repeat;
  text-align: center;
  padding: 0 1.5rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1.1;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  color: var(--gray-light);
  margin: 1.5rem 0 2.5rem;
}

/* --- Services Section (Section 2) --- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 544px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.services .section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--gray-dark);
}

.services .section-subtitle {
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray);
  margin-top: 0.5rem;
}

.service-card {
  text-align: center;
  padding: 2rem 1rem;
}

.service-card .material-icons {
  font-size: 3.5rem;
  color: var(--brand);
  margin-bottom: 1.5rem;
}

.service-card h3 {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gray-dark);
  margin-bottom: 1rem;
}

.service-card p {
  font-family: var(--font-slab);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --- Value Section (Section 3) --- */
.value {
  background: var(--gray-lighter);
  position: relative;
  overflow: hidden;
}

.value-bg {
  display: none;
}

.value-inner {
  background: var(--gray-dark) url("../images/home/las-mejores-apps.jpg") center / cover no-repeat;
  padding: 3rem 1.5rem;
  border-radius: 0;
}

@media (min-width: 544px) {
  .value-inner {
    padding: 4rem 3rem;
  }
}

@media (min-width: 768px) {
  .value-inner {
    padding: 5rem;
    margin-left: 15%;
  }
}

.value-inner h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
  line-height: 1.3;
}

.value-inner .value-desc {
  color: var(--gray-light);
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.value-list {
  margin-bottom: 2rem;
}

.value-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--gray-light);
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.value-list .material-icons {
  color: var(--brand);
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

/* --- Platforms Section (Section 4) --- */
.platforms-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .platforms-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.platform-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.platform-item img {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 8px;
}

.platform-item h4 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--gray-dark);
  margin-bottom: 0.25rem;
}

.platform-item p {
  font-family: var(--font-slab);
  font-size: 0.85rem;
  line-height: 1.4;
}

.platform-desc {
  font-family: var(--font-slab);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 1.5rem 0;
}

.platform-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--brand);
  transition: gap 0.3s ease;
}

.platform-cta:hover {
  gap: 0.75rem;
}

/* --- AWS Cloud Section (NEW Section 5) --- */
.cloud {
  background: var(--gray-lightest);
}

.cloud .section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--gray-dark);
}

.cloud .section-subtitle {
  font-size: 0.9rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray);
  margin-top: 0.5rem;
}

.cloud-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (min-width: 544px) {
  .cloud-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .cloud-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cloud-card {
  background: var(--white);
  border: 1px solid var(--gray-lighter);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cloud-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.cloud-card .material-icons {
  font-size: 2.5rem;
  color: var(--brand);
  margin-bottom: 1rem;
}

.cloud-card h3 {
  font-size: 0.9rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--gray-dark);
  margin-bottom: 0.75rem;
}

.cloud-card p {
  font-family: var(--font-slab);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* --- Portfolio Section (Section 6) --- */
.portfolio .section-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--gray-dark);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 3rem;
}

@media (min-width: 544px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.portfolio-card {
  background: var(--white);
  border: 1px solid var(--gray-lighter);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.portfolio-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.portfolio-card-body {
  padding: 1.5rem;
}

.portfolio-card-body h3 {
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.portfolio-card-body p {
  font-family: var(--font-slab);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.portfolio-card-body .stores {
  display: flex;
  gap: 0.75rem;
}

.portfolio-card-body .stores img {
  width: 120px;
  height: auto;
  aspect-ratio: auto;
}

/* --- Store Section (Section 7) --- */
.store {
  background: var(--gray-lighter);
}

.store h4 {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gray-dark);
}

.store p {
  font-size: 0.9rem;
  font-weight: 400;
  max-width: 700px;
  margin: 1rem auto 2rem;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--brand-light);
  color: var(--white);
  border: 2px solid var(--brand-light);
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.store-btn:hover {
  background: var(--brand);
  border-color: var(--brand);
}

.store-btn .material-icons {
  font-size: 1.2rem;
}

/* --- Contact Section (Section 8) --- */
.contact {
  background: var(--brand) url("../images/home/aplicaciones-movil.jpg") center / cover no-repeat;
  position: relative;
}

.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 157, 224, 0.85);
}

.contact .container {
  position: relative;
  z-index: 1;
}

.contact h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--white);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  transition: opacity 0.3s ease;
}

.contact-link:hover {
  opacity: 0.8;
}

.contact-link .material-icons {
  font-size: 1.5rem;
}

.contact-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.contact-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--white);
  border-radius: 50%;
  color: var(--white);
  transition: all 0.3s ease;
}

.contact-social a:hover {
  background: var(--white);
  color: var(--brand);
}

/* --- Footer --- */
.footer {
  background: var(--white);
  border-top: 4px solid var(--brand);
  padding: 2rem 0;
  text-align: center;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.footer small {
  font-size: 0.85rem;
  color: var(--gray);
}

.footer .lang-switch-footer {
  display: flex;
  gap: 0.25rem;
}

.footer .lang-switch-footer a {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--gray-light);
  border-radius: 4px;
  color: var(--gray);
  transition: all 0.3s ease;
}

.footer .lang-switch-footer a:hover,
.footer .lang-switch-footer a.active {
  background: var(--brand);
  color: var(--white);
  border-color: var(--brand);
}

/* --- Privacy Page --- */
.privacy-page {
  padding-top: calc(var(--header-height) + 3rem);
  padding-bottom: 4rem;
}

.privacy-page h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--gray-dark);
  margin-bottom: 2rem;
}

.privacy-page h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand);
  margin: 2rem 0 0.75rem;
}

.privacy-page p {
  font-family: var(--font-slab);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--gray);
}

/* --- 404 Page --- */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.page-404 h1 {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
}

.page-404 p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--gray);
  margin: 1rem 0 2rem;
}

/* --- Loading GIF (if used) --- */
.loading-img {
  display: block;
  margin: 0 auto;
}

/* --- Responsive: Mobile Navigation --- */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-110%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-lighter);
    width: 100%;
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  .lang-switch {
    margin-left: 0;
    padding: 0.75rem 0;
  }

  body.menu-open {
    overflow: hidden;
  }
}

/* --- Responsive Breakpoints --- */
@media (min-width: 544px) {
  html { font-size: 15px; }
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

/* --- Material Icons --- */
.material-icons {
  font-family: "Material Icons";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
}

/* --- Skip to content (accessibility) --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--brand);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 2000;
  font-weight: 700;
}

.skip-link:focus {
  top: 0;
}
