/* ==========================================================================
   Calidad FC — comfy navy/gold/cream, gentle color animation
   ========================================================================== */

@font-face {
  font-family: 'Passion One';
  src: url('../assets/fonts/passion-one-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Passion One';
  src: url('../assets/fonts/passion-one-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Nunito Sans';
  src: url('../assets/fonts/nunito-sans.woff2') format('woff2');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --navy: #16213E;
  --navy-soft: #223258;
  --navy-ink: #1B2946;
  --gold: #C9A227;
  --gold-light: #E8CE7A;
  --gold-deep: #7D630F; /* accessible gold for text on light backgrounds */
  --gold-faint: rgba(201, 162, 39, 0.14);
  --cream: #FAF6EC;
  --cream-deep: #F2EBDA;
  --white-warm: #FFFDF6;
  --display: 'Passion One', 'Arial Narrow', sans-serif;
  --body: 'Nunito Sans', 'Segoe UI', system-ui, sans-serif;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 6px 30px rgba(22, 33, 62, 0.08);
  --shadow-hover: 0 10px 36px rgba(201, 162, 39, 0.22);
  --ease-soft: cubic-bezier(0.25, 0.6, 0.3, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--body);
  font-size: 1.06rem;
  line-height: 1.65;
  color: var(--navy-ink);
  background: var(--cream);
}

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

/* ---------- crest slot: SVG fallback until assets/crest.png loads --------- */
.crest-slot { display: inline-block; position: relative; }
.crest-slot .crest-svg, .crest-slot .crest-img { width: 100%; height: 100%; }
.crest-slot .crest-img { display: none; object-fit: contain; }
body.has-crest .crest-slot .crest-img { display: block; }
body.has-crest .crest-slot .crest-svg { display: none; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(250, 246, 236, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.crest-slot--nav { width: 40px; height: 40px; }
.nav-wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--navy);
}

.nav-links { display: flex; align-items: center; gap: clamp(0.6rem, 2vw, 1.4rem); flex-wrap: wrap; }
.nav-links a {
  text-decoration: none;
  color: var(--navy-ink);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.3rem 0.2rem;
  border-bottom: 2px solid transparent;
  transition: color 0.35s var(--ease-soft), border-color 0.35s var(--ease-soft);
}
.nav-links a:hover { color: var(--gold); border-bottom-color: var(--gold-light); }
.nav-links .nav-cta {
  background: var(--navy);
  color: var(--cream);
  padding: 0.45rem 1.05rem;
  border-radius: 999px;
  border-bottom: none;
  transition: background-color 0.35s var(--ease-soft), color 0.35s var(--ease-soft), box-shadow 0.35s var(--ease-soft);
}
.nav-links .nav-cta:hover { background: var(--gold); color: var(--navy); box-shadow: var(--shadow-hover); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(1100px 520px at 18% 12%, rgba(201, 162, 39, 0.16), transparent 60%),
    radial-gradient(900px 600px at 85% 85%, rgba(232, 206, 122, 0.10), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-soft) 55%, var(--navy) 100%);
  background-size: 200% 200%, 200% 200%, 100% 100%;
  animation: bloom-drift 24s ease-in-out infinite alternate;
  color: var(--cream);
  text-align: center;
  padding: clamp(4rem, 10vw, 7rem) 1.25rem clamp(4.5rem, 10vw, 7.5rem);
}

@keyframes bloom-drift {
  0%   { background-position: 0% 0%, 100% 100%, 0 0; }
  100% { background-position: 60% 40%, 40% 55%, 0 0; }
}

/* signature: faint live clock, gold on navy */
.hero-clock {
  position: absolute;
  top: 50%;
  right: -8%;
  width: clamp(340px, 46vw, 640px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  color: var(--gold);
  opacity: 0.14;
  animation: clock-breathe 12s ease-in-out infinite;
  pointer-events: none;
}
@keyframes clock-breathe {
  0%, 100% { opacity: 0.10; }
  50%      { opacity: 0.18; }
}
#hand-hour, #hand-minute { transform-origin: 100px 100px; }

.hero-inner { position: relative; max-width: 720px; margin: 0 auto; }

.crest-slot--hero {
  width: clamp(120px, 18vw, 168px);
  height: clamp(120px, 18vw, 168px);
  margin-bottom: 1.6rem;
  border-radius: 50%;
  animation: crest-glow 9s ease-in-out infinite;
}
@keyframes crest-glow {
  0%, 100% { filter: drop-shadow(0 0 14px rgba(201, 162, 39, 0.25)); }
  50%      { filter: drop-shadow(0 0 30px rgba(232, 206, 122, 0.5)); }
}

.eyebrow {
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 0.9rem;
}
.hero .eyebrow, .section-navy .eyebrow { color: var(--gold); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 50;
  background: var(--navy);
  color: var(--cream);
  font-weight: 800;
  padding: 0.7rem 1.2rem;
  border-radius: 0 0 12px 12px;
  text-decoration: none;
  transition: top 0.2s var(--ease-soft);
}
.skip-link:focus { top: 0; }

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(3.2rem, 9vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: rgba(250, 246, 236, 0.88);
  max-width: 560px;
  margin: 0 auto 2.2rem;
}

.hero-ctas { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: background-color 0.4s var(--ease-soft), color 0.4s var(--ease-soft),
              border-color 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-light); box-shadow: var(--shadow-hover); }
.btn-ghost { border-color: rgba(250, 246, 236, 0.55); color: var(--cream); }
.btn-ghost:hover { border-color: var(--gold-light); color: var(--gold-light); background: rgba(201, 162, 39, 0.1); }
.btn-navy { background: var(--navy); color: var(--cream); }
.btn-navy:hover { background: var(--gold); color: var(--navy); box-shadow: var(--shadow-hover); }

.btn:focus-visible, a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
.btn:focus-visible { border-radius: 999px; }

/* ---------- sections ---------- */
.section { position: relative; overflow: hidden; padding: clamp(3.5rem, 8vw, 6rem) 1.25rem; }

/* ghosted player photos along section edges */
.pitch-figure {
  position: absolute;
  top: 50%;
  width: clamp(220px, 26vw, 380px);
  height: auto;
  opacity: 0.1;
  pointer-events: none;
  animation: figure-breathe 16s ease-in-out infinite;
}
.pitch-figure--left  { left:  clamp(-70px, -3vw, -24px); transform: translateY(-50%); }
.pitch-figure--right { right: clamp(-70px, -3vw, -24px); transform: translateY(-50%); }
.pitch-figure--flip.pitch-figure--left  { transform: translateY(-50%) scaleX(-1); }
.pitch-figure--flip.pitch-figure--right { transform: translateY(-50%) scaleX(-1); }
@keyframes figure-breathe {
  0%, 100% { opacity: 0.08; }
  50%      { opacity: 0.14; }
}
.pitch-figure--onnavy { animation-name: figure-breathe-navy; }
@keyframes figure-breathe-navy {
  0%, 100% { opacity: 0.11; }
  50%      { opacity: 0.18; }
}
.section-alt { background: var(--cream-deep); }
.section-navy { background: linear-gradient(170deg, var(--navy) 0%, var(--navy-soft) 100%); color: var(--cream); }

.section-inner { max-width: 880px; margin: 0 auto; }

.section h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--navy);
  margin-bottom: 1.4rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem;
}
.section-navy h2 { color: var(--cream); }

