/* Imagine Your Weekend – Eurojackpot inner page.
   Design canvas 1920x1200; sizes below scale from it via vw with clamps. */

/* Brand font (Cera GR). Both files report weight 400 internally, so weights are set here. */
@font-face {
  font-family: "Cera GR";
  src: url("../fonts/CeraGR-Medium.woff2") format("woff2"), url("../fonts/CeraGR-Medium.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Cera GR";
  src: url("../fonts/CeraGR-Black.woff2") format("woff2"), url("../fonts/CeraGR-Black.woff") format("woff");
  font-weight: 900;
  font-display: swap;
}

:root {
  --ej-font: "Cera GR", "Helvetica Neue", Arial, sans-serif;
  --ej-yellow: #fbc400;
  --ej-ink: #000;
  --ej-white: #fff;
  --ej-ink-soft: #231f20;
  --ej-gold: #ebcc66;
  --ej-rim: #f0c517;
  --ej-card: #69451b;
  --ej-card-hi: #8b6026;
  --ej-wheel-size: clamp(280px, 30vw, 620px);
}

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

html, body { margin: 0; }

body {
  font-family: var(--ej-font);
  color: var(--ej-white);
  background: #8a4a06;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Stage / backgrounds ---------- */

.ej-stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(24px, 4vw, 80px) 16px;
  overflow: hidden;
  background-color: #b5760a;
  background-size: cover;
  background-position: center top;
}

.ej-stage--dots {
  background-image:
    url("../assetsv2/BANNER_1420x275px_FINAL_02-08.jpg"),
    radial-gradient(ellipse at 50% 35%, #e9b80c 0%, #c98a06 45%, #a14d02 100%);
}

/* ---------- Intro ---------- */

.ej-intro {
  width: 100%;
  max-width: 1300px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(24px, 5vw, 100px);
}

.ej-intro__text { max-width: 38em; }

.ej-title {
  margin: 0 0 .35em;
  font-size: clamp(2.5rem, 3.6vw, 4.5rem);
  font-weight: 900;
  line-height: 1;
  color: var(--ej-yellow);
  -webkit-text-stroke: .12em var(--ej-ink);
  paint-order: stroke fill;
  text-shadow: 0 .06em .1em rgb(0 0 0 / .35);
}

.ej-lead {
  margin: 0 0 1em;
  font-size: clamp(1.1rem, 1.45vw, 1.75rem);
  font-weight: 900;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgb(0 0 0 / .45);
}
.ej-lead strong {
  display: block;
  font-size: 1.28em;
}

.ej-copy {
  margin: 0;
  max-width: 24em;
  font-size: clamp(1rem, 1.25vw, 1.5rem);
  font-weight: 500;
  line-height: 1.25;
  text-shadow: 0 1px 4px rgb(0 0 0 / .45);
}

/* ---------- Wheel ---------- */

.ej-wheel {
  position: relative;
  width: var(--ej-wheel-size);
  aspect-ratio: 1;
  filter: drop-shadow(0 1.2vw 2.2vw rgb(105 47 42 / .7)); /* tone of assets/SHADOW.png */
}

.ej-wheel__btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: pointer;
}
.ej-wheel__btn:disabled { cursor: default; }
.ej-wheel__btn:focus-visible { outline: 4px solid var(--ej-white); outline-offset: 6px; }

/* viewBox leaves headroom above the rim for the pointer; overflow guards its flick. */
.ej-wheel__svg { display: block; width: 100%; height: 100%; overflow: visible; }


.ej-rim-edge { fill: url(#ej-g-rim); }
.ej-rim { fill: var(--ej-rim); }
.ej-rim-bulbs { fill: url(#ej-g-bulb); }
.ej-seg-base { fill: #f9ec31; }
.ej-seg-band { fill: none; stroke: #b4641e; stroke-width: 10; mix-blend-mode: multiply; opacity: .45; }
.ej-seg-line { fill: none; stroke: #c86400; stroke-width: 3; mix-blend-mode: multiply; opacity: .7; }
/* Multiply drops the gradient's white edge, leaving only a soft shadow (as in TROXOS.svg). */
.ej-hub__shadow { mix-blend-mode: multiply; opacity: .6; }
.ej-hub__core { fill: #404041; }
.ej-wheel__btn:hover .ej-hub__core,
.ej-wheel__btn:focus-visible .ej-hub__core { fill: #5a5a5c; }

.ej-seg text {
  font-family: var(--ej-font);
  font-size: 30px;
  font-weight: 900;
  fill: var(--ej-white);
  text-anchor: middle;
  filter: url(#ej-f-text);
}

.ej-pointer polygon {
  fill: var(--ej-ink-soft);
  stroke: var(--ej-ink-soft);
  stroke-width: 2;
  stroke-linejoin: round;
}

/* ---------- Result card ---------- */

/* Native <dialog>: top layer over the wheel page, Esc closes it. */
.ej-results {
  width: clamp(360px, 32vw, 610px);
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  overflow: visible;
}
.ej-results[open] { animation: ej-pop .35s cubic-bezier(.2, 1.2, .4, 1); }
.ej-results::backdrop {
  background: rgb(30 10 0 / .65);
  backdrop-filter: blur(2px);
}
@keyframes ej-pop {
  from { opacity: 0; transform: scale(.85); }
}

/* Centred on the card's top-right corner arc (radius 14.6% / 16.4%: the arc's
   45° point sits 4.3% in from the right, 4.8% down from the top), so the
   rounded corner cuts the button in half. */
.ej-close {
  position: absolute;
  z-index: 1;
  top: 4.8%;
  right: 4.3%;
  translate: 50% -50%;
  display: grid;
  place-items: center;
  width: clamp(34px, 2.2vw, 42px);
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid var(--ej-gold);
  border-radius: 50%;
  background: var(--ej-ink-soft);
  box-shadow: 0 2px 6px rgb(0 0 0 / .4);
  cursor: pointer;
  transition: transform .2s, background-color .2s;
}
.ej-close svg {
  width: 45%;
  fill: none;
  stroke: var(--ej-white);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.ej-close:hover, .ej-close:focus-visible { background: #404041; transform: rotate(90deg); }
.ej-close:focus-visible { outline: 3px solid var(--ej-white); outline-offset: 2px; }

.ej-card {
  width: 100%;
  padding: clamp(32px, 3.6vw, 64px) clamp(24px, 3.4vw, 64px);
  /* Matches the baked corners of BACKGROUND_01.png (650x580) so the shadow follows them. */
  border-radius: 14.6% / 16.4%;
  background: var(--ej-card) url("../assets/BACKGROUND_01.png") center / 100% 100% no-repeat;
  box-shadow: 1vw 1.4vw 2.4vw rgb(40 15 0 / .55);
  text-align: center;
  text-shadow: 0 2px 4px rgb(0 0 0 / .35);
}

.ej-card__kicker {
  margin: 0 0 .9em;
  font-size: clamp(1.15rem, 1.67vw, 2rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.ej-card__title {
  margin: 0 0 .45em;
  font-size: clamp(2rem, 2.65vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.ej-card__text {
  margin: 0 0 1.2em;
  font-size: clamp(1rem, 1.15vw, 1.375rem);
  font-weight: 500;
  line-height: 1.1;
}

/* Button artwork (pill + arrow badge) is BUTTON.svg; the label sits over the pill part. */
.ej-cta {
  display: inline-flex;
  align-items: center;
  --w: clamp(190px, 12vw, 240px);
  width: var(--w);
  aspect-ratio: 269 / 86.2; /* BUTTON.svg width/height attrs */
  padding: 0 calc(var(--w) * .27) 0 calc(var(--w) * .1);
  white-space: nowrap;
  background: url("../assets/BUTTON.svg") center / contain no-repeat;
  color: #231f20;
  font-size: clamp(.95rem, 1vw, 1.2rem);
  font-weight: 900;
  line-height: 1;
  justify-content: center;
  text-decoration: none;
  text-shadow: none;
  transition: filter .2s, transform .2s;
}
.ej-cta:hover, .ej-cta:focus-visible { filter: brightness(1.08); transform: translateY(-1px); }

/* ---------- Cookie consent ---------- */

/* Both choices look the same on purpose (rejecting as easy as accepting). */
.ej-consent {
  position: fixed;
  z-index: 10;
  left: 50%;
  bottom: 16px;
  translate: -50% 0;
  width: min(960px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 16px 24px;
  padding: 16px 20px;
  border: 2px solid var(--ej-gold);
  border-radius: 14px;
  background: rgb(35 31 32 / .96);
  box-shadow: 0 8px 24px rgb(0 0 0 / .45);
  color: var(--ej-white);
}
.ej-consent[hidden] { display: none; }

.ej-consent__text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}
.ej-consent__text a { color: var(--ej-gold); }

.ej-consent__actions {
  display: flex;
  flex: none;
  gap: 10px;
}

.ej-consent__btn {
  min-width: 120px;
  padding: 10px 16px;
  border: 2px solid var(--ej-gold);
  border-radius: 999px;
  background: var(--ej-gold);
  color: var(--ej-ink-soft);
  font: 900 14px/1 var(--ej-font);
  cursor: pointer;
  transition: filter .2s;
}
.ej-consent__btn:hover, .ej-consent__btn:focus-visible { filter: brightness(1.1); }
.ej-consent__btn:focus-visible { outline: 3px solid var(--ej-white); outline-offset: 2px; }

/* Sits in the stage's bottom padding. */
.ej-consent-settings {
  position: absolute;
  left: 50%;
  bottom: 6px;
  translate: -50% 0;
  padding: 2px 4px;
  border: 0;
  background: none;
  color: rgb(255 255 255 / .75);
  font: 500 12px/1.2 var(--ej-font);
  text-decoration: underline;
  cursor: pointer;
}
.ej-consent-settings:hover, .ej-consent-settings:focus-visible { color: var(--ej-white); }

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .ej-intro {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .ej-copy { margin-inline: auto; }
  .ej-consent { flex-direction: column; align-items: stretch; }
  .ej-consent__btn { flex: 1; }
  :root { --ej-wheel-size: min(86vw, 420px); }
  /* Square artboard suits portrait screens better than the 16:10 one. */
  .ej-stage--dots {
    background-image:
      url("../assetsv2/BANNER_1420x275px_FINAL_02-05.jpg"),
      radial-gradient(ellipse at 50% 35%, #e9b80c 0%, #c98a06 45%, #a14d02 100%);
  }
}
