/* ============================================================
   Τι να κάνω; — tinakano.com — style.css
   Light comic / pop-art. Mobile-first, compact, no-scroll.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --cream:       #f6eed6;
  --ink:         #241333;   /* σχεδόν μαύρο-μωβ κείμενο */
  --ink-dim:     #6b5685;
  --purple:      #8a4bb8;
  --purple-soft: #b98fd6;
  --purple-deep: #5a2d7a;
  --yellow:      #f9c826;
  --yellow-soft: #ffe07a;
  --yellow-deep: #e0a800;
  --outline:     #1c1228;   /* comic μαύρο περίγραμμα */
  --line:        rgba(28, 18, 40, 0.18);

  --font-display: "Baloo 2", "Trebuchet MS", sans-serif;
  --font-body:    "Nunito", "Helvetica Neue", Arial, sans-serif;

  --maxw: 600px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }

/* ============================================================
   Splash screen (εμφανίζεται στο άνοιγμα, σβήνει μετά)
   ============================================================ */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: #2a1245;
  opacity: 1;
  transition: opacity 0.5s ease;
}
.splash--hide { opacity: 0; pointer-events: none; }
.splash__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.splash__dots {
  position: absolute;
  bottom: 10%;
  display: flex;
  gap: 12px;
  z-index: 1;
}
.splash__dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffe07a;
  box-shadow: 0 2px 0 rgba(0,0,0,0.25);
  animation: splashBlink 1.1s ease-in-out infinite;
}
.splash__dots span:nth-child(2) { animation-delay: 0.18s; }
.splash__dots span:nth-child(3) { animation-delay: 0.36s; }
@keyframes splashBlink {
  0%, 80%, 100% { transform: scale(0.5); opacity: 0.4; }
  40%           { transform: scale(1);   opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .splash__dots span { animation: none; }
}
/* Splash μόνο σε mobile: κρύψ' το σε μεγάλες οθόνες ή ποντίκι/desktop */
@media (min-width: 768px), (pointer: fine) and (min-width: 600px) {
  .splash { display: none !important; }
}
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--cream);
  background-image: url("assets/background.jpg");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

/* Το vintage πλαίσιο δεν ταιριάζει στο comid ύφος — κρυφό */
.frame { display: none !important; }

/* ============================================================
   Page wrapper (θολώνει κατά την αναζήτηση)
   ============================================================ */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: filter 0.6s ease, transform 0.6s ease;
}
.page.is-blurred {
  filter: blur(8px) brightness(0.7) saturate(1.1);
  transform: scale(1.03);
  pointer-events: none;
}

/* ============================================================
   Layout — comic "poster" card που κάθεται πάνω στο busy background
   ============================================================ */
.oracle {
  flex: 0 0 auto;
  width: calc(100% - 28px);
  max-width: 560px;
  margin: 20px auto;
  padding: 20px 24px 24px;
  text-align: center;
  background: rgba(255, 251, 240, 0.86);
  border: 3px solid var(--outline);
  border-radius: 28px;
  box-shadow: 0 8px 0 var(--outline), 0 22px 46px rgba(20, 10, 32, 0.3);
}

/* ---------- Hero ---------- */
.hero { margin-top: 4px; }
.hero__logo {
  margin: 0 auto;
  max-width: 460px;
  padding: 0 4px;
}
.hero__logo img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(28, 18, 40, 0.25));
}
.hero__subtitle {
  font-size: clamp(1.02rem, 4vw, 1.28rem);
  font-weight: 700;
  color: var(--purple-deep);
  margin: 8px auto 0;
  max-width: 30ch;
  text-wrap: pretty;
}

/* ============================================================
   Σφαίρα-μασκότ + κουμπί
   ============================================================ */
.orb-stage {
  display: flex;
  justify-content: center;
  margin: 6px auto 0;
}
.orb__img {
  display: block;
  width: min(58vw, 250px);
  max-height: 38vh;
  height: auto;
  filter: drop-shadow(0 10px 16px rgba(28, 18, 40, 0.22));
  transition: transform 0.4s ease;
}
.orb__img:hover { transform: rotate(-3deg) scale(1.03); }

.ask-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.orb__hint {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--purple-deep);
  letter-spacing: 0.02em;
}

/* ============================================================
   Κουμπιά (comic style)
   ============================================================ */
.btn {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }

