/* ==========================================================================
   DigiShoes - Bio-Digital Luxury & Footwear R&D Design System
   Main Stylesheet (Valuni / Eurodavil • Spinner Dynamics • ESAN-UA)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;500;600&family=Geist:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
  /* Bio-Digital Luxury Color Palette */
  --bg-main: #f2eee7;
  --bg-subtle: #ebe5db;
  --bg-card: #f9f7f4;
  --bg-white: #ffffff;
  --bg-dark: #141814;
  --bg-dark-surface: #1d231d;
  --bg-dark-card: #252c25;

  --text-main: #141814;
  --text-muted: #616a5e;
  --text-subtle: #8d978a;
  --text-inverse: #f4f7f2;
  --text-inverse-muted: #a6b1a3;

  --accent-olive: #52604a;
  --accent-olive-hover: #43503c;
  --accent-olive-soft: rgba(82, 96, 74, 0.12);
  --accent-clay: #c86a43;
  --accent-clay-hover: #b35a34;
  --accent-clay-soft: rgba(200, 106, 67, 0.12);
  --accent-sand: #d8cebe;

  --border-light: rgba(20, 24, 20, 0.08);
  --border-medium: rgba(20, 24, 20, 0.14);
  --border-dark: rgba(255, 255, 255, 0.1);

  /* Shadows - Organic Diffusion */
  --shadow-sm: 0 2px 6px rgba(20, 24, 20, 0.03);
  --shadow-md: 0 8px 24px -4px rgba(20, 24, 20, 0.06);
  --shadow-lg: 0 20px 40px -12px rgba(20, 24, 20, 0.08);
  --shadow-dark: 0 24px 48px -12px rgba(0, 0, 0, 0.5);

  /* Typography */
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Layout Constants */
  --max-width: 1280px;
  --header-height: 148px;
  --header-height-scrolled: 68px;
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-full: 9999px;

  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.65;
  overflow-x: hidden;
}

img, svg, video {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.75rem;
}

/* Typography Utilities */
.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

.section-center-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3.5rem;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent-olive);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.section-tag::before {
  content: '●';
  font-size: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.125rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.85rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-olive);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-olive-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(82, 96, 74, 0.25);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background: #ffffff;
  border-color: var(--text-main);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  background: var(--bg-card);
  border-color: var(--text-main);
}

.btn-sm {
  padding: 0.5rem 1.1rem;
  font-size: 0.8125rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(242, 238, 231, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled {
  height: var(--header-height-scrolled);
  background: rgba(249, 247, 244, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 4px 20px -2px rgba(20, 24, 20, 0.05);
}

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

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-wrap img {
  height: 84px;
  width: auto;
  object-fit: contain;
  transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled .brand-wrap img {
  height: 38px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  transition: gap 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled .nav-menu {
  gap: 0.875rem;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: var(--radius-full);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-header.scrolled .nav-link {
  font-size: 0.875rem;
  padding: 6px 10px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-main);
  background: rgba(20, 24, 20, 0.05);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-main);
  cursor: pointer;
}

/* Hero Section */
.hero-section {
  padding-top: calc(var(--header-height) + 2rem);
  padding-bottom: 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--accent-clay-soft);
  color: var(--accent-clay);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.hero-title span {
  color: var(--accent-olive);
}

.hero-lead {
  font-size: 1.1875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.25rem;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3.5rem;
}

.hero-stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.hero-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.hero-stat-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hero Showcase Card */
.hero-media-wrapper {
  position: relative;
}

.hero-card-showcase {
  background: var(--bg-white);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.hero-card-showcase img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.hero-card-caption {
  padding: 1.25rem 0.5rem 0.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Consortium Strip */
.consortium-strip {
  background: var(--bg-white);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 2.5rem 0;
}

.consortium-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.consortium-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-subtle);
  margin-bottom: 0.5rem;
}

.consortium-logos {
  display: flex;
  align-items: center;
  gap: 2.75rem;
  flex-wrap: wrap;
}

.consortium-logos img {
  height: 36px;
  max-height: 38px;
  width: auto;
  object-fit: contain;
  opacity: 0.9;
  transition: var(--transition-smooth);
}

.consortium-logos img:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* Spatial Bento 2.0 Grid */
.bento-section {
  padding: 6rem 0;
}

.bento-grid-spatial {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.75rem;
}

.spatial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.spatial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: var(--bg-white);
}

.spatial-card-8 {
  grid-column: span 8;
}

.spatial-card-4 {
  grid-column: span 4;
}

.spatial-card-6 {
  grid-column: span 6;
}

.spatial-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-clay);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.spatial-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.spatial-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.spatial-img-wrap {
  margin-top: 1.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 220px;
}

.spatial-card-4 .spatial-img-wrap {
  height: 260px;
}

.spatial-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Activities List Accordion */
.activities-section {
  padding: 6rem 0;
  background: var(--bg-subtle);
}

.activities-accordion {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.activity-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.activity-card.active {
  border-color: var(--accent-olive);
  box-shadow: var(--shadow-md);
}

.activity-header {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.activity-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.activity-index {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--accent-olive-soft);
  color: var(--accent-olive);
}

.activity-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
}

.activity-badge {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--bg-main);
  color: var(--text-muted);
}

.activity-toggle-icon {
  font-size: 1.25rem;
  color: var(--text-subtle);
  transition: transform 0.25s ease;
}

.activity-card.active .activity-toggle-icon {
  transform: rotate(180deg);
  color: var(--accent-olive);
}

.activity-body {
  padding: 0 2rem 2rem;
  display: none;
  border-top: 1px solid var(--border-light);
  padding-top: 1.5rem;
}

.activity-card.active .activity-body {
  display: block;
}

.activity-grid-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
}

