/* ============================================
   luisracosta.com — Full-Screen Scroll Redesign
   GSAP + Lenis. Pure #FFFFFF / #0A0A0A.
   Full-viewport sections. Zero dividers. Zero shadows.
   ============================================ */

:root {
  --bg:           #FFFFFF;
  --color-bg:     #FFFFFF;
  --surface:      #F5F5F5;
  --card:         #FFFFFF;
  --border:       #E5E5E5;
  --border-hover: #CCCCCC;
  --text:         #0A0A0A;
  --text-2:       #525252;
  --text-muted:   #737373;
  --text-faint:   #A3A3A3;

  --font-display: 'Instrument Serif', Georgia, serif;
  --font-body:    'Satoshi', 'Inter', -apple-system, sans-serif;
  --font-mono:    'DM Mono', 'SF Mono', monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg:           #0A0A0A;
  --color-bg:     #0A0A0A;
  --surface:      #111111;
  --card:         #161616;
  --border:       #262626;
  --border-hover: #383838;
  --text:         #E8E6E3;
  --text-2:       #A0A0A0;
  --text-muted:   #737373;
  --text-faint:   #525252;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: background 200ms ease, color 200ms ease;
}

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

/* ============================================
   LAYOUT — Varied content widths
   ============================================ */

.col       { max-width: 560px; margin: 0 auto; padding: 0 24px; width: 100%; }
.col-sm    { max-width: 440px; margin: 0 auto; padding: 0 24px; width: 100%; }
.col-md    { max-width: 520px; margin: 0 auto; padding: 0 24px; width: 100%; }
.col-wide  { max-width: 700px; margin: 0 auto; padding: 0 32px; width: 100%; }
.col-hero  { max-width: 600px; margin: 0 auto; padding: 0 24px; width: 100%; }

/* ============================================
   PRELOADER
   ============================================ */

#preloader {
  position: fixed; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 999; transition: opacity 400ms ease;
}
#preloader.fade-out { opacity: 0; pointer-events: none; }
.preloader-mark { font-family: var(--font-display); font-size: 48px; color: var(--text); }

/* ============================================
   STICKY NAV
   ============================================ */

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-100%);
  transition: transform 300ms var(--ease);
}
.site-nav.visible { transform: translateY(0); }
[data-theme="dark"] .site-nav { background: rgba(10,10,10,0.85); }

.nav-inner {
  max-width: 700px; margin: 0 auto; padding: 0 32px;
  height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-name { font-family: var(--font-display); font-size: 15px; color: var(--text); white-space: nowrap; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 20px; overflow-x: auto; }
.nav-link {
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--text-muted); white-space: nowrap;
  transition: color 180ms ease; padding: 2px 0; border-bottom: 1.5px solid transparent;
}
.nav-link:hover { color: var(--text); }
.nav-link.active { color: var(--text); border-bottom-color: var(--text); }

.theme-toggle {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0; transition: all 180ms var(--ease);
}
.theme-toggle:hover { background: var(--surface); color: var(--text); }
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ============================================
   FULL-VIEWPORT SECTIONS
   ============================================ */

.section {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 100px 0;
}

/* Section labels: inside col, centered on mobile, absolute on desktop */
.section-label {
  display: block;
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint);
  text-align: center;
  margin-bottom: 32px;
}

/* ============================================
   SCROLL PROGRESS INDICATOR
   ============================================ */

.scroll-progress {
  position: fixed; top: 0; right: 0;
  width: 3px; height: 100vh;
  z-index: 90; pointer-events: none;
}
.scroll-progress-fill {
  width: 100%; height: 0%;
  background: var(--text);
  opacity: 0.15;
  transition: height 100ms linear;
}

