/* home.css — landing page prototype (loaded after style.css).
   Tries the "search hero + card grid" layout of tickets.hh.gr in this
   site's palette. */

body.home {
  display: block;
  height: auto;
  min-height: 100%;
}
.home__main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px) 48px;
}

.home__maplink { padding: 8px 14px; font-size: 13px; white-space: nowrap; }

/* ---- hero ---- */
.hero {
  text-align: center;
  padding: clamp(28px, 6vw, 56px) 0 8px;
}
.hero__title {
  margin: 0;
  font-size: clamp(24px, 4.5vw, 38px);
  line-height: 1.2;
  letter-spacing: .2px;
  color: var(--ink);
  animation: home-rise .5s cubic-bezier(.2, .7, .3, 1) backwards;
}
.hero__sub {
  margin: 12px auto 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: clamp(14px, 2vw, 16px);
  animation: home-rise .5s cubic-bezier(.2, .7, .3, 1) .07s backwards;
}
@keyframes home-rise { from { opacity: 0; transform: translateY(14px); } }

/* ---- search card ---- */
.searchcard {
  margin: clamp(24px, 5vw, 40px) auto 0;
  max-width: 780px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .05), 0 24px 60px rgba(0, 0, 0, .07);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: box-shadow .28s ease;
  animation: home-rise .55s cubic-bezier(.2, .7, .3, 1) .14s backwards;
}
.searchcard:focus-within {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .06), 0 30px 74px rgba(0, 0, 0, .12);
}
.searchcard__input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 6px 4px 18px;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
/* hover (before it's focused): a gentle warm-up + the magnifier nudges */
.searchcard__input:hover:not(:focus-within) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 3px 16px color-mix(in srgb, var(--accent) 12%, transparent);
  transform: translateY(-1px);
}
.searchcard__input:hover:not(:focus-within) .searchcard__icon {
  color: var(--accent);
  animation: search-nudge .45s ease;
}
@keyframes search-nudge {
  0%, 100% { transform: translateX(0) scale(1); }
  40%      { transform: translateX(2.5px) scale(1.12); }
  72%      { transform: translateX(-1px) scale(1); }
}
.searchcard__input:focus-within {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  transform: translateY(-1px);
}
.searchcard__icon {
  width: 20px; height: 20px; color: var(--muted); flex: none;
  transition: color .2s ease, transform .25s cubic-bezier(.2, .7, .3, 1);
}
.searchcard__input:focus-within .searchcard__icon { color: var(--accent); transform: scale(1.12) rotate(-6deg); }
.searchcard__input input {
  flex: 1;
  border: 0;
  background: none;
  color: var(--ink);
  font: 16px/1.4 inherit;
  padding: 12px 8px;
  min-width: 0;
}
.searchcard__input input:focus { outline: none; }
.searchcard__input input::placeholder { color: var(--muted); }

.searchcard__pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}
.searchcard__hint {
  margin: -2px 0 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--muted);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 500 14px inherit;
  padding: 9px 16px;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease,
              transform .12s ease, box-shadow .18s ease;
}
.pill:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}
.pill:active { transform: translateY(0) scale(.96); }
/* waiting on the location permission prompt - a neutral hint, not "selected" */
.pill.is-busy { opacity: .55; cursor: progress; }
.pill.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent);
}
.pill__pin { font-size: 14px; line-height: 1; }
.pill.is-active .pill__pin { animation: pin-bounce .45s cubic-bezier(.2, .7, .3, 1); }
@keyframes pin-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  35%      { transform: translateY(-5px) scale(1.18); }
  70%      { transform: translateY(0) scale(.92); }
}
.pill--select {
  position: relative;
  padding-right: 30px;
  background-image: var(--select-arrow);
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.pill--select select {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  border: 0;
  cursor: pointer;
  font: inherit;
}
.pill--select.is-active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.searchcard__go {
  align-self: center;
  padding: 11px 26px;
  border-radius: 999px;
  font-size: 15px;
  position: relative;
}
/* an attention ring that pulses a few times on load, then rests */
.searchcard__go::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: cta-ring 2.4s ease-out 1s 3;
  pointer-events: none;
}
@keyframes cta-ring {
  0%       { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); }
  70%, 100% { box-shadow: 0 0 0 15px color-mix(in srgb, var(--accent) 0%, transparent); }
}

