/* === INTER – SELF HOSTED === */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   LT LASIPRO - LOPULLINEN KORJATTU MOBIILISKAALAUS (VERSIO 7.0)
   ============================================================ */

:root {
  --bg: #f6fbff;
  --text: #07111e;
  --muted: #4a6277;
  --primary: #14a3c7;
  --primary-dark: #0d7d99;
  --radius: 32px;
  --font-main: 'Inter', sans-serif;
}

/* --- PERUSMÄÄRITTELYT --- */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  min-height: 100%;
  background:
    radial-gradient(ellipse 140% 70% at 0% 0%, rgba(235, 240, 250, 0.98) 0%, rgba(215, 225, 242, 0.80) 20%, transparent 62%),
    linear-gradient(165deg, #e2e9f6 0%, #d4dff2 8%, #c0cfec 16%, #8e9ed8 36%, #3a3e92 76%, #1e1e6a 100%);
  background-attachment: fixed;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--text);
  line-height: 1.6;
  background: transparent;
}

/* Pakotus kaikille lomake-elementeille */
button, input, select, textarea, label, span, p {
  font-family: 'Inter', sans-serif !important;
}

/* --- TAUSTA-ANIMAATIOT --- */
body::before, body::after {
  content: ""; position: fixed; border-radius: 50%; filter: blur(100px); z-index: -2; pointer-events: none;
}
body::before { top: -300px; left: -200px; width: 1000px; height: 1000px; background: radial-gradient(circle, rgba(30, 180, 220, 0.65) 0%, transparent 70%); }
body::after { bottom: -300px; right: -200px; width: 1100px; height: 1100px; background: radial-gradient(circle, rgba(10, 140, 190, 0.60) 0%, transparent 70%); }

/* --- PÄÄKORTTI (Glass Shell) --- */
.arvonta-shell {
  max-width: 1000px;
  width: calc(100% - 1.5rem); /* Pieni marginaali sivuille mobiilissa */
  margin: 2rem auto;
  padding: 4rem 2rem;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 253, 255, 0.92) 30%, rgba(218, 240, 255, 0.84) 100%);
  backdrop-filter: blur(56px) saturate(240%) brightness(1.10);
  -webkit-backdrop-filter: blur(56px) saturate(240%) brightness(1.10);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.90), 0 36px 72px rgba(8, 40, 80, 0.13);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- MASSIIVISET OTSIKOT (ETUSIVUN HERO-TYYLI) --- */
h1, .arvonta-hook, .success-box h3 {
  /* Skaalautuva koko: Desktop 5.8rem, Mobiili alkaen 2.2rem */
  font-size: clamp(2.2rem, 11vw, 5.8rem) !important; 
  line-height: 0.9 !important;
  letter-spacing: -0.07em !important; /* Hieman väljempi kuin -0.08 mobiilin takia */
  font-weight: 900 !important;
  margin: 0 auto 1.5rem auto !important;
  color: #07111e !important;
  text-wrap: balance;
  text-align: center;
  width: 100%;
}

.gradient-text {
  background: linear-gradient(to right, #42cbe8, #183f86);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
  padding-right: 0.05em;
}

/* --- COUNTDOWN --- */
.arvonta-countdown-label {
  display: inline-flex;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a6f8a;
  background: rgba(20, 163, 199, 0.12);
  margin-bottom: 0.8rem;
}

.arvonta-countdown-value {
  font-size: clamp(1.6rem, 6vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--text);
}

/* --- LOMAKE JA INPUTIT --- */
.contact-form {
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  text-align: left;
}

label {
  display: block;
  font-weight: 800;
  font-size: 0.9rem;
  color: #3d5a6e;
  margin-bottom: 0.5rem;
}

label .required {
  color: #d93025;
  margin-left: 0.15rem;
}

input:not([type="checkbox"]) {
  width: 100%;
  padding: 1.1rem 1.3rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(235, 247, 255, 0.6) 100%) !important;
  border: 1.5px solid rgba(90, 130, 160, 0.3) !important;
  border-radius: 18px !important;
  font-size: 1rem;
  font-weight: 600 !important;
  color: var(--text);
}