/* ============================================
   HERO — 100vh, generous spacing
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; text-align: left;
  padding: 0 24px;
}
.hero > .col-hero { width: 100%; }

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  opacity: 0.15; pointer-events: none;
}
[data-theme="dark"] .hero-grid { opacity: 0.06; }

.clock {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-faint);
  margin-bottom: 48px; letter-spacing: 0.02em;
}
.name {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1rem + 2.5vw, 2.8rem);
  font-weight: 400; color: var(--text);
  margin: 0 0 12px; line-height: 1.15;
}
.tagline {
  font-family: var(--font-body); font-size: 17px; font-weight: 400;
  color: var(--text-muted); margin: 0 0 20px;
}
.location {
  font-family: var(--font-body); font-size: 13px; color: var(--text-faint);
  margin-bottom: 48px;
}
.mono { font-family: var(--font-mono); }

.social-bar { display: flex; gap: 6px; margin-bottom: 28px; }
.social-icon {
  width: 40px; height: 40px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}
.social-icon:hover { background: var(--surface); color: var(--text); transform: scale(1.05); }
[data-theme="dark"] .social-icon:hover { background: #1A1A18; }

.action-row { display: flex; align-items: center; gap: 14px; }
.btn {
  font-family: var(--font-body); font-size: 14px; font-weight: 500;
  padding: 10px 20px; border-radius: 10px;
  border: 1px solid var(--border); cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  transition: all 180ms var(--ease);
}
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { opacity: 0.85; }
.btn-secondary { background: transparent; color: var(--text); }
.btn-secondary:hover { background: var(--surface); border-color: var(--border-hover); }
.action-divider { font-size: 13px; color: var(--text-faint); }

.scroll-indicator {
  position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
  color: var(--text-faint); animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.7; transform: translateX(-50%) translateY(6px); }
}

.toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--text); color: var(--bg);
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  padding: 10px 20px; border-radius: 10px;
  opacity: 0; transition: opacity 200ms ease, transform 200ms ease;
  z-index: 200; pointer-events: none;
}
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================
   ABOUT — intimate reading width
   ============================================ */

.about-text p {
  font-family: var(--font-body); font-size: 16px; line-height: 1.8;
  color: var(--text); margin: 0 0 20px;
}
.about-text p:last-child { margin-bottom: 0; }
.about-cta {
  font-weight: 500; color: var(--text);
  border-top: 1px solid var(--border);
  padding-top: 20px; margin-top: 28px;
}
.about-text a { border-bottom: 1px solid var(--border-hover); transition: border-color 180ms ease; }
.about-text a:hover { border-color: var(--text); }

/* ============================================
   SETUP — wide showcase
   ============================================ */

/* Setup section: content-driven height, not forced 100vh */
.section-setup { min-height: auto; align-items: flex-start; padding: 100px 0 80px; }

.setup-intro {
  font-family: var(--font-mono); font-size: 13px; color: var(--text-faint);
  margin: 0 0 56px;
}

/* Hardware showcase */
.hw-showcase { margin-bottom: 80px; display: grid; grid-template-columns: 1fr; gap: 32px; }
.hw-image { display: flex; justify-content: center; }
.hw-image img { width: 100%; max-width: 480px; height: auto; transition: transform 300ms var(--ease); }
.hw-image:hover img { transform: scale(1.02); }

.hw-name { font-family: var(--font-display); font-size: 28px; font-weight: 400; color: var(--text); margin-bottom: 8px; }
.hw-tagline { font-family: var(--font-body); font-size: 15px; color: var(--text-muted); margin-bottom: 24px; }

.hw-specs { display: flex; flex-direction: column; gap: 8px; }
.spec-row {
  display: flex; align-items: baseline;
  font-family: var(--font-mono); font-size: 13px; color: var(--text-2); line-height: 1.6;
}
.spec-key { white-space: nowrap; flex-shrink: 0; }
.spec-dots { flex: 1; border-bottom: 1px dotted var(--border); margin: 0 10px; min-width: 20px; position: relative; top: -3px; }
.spec-val { white-space: nowrap; flex-shrink: 0; text-align: right; }
.spec-highlight { color: var(--text); font-weight: 500; }

.subsection-label {
  font-family: var(--font-mono); font-size: 11px; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 16px; margin-top: 8px;
}

/* Card base */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: none;
  transition: background 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
}
.card:hover { border-color: var(--border-hover); transform: translateY(-3px); }
[data-theme="dark"] .card:hover { background: #1A1A18; }

/* AI Primary cards */
.ai-primary-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: 48px; }
.ai-card { padding: 22px 24px; display: flex; align-items: flex-start; gap: 16px; }
.ai-card-primary { padding: 28px; }
.ai-body { flex: 1; min-width: 0; }
.ai-name { font-family: var(--font-body); font-size: 15px; font-weight: 500; color: var(--text); }
.ai-role { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); margin-bottom: 6px; }
.ai-desc { font-family: var(--font-body); font-size: 13px; line-height: 1.5; color: var(--text-muted); }

/* Logo icons */
.logo-icon {
  flex-shrink: 0;
  filter: grayscale(1) contrast(0.8); opacity: 0.7;
  transition: filter 180ms var(--ease), opacity 180ms var(--ease);
}
.card:hover .logo-icon, .logo-card:hover .logo-icon { filter: grayscale(0); opacity: 1; }
.logo-32 { width: 24px; height: 24px; }
[data-theme="dark"] .logo-icon { filter: grayscale(1) contrast(0.8) invert(1); }
[data-theme="dark"] .card:hover .logo-icon, [data-theme="dark"] .logo-card:hover .logo-icon { filter: grayscale(0) invert(1); opacity: 1; }