.activity-deliverables-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-subtle);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.activity-deliverable-item {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  gap: 8px;
}

/* Consortium Section */
.consortium-section {
  padding: 6rem 0;
}

.consortium-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.partner-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.partner-card:hover {
  background: var(--bg-white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.partner-card-header {
  height: 55px;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
}

.partner-card-header img {
  height: 38px;
  max-height: 42px;
  max-width: 250px;
  width: auto;
  object-fit: contain;
}

.partner-role-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-olive);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.partner-card-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.partner-card-desc {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

/* News Section */
.news-section {
  padding: 6rem 0;
  background: var(--bg-subtle);
}

.news-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.news-card {
  width: 100%;
  max-width: 370px;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-thumb {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-thumb img {
  transform: scale(1.04);
}

.news-category-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(20, 24, 20, 0.78);
  backdrop-filter: blur(8px);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.news-body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-date {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-subtle);
  margin-bottom: 0.5rem;
}

.news-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.news-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* Ficha de Operação (Dark Forest Noir) */
.ficha-section {
  padding: 6rem 0;
  background: var(--bg-dark);
  color: var(--text-inverse);
}

.ficha-header .section-tag {
  color: #a6b1a3;
}
.ficha-header .section-title {
  color: #ffffff;
}
.ficha-header .section-desc {
  color: var(--text-inverse-muted);
}

.ficha-container-card {
  margin-top: 3.5rem;
  background: var(--bg-dark-surface);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.ficha-item-row {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border-dark);
  align-items: center;
}

.ficha-item-row:last-child {
  border-bottom: none;
}

.ficha-key {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-inverse-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ficha-val {
  font-size: 0.9375rem;
  color: #ffffff;
  font-weight: 500;
}

.funding-banner-box {
  margin-top: 3.5rem;
  background: #ffffff;
  padding: 1.5rem 2.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.funding-banner-box img {
  max-height: 65px;
  width: auto;
}

/* Footer */
.site-footer {
  background: #0f120f;
  color: var(--text-inverse-muted);
  padding: 4.5rem 0 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
  height: 68px;
  width: auto;
  object-fit: contain;
  margin-bottom: 0.5rem;
}

.site-footer a {
  color: var(--text-inverse-muted);
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.site-footer a:hover {
  color: #ffffff;
}

.site-footer .external-icon {
  font-size: 0.75rem;
  opacity: 0.7;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-footer a:hover .external-icon {
  opacity: 1;
  transform: translate(1px, -1px);
}

.footer-bottom {
  padding-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8125rem;
}

/* Modal Overlay & Dialog */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 18, 14, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open {
  display: flex;
}

.modal-container {
  background: var(--bg-white);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-dark);
  border: 1px solid var(--border-medium);
  padding: 2.5rem;
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.modal-close-btn:hover {
  background: var(--text-main);
  color: #ffffff;
}

/* Responsive Rules */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .spatial-card-8,
  .spatial-card-4,
  .spatial-card-6 {
    grid-column: span 12;
  }
  .consortium-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ficha-item-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 768px) {
  .site-header {
    height: 80px;
  }
  .site-header.scrolled {
    height: 64px;
  }
  .brand-wrap img {
    height: 48px;
  }
  .site-header.scrolled .brand-wrap img {
    height: 38px;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-card);
    padding: 1.5rem;
    flex-direction: column;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
  }
  .nav-menu.open {
    display: flex;
  }
  .mobile-toggle {
    display: block;
  }
  .hero-stats-cards {
    grid-template-columns: 1fr;
  }
  .activity-grid-details {
    grid-template-columns: 1fr;
  }
}
