/* ============================================================================
   MYNT GATE — Styles
   ----------------------------------------------------------------------------
   Every class is prefixed with "mynt-", so nothing here can clash with the
   site's own CSS. Redesign the site freely; this file stays as it is.

   To restyle, change the variables below.
   ============================================================================ */

:root {
  --mynt-teal:      #3fbfb0;
  --mynt-teal-dark: #0d2b28;
  --mynt-ink:       #111111;
  --mynt-white:     #ffffff;

  --mynt-font: 'Aristotelica', 'Poppins', sans-serif;

  /* Separate font for digits — see the DIGITS section below */
  --mynt-font-num: 'Poppins', 'Century Gothic', 'Segoe UI', Arial, sans-serif;

  /* Country screen background (path relative to this file) */
  --mynt-gate-bg: url('../images/background.png');
}

/* Stop the page behind from scrolling while the gate is open */
html.mynt-locked,
html.mynt-locked body {
  overflow: hidden !important;
}

/* =========================================================== COUNTRY SCREEN */

#mynt-gate {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 90px;
  overflow-y: auto;
  background: var(--mynt-teal-dark);
  font-family: var(--mynt-font);
}

#mynt-gate.is-open { display: flex; }

#mynt-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--mynt-gate-bg) center / cover no-repeat;
  opacity: 0.9;
}

/* Diagonal shading over the background */
#mynt-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(107deg,
      rgba(13, 43, 40, 0.10) 0 44%,
      rgba(13, 43, 40, 0.72) 44% 100%);
}

.mynt-gate__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  text-align: center;
  animation: mynt-rise 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

@keyframes mynt-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

.mynt-gate__logo {
  width: 240px;
  max-width: 55%;
  height: auto;
  display: block;
  margin: 0 auto 3.5rem;
}

.mynt-gate__title {
  margin: 0 0 1.25rem;
  color: var(--mynt-white);
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 400;
  line-height: 1.15;
}

.mynt-gate__text {
  max-width: 30em;
  margin: 0 auto;
  color: var(--mynt-white);
  font-size: clamp(1rem, 2vw, 1.15rem);
  font-weight: 300;
  line-height: 1.6;
  opacity: 0.92;
}

.mynt-gate__legal {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
  padding: 14px 24px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--mynt-white);
  font-size: clamp(0.7rem, 1.6vw, 0.85rem);
  font-weight: 600;
  line-height: 1.45;
  text-align: center;
}

/* ---------------------------------------------------------- country list */

.mynt-country-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 32px;
  max-width: 560px;
  margin: 3rem auto 0;
  padding: 0;
  list-style: none;
}

.mynt-country {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--mynt-white);
  font: inherit;
  font-size: clamp(1rem, 2vw, 1.25rem);
  text-align: left;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.mynt-country:hover,
.mynt-country:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(4px);
}

.mynt-country:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* object-fit lets flags of any aspect ratio — SVG or PNG — crop cleanly
   into the circle, so the colours and stripe widths stay correct. */
.mynt-country img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85),
              0 3px 12px rgba(0, 0, 0, 0.35);
}

/* =============================================================== AGE POPUP */

#mynt-age {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.7);
  font-family: var(--mynt-font);
}

#mynt-age.is-open { display: flex; }

/* Width knob for the popup — change these two values to taste.
   Remove both and it falls back to sizing itself to its content. */
.mynt-age__box {
  width: 70%;
  max-width: 900px;
  max-height: 100vh;
  overflow-y: auto;
  padding: 30px 30px;
  background: var(--mynt-white);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  text-align: center;
}

.mynt-age__logo {
  display: block;
  width: 40%;
  height: auto;
  margin: 0 auto;
}

.mynt-age__title {
  margin: 2rem 0 0;
  color: var(--mynt-teal);
  font-size: 3.5rem;
  font-weight: bold;
  line-height: 100%;
  text-transform: uppercase;
}

.mynt-age__desc {
  width: 70%;
  margin: 1.5rem auto 0;
  color: #000000;
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.35;
}

.mynt-age__desc b { font-weight: 700; }

/* A 50%-wide row with the two buttons at 40% each, spread with space-around.
   min-width: fit-content lets the row grow when a translation is long
   (Polish is the widest), so the buttons stay side by side instead of
   wrapping. If they do wrap on a narrow screen, gap keeps them apart. */
.mynt-age__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: stretch;
  gap: 1rem 1.5rem;
  width: 50%;
  min-width: fit-content;
  max-width: 100%;
  margin: 1.5rem auto 0;
}

.mynt-btn {
  flex: 0 1 auto;
  width: 40%;
  min-width: max-content;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 100px;
  background: #000000;
  color: var(--mynt-white);
  font: inherit;
  font-size: 1.15rem;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.mynt-btn:hover { opacity: 0.8; }
.mynt-btn:focus-visible { outline: 2px solid var(--mynt-teal); outline-offset: 3px; }

.mynt-age__note {
  width: 80%;
  margin: 2rem auto 0;
  color: #000000;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.4;
}

.mynt-link {
  margin-top: 1.5rem;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--mynt-teal);
  font: inherit;
  font-size: 0.95rem;
  text-decoration: underline;
  cursor: pointer;
}

/* ================================================================== DIGITS
   The Aristotelica TRIAL font maps digits to a "ZETAFONTS.COM" watermark
   glyph, and because a glyph exists the browser never falls back on its own.
   gate.js wraps every run of digits in this span so the font can be
   overridden just there.

   Once a licensed font is in place:
     1. set fixDigits: false in config.js
     2. delete this rule
   ========================================================================= */

.mynt-num {
  font-family: var(--mynt-font-num) !important;
  letter-spacing: 0.01em;
}

/* Elements whose text is rewritten by JS on every frame — the animated
   counters — lose the wrapper span, so they get the numeric font directly.
   Add any other site selectors of that kind here. */
.count-number,
.count-title {
  font-family: var(--mynt-font-num) !important;
}

/* ================================================================== MOBILE
   Breakpoints match the ones the site's own stylesheet already uses.
   ========================================================================= */

/* Tablets in landscape and small desktops — matches the site's 1024–1399 rules */
@media (min-width: 1024px) and (max-width: 1399px) {
  .mynt-age__title { font-size: 3rem; }
  .mynt-age__desc  { width: 60%; }
  .mynt-age__note  { width: 60%; }
}

@media (max-width: 767px) {
  #mynt-gate { padding: 32px 18px 100px; align-items: flex-start; }
  .mynt-gate__logo { margin-bottom: 2.25rem; }

  .mynt-country-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    gap: 2px;
    margin-top: 2rem;
  }
  .mynt-country img { width: 40px; height: 40px; flex: 0 0 40px; }

  .mynt-age__box   { max-width: 400px; }
  .mynt-age__logo  { width: 70%; }
  .mynt-age__title { font-size: 2.5rem; }

  /* The original used 60% here, but that was sized for an image of the
     sentence. As live text it needs more room on a 400px box. */
  .mynt-age__desc { width: 85%; font-size: 1.2rem; }
  .mynt-age__note { width: 90%; }

  /* 50% of a 400px box would leave the buttons unusably narrow for text,
     so on small screens they take the full row instead. */
  .mynt-age__actions { width: 100%; justify-content: space-evenly; gap: 0.75rem; }
  .mynt-btn { width: auto; flex: 1 1 auto; padding: 0.75rem 1rem; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .mynt-gate__inner { animation: none; }
  .mynt-country, .mynt-btn { transition: none; }
}