/* ---- shared button motion (home page only, keeps style.css .btn intact) ---- */
.home .btn {
  transition: transform .14s ease, box-shadow .2s ease,
              background-color .2s ease, filter .2s ease;
}
.home .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 32%, transparent);
  filter: brightness(1.04);
}
.home .btn:active { transform: translateY(0) scale(.97); }
.home .btn--ghost:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  filter: none;
}

/* ---- card grid ---- */
.grid-section { margin-top: clamp(36px, 7vw, 64px); }
.grid-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.grid-section__h { margin: 0; font-size: clamp(18px, 3vw, 24px); color: var(--ink); }
.grid-section__count { color: var(--muted); font-size: 13px; }

.homegrid__state { color: var(--muted); font-size: 14px; margin: 8px 0 0; }

.homegrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: clamp(16px, 3vw, 26px);
}

.homecard {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.homecard:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .12), 0 22px 48px rgba(0, 0, 0, .1);
}
.homecard:active { transform: translateY(-1px) scale(.99); }
.homecard:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* staggered entrance - only on the first render (see home.js) */
.homegrid.is-intro .homecard { animation: home-rise .5s cubic-bezier(.2, .7, .3, 1) backwards; }
.homegrid.is-intro .homecard:nth-child(1) { animation-delay: .02s; }
.homegrid.is-intro .homecard:nth-child(2) { animation-delay: .06s; }
.homegrid.is-intro .homecard:nth-child(3) { animation-delay: .10s; }
.homegrid.is-intro .homecard:nth-child(4) { animation-delay: .14s; }
.homegrid.is-intro .homecard:nth-child(5) { animation-delay: .18s; }
.homegrid.is-intro .homecard:nth-child(6) { animation-delay: .22s; }
.homegrid.is-intro .homecard:nth-child(7) { animation-delay: .26s; }
.homegrid.is-intro .homecard:nth-child(n+8) { animation-delay: .3s; }

.homecard__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--bg);
  overflow: hidden;
}
.homecard__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;   /* posters put the name up top */
  display: block;
  transition: transform .4s cubic-bezier(.2, .7, .3, 1);
}
.homecard:hover .homecard__media img { transform: scale(1.055); }
.homecard__media--empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 20% 0%, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface));
}
.homecard__media--empty span {
  font-size: 34px;
  opacity: .5;
}
.homecard__badge {
  position: absolute;
  top: 10px; left: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--badge-neutral-bg);
  color: var(--muted);
  backdrop-filter: blur(2px);
}
.homecard__badge--today { background: var(--chip-free-bg); color: var(--chip-free-fg); }

.homecard__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.homecard__title {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}
.homecard__loc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: flex-start;
  gap: 5px;
}
.homecard__loc svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.homecard__date {
  margin: 4px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}
.homecard__km { color: var(--muted); font-weight: 400; }

.homegrid__all {
  display: inline-block;
  margin: 26px auto 0;
  padding: 10px 22px;
  border-radius: 999px;
}
.grid-section { text-align: center; }
.grid-section__head, .homegrid, .homegrid__state { text-align: left; }

@media (max-width: 620px) {
  /* style.css already stacks the top bar; just pin the map link to the right */
  .home__maplink { margin-left: auto; }
  .searchcard { padding: 14px; border-radius: 18px; }
  .searchcard__pills { justify-content: stretch; }
  .pill { flex: 1 1 auto; justify-content: center; }
  .homegrid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .homecard__body { padding: 11px 12px 13px; gap: 3px; }
  .homecard__title { font-size: 13.5px; }
  .homecard__loc { font-size: 12px; }
  .homecard__date { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__title, .hero__sub, .searchcard,
  .homegrid.is-intro .homecard,
  .searchcard__go::after,
  .pill.is-active .pill__pin,
  .searchcard__icon,
  .homecard__media img {
    animation: none !important;
    transition: none !important;
  }
  .home .btn:hover, .home .btn:active,
  .pill:hover, .pill:active,
  .searchcard__input:focus-within,
  .searchcard__input:hover:not(:focus-within),
  .homecard:hover, .homecard:active,
  .homecard:hover .homecard__media img,
  .searchcard__input:focus-within .searchcard__icon {
    transform: none;
  }
}
