/* =============================================================
   My Big Fat Greek Festival — a little mobile newspaper.
   Classic Greek blue + white. Self-contained (no QRcade tokens).
   ============================================================= */
:root {
  --blue: #0b4ea2;
  --blue-deep: #08366f;
  --blue-bright: #1469c7;
  --white: #ffffff;
  --paper: #f7f9fc;
  --ink: #0a2342;
  --ink-soft: #3a5478;
  --rule: #0b4ea2;
  --serif-display: "Playfair Display", Georgia, serif;
  --serif-body: "PT Serif", Georgia, serif;

  /* Greek fret band, tiled. */
  --greek-key: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Crect width='24' height='24' fill='%230b4ea2'/%3E%3Cpath d='M0 6 H18 V24 M6 0 V18 H24' fill='none' stroke='%23fff' stroke-width='2.5'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  margin: 0;
  background: var(--blue);
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--blue);
  /* subtle paper texture via faint diagonal */
  font-family: var(--serif-body);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding: 16px 12px calc(env(safe-area-inset-bottom) + 22px);
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

/* The newspaper sheet */
.paper {
  width: 100%;
  max-width: 560px;
  background: var(--paper);
  border: 3px solid var(--blue-deep);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  padding: 18px 16px 20px;
}

/* ---- Masthead ---------------------------------------------- */
.masthead { text-align: center; }
.masthead-dateline {
  display: flex;
  justify-content: space-between;
  font-family: var(--serif-body);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 6px;
}
.masthead-title {
  font-family: var(--serif-display);
  font-weight: 900;
  color: var(--blue);
  margin: 12px 0 8px;
  text-transform: uppercase;
}
.masthead-title-line {
  display: block;
  line-height: 0.88;
  white-space: nowrap;
}
.masthead-title-line--top {
  font-size: clamp(30px, 8.1vw, 55px);
  letter-spacing: 0.018em;
}
.masthead-title-line--bottom {
  font-size: clamp(31px, 8.4vw, 57px);
  letter-spacing: 0.034em;
}
.masthead-sub {
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0 0 12px;
}

/* Greek fret rule */
.greek-key {
  height: 16px;
  background-image: var(--greek-key);
  background-repeat: repeat-x;
  background-size: auto 100%;
  border-top: 2px solid var(--blue-deep);
  border-bottom: 2px solid var(--blue-deep);
}

/* ---- Generic story block ----------------------------------- */
.story { margin-top: 18px; }
.kicker {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  text-align: center;
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--rule);
}
.caption {
  font-size: 12.5px;
  font-style: italic;
  color: var(--ink-soft);
  text-align: center;
  margin: 8px 0 0;
}

/* ---- Video ------------------------------------------------- */
.video-frame {
  border: 2px solid var(--blue-deep);
  background: var(--blue);
  line-height: 0;
  padding: 8px;
}
.video-frame-title {
  position: relative;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: clamp(18px, 5.3vw, 27px);
  line-height: 1.16;
  color: var(--white);
  font-style: italic;
  text-align: center;
  margin: 0 0 8px;
  padding: 12px 10px 13px;
  border: 2px solid var(--white);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.12), rgba(255,255,255,0), rgba(255,255,255,0.12)),
    var(--blue);
  letter-spacing: 0.015em;
}
.video-frame-title::before,
.video-frame-title::after {
  content: "";
  display: block;
  height: 8px;
  margin: 0 0 9px;
  background-image: var(--greek-key);
  background-size: auto 100%;
  background-repeat: repeat-x;
  border-top: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}
.video-frame-title::after {
  margin: 10px 0 0;
}
.video-window {
  position: relative;
  background: #000;
  border: 2px solid var(--white);
  padding: 5px 5px 17px;
}
.video-window::before {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  top: 5px;
  right: 5px;
  bottom: 17px;
  left: 5px;
  border: 2px solid var(--white);
}
.video-window::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  height: 8px;
  background-image: var(--greek-key);
  background-size: auto 100%;
  background-repeat: repeat-x;
  border-top: 1px solid var(--white);
  border-bottom: 1px solid var(--white);
}
.video-frame video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.video-frame video::-webkit-media-controls-start-playback-button {
  display: none !important;
  -webkit-appearance: none;
}
.video-play {
  appearance: none;
  position: absolute;
  z-index: 2;
  top: calc(50% - 6px);
  left: 50%;
  width: clamp(54px, 16vw, 82px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 3px solid var(--white);
  border-radius: 50%;
  background: rgba(11, 78, 162, 0.86);
  box-shadow: 0 4px 0 var(--blue-deep), 0 0 0 4px rgba(255,255,255,0.16);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.16s ease;
}
.video-play span {
  display: block;
  width: 0;
  height: 0;
  margin-left: 6%;
  border-top: clamp(13px, 3.8vw, 19px) solid transparent;
  border-bottom: clamp(13px, 3.8vw, 19px) solid transparent;
  border-left: clamp(20px, 5.8vw, 30px) solid var(--white);
}
.video-play:hover { filter: brightness(1.08); }
.video-play:active { transform: translate(-50%, calc(-50% + 2px)); }
.video-play:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 4px;
}
.video-play.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

