/* Goldival teaser site. Palette from the logo and the game UI, contrast checked against
   WCAG 2.2 AA (see strona/README.md). Phone first; wider layouts from 40em and 60em. */

@font-face {
  font-family: "Fraunces";
  src: url("/fonts/fraunces.woff2") format("woff2");
  font-weight: 500 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #FBF4E2;
  --paper-2: #F5E9C8;
  --card: #FFFBF0;
  --ink: #2B3A2C;
  --ink-soft: #5E604B;
  --teal: #0E3B39;
  --teal-600: #2F6F6A;
  --gold: #F2B01E;
  --wheat: #FCE8A7;
  --gold-ink: #8A5A0B;
  --green: #3C653B;
  --sage: #94B999;
  --water: #5B8B9C;
  --rust: #A3402A;
  --field-line: #8C7F5A;
  --line: #E2D6B4;
  --label-bg: rgb(20 33 28 / 0.82);
  --label-ink: #F3EAD0;
  --shadow: 0 6px 22px #283b2b25, 0 2px 4px #243b2220;
  --radius: 1.25rem;
  --gutter: 1rem;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--teal);
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4vw + 1rem, 3.25rem);
}

h2 {
  font-size: clamp(1.7rem, 2.5vw + 1rem, 2.6rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--teal-600);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--teal);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.pomin {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--teal);
  color: var(--wheat);
  font-weight: 700;
  border-radius: 0.5rem;
}

.pomin:focus {
  top: var(--gutter);
  color: var(--wheat);
}

.pomin:focus-visible {
  outline-color: var(--gold);
}

/* Buttons */

.przycisk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.7rem 1.5rem;
  border: 2px solid var(--teal);
  border-radius: 999px;
  background: var(--gold);
  color: var(--teal);
  font: 700 1.0625rem/1.2 var(--sans);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--teal);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}

.przycisk:hover {
  background: #F7BF3C;
  color: var(--teal);
}

.przycisk:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--teal);
}

.przycisk[disabled],
.przycisk[aria-disabled="true"] {
  cursor: progress;
  opacity: 0.7;
}

.przycisk--drugi {
  background: var(--card);
}

.przycisk--drugi:hover {
  background: var(--wheat);
}

.przycisk--pelny {
  width: 100%;
}

/* Labels on images that are not screenshots */

.etykieta {
  position: absolute;
  right: 0.6rem;
  bottom: 0.6rem;
  margin: 0;
  padding: 0.2rem 0.65rem;
  border-radius: 0.5rem;
  background: var(--label-bg);
  color: var(--label-ink);
  font: 600 0.8125rem/1.4 var(--sans);
  letter-spacing: 0.01em;
}

/* Hero */

.hero {
  position: relative;
  background: var(--paper);
}

.hero__obraz {
  position: relative;
  margin: 0;
}

/* Below 60em the card overlaps the bottom of the image, so the label goes to the top. */
.hero__obraz .etykieta {
  top: 0.6rem;
  bottom: auto;
}

.hero__obraz img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 15% 50%;
}

.hero__zosia {
  display: none;
}