/* Logo grids */
.logo-grid { display: grid; gap: 10px; margin-bottom: 36px; }
.logo-grid-4 { grid-template-columns: repeat(4, 1fr); }
.logo-card {
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start;
  gap: 10px; padding: 14px 16px;
}
.logo-name {
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  color: var(--text-muted); transition: color 180ms var(--ease);
}
.logo-card:hover .logo-name { color: var(--text); }

/* ============================================
   SERVICIOS
   ============================================ */

.section-servicios { min-height: auto; align-items: flex-start; padding: 100px 0 80px; }

.service-card-featured {
  padding: 32px;
  margin-bottom: 24px;
}
.service-card-featured .work-title {
  font-size: 22px;
  font-weight: 300;
  margin-bottom: 10px;
}
.service-card-featured .work-desc {
  font-size: 15px;
  line-height: 1.7;
}
.service-card-featured .service-meta {
  margin-top: 20px;
  flex-direction: column;
  gap: 8px;
}

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

.service-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
}
.service-title {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.3;
}
.service-desc {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}
.service-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.service-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  display: block;
  line-height: 1.5;
}
.service-tag-time {
  color: var(--text-muted);
}

/* ============================================
   TRAYECTORIA
   ============================================ */

.section-trayectoria { min-height: auto; align-items: flex-start; padding: 100px 0 80px; }

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.timeline-entry {
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
.timeline-entry:first-child {
  border-top: 1px solid var(--border);
}
.timeline-period {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}
.timeline-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 8px;
}
.timeline-desc {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================
   WORK
   ============================================ */

.work-cards { display: flex; flex-direction: column; gap: 12px; }
.work-card { display: block; padding: 28px; }
.work-role {
  font-family: var(--font-mono); font-size: 11px; color: var(--text-faint);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px;
}
.work-title { font-family: var(--font-display); font-size: 20px; color: var(--text); margin-bottom: 8px; }
.work-desc { font-family: var(--font-body); font-size: 14px; line-height: 1.6; color: var(--text-muted); margin-bottom: 12px; }
.work-indicator { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); transition: color 180ms ease; }
.work-card:hover .work-indicator { color: var(--text-muted); }

/* ============================================
   WRITING
   ============================================ */

.writing-note { font-family: var(--font-body); font-size: 13px; color: var(--text-faint); font-style: italic; margin-bottom: 28px; }
.article-list { list-style: none; padding: 0; margin: 0; }
.article-item { border-bottom: 1px solid var(--border); }
.article-item:first-child { border-top: 1px solid var(--border); }
.article-link {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 18px 0; gap: 16px; transition: padding-left 180ms var(--ease);
}
.article-link:hover { padding-left: 8px; }
.article-link:hover .article-title { border-bottom-color: var(--text); }
.article-title {
  font-family: var(--font-body); font-size: 15px; font-weight: 400; color: var(--text);
  border-bottom: 1px solid transparent; transition: border-color 180ms ease;
}
.article-date { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); white-space: nowrap; flex-shrink: 0; }

/* ============================================
   NEWSLETTER — compact centered
   ============================================ */

.newsletter-heading {
  font-family: var(--font-display); font-size: 28px; font-weight: 400;
  color: var(--text); margin: 0 0 12px;
}
.newsletter-sub {
  font-family: var(--font-body); font-size: 15px; color: var(--text-muted);
  line-height: 1.6; margin: 0 0 28px;
}
.form-row { display: flex; gap: 10px; }
.email-input {
  flex: 1; font-family: var(--font-body); font-size: 14px;
  padding: 10px 16px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--card); color: var(--text);
  outline: none; transition: border-color 180ms ease;
}
.email-input:focus { border-color: var(--text-muted); }
.email-input::placeholder { color: var(--text-faint); }
.newsletter-success { font-family: var(--font-body); font-size: 14px; color: var(--text-muted); margin-top: 12px; }

/* ============================================
   FOOTER — compact, no border, generous space
   ============================================ */

