/* --- Design tokens --- */
:root {
  --bg-hero: #0a0a0b;
  --bg-body: #f6f4f0;
  --bg-card: #ffffff;
  --text: #1a1917;
  --text-muted: #5c5956;
  --text-hero: #f5f3ef;
  --accent: #0088cc;
  --accent-hover: #006699;
  --accent-warm: #b8860b;
  --border: rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --radius-sm: 10px;
  --font-head: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
}

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

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

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(6%, -4%) scale(1.02); }
  66% { transform: translate(-4%, 5%) scale(0.98); }
}

@keyframes floatSlow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-3%, 3%); }
}

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

@keyframes btnShine {
  from { transform: translateX(-100%) skewX(-12deg); }
  to { transform: translateX(200%) skewX(-12deg); }
}

@keyframes heroImageFade {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroIllustrationFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes planeFly {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  50% { transform: translate(4px, -6px) scale(1.05); opacity: 1; }
}

@keyframes iconPop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pinBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.1); }
}

@keyframes flagWave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.02); }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Hero --- */
.hero {
  position: relative;
  padding: clamp(3rem, 10vw, 5rem) 1.5rem clamp(3rem, 8vw, 4rem);
  text-align: center;
  background: var(--bg-hero);
  color: var(--text-hero);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 136, 204, 0.14), transparent 50%),
    radial-gradient(ellipse 60% 40% at 80% 100%, rgba(184, 134, 11, 0.1), transparent 45%);
  pointer-events: none;
  z-index: 1;
}

.hero-parallax {
  position: absolute;
  inset: -20%;
  z-index: 0;
  will-change: transform;
  transition: transform 0.1s linear;
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: float 18s ease-in-out infinite;
}

.hero-blob-1 {
  width: 280px;
  height: 280px;
  background: rgba(0, 136, 204, 0.25);
  top: 10%;
  left: 10%;
  animation-duration: 22s;
  animation-delay: 0s;
}

.hero-blob-2 {
  width: 200px;
  height: 200px;
  background: rgba(184, 134, 11, 0.2);
  top: 50%;
  right: 15%;
  animation-duration: 20s;
  animation-delay: -5s;
}

.hero-blob-3 {
  width: 160px;
  height: 160px;
  background: rgba(0, 136, 204, 0.15);
  bottom: 20%;
  left: 20%;
  animation: floatSlow 25s ease-in-out infinite;
}

.hero-blob-4 {
  width: 120px;
  height: 120px;
  background: rgba(184, 134, 11, 0.15);
  top: 30%;
  right: 30%;
  animation-duration: 16s;
  animation-delay: -8s;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black 20%, transparent 70%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 36rem;
  margin: 0 auto;
}

.hero-visual {
  margin-bottom: 1.5rem;
  padding: 0 1rem;
}

.hero-illustration {
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto;
  display: block;
  opacity: 0;
  animation: heroImageFade 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.hero-illustration .hero-illus-phone {
  animation: heroIllustrationFloat 4s ease-in-out infinite;
  transform-origin: center bottom;
}

.hero-illustration .hero-illus-bubbles {
  opacity: 0.9;
}

.hero-illustration .hero-illus-plane {
  animation: planeFly 2.5s ease-in-out infinite;
  transform-origin: center center;
  animation-delay: 0.5s;
}

.logo {
  margin: 0 0 0.75rem;
  font-family: var(--font-head);
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  opacity: 0;
  animation: heroFadeIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s forwards;
}

.tagline {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 400;
  opacity: 0;
  animation: heroFadeIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
}

.logo span {
  background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Main content --- */
main {
  flex: 1;
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem clamp(3rem, 8vw, 5rem);
  width: 100%;
}

.section-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-warm);
  margin-bottom: 0.5rem;
}

.intro h2,
.countries h2 {
  margin: 0 0 1rem;
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 1.875rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* --- Reveal on scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

.reveal[data-reveal-delay="0"].in-view { transition-delay: 0.1s; }
.reveal[data-reveal-delay="1"].in-view { transition-delay: 0.2s; }
.reveal[data-reveal-delay="2"].in-view { transition-delay: 0.3s; }

/* --- Intro visual (icons) --- */
.intro-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.intro-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  color: var(--accent);
  opacity: 0;
  transform: translateY(16px);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.reveal.in-view .intro-icon-post {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.15s;
  animation: iconPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

.reveal.in-view .intro-icon-find {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.35s;
  animation: iconPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s both;
}

.intro-icon-wrap svg {
  width: 40px;
  height: 40px;
}

.intro-icon-wrap span {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.intro-arrow {
  font-size: 1.25rem;
  color: var(--accent-warm);
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.reveal.in-view .intro-arrow {
  opacity: 1;
  transform: translateX(0);
  transition-delay: 0.25s;
}

.intro-icon-wrap:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

@media (max-width: 480px) {
  .intro-visual {
    gap: 0.75rem;
  }
  .intro-icon-wrap {
    padding: 0.75rem 1rem;
  }
  .intro-icon-wrap svg {
    width: 32px;
    height: 32px;
  }
}

.intro {
  margin-bottom: 3rem;
}

.intro p {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--text-muted);
  max-width: 42ch;
}

/* --- Country cards --- */
.countries h2 {
  margin-bottom: 1.5rem;
}

.country-cards {
  display: grid;
  gap: 1.5rem;
}

.country-card {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s ease;
}

.country-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 136, 204, 0.2);
}

.country-card:hover .country-pin {
  animation: pinBounce 0.5s ease;
}

.country-card:hover .country-flag {
  animation: flagWave 1.5s ease-in-out infinite;
}

.country-visual {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.country-flag {
  width: 48px;
  height: auto;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.country-pin {
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
  transition: transform 0.3s ease;
}

.country-card h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.country-label {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.country-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
}

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

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

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%) skewX(-12deg);
  transition: transform 0.6s ease;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 136, 204, 0.35);
}

.btn-primary:hover::after {
  animation: btnShine 0.7s ease forwards;
}

/* --- Footer --- */
.footer {
  padding: 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--text-muted);
  background: var(--bg-hero);
  color: rgba(255, 255, 255, 0.7);
}

.footer-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: #fff;
}

@media (min-width: 640px) {
  .country-cards {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (min-width: 768px) {
  .hero {
    padding-top: clamp(4rem, 12vw, 6rem);
    padding-bottom: clamp(3.5rem, 10vw, 5rem);
  }
}