/* --- NAPIT --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 0 2.5rem;
  border-radius: 999px;
  font-weight: 900 !important;
  font-size: 1.1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  color: white !important;
  background: linear-gradient(135deg, #1198ba 0%, #43c9e7 48%, #128fb4 100%) !important;
  box-shadow: 0 12px 30px rgba(20, 163, 199, 0.3);
  width: 100%;
}

.btn-secondary {
  color: var(--text) !important;
  background: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.9) !important;
  min-height: 50px;
}

/* --- REFERRAL-STATUS LAATIKKO --- */
.referral-status {
  margin-top: 2.5rem;
  padding: 2rem 1.5rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  border: 1px solid rgba(20, 163, 199, 0.2);
  font-size: 1.15rem;
  font-weight: 800;
  width: 100%;
}

/* --- ONNISTUMISEN ALENNUSKOODI --- */
.discount-code {
  font-size: clamp(1.8rem, 8vw, 2.5rem);
  font-weight: 950;
  color: var(--primary-dark);
  padding: 1rem 2rem;
  background: white;
  border: 3px dashed var(--primary);
  border-radius: 20px;
}

.referral-wrapper {
  display: flex;
  gap: 10px;
  width: 100%;
  max-width: 500px;
  margin: 1.5rem auto;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- MOBIILIYSTÄVÄLLINEN SKAALAUS (Max 760px) --- */
@media (max-width: 760px) {
  .arvonta-shell {
    padding: 3rem 1.25rem;
    margin: 1rem auto;
  }

  h1, .arvonta-hook, .success-box h3 {
    font-size: 2.2rem !important; /* Estää tekstin menemisen reunojen yli */
    line-height: 1.0 !important;
    letter-spacing: -0.05em !important; /* Hieman väljempi mobiilissa luettavuuden takia */
  }

  .arvonta-countdown-value {
    font-size: 1.7rem;
  }

  .referral-wrapper {
    flex-direction: column;
  }

  .referral-wrapper input {
    width: 100% !important;
    min-width: 0;
    font-size: 0.9rem !important;
  }

  .referral-wrapper .btn {
    width: 100%;
  }

  .discount-code {
    font-size: 1.7rem;
  }
}

@media (max-width: 400px) {
  h1, .arvonta-hook {
    font-size: 1.9rem !important; /* Vielä pienempi kapeimmille puhelimille */
  }
}
.site-footer {
  margin-top: 0;
}

body.arvonta-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.section {
  flex: 1;
}
.arvonta-shell {
  margin: 4rem auto;
}
.arvonta-shell {
  margin: 4rem auto;
}
html, body {
  height: 100%;
}

body.arvonta-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.section {
  flex: 1;
  display: flex;
  align-items: center; /* keskittää pystysuunnassa */
}
body.arvonta-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main.section {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arvonta-shell {
  width: 100%;
  max-width: 900px;
  padding: 4.5rem 3rem;
  margin: 0 auto;
  border-radius: 28px;
}
.arvonta-shell {
  box-shadow: 
    0 20px 60px rgba(16, 35, 51, 0.12),
    0 8px 24px rgba(16, 35, 51, 0.08);
}
body.arvonta-page {
  padding-top: 80px;
}
.referral-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.referral-wrapper input {
  flex: 1;
  min-width: 180px;
}

.referral-wrapper .btn {
  flex: 0 0 auto;
}

body.arvonta-page {
  padding-top: 0 !important;
}

/* ============================================================
   OVERRIDE v8.0 – DESKTOP & MOBILE TWEAKS
   ============================================================ */

/* --- TIMER → OTSIKKO: isompi gap --- */
.arvonta-countdown-value {
  margin-bottom: 1.8rem !important;
  display: block;
}

/* --- OTSIKKO: isompi ja jykevämpää --- */
h1,
.arvonta-hook {
  font-size: clamp(2.4rem, 12vw, 6.8rem) !important;
  font-weight: 950 !important;
  letter-spacing: -0.08em !important;
}

/* --- KAKSI TEKSTIÄ SAMALLE RIVILLE, MOLEMMAT BOLD --- */
.arvonta-sub-texts {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.5rem !important;
  margin-bottom: 1.5rem !important;
}

.arvonta-sub-texts p,
.arvonta-sub-texts span {
  font-weight: 800 !important;
  font-size: 1rem !important;
  margin: 0 !important;
  color: var(--text) !important;
}

/* Pistepilkku / erottaja tekstien väliin */
.arvonta-sub-texts p:first-child::after {
  content: " –";
}

/* ============================================================
   MOBILE OVERRIDES (max 760px)
   Kaikki samat muutokset kuin desktop PAITSI lomake
   ============================================================ */
@media (max-width: 760px) {

  /* Timer gap */
  .arvonta-countdown-value {
    margin-bottom: 1.8rem !important;
  }

  /* Otsikko isompi/jykevämpää mobiilissa */
  h1,
  .arvonta-hook {
    font-size: 2.6rem !important;
    font-weight: 950 !important;
    letter-spacing: -0.06em !important;
  }

  /* Tekstit samalle riville boldina mobiilissa */
  .arvonta-sub-texts {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.4rem !important;
  }

  .arvonta-sub-texts p,
  .arvonta-sub-texts span {
    font-weight: 800 !important;
    font-size: 0.95rem !important;
  }
}

@media (max-width: 400px) {
  h1,
  .arvonta-hook {
    font-size: 2.2rem !important;
    font-weight: 950 !important;
  }
}

.arvonta-heading p{
  margin: 3.1rem auto 1.85rem !important; /* ylä, sivut auto, ala */
}

/* ===== COUNTDOWN: Times Square slide (final, stable) ===== */
.arvonta-countdown-value{
  display: block;                 /* koska haluat margin-bottomin toimivan */
  margin-bottom: 1.8rem !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.1;
}

/* numeropaikka */
.arvonta-countdown-value .cd-slot{
  display: inline-flex;
  position: relative;
  overflow: hidden;

  height: 1em;
  line-height: 1em;
  vertical-align: baseline;

  /* estää 9:n tms leikkautumisen */
  padding-inline: 0.10em;
  box-sizing: content-box;
}

/* lukitse leveys jotta ei “nykäise” */
.arvonta-countdown-value .cd-slot[data-k="h"],
.arvonta-countdown-value .cd-slot[data-k="m"],
.arvonta-countdown-value .cd-slot[data-k="s"]{
  min-width: 2ch;                 /* 00-59 */
  justify-content: flex-end;
}

/* päiville vähän isompi minimi (13 -> 99 ei hyppää) */
.arvonta-countdown-value .cd-slot[data-k="d"]{
  min-width: 2ch;
  justify-content: flex-end;
}

.arvonta-countdown-value .cd-track{
  display: block;
  transform: translateY(0);
  will-change: transform;
  transition: transform 320ms cubic-bezier(.2,.9,.2,1);
}

.arvonta-countdown-value .cd-track > span{
  display: block;
  height: 1em;
  line-height: 1em;
}

.arvonta-countdown-value .cd-track.is-animating{
  transform: translateY(-1em);
}

/* tiivistä countdownin välejä */
.arvonta-countdown-value{
  letter-spacing: -0.04em; /* tiivistää kokonaisuutta */
}

.arvonta-countdown-value .cd-slot{
  padding-inline: 0.06em;  /* oli 0.10em -> vähän tiiviimpi, silti ei crop */
}

/* tiivistä yksikkötekstit (pv, h, min, s) */
.arvonta-countdown-value{
  word-spacing: -0.25em;   /* pienentää nimenomaan välilyöntejä */
}

@media (max-width: 760px) {
  body.arvonta-page h1 {
    font-size: 3.0rem !important; /* nosta/lask e tarpeen mukaan */
    line-height: 0.98 !important;
  }
}

/* FIX: menu stagger for arvonta page (7 nav links) */
@media (max-width: 760px) {
  .site-nav.open a:nth-child(6),
  .site-header.menu-open .site-nav a:nth-child(6) { transition-delay: 0.24s !important; }

  .site-nav.open a:nth-child(7),
  .site-header.menu-open .site-nav a:nth-child(7) { transition-delay: 0.28s !important; }
}