/* =============================================
   DESIGN TOKENS
   ============================================= */
:root {
  /* Colors */
  --c-bg:       #FAF8F5;
  --c-surface:  #FFFFFF;
  --c-text:     #2C2825;
  --c-muted:    #7A7068;
  --c-accent:   #C85A3A;
  --c-amber:    #E8A040;
  --c-border:   #EDE8E0;
  --c-dark:     #2C2825;
  --c-dark-alt: #3A3330;
  --c-offwhite: #FAF8F5;

  /* Typography */
  --f-display: 'Playfair Display', Georgia, serif;
  --f-body:    'Nunito', system-ui, sans-serif;

  --t-hero:    clamp(3rem, 6vw, 5rem);
  --t-section: clamp(1.75rem, 3vw, 2.25rem);
  --t-card:    1.125rem;
  --t-body:    1rem;
  --t-caption: 0.8125rem;
  --t-nav:     0.9375rem;

  /* Spacing */
  --sp-xs: 0.5rem;
  --sp-sm: 1rem;
  --sp-md: 2rem;
  --sp-lg: 4rem;
  --sp-xl: 7rem;

  /* Shapes */
  --r-card: 12px;
  --r-pill: 100px;

  /* Shadows */
  --sh-card:       0 2px 8px rgba(44,40,37,0.06);
  --sh-card-hover: 0 12px 32px rgba(44,40,37,0.14);

  --ease: 0.25s ease;
  --container: 1200px;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: 1.7;
  background: var(--c-bg);
  color: var(--c-text);
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--sp-md);
  position: relative;
}

/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,248,245,0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--c-border);
  padding: var(--sp-sm) var(--sp-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
}

.navbar-logo {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--c-text);
  letter-spacing: 0.02em;
}

.navbar-links {
  display: flex;
  gap: var(--sp-md);
  align-items: center;
}

.navbar-links a {
  font-family: var(--f-body);
  font-weight: 700;
  font-size: var(--t-nav);
  color: var(--c-text);
  position: relative;
  padding-bottom: 2px;
  transition: color var(--ease);
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--c-accent);
  transition: width var(--ease);
}

.navbar-links a:hover               { color: var(--c-accent); }
.navbar-links a:hover::after        { width: 100%; }

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--c-text);
  line-height: 1;
}

/* =============================================
   HERO
   ============================================= */
.hero {
  min-height: 85vh;
  display: flex;
  align-items: center;
  background: var(--c-bg);
  padding: var(--sp-xl) var(--sp-md);
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-xl);
  align-items: center;
  width: 100%;
}

.hero-eyebrow {
  font-weight: 600;
  font-size: var(--t-caption);
  color: var(--c-accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--sp-sm);
}

.hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--t-hero);
  line-height: 1.05;
  color: var(--c-text);
  margin-bottom: var(--sp-sm);
}

.hero-tagline {
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--c-muted);
  margin-bottom: var(--sp-sm);
}

.hero-description {
  font-size: 1rem;
  color: var(--c-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-md);
  max-width: 48ch;
}

.hero-cta {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  background: var(--c-accent);
  color: var(--c-offwhite);
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: var(--r-pill);
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}

.btn-primary:hover {
  background: #b34e30;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,90,58,0.3);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  padding: 0.875rem 1.75rem;
  border: 2px solid var(--c-border);
  color: var(--c-text);
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: var(--r-pill);
  transition: border-color var(--ease), color var(--ease);
}

.btn-outline:hover {
  border-color: var(--c-accent);
  color: var(--c-accent);
}

.hero-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-image-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #F5E6D3 0%, #EDD5C0 50%, #E0C4AA 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.hero-image-placeholder svg {
  width: 60%;
  height: 60%;
  opacity: 0.25;
}

/* =============================================
   SECTION SHARED
   ============================================= */
.section {
  padding: var(--sp-xl) 0;
}

.section-ghost-number {
  position: absolute;
  top: -0.1em;
  right: -0.05em;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(8rem, 18vw, 18rem);
  color: rgba(200,90,58,0.055);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  white-space: nowrap;
  overflow: hidden;
}

.section-header {
  position: relative;
  z-index: 1;
  margin-bottom: var(--sp-lg);
}

.section-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--t-section);
  color: var(--c-text);
  line-height: 1.2;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 64px;
  height: 6px;
  margin-top: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='6'%3E%3Cpath d='M0 4 Q8 0 16 4 Q24 8 32 4 Q40 0 48 4 Q56 8 64 4' stroke='%23C85A3A' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
}

.section-title--light {
  color: var(--c-offwhite);
}

.section-title--light::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='6'%3E%3Cpath d='M0 4 Q8 0 16 4 Q24 8 32 4 Q40 0 48 4 Q56 8 64 4' stroke='%23E8A040' stroke-width='2' fill='none'/%3E%3C/svg%3E");
}

.section-subtitle {
  margin-top: var(--sp-xs);
  color: var(--c-muted);
  font-size: 1rem;
}

/* =============================================
   PROJECTS
   ============================================= */
.section-projects {
  background: var(--c-bg);
  overflow: hidden;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--sp-md);
  position: relative;
  z-index: 1;
}

.no-projects {
  color: var(--c-muted);
  font-style: italic;
  grid-column: 1 / -1;
}

/* =============================================
   PROJECT CARD
   ============================================= */
