/* =========================================================================
   Contest Queue — site stylesheet (shares the Score Arcs app-site template)
   To rebrand for another app, edit the CSS variables in :root below and swap
   the logo / colors. Everything else is generic.
   ========================================================================= */

:root {
  /* Brand palette (from the app: indigo primary, amber accent) */
  --brand-deep:  #2E3270;
  --brand:       #464A9F;
  --brand-light: #8A8EDC;
  --accent:      #F2B544;
  --accent-soft: #FBD98B;
  --tint:        #EEEEF6;

  /* Semantic tokens */
  --bg:          #ffffff;
  --bg-alt:      var(--tint);
  --ink:         #1c1d33;        /* body text */
  --ink-soft:    #565a78;        /* secondary text */
  --accent-ink:  var(--brand-deep);
  --on-accent:   #ffffff;

  --radius:      14px;
  --maxw:        1080px;
  --nav-h:       64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-ink); }

img, svg { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ----------------------------------------------------------------- Nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid #e3e3ef;
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  height: var(--nav-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand-deep);
  text-decoration: none;
}
.nav__brand img { width: 30px; height: 30px; }

/* ===== EDIT HERE: nav links. Add <li> items for other apps' sites. ===== */
.nav__links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.nav__links a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
}
.nav__links a:hover,
.nav__links a[aria-current="page"] {
  color: var(--brand-deep);
  background: var(--bg-alt);
}

.nav__toggle {
  display: none;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px 0;
  background: var(--brand-deep);
  transition: transform .2s, opacity .2s;
}

@media (max-width: 640px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #e3e3ef;
    padding: 8px 12px 14px;
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 12px; }
}

/* ---------------------------------------------------------------- Hero --- */
.hero {
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(138,142,220,0.22), transparent 60%),
    linear-gradient(180deg, var(--tint), #ffffff);
  padding: 56px 0 64px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero__title {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 14px;
  color: var(--brand-deep);
  letter-spacing: -0.5px;
}
.hero__tagline {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-soft);
  margin: 0 0 28px;
  max-width: 34ch;
}
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.store-badges a { display: inline-block; }
.store-badges img { height: 52px; width: auto; }

/* Carousel ---------------------------------------------------------------- */
.carousel {
  position: relative;
  margin: 0 auto;
  max-width: 320px;
}
.carousel__viewport {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(46,50,112,0.30);
  background: #14163a;
  aspect-ratio: 9 / 19.5;     /* phone-ish */
}
.carousel__track {
  display: flex;
  height: 100%;
  transition: transform .45s ease;
}
.carousel__slide {
  min-width: 100%;
  height: 100%;
}
.carousel__slide img { width: 100%; height: 100%; object-fit: cover; }

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px; height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--brand-deep);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  display: grid;
  place-items: center;
}
.carousel__btn:hover { background: #fff; }
.carousel__btn--prev { left: -18px; }
.carousel__btn--next { right: -18px; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.carousel__dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: 0;
  background: #cdcde0;
  cursor: pointer;
  padding: 0;
}
.carousel__dots button.is-active { background: var(--brand); }

/* -------------------------------------------------------------- Sections - */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  color: var(--brand-deep);
  margin: 0 0 18px;
}
.prose { max-width: 70ch; }
.prose p { margin: 0 0 16px; color: var(--ink); }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 6px 0; }

/* Legal/support pages get a centered single column */
.page { padding: 48px 0 72px; }
.page h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--brand-deep);
  margin: 0 0 6px;
}
.page .updated { color: var(--ink-soft); margin: 0 0 28px; font-size: .95rem; }
.page .prose { margin: 0 auto; }

.todo {
  background: #fff7e6;
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 10px 14px;
  margin: 18px 0;
  color: #7a5a12;
  font-size: .92rem;
}

/* --------------------------------------------------------------- Forms --- */
.form { max-width: 540px; margin: 0 auto; }
.form .field { margin-bottom: 18px; }
.form label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--accent-ink);
}
.form input,
.form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cfcfe0;
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--brand-light);
  border-color: var(--brand);
}
.form textarea { min-height: 150px; resize: vertical; }
/* honeypot — hidden from humans, bots fill it */
.form .hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: var(--on-accent);
  border: 0;
  border-radius: 10px;
  padding: 13px 26px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--brand-deep); }

.form__status { margin-top: 16px; font-weight: 600; min-height: 1.4em; }
.form__status.ok  { color: #1d7a36; }
.form__status.err { color: #b3261e; }

.fallback {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e2e2ee;
  color: var(--ink-soft);
  text-align: center;
}

/* -------------------------------------------------------------- Footer --- */
.footer {
  background: var(--brand-deep);
  color: #e4e4f5;
  padding: 40px 0;
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: space-between;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer a { color: #cfd0f0; text-decoration: none; font-weight: 600; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer__copy { color: #a9abd0; font-size: .9rem; }

/* ------------------------------------------------------------ Responsive - */
@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; gap: 36px; }
  .hero__copy { text-align: center; }
  .hero__tagline { margin-left: auto; margin-right: auto; }
  .store-badges { justify-content: center; }
}