.hero__karta {
  position: relative;
  margin: -3rem var(--gutter) 0;
  padding: 1.5rem 1.25rem 1.25rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.hero__logo {
  margin: 0 auto 0.75rem;
  max-width: 22rem;
}

.hero__logo img {
  width: 100%;
}

.hero__haslo {
  font: 650 clamp(1.45rem, 2vw + 1rem, 2rem)/1.2 var(--serif);
  color: var(--teal);
  margin-bottom: 0.6rem;
  text-wrap: balance;
}

.hero__opis {
  color: var(--ink);
  max-width: 34rem;
  margin-inline: auto;
}

.hero__kiedy {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* Sections */

.sekcja {
  padding: 3.5rem 0;
}

.sekcja__wnetrze {
  width: min(72rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.sekcja__wnetrze--waskie {
  width: min(46rem, 100% - 2 * var(--gutter));
}

.sekcja__wstep {
  max-width: 44rem;
  font-size: 1.125rem;
}

.sekcja--odbudowa,
.sekcja--mieszkancy {
  background: var(--paper-2);
}

.wyroznienie {
  font-weight: 600;
  color: var(--teal);
}

.przypis {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  margin-top: 1.25rem;
}

.lista {
  padding-left: 1.25rem;
  margin: 0 0 1em;
}

.lista li + li {
  margin-top: 0.35rem;
}

.dwie-kolumny {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.obraz-z-etykieta {
  position: relative;
  margin: 0;
}

.obraz-z-etykieta img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Rebuild stages */

.etapy {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  counter-reset: etap;
}

.etap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  counter-increment: etap;
}

.etap img {
  width: min(100%, 17rem);
}

.etap__nazwa {
  margin-top: 0.5rem;
  font: 650 1.2rem/1.2 var(--serif);
  color: var(--teal);
  text-align: center;
  text-wrap: balance;
}

.etap__nazwa::before {
  content: counter(etap) ". ";
  color: var(--gold-ink);
}

/* Features */

.cechy {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.cecha {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.cecha h3 {
  margin-bottom: 0.4rem;
}

.cecha p {
  margin: 0;
}

.cecha__obraz {
  height: 7rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 6px 6px rgb(40 59 43 / 0.18));
}

.cecha__obraz--szeroki {
  height: auto;
  width: 100%;
  max-height: 7rem;
  margin-top: auto;
}

.cecha__obraz--znak {
  height: 6rem;
}

/* Characters */

.postacie {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.postac {
  display: flex;
  flex-direction: column;
  padding: 0 1.25rem 1.25rem;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.postac__portret {
  width: calc(100% + 2.5rem);
  max-width: none;
  margin: 0 -1.25rem 1rem;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: 50% 30%;
  background: radial-gradient(circle at 50% 45%, var(--wheat), var(--paper-2) 70%);
}

.postac__imie {
  margin-bottom: 0.1rem;
}

.postac__rola {
  margin-bottom: 0.75rem;
  color: var(--gold-ink);
  font-weight: 700;
}

.postac__cytat {
  margin: auto 0 0;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--gold);
  background: var(--paper);
  border-radius: 0 0.75rem 0.75rem 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--teal);
}

.postac__cytat p {
  margin: 0;
}

.postac__cytat p::before {
  content: "„";
}

.postac__cytat p::after {
  content: "”";
}

/* Sign-up */

.sekcja--zapis {
  background: var(--teal);
  color: var(--wheat);
}

.sekcja--zapis h2 {
  color: var(--wheat);
}

.sekcja--zapis .zapis__opis p {
  color: #F3EAD0;
}

.sekcja--zapis :focus-visible {
  outline-color: var(--gold);
}

.zapis {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.formularz {
  padding: 1.5rem 1.25rem;
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sekcja--zapis .formularz :focus-visible {
  outline-color: var(--teal);
}

.formularz--waski {
  max-width: 30rem;
  margin: 1.5rem 0;
}

.pole {
  margin-bottom: 1.25rem;
}

.pole__etykieta {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.pole__wejscie {
  display: block;
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.85rem;
  border: 2px solid var(--field-line);
  border-radius: 0.75rem;
  background: #FFFFFF;
  color: var(--ink);
  font: 400 1.0625rem/1.4 var(--sans);
}

.pole__wejscie:focus-visible {
  border-color: var(--teal);
}

.pole__wejscie[aria-invalid="true"] {
  border-color: var(--rust);
}

.pole--wybor {
  display: grid;
  grid-template-columns: 1.5rem 1fr;
  column-gap: 0.75rem;
  align-items: start;
}

.pole--wybor label {
  font-size: 0.9875rem;
  line-height: 1.5;
}

.pole__pudelko {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.05rem 0 0;
  accent-color: var(--teal);
  cursor: pointer;
}

.pole--wybor .pole__podpowiedz,
.pole--wybor .pole__blad {
  grid-column: 2;
}

.pole__podpowiedz {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

.pole__blad {
  margin: 0.35rem 0 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--rust);
}

.pole__blad[hidden] {
  display: none;
}

/* The honeypot is off-screen rather than display:none, which some bots skip. */
.pulapka {
  position: absolute;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.formularz__stan {
  margin: 1rem 0 0;
  font-weight: 700;
}

/* Kept in the accessibility tree while empty, so the first message is announced. */
.formularz__stan:empty {
  margin: 0;
}

.formularz__stan--blad {
  color: var(--rust);
}

.klauzula {
  margin: 1.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-soft);
}

.potwierdzenie h3 {
  margin-bottom: 0.5rem;
}

.potwierdzenie p:last-child {
  margin-bottom: 0;
}

/* Small header on inner pages */

.pasek {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(72rem, 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 1rem 0;
}

.pasek__logo img {
  width: 9.5rem;
}

.pasek__link {
  font-weight: 700;
}

/* Legal documents and short message pages */

.dokument,
.komunikat {
  width: min(46rem, 100% - 2 * var(--gutter));
  margin: 1.5rem auto 4rem;
}

.dokument h2 {
  margin-top: 2rem;
  font-size: clamp(1.35rem, 1.5vw + 1rem, 1.75rem);
}

.dokument h3 {
  margin-top: 1.5rem;
}

.dokument__wersja {
  color: var(--ink-soft);
}

.komunikat {
  min-height: 50vh;
}

.komunikat__adres {
  overflow-wrap: anywhere;
}

.komunikat__formularz {
  margin: 1.5rem 0;
}

.tabela {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--card);
}

table {
  border-collapse: collapse;
  min-width: 40rem;
  font-size: 0.9375rem;
}

th,
td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--paper-2);
  color: var(--teal);
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* Footer */

.stopka {
  background: #2F452E;
  color: #F3EAD0;
  padding: 2.5rem 0 3rem;
  font-size: 0.9375rem;
}

.stopka__wnetrze {
  width: min(72rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.stopka a {
  color: var(--wheat);
}

.stopka a:hover {
  color: #FFFFFF;
}

.stopka :focus-visible {
  outline-color: var(--gold);
}

.stopka__linki {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-weight: 700;
}

.stopka__linki a {
  display: inline-block;
  padding: 0.35rem 0;
}

.stopka__firma,
.stopka__drobne {
  color: #D9D2B5;
}

.stopka__drobne {
  margin-bottom: 0;
  font-size: 0.8125rem;
}

/* Wider screens */

@media (min-width: 40em) {
  :root {
    --gutter: 1.5rem;
  }

  .hero__obraz img {
    aspect-ratio: 16 / 9;
    object-position: 50% 42%;
  }

  .hero__karta {
    margin-top: -5rem;
    margin-inline: auto;
    max-width: 36rem;
    padding: 2rem 2.25rem 1.75rem;
  }

  .etapy {
    grid-template-columns: repeat(3, 1fr);
  }

  .cechy {
    grid-template-columns: repeat(2, 1fr);
  }

  .formularz {
    padding: 2rem;
  }
}

@media (min-width: 60em) {
  .hero {
    min-height: min(100vh, 56.25vw);
    display: grid;
    place-items: center;
    overflow: hidden;
  }

  .hero__obraz {
    position: absolute;
    inset: 0;
  }

  .hero__obraz picture,
  .hero__obraz img {
    width: 100%;
    height: 100%;
  }

  .hero__obraz img {
    aspect-ratio: auto;
  }

  .hero__obraz .etykieta {
    top: auto;
    right: 1rem;
    bottom: 1rem;
  }

  .hero__zosia {
    display: block;
    position: absolute;
    left: max(0rem, 50% - 46rem);
    bottom: 0;
    width: auto;
    height: min(46vh, 26rem);
    filter: drop-shadow(0 8px 18px rgb(40 59 43 / 0.25));
  }

  .hero__karta {
    margin: 3rem 0;
    background: rgb(255 251 240 / 0.95);
  }

  .dwie-kolumny {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
  }

  .cechy {
    grid-template-columns: repeat(4, 1fr);
  }

  .postacie {
    grid-template-columns: repeat(3, 1fr);
  }

  .zapis {
    grid-template-columns: 0.9fr 1.1fr;
    gap: 3rem;
  }

  .sekcja {
    padding: 5rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .przycisk {
    transition: none;
  }
}

@media print {
  .pasek,
  .stopka__linki,
  .pomin,
  .hero__zosia {
    display: none;
  }

  body {
    background: #FFFFFF;
  }
}
