/* =====================================================
   GABRIEL'S CANADA COUNTDOWN — STYLESHEET
   ===================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:      #D52B1E;   /* Canada red */
  --red-dark: #a01f15;
  --gold:     #E8B44E;   /* warm accent */
  --dark:     #0a0c10;
  --dark2:    #111520;
  --dark3:    #1a1f2e;
  --text:     #e8eaf0;
  --muted:    #8892a4;
  --white:    #ffffff;
  --font-head: 'Segoe UI', 'Segoe UI Semibold', Georgia, serif;
  --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --radius:   16px;
  --shadow:   0 8px 40px rgba(0,0,0,.45);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--dark);
  color: var(--text);
  overflow-x: hidden;
}

/* ===== UTILITY ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.accent    { color: var(--red); }

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 0%, #1a0a0a 0%, #0a0c10 70%);
}

/* Aurora effect */
.aurora {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 40% at 20% -10%, rgba(213,43,30,.18) 0%, transparent 70%),
    radial-gradient(ellipse 60% 30% at 80% -5%,  rgba(232,180,78,.10) 0%, transparent 60%),
    radial-gradient(ellipse 100% 50% at 50% 100%, rgba(26,31,46,.8) 0%, transparent 70%);
  animation: auroraShift 12s ease-in-out infinite alternate;
}

@keyframes auroraShift {
  0%   { opacity: .7; transform: translateY(0); }
  100% { opacity: 1;  transform: translateY(-20px); }
}

/* Snow canvas */
#snowCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Hero content */
.hero__content {
  position: relative;
  z-index: 2;
  padding: 24px;
}

.hero__eyebrow {
  font-size: .85rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: .9;
}

.hero__name {
  font-family: var(--font-head);
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 16px;
  text-shadow: 0 4px 30px rgba(0,0,0,.6);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: var(--muted);
  margin-bottom: 40px;
  letter-spacing: .05em;
}

/* Flags */
.flags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.flag-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}

.flag-img {
  width: 72px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
  border: 2px solid rgba(255,255,255,.08);
  transition: transform .3s;
}

.flag-img:hover { transform: scale(1.08); }

.flag-arrow {
  font-size: 1.8rem;
  color: var(--red);
  animation: flyplane 3s ease-in-out infinite;
}

@keyframes flyplane {
  0%, 100% { transform: translateX(-4px) translateY(-2px); }
  50%       { transform: translateX(4px)  translateY(2px); }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 56px;
  border: 2px solid rgba(255,255,255,.2);
  border-radius: 20px;
  text-decoration: none;
}

.scroll-hint span {
  display: block;
  width: 6px;
  height: 6px;
  background: var(--white);
  border-radius: 50%;
  animation: scrollBounce 1.8s infinite;
}

@keyframes scrollBounce {
  0%   { transform: translateY(-10px); opacity: 0; }
  50%  { opacity: 1; }
  100% { transform: translateY(10px);  opacity: 0; }
}

/* ===== SHARED SECTION STYLES ===== */
.section-label {
  font-size: .78rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
  font-weight: 600;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 8px;
}

.section-sub {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 48px;
}

/* ===== COUNTDOWN SECTION ===== */
.countdown-section {
  background: var(--dark2);
  padding: 100px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.countdown-section::before {
  content: "🍁";
  position: absolute;
  font-size: 320px;
  opacity: .025;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.countdown-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.countdown-card {
  background: var(--dark3);
  border: 1px solid rgba(213,43,30,.2);
  border-radius: var(--radius);
  padding: 28px 28px 20px;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 24px rgba(213,43,30,.08);
  transition: transform .2s, box-shadow .2s;
}

.countdown-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 36px rgba(213,43,30,.18);
}

.count-number {
  font-family: var(--font-head);
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 700;
  color: var(--red);
  line-height: 1;
  letter-spacing: -.02em;
  min-width: 3ch;
  text-align: center;
  display: block;
  transition: transform .15s;
}

.count-number.flip {
  animation: flipNum .3s ease;
}

@keyframes flipNum {
  0%   { transform: translateY(-8px); opacity: .4; }
  100% { transform: translateY(0);    opacity: 1; }
}

.count-label {
  font-size: .72rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.countdown-sep {
  font-size: 3rem;
  color: var(--muted);
  opacity: .4;
  align-self: flex-start;
  margin-top: 20px;
  line-height: 1;
}

/* Progress */
.progress-wrap { max-width: 560px; margin: 0 auto; }

.progress-bar {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--red-dark), var(--red), var(--gold));
  border-radius: 99px;
  width: 0%;
  transition: width 1s ease;
}