.btn--primary {
  padding: 14px 28px;
  font-size: clamp(0.95rem, 3.8vw, 1.12rem);
  white-space: nowrap;
  color: var(--ink);
  border: 3px solid var(--outline);
  background: linear-gradient(180deg, var(--yellow-soft) 0%, var(--yellow) 55%, var(--yellow-deep) 100%);
  box-shadow: 0 5px 0 var(--outline), 0 10px 16px rgba(28,18,40,0.3);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--outline), 0 14px 20px rgba(28,18,40,0.32); }
.btn--primary:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--outline), 0 5px 10px rgba(28,18,40,0.3); }
.btn--primary:disabled { cursor: wait; opacity: 0.6; transform: none; }

.btn--ghost {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  font-size: 0.85rem;
  color: var(--purple-deep);
  background: #fff;
  border: 2.5px solid var(--outline);
  box-shadow: 0 3px 0 var(--outline);
}
.btn--ghost:hover { transform: translateY(-1px); background: var(--purple); color: #fff; box-shadow: 0 4px 0 var(--outline); }
.btn--ghost:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
.btn--sm { padding: 10px 18px; font-size: 0.8rem; }
.btn__icon { flex-shrink: 0; }

/* ============================================================
   Πώς λειτουργεί — 3 βήματα
   ============================================================ */
.steps {
  list-style: none;
  margin: 16px auto 4px;
  padding: 0;
  max-width: 540px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  position: relative;
}
.steps::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 18%;
  right: 18%;
  border-top: 2.5px dashed rgba(28, 18, 40, 0.32);
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.step__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--purple-deep);
  background: #fff;
  border: 2.5px solid var(--outline);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--outline);
}
.step__text { font-size: 0.86rem; font-weight: 600; line-height: 1.25; color: var(--ink); }
.step__text b { color: var(--purple-deep); font-weight: 800; }

/* Footer — πάνω στο background, έξω από το card */
.footer {
  flex-shrink: 0;
  text-align: center;
  padding: 4px 18px 22px;
  margin-top: -4px;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}
.footer__link {
  color: var(--purple-deep);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  text-shadow: 0 1px 3px rgba(255,251,240,0.9);
}
.footer__link:hover { color: var(--yellow-deep); }
.footer__sep { color: var(--ink-dim); font-size: 0.7rem; }
.footer__disclaimer { display: none; }

/* ============================================================
   Κουμπί info (κάτω δεξιά) + overlay οδηγιών
   ============================================================ */
.info-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 30;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 3px solid var(--outline);
  background: linear-gradient(180deg, var(--yellow-soft) 0%, var(--yellow) 60%, var(--yellow-deep) 100%);
  box-shadow: 0 4px 0 var(--outline), 0 8px 16px rgba(28,18,40,0.3);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.info-btn img {
  display: block;
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.25));
}
.info-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--outline), 0 12px 20px rgba(28,18,40,0.32); }
.info-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--outline); }
.info-btn:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; }
@supports (padding: max(0px)) {
  .info-btn {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

.howto {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 22px;
}
.howto__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(58, 26, 86, 0.5), rgba(20, 10, 32, 0.72));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.4s ease both;
}
.howto__panel {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  animation: panelIn 0.45s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.howto__img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 92vh;
  object-fit: contain;
  border: 3px solid var(--outline);
  border-radius: 18px;
  box-shadow: 0 8px 0 var(--outline), 0 22px 44px rgba(20, 10, 32, 0.45);
}
.howto__close {
  position: absolute;
  top: -16px;
  right: -8px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2.5px solid var(--outline);
  background: #fff;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--outline);
  transition: transform 0.12s ease, background 0.2s ease;
}
.howto__close:hover { transform: translateY(-1px); background: var(--yellow); }
.howto__close:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }

/* ============================================================
   Κουμπί κοινοποίησης εφαρμογής (κάτω αριστερά) + μενού
   ============================================================ */
.share-fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 30;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 4px 6px rgba(28,18,40,0.35));
  transition: transform 0.12s ease, filter 0.12s ease;
  -webkit-tap-highlight-color: transparent;
}
.share-fab img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.share-fab:hover { transform: translateY(-2px) rotate(-4deg); filter: drop-shadow(0 7px 9px rgba(28,18,40,0.4)); }
.share-fab:active { transform: translateY(2px) scale(0.96); }
.share-fab:focus-visible { outline: 3px solid var(--purple); outline-offset: 3px; border-radius: 50%; }
@supports (padding: max(0px)) {
  .share-fab {
    left: max(16px, env(safe-area-inset-left));
    bottom: max(16px, env(safe-area-inset-bottom));
  }
}