.footer { padding: 64px 0 40px; }
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 24px;
}
.footer-left p { font-family: var(--font-body); font-size: 13px; color: var(--text-muted); margin: 0 0 4px; }
.footer-cheeky { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-top: 12px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { font-family: var(--font-body); font-size: 13px; color: var(--text-faint); transition: color 180ms ease; }
.footer-links a:hover { color: var(--text); }

/* ============================================
   GSAP ANIMATION INITIAL STATES
   ============================================ */

.hero-anim { opacity: 0; transform: translateY(30px); }

/* About: fade up */
#about [data-animate] { opacity: 0; transform: translateY(24px); }

/* Setup hardware: scale + fade */
.hw-image[data-animate] { opacity: 0; transform: scale(0.95) translateY(30px); }
.hw-name[data-animate], .hw-tagline[data-animate], .hw-specs[data-animate] { opacity: 0; transform: translateX(20px); }
.setup-intro[data-animate] { opacity: 0; transform: translateY(20px); }

/* Servicios (Configurador): fade up */
#servicios .cfg-landing-title[data-animate] { opacity: 0; transform: translateY(20px); }
#servicios .cfg-landing-desc[data-animate] { opacity: 0; transform: translateY(20px); }
.cfg-package-card[data-animate] { opacity: 0; transform: translateY(20px) scale(0.97); }

/* Trayectoria: fade up */
#trayectoria .writing-note[data-animate] { opacity: 0; transform: translateY(20px); }
.timeline-entry[data-animate] { opacity: 0; transform: translateY(20px); }

/* Setup grids: pop in */
.logo-card[data-animate], .ai-card[data-animate] { opacity: 0; transform: translateY(20px) scale(0.97); }
.subsection-label[data-animate] { opacity: 0; transform: translateY(12px); }

/* Work: slide up with slight rotation */
.work-card[data-animate] { opacity: 0; transform: translateY(30px) rotate(0.5deg); }

/* Writing: slide from left */
#writing .article-item[data-animate] { opacity: 0; transform: translateX(-20px); }
#writing .writing-note[data-animate] { opacity: 0; transform: translateX(-10px); }

/* Newsletter: simple fade up */
#newsletter [data-animate] { opacity: 0; transform: translateY(20px); }

/* ============================================
   ARTICLE PAGE COMPAT
   ============================================ */

.site-wrapper { max-width: 960px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .site-wrapper { padding: 0 40px; } }
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; max-width: 960px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .header-inner { padding: 0 40px; } }
.header-nav { display: flex; align-items: center; gap: 24px; }
.header-nav a { font-size: 14px; color: var(--text-muted); transition: color 180ms ease; }
.header-nav a:hover { color: var(--text); }
.article { padding: 120px 0 80px; }
.article-header { margin-bottom: 48px; }
.article-header .article-title { font-family: var(--font-display); font-size: clamp(2rem, 1.2rem + 2.5vw, 3.5rem); font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); margin-bottom: 16px; border-bottom: none; }
.article-meta { font-family: var(--font-body); font-size: 13px; color: var(--text-faint); }
.article-body { max-width: 60ch; }
.article-body p { font-size: 16px; line-height: 1.7; color: var(--text); margin-bottom: 24px; }
.article-body hr { border: none; border-top: 1px solid var(--border); margin: 48px 0; }
.article-body h2 { font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem); font-weight: 400; line-height: 1.2; color: var(--text); margin-bottom: 24px; }
.article-sign { font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--text-muted); margin-top: 48px; }
.table-wrapper { overflow-x: auto; margin: 32px 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.article-body thead th { text-align: left; font-weight: 500; color: var(--text); padding: 12px 16px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.article-body tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-muted); vertical-align: top; }
.article-body tbody tr:last-child td { border-bottom: none; }
.article-body tbody td:first-child { color: var(--text); font-weight: 500; white-space: nowrap; }
.back-link { font-size: 14px; color: var(--text-muted); transition: color 180ms ease; }
.back-link:hover { color: var(--text); }
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer-text { font-size: 13px; color: var(--text-faint); }

/* ============================================
   HAMBURGER NAV (mobile)
   ============================================ */

.nav-right-group {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
}

.nav-hamburger {
  display: none; /* Hidden on desktop */
  width: 44px; height: 44px; border-radius: 8px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); cursor: pointer;
  align-items: center; justify-content: center;
  transition: all 180ms var(--ease); flex-shrink: 0;
}
.nav-hamburger:hover { background: var(--surface); color: var(--text); }

/* Mobile nav panel */
.nav-panel {
  display: none;
  position: fixed; top: 52px; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--border);
  padding: 8px 20px 16px; z-index: 99;
  flex-direction: column; gap: 0;
}
.nav-panel .nav-link {
  display: flex; align-items: center;
  height: 48px; /* 44px min touch target + padding */
  font-size: 15px; font-weight: 500;
  color: var(--text-muted); border-bottom: 1px solid var(--border);
  padding: 0; width: 100%;
}
.nav-panel .nav-link:last-child { border-bottom: none; }
.nav-panel .nav-link:hover, .nav-panel .nav-link.active { color: var(--text); }

