/* ─── CSS Variables ─── */
:root {
  --cyan:    #00AEC7;
  --purple:  #4C0045;
  --gold:    #d3bc8d;
  --offwhite: rgb(227,228,220);
  --dark:    rgb(29,29,27);
  --wine:    rgb(63,0,55);

  --heading-font: 'Libre Franklin', 'Franklin Gothic Medium', 'Arial Narrow', sans-serif;
  --body-font:    'Cabin', 'Corbel', Calibri, 'Trebuchet MS', sans-serif;
}

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

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: var(--body-font);
  color: var(--offwhite);
}

/* ─── Background ─── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url('https://vandemoortele.getbynder.com/transform/ce3bc31d-c090-4159-ae34-139b7a3c077b/20260402120000?io=transform:fill,width:1280,height:960');
  background-size: cover;
  background-position: center;
}

/* Dark gradient overlay — heavier at bottom, lighter at top */
.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      160deg,
      rgba(63,0,55,0.72) 0%,
      rgba(29,29,27,0.55) 40%,
      rgba(0,174,199,0.18) 100%
    );
}

/* ─── Page wrapper ─── */
.page {
  position: relative;
  z-index: 1;
  height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 1.25rem 2.5rem;
}

/* ─── Logo ─── */
.logo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  animation: fadeDown 0.9s ease both;
}
.logo-wrap img {
  width: clamp(140px, 40vw, 220px);
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.4));
}

/* ─── Middle content ─── */
.content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  animation: fadeUp 1s 0.2s ease both;
}

/* Thin decorative rule */
.rule {
  width: 48px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.eyebrow {
  font-family: var(--body-font);
  font-size: clamp(0.65rem, 2.2vw, 0.8rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.9;
}
.eyebrow span { white-space: nowrap; }

h1 {
  font-family: var(--heading-font);
  font-weight: 900;
  font-size: clamp(1.9rem, 7vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--offwhite);
  text-shadow: 0 2px 24px rgba(0,0,0,0.5);
  max-width: 15ch;
}

h1 span {
  color: var(--cyan);
}

.subtitle {
  font-family: var(--body-font);
  font-size: clamp(0.85rem, 3vw, 1.05rem);
  line-height: 1.6;
  color: var(--offwhite);
  opacity: 0.82;
  max-width: 38ch;
}

/* ─── Language Cards ─── */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  width: 100%;
  max-width: 420px;
  animation: fadeUp 1s 0.45s ease both;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.4rem 1rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}

/* subtle inner highlight */
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.01) 100%);
  pointer-events: none;
}

.card-en {
  background: rgba(0,174,199,0.18);
}
.card-es {
  background: rgba(76,0,69,0.28);
}
.card-pl {
  background: rgba(220, 20, 60, 0.18);
}
.card-cz {
  background: rgba(17, 16, 122, 0.18);
}

.card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.card-flag {
  font-size: 1.8rem;
  line-height: 1;
}

.card-flag svg {
  height: 42px;
  width: 42px;
}

.card-lang {
  font-family: var(--heading-font);
  font-weight: 900;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--offwhite);
}

.card-label {
  font-family: var(--body-font);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.7;
  color: var(--offwhite);
}

.card-arrow {
  margin-top: 0.35rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.card:hover .card-arrow {
  background: var(--cyan);
  border-color: var(--cyan);
}

.card-es:hover .card-arrow {
  background: var(--gold);
  border-color: var(--gold);
}

.card-pl:hover .card-arrow {
  background: #dc143c;
  border-color: #dc143c;
}

.card-cz:hover .card-arrow {
  background: #11107a;
  border-color: #11107a;
}

.card-arrow svg {
  width: 12px;
  height: 12px;
  stroke: var(--offwhite);
  fill: none;
}

/* ─── Footer Wrapper ─── */
.footer-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.footer {
  font-family: var(--body-font);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(227,228,220,0.4);
  text-transform: uppercase;
  text-align: center;
  animation: fadeUp 1s 0.65s ease both;
  margin: 0;
}

/* ─── Country Switcher Button ─── */
.country-switcher {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 174, 199, 0.25);
  border: 1px solid rgba(0, 174, 199, 0.5);
  color: var(--offwhite);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  animation: fadeUp 1s 0.65s ease both;
  padding: 0;
  font-family: inherit;
}

.country-switcher:hover {
  background: rgba(0, 174, 199, 0.4);
  border-color: var(--cyan);
  transform: scale(1.1);
}

/* ─── Country Modal ─── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: rgba(76, 0, 69, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  backdrop-filter: blur(20px);
  animation: slideUp 0.3s ease;
}

.modal-content h2 {
  color: var(--offwhite);
  margin-bottom: 1.5rem;
  font-family: var(--heading-font);
  font-size: 1.8rem;
}

.country-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.country-btn {
  padding: 1rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: rgba(0, 174, 199, 0.2);
  color: var(--offwhite);
  font-family: var(--body-font);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.country-btn:hover {
  background: rgba(0, 174, 199, 0.4);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.country-btn:active {
  transform: translateY(0);
}

/* ─── Animations ─── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-18px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

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

/* ─── Desktop tweaks ─── */
@media (min-width: 640px) {
  .page {
    padding: 3rem 2rem 2.5rem;
  }
  .cards {
    max-width: 480px;
    gap: 1.1rem;
  }
  .card {
    padding: 1.8rem 1.5rem 1.5rem;
  }
  .card-lang {
    font-size: 1.2rem;
  }
}

@media (min-width: 1024px) {
  .logo-wrap img {
    width: 300px;
  }
  h1 {
    font-size: clamp(3rem, 4.5vw, 4.5rem);
  }
}