.sharemenu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
}
.sharemenu__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(58, 26, 86, 0.5), rgba(20, 10, 32, 0.72));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.35s ease both;
}
.sharemenu__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
  padding: 26px 22px 20px;
  background: #fffef7;
  border: 3px solid var(--outline);
  border-radius: 22px;
  box-shadow: 0 8px 0 var(--outline), 0 22px 44px rgba(20, 10, 32, 0.45);
  animation: panelIn 0.4s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.sharemenu__close {
  position: absolute;
  top: -16px;
  right: -8px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2.5px solid var(--outline);
  background: #fff;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--outline);
  transition: transform 0.12s ease, background 0.2s ease;
}
.sharemenu__close:hover { transform: translateY(-1px); background: var(--yellow); }
.sharemenu__close:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
.sharemenu__title {
  margin: 0 0 18px;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  color: var(--ink);
}
.sharemenu__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 8px;
}
.sharetile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sharetile__ic {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2.5px solid var(--outline);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 3px 0 var(--outline);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.sharetile:hover .sharetile__ic { transform: translateY(-2px); box-shadow: 0 5px 0 var(--outline); }
.sharetile:active .sharetile__ic { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
.sharetile:focus-visible { outline: none; }
.sharetile:focus-visible .sharetile__ic { outline: 3px solid var(--purple); outline-offset: 2px; }
.sharetile__lb {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--ink);
}
.sharemenu__toast {
  min-height: 1.1em;
  margin: 16px 0 0;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--purple-deep);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.sharemenu__toast.is-visible { opacity: 1; }

/* ============================================================
   Κεντρικό overlay (αναζήτηση + απάντηση)
   ============================================================ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
}
.overlay__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 45%, rgba(58, 26, 86, 0.55), rgba(20, 10, 32, 0.78));
  opacity: 1;
  animation: fadeIn 0.5s ease both;
}
.overlay__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  opacity: 1;
  animation: panelIn 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
.overlay__close {
  position: absolute;
  top: -16px;
  right: -8px;
  z-index: 2;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2.5px solid var(--outline);
  background: #fff;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--outline);
  transition: transform 0.12s ease, background 0.2s ease;
}
.overlay__close:hover { transform: translateY(-1px); background: var(--yellow); }
.overlay__close:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--outline); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes panelIn {
  0%   { transform: scale(0.9) translateY(14px) rotate(-1.5deg); }
  100% { transform: scale(1) translateY(0) rotate(0); }
}

/* ---------- Κατάσταση αναζήτησης ---------- */
.searching {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 28px;
}
.searching__halo {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(185, 143, 214, 0.55), rgba(185, 143, 214, 0) 65%);
  filter: blur(8px);
  animation: haloPulse 1.5s ease-in-out infinite;
}
@keyframes haloPulse {
  0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.92); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.12); }
}
.searching__text {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}
.dots { position: relative; display: flex; gap: 10px; }
.dots__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 10px rgba(249, 200, 38, 0.9);
  animation: blink 1.2s ease-in-out infinite;
}
.dots__dot:nth-child(2) { animation-delay: 0.2s; }
.dots__dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0%, 80%, 100% { transform: scale(0.55); opacity: 0.35; }
  40%           { transform: scale(1);    opacity: 1; }
}

/* ---------- Κάρτα απάντησης (comic) ---------- */
.answer__card {
  position: relative;
  margin: 0;
  padding: 30px 26px 26px;
  background: #fffef7;
  border: 3px solid var(--outline);
  border-radius: 20px;
  box-shadow: 0 8px 0 var(--outline), 0 22px 44px rgba(20, 10, 32, 0.4);
  text-align: center;
}
/* τα vintage γωνιακά στολίδια δεν χρειάζονται στο comic */
.answer__corner { display: none; }

.answer__label {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: var(--purple-deep);
  background: var(--yellow-soft);
  border: 2px solid var(--outline);
  border-radius: 999px;
  padding: 4px 14px;
  margin-bottom: 18px;
  transform: rotate(-2deg);
}
.answer__text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 6.8vw, 2.05rem);
  line-height: 1.25;
  color: var(--ink);
  margin: 0;
  min-height: 1.25em;
  text-wrap: balance;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.toast {
  min-height: 1.1em;
  margin: 12px 0 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--purple-deep);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.toast.is-visible { opacity: 1; }

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 640px) {
  body { font-size: 19px; }
  .orb__img { width: min(46vw, 240px); }
}
@media (max-height: 720px) {
  .orb__img { width: min(44vw, 200px); max-height: 32vh; }
}

/* ============================================================
   prefers-reduced-motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