.project-card {
  background: var(--c-surface);
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-card);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-card-hover);
  border-color: var(--c-accent);
}

.project-card-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--c-border);
}

.project-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ease);
}

.project-card:hover .project-card-thumbnail img {
  transform: scale(1.03);
}

.project-card-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #F0EBE5 0%, var(--c-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--c-muted);
  opacity: 0.5;
}

.project-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.project-card-level {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}

.project-card-level--infanzia   { background: rgba(232,160,64,0.15);  color: #9A6B10; }
.project-card-level--primaria   { background: rgba(80,160,100,0.12);  color: #2D6B40; }
.project-card-level--secondaria { background: rgba(200,90,58,0.12);   color: var(--c-accent); }

.project-card-title {
  font-weight: 800;
  font-size: var(--t-card);
  color: var(--c-text);
  line-height: 1.3;
}

.project-card-meta {
  font-weight: 400;
  font-size: var(--t-caption);
  color: var(--c-muted);
}

.project-card-desc {
  font-size: 0.9375rem;
  color: var(--c-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-media {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.media-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--c-muted);
}

.project-card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: auto;
  padding-top: 0.75rem;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--c-accent);
  transition: gap var(--ease);
}

.project-card-link:hover { gap: 0.6rem; }

/* =============================================
   TEAM (DARK SECTION)
   ============================================= */
.section-team {
  background: var(--c-dark);
  overflow: hidden;
}

.section-team .section-ghost-number {
  color: rgba(200,90,58,0.07);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-md);
  position: relative;
  z-index: 1;
}

.team-card {
  background: var(--c-dark-alt);
  border-radius: var(--r-card);
  padding: 2rem;
  border: 1px solid rgba(255,255,255,0.06);
  transition: transform var(--ease), border-color var(--ease);
}

.team-card:hover {
  transform: translateY(-3px);
  border-color: rgba(200,90,58,0.3);
}

.team-card-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--c-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: white;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.team-card-name {
  font-weight: 800;
  font-size: 1rem;
  color: var(--c-offwhite);
  margin-bottom: 0.25rem;
}

.team-card-role {
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--c-amber);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.team-card-qualification {
  font-size: 0.875rem;
  color: rgba(250,248,245,0.5);
  line-height: 1.5;
}

.team-card-specialization {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: rgba(250,248,245,0.65);
  line-height: 1.6;
}

/* =============================================
   METHODOLOGY
   ============================================= */
.section-methodology {
  background: var(--c-surface);
  overflow: hidden;
}

.methodology-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--sp-sm);
}

.methodology-list li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem 1.25rem;
  background: var(--c-bg);
  border-radius: 8px;
  border-left: 3px solid var(--c-accent);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--c-text);
}

.methodology-list li::before {
  content: '♩';
  color: var(--c-accent);
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--c-dark);
  color: var(--c-offwhite);
  padding: var(--sp-lg) 0 var(--sp-md);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-lg);
  align-items: start;
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: var(--sp-md);
}

.footer-logo {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: rgba(250,248,245,0.5);
  max-width: 36ch;
  line-height: 1.6;
}

.footer-contact h3 {
  font-size: var(--t-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-amber);
  margin-bottom: 0.5rem;
}

.footer-contact a {
  font-size: 0.9375rem;
  color: rgba(250,248,245,0.75);
  transition: color var(--ease);
}

.footer-contact a:hover { color: var(--c-accent); }

.footer-bottom {
  font-size: 0.8125rem;
  color: rgba(250,248,245,0.3);
}

/* =============================================
   PROJECT PAGE
   ============================================= */
.project-page {
  max-width: 860px;
  margin-inline: auto;
  padding: var(--sp-lg) var(--sp-md);
}

.project-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: var(--t-caption);
  color: var(--c-accent);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--sp-md);
  transition: gap var(--ease);
}

.project-back:hover { gap: 0.7rem; }

.project-hero-level { margin-bottom: var(--sp-sm); }

.project-hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--c-text);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.project-hero-meta {
  font-size: var(--t-caption);
  color: var(--c-muted);
  font-weight: 600;
  margin-bottom: var(--sp-md);
}

.project-description {
  font-size: 1.0625rem;
  color: var(--c-muted);
  line-height: 1.8;
  margin-bottom: var(--sp-lg);
  max-width: 65ch;
}

.project-video {
  aspect-ratio: 16/9;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--sp-md);
}

.project-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.project-actions {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  margin-bottom: var(--sp-lg);
}

.btn-photos,
.btn-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: var(--r-pill);
}

.btn-photos {
  border: 2px solid var(--c-accent);
  color: var(--c-accent);
  transition: background var(--ease), color var(--ease);
}

.btn-photos:hover {
  background: var(--c-accent);
  color: white;
}

.btn-pdf {
  border: 2px solid var(--c-border);
  color: var(--c-text);
  transition: border-color var(--ease);
}

.btn-pdf:hover { border-color: var(--c-text); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: var(--sp-lg);
  }
  .hero-image { display: none; }

  .team-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .navbar-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-border);
    padding: var(--sp-md);
    gap: var(--sp-sm);
  }
  .navbar-links.open { display: flex; }
  .navbar-toggle     { display: block; }
  .navbar            { position: relative; }

  .footer-inner { grid-template-columns: 1fr; }

  .section { padding: var(--sp-lg) 0; }
  .hero     { min-height: auto; padding: var(--sp-lg) var(--sp-sm); }
}