/* gold underline sweep, triggered by .in-view */
.section h2::after, .footer h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease-soft) 0.25s;
}
.in-view h2::after { transform: scaleX(1); }

.section-lede { font-size: 1.15rem; max-width: 620px; margin-bottom: 1.6rem; }
.section-navy .section-lede { color: rgba(250, 246, 236, 0.9); }

.prose p { max-width: 660px; margin-bottom: 1.1rem; }
.prose strong { color: var(--gold-deep); font-weight: 800; }

.about-wordmark {
  width: min(340px, 70%);
  margin: 2.2rem 0 0;
  opacity: 0.92;
}

/* ---------- check list ---------- */
.check-list { list-style: none; max-width: 620px; margin-bottom: 2rem; }
.check-list li {
  position: relative;
  padding: 0.55rem 0 0.55rem 2.3rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.78rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--gold-faint);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%23C9A227' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 78%;
  background-position: center;
  background-repeat: no-repeat;
}

.cta-note { font-size: 0.92rem; opacity: 0.75; margin-top: 0.8rem; }

/* ---------- sponsor cards ---------- */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem;
  margin: 0 0 2.2rem;
}
.sponsor-card {
  background: rgba(250, 246, 236, 0.06);
  border: 1px solid rgba(232, 206, 122, 0.22);
  border-radius: var(--radius);
  padding: 1.4rem 1.3rem;
  transition: border-color 0.45s var(--ease-soft), background-color 0.45s var(--ease-soft),
              box-shadow 0.45s var(--ease-soft);
}
.sponsor-card:hover {
  border-color: var(--gold-light);
  background: rgba(201, 162, 39, 0.12);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.sponsor-card h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}