.site-nav.nav-open .nav-panel { display: flex; }

/* ============================================
   RESPONSIVE — Tablet (769-1024px)
   ============================================ */

@media (min-width: 769px) and (max-width: 1024px) {
  .logo-grid-4 { grid-template-columns: repeat(3, 1fr); }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
}

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

  /* Desktop: labels float to the left of content */
  .section-label {
    position: absolute;
    top: 84px; left: 32px;
    text-align: left;
    margin-bottom: 0;
    opacity: 0; transform: translateX(-10px);
    transition: opacity 500ms ease, transform 500ms ease;
  }
  .section.visible .section-label {
    opacity: 1; transform: translateX(0);
  }
}

/* ============================================
   RESPONSIVE — Mobile (max 768px)
   ============================================ */

@media (max-width: 768px) {
  /* Layout: free scroll — no forced heights, generous padding */
  .col, .col-sm, .col-md, .col-wide, .col-hero { padding: 0 20px; }
  .section {
    min-height: auto;
    padding: 64px 0;
  }

  .section-setup { padding: 64px 0; }
  .section-servicios { padding: 64px 0; }
  .section-trayectoria { padding: 64px 0; }

  /* Servicios: single column on mobile */
  .service-grid { grid-template-columns: 1fr; }
  .service-card-featured { padding: 24px; }
  .service-card-featured .work-title { font-size: 20px; }

  /* Hero: keep full height for impact */
  .hero {
    min-height: 100svh; min-height: 100vh;
    padding: 0 20px;
    text-align: center; align-items: center;
  }
  .hero .col-hero { display: flex; flex-direction: column; align-items: center; }
  .clock { margin-bottom: 24px; }
  .name { font-size: 1.4rem; }
  .tagline { font-size: 15px; margin-bottom: 14px; }
  .location { margin-bottom: 28px; }
  .social-bar { margin-bottom: 20px; justify-content: center; }

  /* Section labels: already centered in base styles, just tweak size */
  .section-label { font-size: 12px; }

  /* Subsection labels: centered */
  .subsection-label { text-align: center; }
  .setup-intro { text-align: center; }

  /* Hardware: center everything */
  .hw-info { text-align: center; }
  .hw-name { text-align: center; }
  .hw-tagline { text-align: center; }
  .hw-specs { align-items: center; max-width: 320px; margin: 0 auto; }

  /* Nav: hamburger on mobile */
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-inner { padding: 0 16px; }

  /* Touch targets: 44px minimum */
  .social-icon { width: 44px; height: 44px; }
  .btn { padding: 12px 20px; }
  .theme-toggle { width: 44px; height: 44px; }
  .email-input { padding: 14px 16px; }

  /* Grids */
  .logo-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .logo-name { font-size: 12px; }

  /* Hardware */
  .hw-showcase { gap: 20px; margin-bottom: 56px; }
  .hw-image img { max-width: 320px; }
  .hw-name { font-size: 22px; }

  /* Spec text: allow wrapping */
  .spec-row { font-size: 12px; }
  .spec-val { white-space: normal; text-align: right; }

  /* Cards */
  .ai-primary-grid { margin-bottom: 36px; }
  .ai-card-primary { padding: 20px; }

  /* Work: center on mobile */
  .work-card { text-align: center; }
  .work-role { text-align: center; }
  .work-indicator { text-align: center; display: block; }

  /* Newsletter: center on mobile */
  .newsletter-heading { font-size: 24px; text-align: center; }
  .newsletter-sub { text-align: center; }
  .form-row { flex-direction: column; }

  /* Writing: center the note */
  .writing-note { text-align: center; }

  /* About CTA: center */
  .about-cta { text-align: center; }

  /* Footer */
  .footer-inner { flex-direction: column; gap: 20px; align-items: center; text-align: center; }
  .footer-links { justify-content: center; }
  .action-row { flex-wrap: wrap; justify-content: center; }

  /* Scroll progress: hide on mobile */
  .scroll-progress { display: none; }

  /* Scroll indicator: lower on mobile */
  .scroll-indicator { bottom: 24px; }
}

/* ============================================
   RESPONSIVE — Small phones (max 480px)
   ============================================ */

@media (max-width: 480px) {
  .col, .col-sm, .col-md, .col-wide, .col-hero { padding: 0 16px; }
  .name { font-size: 1.3rem; }
  .hw-image img { max-width: 260px; }
  .hw-specs { max-width: 280px; }

  /* Stack action buttons vertically */
  .action-row { flex-direction: column; align-items: center; gap: 10px; width: 100%; }
  .action-divider { display: none; }
  .btn { width: 100%; justify-content: center; }
}