.progress-label {
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .05em;
}

/* ===== JOURNEY SECTION ===== */
.journey-section {
  background: var(--dark);
  padding: 100px 0;
  text-align: center;
}

.journey-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 56px 0;
  flex-wrap: wrap;
}

.journey-step {
  background: var(--dark3);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 36px 40px;
  max-width: 280px;
  text-align: center;
}

.journey-step--dest {
  border-color: rgba(213,43,30,.35);
  background: linear-gradient(135deg, var(--dark3), #1e1015);
}

.step-icon {
  font-size: 2.8rem;
  margin-bottom: 16px;
  display: block;
}

.journey-step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}

.journey-step p {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.6;
}

.journey-line {
  flex: 1;
  min-width: 80px;
  max-width: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.journey-line::before {
  content: "";
  position: absolute;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  top: 50%;
  transform: translateY(-50%);
}

.plane-icon {
  font-size: 1.8rem;
  position: relative;
  z-index: 2;
  animation: flyJourney 4s ease-in-out infinite;
  display: block;
}

@keyframes flyJourney {
  0%   { transform: translateX(-12px) translateY(-4px); }
  50%  { transform: translateX(12px)  translateY(4px); }
  100% { transform: translateX(-12px) translateY(-4px); }
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.stat-card {
  background: var(--dark3);
  border: 1px solid rgba(255,255,255,.05);
  border-radius: var(--radius);
  padding: 28px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stat-num {
  font-family: var(--font-head);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--red);
}

.stat-label {
  font-size: .73rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

/* ===== WHY CANADA SECTION ===== */
.why-section {
  background: var(--dark2);
  padding: 100px 0;
  text-align: center;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 56px 0 48px;
}

.why-card {
  background: var(--dark3);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 40px 28px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .25s, box-shadow .25s;
}

.why-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}

.why-card--featured {
  border-color: rgba(213,43,30,.4);
  background: linear-gradient(155deg, var(--dark3) 60%, #1e1015);
  box-shadow: 0 4px 28px rgba(213,43,30,.1);
}

.why-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.why-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}

.why-card p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.75;
}

.why-card p em {
  color: var(--text);
  font-style: normal;
  font-weight: 600;
}

.why-quote {
  max-width: 620px;
  margin: 0 auto;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-style: italic;
  color: var(--text);
  border-left: 3px solid var(--red);
  padding: 16px 0 16px 28px;
  text-align: left;
  line-height: 1.7;
}

.why-quote cite {
  display: block;
  margin-top: 12px;
  font-size: .8rem;
  font-style: normal;
  color: var(--muted);
  letter-spacing: .08em;
}

@media (max-width: 768px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ===== GALLERY ===== */
.gallery-section {
  background: var(--dark2);
  padding: 100px 0;
  text-align: center;
}

.gallery-hint {
  font-size: .82rem;
  color: var(--muted);
  background: rgba(232,180,78,.07);
  border: 1px solid rgba(232,180,78,.15);
  border-radius: 8px;
  padding: 12px 20px;
  display: inline-block;
  margin-bottom: 48px;
}

.gallery-hint code {
  background: rgba(255,255,255,.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .8rem;
  color: var(--gold);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--dark3);
  border: 1px solid rgba(255,255,255,.06);
  aspect-ratio: 4/3;
  cursor: pointer;
  transition: transform .3s, box-shadow .3s;
}

.gallery-item:hover {
  transform: scale(1.025);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  z-index: 2;
}

.gallery-item--large {
  grid-column: span 2;
  aspect-ratio: 16/9;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Placeholder state when image missing */
.gallery-item.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item.placeholder::before {
  content: "📷  Add photo";
  font-size: .85rem;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.gallery-item.placeholder img { display: none; }

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 12px;
  font-size: .72rem;
  color: rgba(255,255,255,.4);
  background: linear-gradient(transparent, rgba(0,0,0,.55));
  letter-spacing: .06em;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s;
}

.gallery-item:hover .gallery-caption { opacity: 1; }

/* ===== FOOTER ===== */
.site-footer {
  background: #070910;
  padding: 60px 0;
  text-align: center;
  border-top: 1px solid rgba(213,43,30,.12);
}

.footer-name {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 6px;
}

.footer-sub {
  font-size: .82rem;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-copy {
  font-size: .78rem;
  color: rgba(255,255,255,.2);
  letter-spacing: .06em;
}

/* ===== FLOATING MAPLE LEAVES ===== */
.leaf {
  position: fixed;
  top: -80px;
  pointer-events: none;
  z-index: 1;
  font-size: 1.4rem;
  opacity: 0;
  animation: leafFall linear infinite;
  will-change: transform, opacity;
  user-select: none;
}

@keyframes leafFall {
  0%   { transform: translateY(0)      rotate(0deg)   translateX(0);   opacity: 0; }
  5%   { opacity: .55; }
  90%  { opacity: .4; }
  100% { transform: translateY(110vh)  rotate(720deg) translateX(var(--drift)); opacity: 0; }
}

/* Arrival state */
#countdown-grid.arrived {
  display: block;
  padding: 20px 0;
}

.arrived-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: arrivalFadeIn 1.2s ease forwards;
}

@keyframes arrivalFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.arrived-leaf {
  font-size: 4rem;
  animation: leafSpin 4s ease-in-out infinite alternate;
  display: block;
}

@keyframes leafSpin {
  from { transform: rotate(-15deg) scale(1); }
  to   { transform: rotate(15deg) scale(1.12); }
}

.arrived-text {
  font-family: var(--font-head);
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 600;
  color: var(--white);
  line-height: 1.2;
}

.arrived-text em {
  font-style: normal;
  color: var(--red);
}

.arrived-sub {
  font-size: clamp(.9rem, 2vw, 1.1rem);
  color: var(--muted);
  letter-spacing: .06em;
}

/* ===== MUSIC BUTTON ===== */
.music-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(213,43,30,.35);
  background: rgba(26,31,46,.85);
  backdrop-filter: blur(10px);
  color: var(--white);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  transition: background .2s, transform .2s, border-color .2s;
}

.music-btn:hover {
  background: rgba(213,43,30,.25);
  border-color: var(--red);
  transform: scale(1.1);
}

.music-btn.muted .music-icon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 22px;
  background: var(--red);
  transform: rotate(45deg);
  border-radius: 2px;
  pointer-events: none;
}

.music-btn { position: fixed; }
.music-icon { position: relative; line-height: 1; user-select: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .countdown-card   { min-width: 90px; padding: 20px 16px 14px; }
  .count-number     { font-size: 2.4rem; }
  .countdown-sep    { font-size: 2rem; margin-top: 14px; }
  .journey-steps    { flex-direction: column; gap: 16px; }
  .journey-line     { width: 2px; height: 60px; min-width: auto; }
  .journey-line::before { width: 2px; height: 100%; top: 0; left: 50%; transform: translateX(-50%); background: linear-gradient(180deg, transparent, var(--red), transparent); }
  .gallery-grid     { grid-template-columns: 1fr 1fr; }
  .gallery-item--large { grid-column: span 2; }
}

@media (max-width: 480px) {
  .countdown-grid   { gap: 6px; }
  .countdown-sep    { display: none; }
  .gallery-grid     { grid-template-columns: 1fr; }
  .gallery-item--large { grid-column: span 1; aspect-ratio: 4/3; }
}