/* ---- Two-column row ---------------------------------------- */
.two-col {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.col-box {
  margin-top: 0;
  border: 2px solid var(--blue-deep);
  background: var(--white);
  padding: 12px 12px 14px;
}

/* ---- Flip book --------------------------------------------- */
.flipbook { display: flex; flex-direction: column; gap: 10px; }
.flipcard {
  perspective: 900px;
  cursor: pointer;
  min-height: 168px;
}
.flipcard-inner {
  position: relative;
  width: 100%;
  min-height: 168px;
  transition: transform 0.5s cubic-bezier(.2,.7,.3,1);
  transform-style: preserve-3d;
}
.flipcard.is-flipped .flipcard-inner { transform: rotateY(180deg); }
.flipcard-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 12px 10px;
  border: 2px solid var(--blue);
}
.flipcard-front { background: var(--paper); }
.flipcard-back { background: var(--blue); transform: rotateY(180deg); }
.flipcard-back .flip-label,
.flipcard-back .flip-text,
.flipcard-back .flip-hint { color: var(--white); }
.flip-label {
  font-family: var(--serif-display);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.flip-text {
  font-family: var(--serif-body);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  margin: 0;
}
.flip-hint { font-size: 10px; font-style: italic; opacity: 0.7; }

.flip-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.flip-count {
  font-family: var(--serif-display);
  font-size: 13px;
  color: var(--ink-soft);
}
.paper-btn {
  appearance: none;
  font-family: var(--serif-display);
  font-size: 20px;
  line-height: 1;
  font-weight: 700;
  color: var(--blue);
  background: var(--white);
  border: 2px solid var(--blue);
  width: 40px;
  height: 36px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.paper-btn:hover { background: var(--blue); color: var(--white); }
.paper-btn:active { transform: translateY(1px); }

/* ---- The Raffler: a pulled gradient meter ------------------ */
.raffle { display: flex; flex-direction: column; gap: 12px; text-align: center; }

/* The full white→blue→red gradient lives on the track; a cover hides the
   un-pulled remainder from the right, so the gradient is revealed
   left→right and the red end only shows when pulled all the way. */
.thermo {
  position: relative;
  width: 100%;
  height: 28px;
  border: 2px solid var(--blue-deep);
  overflow: hidden;
  background: linear-gradient(90deg,
    #ffffff 0%, var(--blue-bright) 34%, var(--blue) 60%, #c8262f 100%);
}
.thermo-cover {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 100%;                 /* starts fully covered (empty) */
  background: #e4eaf2;
  border-left: 2px solid var(--blue-deep);   /* the moving fill head */
  transition: width 1.1s cubic-bezier(.2,.7,.3,1);
}

/* Static stakes scale: small $ → rising line → big $$$ */
.raffle-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}
.scale-cash {
  font-family: var(--serif-display);
  font-weight: 900;
  color: var(--blue);
  line-height: 1;
  flex: 0 0 auto;
}
.scale-cash--sm { font-size: 13px; opacity: 0.65; }
.scale-cash--lg { font-size: 21px; }
.scale-line { flex: 1 1 auto; min-width: 0; display: block; }
.scale-line svg { display: block; width: 100%; height: auto; }

.raffle-incentive {
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.28;
  color: var(--ink);
  margin: 2px 0 0;
  min-height: 1.2em;
}
.raffle-updated {
  font-size: 11px;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0;
}

/* ---- Poll / interactions ----------------------------------- */
.poll { text-align: center; }
.poll-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.poll-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 3px;
  font-family: var(--serif-body);
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: var(--white);
  border: 2px solid var(--blue);
  cursor: pointer;
  transition: transform 0.08s ease, background 0.14s ease, color 0.14s ease;
}
.poll-btn:hover { background: #eaf2fb; }
.poll-btn:active { transform: translateY(1px); }
.poll-btn.is-on { background: var(--blue); color: var(--white); }
.poll-btn:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; }
.poll-icon { width: 42px; height: 42px; }
.poll-icon svg { width: 100%; height: 100%; display: block; }
.poll-label { line-height: 1.1; text-align: center; white-space: nowrap; font-size: 10px; letter-spacing: -0.1px; }
.poll-count { font-family: var(--serif-display); font-variant-numeric: tabular-nums; font-size: 14px; }

.share-btn {
  margin-top: 16px;
  width: 100%;
  appearance: none;
  font-family: var(--serif-body);
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  background: var(--blue);
  border: 2px solid var(--blue-deep);
  padding: 14px 24px;
  cursor: pointer;
  transition: filter 0.14s ease, transform 0.08s ease;
}
.share-btn:hover { filter: brightness(1.08); }
.share-btn:active { transform: translateY(1px); }
.share-btn:focus-visible { outline: 3px solid var(--blue-bright); outline-offset: 2px; }

/* ---- Colophon / disclaimer --------------------------------- */
.colophon { margin-top: 24px; }
.colophon .greek-key { margin-bottom: 12px; }
.disclaimer {
  font-size: 11.5px;
  font-style: italic;
  line-height: 1.4;
  color: var(--ink-soft);
  text-align: center;
  margin: 0;
}

/* ---- Desktop ----------------------------------------------- */
@media (min-width: 720px) {
  .paper { max-width: 640px; padding: 26px 26px 28px; }
  .flip-text { font-size: 17px; }
  .masthead-sub { font-size: 17px; }
}
