:root {
  --navy: #07122b;
  --primary-blue: #1e3a8a;
  --secondary-blue: #3b82f6;
  --accent: #c1ff72;
  --light-blue: #dbeafe;
  --text: #4b5563;
  --text-light: rgba(255, 255, 255, 0.88);
  --bg: #f9fafb;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  position: relative;
  overflow: hidden;
  padding: 2rem 1.5rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(30, 58, 138, 0.35) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 80% 20%, rgba(59, 130, 246, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.75rem;
  animation: fadeUp 0.8s ease-out both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
}

.brand-name {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.06em;
  line-height: 1;
}

.brand-name .accent {
  color: var(--accent);
}

.tagline {
  color: var(--text-light);
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-weight: 400;
  max-width: 36rem;
  letter-spacing: 0.02em;
}

.accent-line {
  width: 4rem;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 0.25rem;
}

.footer-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  z-index: 1;
}

.footer-bar a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: color 0.2s;
}

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

/* Imatge enllaç Tour de France */
.tour-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-top: 0.5rem;
  border-radius: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tour-link:hover {
  transform: scale(1.03);
}

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

.tour-link-img {
  display: block;
  max-width: min(320px, 80vw);
  height: auto;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Modal d'accés */
body.modal-open {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(7, 18, 43, 0.85);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}

.modal-overlay[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-box {
  position: relative;
  background: var(--navy);
  border: 1px solid rgba(193, 255, 114, 0.35);
  border-radius: 16px;
  padding: 2rem 2rem 1.75rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  animation: fadeUp 0.3s ease-out both;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.2s;
}

.modal-close:hover,
.modal-close:focus-visible {
  color: var(--accent);
  outline: none;
}

.modal-logo {
  max-width: 180px;
  height: auto;
  margin: 0 auto 1.25rem;
  display: block;
}

.modal-title {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.modal-option {
  display: block;
  padding: 0.85rem 1.25rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(193, 255, 114, 0.4);
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.modal-option:hover {
  background: rgba(193, 255, 114, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.modal-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Pàgines secundàries */
.page-header {
  background: var(--navy);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: #fff;
}

.page-header-brand img {
  height: 2rem;
  width: auto;
}

.page-header-brand span {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

.page-back {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.page-back:hover {
  color: var(--accent);
}

.page-content {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.page-content h1 {
  color: var(--primary-blue);
  font-size: 1.75rem;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
}

.page-content p {
  color: var(--text);
  font-size: 1.05rem;
}

@media (max-width: 480px) {
  .logo {
    width: 56px;
    height: 56px;
  }

  .logo-wrap {
    flex-direction: column;
    gap: 1rem;
  }
}
