/* Zaproszenie adQuery — teatr. Marka: adquery.io (Outfit, Figtree, midnight/navy/core blue). */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --midnight: #0f1214;
  --ink: #0a0c0e;
  --surface: #e6eefc;
  --muted: #b4bed6;
  --blue: #84a9f6;
  --core-blue: #345fd6;
  --gold: #e6cd93;
  --gold-hi: #f1dcab;
  --gold-ink: #1d1608;
  --err: #ffb4b4;
  --display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --text: "Figtree", ui-sans-serif, system-ui, sans-serif;
  --pad: clamp(20px, 4vw, 56px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--midnight);
  color: var(--surface);
  font: 400 1rem/1.5 var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--core-blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
html { scrollbar-color: #2a3140 var(--midnight); }

/* ---------- scena ---------- */

.stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-areas: "intro" "details" "." "decide";
  grid-template-rows: auto auto 1fr auto;
  justify-items: center;
  padding: var(--pad) var(--pad) calc(var(--pad) + env(safe-area-inset-bottom));
  overflow: hidden;
  isolation: isolate;
}

.backdrop, .shade {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 58%;
  display: block;
}
/* jedno autorskie wejście: światła sceny rozjaśniają się jak przed ukłonem */
@media (prefers-reduced-motion: no-preference) {
  .backdrop img { animation: house-lights 1.8s var(--ease-out) both; }
  @keyframes house-lights {
    from { filter: brightness(0.45) saturate(0.8); transform: scale(1.035); }
    to { filter: none; transform: none; }
  }
}
.shade {
  background:
    linear-gradient(180deg,
      rgba(10, 12, 14, 0.9) 0%,
      rgba(10, 12, 14, 0.7) 26%,
      rgba(10, 12, 14, 0.35) 40%,
      rgba(10, 12, 14, 0) 54%,
      rgba(10, 12, 14, 0) 62%,
      rgba(10, 12, 14, 0.72) 80%,
      rgba(10, 12, 14, 0.94) 100%);
}

/* ---------- powitanie ---------- */

