/* ========================================
   SIA JS Monta — Shared Styles
   Clean, compliant, responsive
   ======================================== */

/* ===== CSS Variables ===== */
:root {
  /* Palette */
  --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --card: rgba(255, 255, 255, 0.92);
  --text-dark: #1e293b;
  --text-light: #64748b;
  --accent: #6366f1;

  /* Bento Gradients */
  --g-blue: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  --g-rose: linear-gradient(135deg, #fff1f2 0%, #fecdd3 100%);
  --g-mint: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);

  /* Spacing & Layout */
  --radius-lg: 40px;
  --radius-md: 28px;
  --radius-sm: 16px;
  --shadow-soft: 0 25px 50px -12px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: "Inter", "Inter UI", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(-45deg, #f8fafc, #eef2ff, #fdf2f8, #f0fdf4);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  color: var(--text-dark);
  line-height: 1.6;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

@keyframes gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ===== Layout Wrapper ===== */
.wrapper {
  width: 100%;
  max-width: 850px;
  background: var(--card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  padding: 40px 48px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-soft);
}

.wrapper-narrow {
  max-width: 720px;
  padding: 48px 40px;
  border-radius: 32px;
}

/* ===== Typography ===== */
.tagline {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.4em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 16px;
  opacity: 0.9;
  text-align: center;
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: linear-gradient(to right, #1e293b, #475569);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: 8px;
}

h2 {
  font-size: 1.25rem;
  margin: 20px 0 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

p, ul {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

ul {
  padding-left: 20px;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* ===== Header ===== */
header {
  text-align: center;
  margin-bottom: 32px;
}

/* ===== Bento Grid (Index Page) ===== */
.bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cell {
  padding: 35px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid rgba(255, 255, 255, 0.4);
  gap: 2px;
}

.cell:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.valters { background: var(--g-blue); }
.ance { background: var(--g-rose); }
.project {
  background: var(--g-mint);
  grid-column: span 2;
}

.links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.links a {
  font-size: 0.75rem;
  color: var(--text-dark);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.5);
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.links a:hover {
  background: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  color: var(--accent);
  text-decoration: none;
}

.project-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.btn {
  display: inline-flex;
  align-items: center;
  background: var(--g-blue);
  color: var(--text-dark);
  padding: 14px 28px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn:hover {
  background: var(--accent);
  color: white;
  transform: scale(1.02);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
  text-decoration: none;
}

code {
  background: rgba(255, 255, 255, 0.7);
  padding: 4px 10px;
  border-radius: 10px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
}

/* ===== Legal Pages Content ===== */
.legal-section { margin-bottom: 20px; }
.legal-section h2 { font-size: 1.1rem; margin: 20px 0 10px; }

/* ===== Footer — Shared Across All Pages ===== */
.site-footer {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  font-size: 0.75rem;
  color: var(--text-light);
  flex-wrap: wrap;
}

.footer-business { line-height: 1.6; }
.footer-location, .footer-contact { opacity: 0.85; }

.footer-contact {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-contact:hover { color: var(--accent); text-decoration: none; }

.footer-legal {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
  padding: 4px 2px;
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--accent); text-decoration: none; }

.footer-divider {
  opacity: 0.3;
  user-select: none;
  padding: 0 2px;
}

.footer-registry {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid #cbd5e1;
  transition: all 0.2s ease;
}
.footer-registry:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ===== Responsive Design ===== */
@media (max-width: 700px) {
  body { padding: 20px; }
  
  .wrapper {
    padding: 40px 24px;
    border-radius: 0;
  }
  
  .wrapper-narrow {
    padding: 32px 24px;
    border-radius: 24px;
  }
  
  .bento {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .project { grid-column: span 1; }
  
  .project-meta {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  
  h1 { font-size: 2rem; }
  
  .site-footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    margin-top: 40px;
  }
  
  .footer-legal {
    align-items: center;
    text-align: center;
  }
  
  .footer-links { justify-content: center; }
}

/* ===== Accessibility ===== */
.footer-links a:focus,
.footer-registry:focus,
.footer-contact:focus,
.btn:focus,
.links a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  body { background: #f8fafc; }
}

/* ===== Print Styles ===== */
@media print {
  body { background: white; color: black; }
  .wrapper, .wrapper-narrow { box-shadow: none; border: 1px solid #ccc; }
  a { text-decoration: underline; color: #000; }
  .site-footer { border-top: 1px solid #000; }
}

/* ===== Back to Home Link ===== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 12px;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.back-link:hover {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
  text-decoration: none;
}

.back-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.back-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}