.sponsor-card p { font-size: 0.98rem; color: rgba(250, 246, 236, 0.85); }

/* ---------- staff ---------- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.1rem;
}
.staff-card {
  background: var(--white-warm);
  border: 1px solid rgba(201, 162, 39, 0.22);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.2rem 1.4rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.45s var(--ease-soft), box-shadow 0.45s var(--ease-soft);
}
.staff-card:hover { border-color: var(--gold); box-shadow: var(--shadow-hover); }
.staff-tile {
  width: 84px;
  height: 84px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: 0.04em;
  color: var(--gold-light);
  background: radial-gradient(circle at 32% 28%, var(--navy-soft), var(--navy) 72%);
  border: 3px solid var(--gold);
}
.staff-photo {
  width: 84px;
  height: 84px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold);
}
.staff-tile--open {
  color: var(--gold);
  background: var(--gold-faint);
  border-style: dashed;
}
.staff-card h3 { font-size: 1.08rem; font-weight: 800; color: var(--navy); }
.staff-role { font-size: 0.9rem; opacity: 0.78; margin-top: 0.2rem; }
.staff-role a { color: var(--gold-deep); font-weight: 700; }
.staff-card--open { border-style: dashed; }

/* ---------- footer ---------- */
.footer {
  background: linear-gradient(180deg, var(--navy) 0%, #101830 100%);
  color: var(--cream);
  text-align: center;
  padding: clamp(3.5rem, 8vw, 5.5rem) 1.25rem 2.5rem;
}
.crest-slot--footer { display: block; width: 92px; height: 92px; margin: 0 auto 1.2rem; }
.footer-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 2.7rem);
  text-transform: uppercase;
  position: relative;
  display: inline-block;
  padding-bottom: 0.45rem;
  margin-bottom: 1rem;
}
.footer-email {
  display: table;
  margin: 0 auto 1.4rem;
  color: var(--gold-light);
  font-weight: 800;
  font-size: 1.12rem;
  text-decoration: none;
  border-bottom: 2px solid rgba(232, 206, 122, 0.4);
  transition: color 0.35s var(--ease-soft), border-color 0.35s var(--ease-soft);
}
.footer-email:hover { color: var(--cream); border-bottom-color: var(--gold-light); }
.footer-social { display: flex; gap: 1.4rem; justify-content: center; margin-bottom: 1.8rem; }
.footer-social a {
  color: rgba(250, 246, 236, 0.85);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.35s var(--ease-soft);
}
.footer-social a:hover { color: var(--gold-light); }
.footer-line { font-size: 0.9rem; opacity: 0.6; }
.footer-motto {
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.5rem;
}
.footer-credits { font-size: 0.75rem; opacity: 0.6; margin-top: 1.4rem; }
.footer-credits a { color: inherit; }

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease-soft), transform 0.9s var(--ease-soft);
}
.reveal.in-view { opacity: 1; transform: none; }
/* no-JS: keep everything visible */
html.no-js .reveal { opacity: 1; transform: none; }
html.no-js .section h2::after, html.no-js .footer h2::after { transform: scaleX(1); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero, .hero-clock, .crest-slot--hero, .pitch-figure { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .section h2::after, .footer h2::after { transform: scaleX(1); transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .pitch-figure { display: none; }
}

@media (max-width: 640px) {
  .nav { flex-direction: column; gap: 0.5rem; padding-bottom: 0.8rem; }
  .nav-links { justify-content: center; }
  .nav-links a { padding: 0.55rem 0.5rem; }  /* comfortable tap targets */
  .nav-links .nav-cta { padding: 0.62rem 1.2rem; }
  .hero-clock { right: -30%; opacity: 0.1; }
  .footer-social { flex-direction: column; gap: 0.6rem; }
}