.intro {
  grid-area: intro;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 44rem;
}
.logo {
  width: 118px;
  height: auto;
  margin-bottom: clamp(18px, 2.8vh, 32px);
}
.hello {
  margin: 0;
  font: 300 clamp(2.5rem, 1.6rem + 3.2vw, 4.4rem)/1.04 var(--display);
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.title {
  margin: 0.7rem 0 0;
  font: 400 clamp(1.05rem, 0.95rem + 0.45vw, 1.35rem)/1.35 var(--display);
  color: var(--gold-hi);
  letter-spacing: 0.01em;
  text-wrap: balance;
}

/* ---------- szczegóły ---------- */

/* Jedna tabliczka, dwie równe kolumny: podział wypada dokładnie na osi strony. */
.details {
  grid-area: details;
  margin-top: clamp(18px, 2.8vh, 30px);
  max-width: 100%;
  display: grid;
  grid-template-columns: auto auto;
  padding: 14px 0;
  border-radius: 16px;
  background: rgba(10, 12, 14, 0.62);
  border: 1px solid rgba(230, 238, 252, 0.14);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8);
}
/* ikona obok tekstu; kolumny wyrównane do lewej, cała tabliczka wyśrodkowana na osi strony */
.fact {
  display: grid;
  grid-template-columns: 22px auto;
  column-gap: 12px;
  justify-content: start;
  align-content: start;
  justify-items: start;
  text-align: left;
  padding: 0 28px;
  min-width: 0;
}
.fact > :not(.ico) { grid-column: 2; }
.fact + .fact { border-left: 1px solid rgba(230, 238, 252, 0.14); }
.fact p { margin: 0; text-wrap: balance; }
.ico {
  grid-row: 1 / span 3;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fact-main {
  font: 600 1.125rem/1.35 var(--text);
  font-variant-numeric: tabular-nums;
}
.fact-sub {
  margin-top: 2px;
  font-size: 1rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.fact-sub.muted { color: var(--muted); font-size: 0.9375rem; }
.fact-sub:empty { display: none; }
.map-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 0;
  color: var(--blue);
  font: 600 0.875rem/1.2 var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(132, 169, 246, 0.45);
  text-underline-offset: 4px;
  border-radius: 4px;
}
.map-link:hover { color: #a9c3fa; text-decoration-color: currentColor; }
.map-link svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- decyzja ---------- */

.decide {
  grid-area: decide;
  width: min(100%, 560px);
  text-align: center;
}
.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.btn {
  min-height: 54px;
  padding: 14px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  border-radius: 999px;
  font: 600 1.0625rem/1.2 var(--text);
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background-color 180ms var(--ease-out), border-color 180ms var(--ease-out), color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.btn.yes {
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--gold-ink);
  box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.75);
}
.btn.yes:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
.btn.no {
  border: 1px solid rgba(230, 238, 252, 0.55);
  background: rgba(10, 12, 14, 0.45);
  color: var(--surface);
}
.btn.no:hover { border-color: var(--surface); background: rgba(230, 238, 252, 0.08); }
.btn:disabled { cursor: default; opacity: 0.4; box-shadow: none; }
.btn[aria-busy="true"] { opacity: 0.7; cursor: progress; }
.btn.done:disabled { opacity: 1; }
.btn.yes.done { box-shadow: none; }
.btn.done::before {
  content: "";
  flex: none;
  width: 1.1em;
  height: 1.1em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4.5 12.5l5 5L19.5 7' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.btn-text { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.15; }
.btn-sub { font-size: 0.8125rem; font-weight: 500; opacity: 0.8; font-variant-numeric: tabular-nums; margin-top: 2px; }
.btn.no.done { border-color: rgba(230, 238, 252, 0.3); color: var(--muted); background: transparent; }

.btn.danger {
  border: 1px solid #c62828;
  background: #c62828;
  color: #fff;
}
.btn.danger:hover { background: #b71c1c; border-color: #b71c1c; }

/* potwierdzenie rezygnacji: w miejscu przycisków, bez okna modalnego */
.confirm {
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: rgba(10, 12, 14, 0.72);
  border: 1px solid rgba(230, 238, 252, 0.16);
}
.confirm-title {
  margin: 0;
  font: 500 1.25rem/1.3 var(--display);
}
.confirm-text {
  margin: 4px auto 14px;
  max-width: 30rem;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.45;
  text-wrap: balance;
}
@media (prefers-reduced-motion: no-preference) {
  .confirm:not([hidden]) { animation: confirm-in 220ms var(--ease-out); }
  @keyframes confirm-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
  }
}

.err {
  margin: 12px 0 0;
  color: var(--err);
  font-size: 0.9375rem;
}
.hint {
  margin: 14px auto 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.45;
  text-wrap: balance;
}
.deadline {
  margin: 6px 0 0;
  font-size: 0.875rem;
  color: var(--surface);
}

/* ---------- stany strony ---------- */

.is-loading .hello,
.is-message .hello {
  font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem);
  font-weight: 400;
  max-width: 26ch;
}
.is-loading .hello { color: var(--muted); }

/* ---------- prywatność i zgoda ---------- */

.privacy-link {
  position: fixed;
  right: 10px;
  bottom: calc(8px + env(safe-area-inset-bottom));
  z-index: 20;
  padding: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 400 0.75rem/1 var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.privacy-link:hover { color: var(--surface); }

.sheet {
  position: fixed;
  left: 50%;
  bottom: calc(16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 30;
  width: min(calc(100vw - 24px), 620px);
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px 22px;
  border-radius: 16px;
  background: #151a1f;
  border: 1px solid rgba(230, 238, 252, 0.14);
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.7);
  font-size: 0.875rem;
  line-height: 1.5;
}
.sheet h2 { margin: 0 0 8px; font: 500 1.0625rem/1.3 var(--display); }
.sheet p { margin: 0 0 10px; color: #d3dbec; }
.sheet a { color: var(--blue); text-underline-offset: 3px; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.sbtn {
  flex: 1 1 160px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(230, 238, 252, 0.6);
  background: transparent;
  color: var(--surface);
  font: 600 0.875rem/1 var(--text);
  cursor: pointer;
}
.sbtn:hover { background: rgba(230, 238, 252, 0.08); }
.sbtn.ghost { border-color: rgba(230, 238, 252, 0.25); }

/* ---------- telefon: obraz u góry, treść pod nim ---------- */

@media (max-width: 720px) {
  .stage {
    grid-template-areas: "hero" "details" "decide";
    grid-template-rows: auto auto 1fr;
    padding: 0 0 calc(20px + env(safe-area-inset-bottom));
  }
  .backdrop, .shade {
    position: relative;
    inset: auto;
    z-index: 0;
    grid-area: hero;
    width: 100%;
    height: min(133.333vw, 56svh);
  }
  .backdrop img { object-position: 50% 62%; }
  /* dół zdjęcia znika w tło maską, więc nie ma krawędzi ani cienkiej linii */
  .backdrop {
    -webkit-mask-image: linear-gradient(180deg, #000 58%, transparent 97%);
    mask-image: linear-gradient(180deg, #000 58%, transparent 97%);
  }
  .shade {
    background:
      linear-gradient(180deg,
        rgba(10, 12, 14, 0.88) 0%,
        rgba(10, 12, 14, 0.5) 22%,
        rgba(10, 12, 14, 0) 40%);
  }
  .intro {
    grid-area: hero;
    align-self: start;
    z-index: 1;
    padding: calc(22px + env(safe-area-inset-top)) 20px 0;
  }
  .logo { width: 96px; margin-bottom: 16px; }
  .details {
    position: relative;
    z-index: 1;
    width: auto;
    justify-self: stretch;
    margin: -48px 20px 0;
    grid-template-columns: 1fr;
    padding: 2px 18px;
  }
  .fact {
    grid-template-columns: 22px 1fr;
    column-gap: 14px;
    justify-content: stretch;
    padding: 12px 0;
  }
  .fact + .fact { border-left: 0; border-top: 1px solid rgba(230, 238, 252, 0.12); }
  .fact-main { font-size: 1.0625rem; }
  .map-link { margin-top: 6px; }
  .decide {
    position: relative;
    z-index: 1;
    width: auto;
    justify-self: stretch;
    margin: 18px 20px 0;
    align-self: start;
  }
  .hint { margin-top: 12px; }
  /* na telefonie link do prywatności idzie na koniec treści, nie nachodzi na tekst */
  .privacy-link {
    position: static;
    display: block;
    margin: 0 auto calc(10px + env(safe-area-inset-bottom));
  }
  .stage { padding-bottom: 8px; }
  .choices { grid-template-columns: 1fr; gap: 10px; }
  .is-loading .stage, .is-message .stage { grid-template-rows: auto; }
}

@media (max-width: 720px) and (max-height: 700px) {
  .backdrop, .shade { height: min(133.333vw, 48svh); }
}
