/* UX / accessibility pass. Loaded after the compiled stylesheet.
   tools/build.py copies this file to /assets/polish-<hash>.css. */

/* Inter, self-hosted (variable 400-700). No request to Google Fonts. */
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-v20.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: Inter;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/assets/fonts/inter-latin-ext-v20.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* One family everywhere. The cookie dialog was the only thing still set in
   Manrope and Space Grotesk. Accent text was 4.17:1 on the page background;
   #80623b clears WCAG AA (4.77:1 on #ececeb). */
:root {
  --font-body: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: var(--font-body);
  --gold-deep: #80623b;
}

html {
  scroll-padding-top: 72px;
}

h1,
h2 {
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

/* Header: 13px links were 20px tall, FR/EN/DE 16x18px. Grow the hit areas
   to 44px without moving the visible layout. */
.syne-nav__links a,
.syne .syne-lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: -12px 0;
}

.syne .syne-lang a {
  min-width: 24px;
}

/* Story progress dots: 18x18px -> 24x24px targets (WCAG 2.5.8). */
.story .story__dots button {
  width: 24px;
  height: 24px;
}

.story .story__dots button::before {
  top: 9px;
  left: 9px;
}

.story .story__dots button.is-on {
  height: 32px;
}

.story .story__dots button.is-on::before {
  top: 7px;
}

@media (width <= 800px) {
  .story .story__dots button.is-on {
    width: 32px;
    height: 24px;
  }

  .story .story__dots button.is-on::before {
    top: 9px;
    left: 7px;
  }
}

/* A leftover `.story h2 { font-size: 1.2rem }` shrank the product heading on
   the home page to 19px and turned the FAQ group labels into headings. */
.story .story__scene--devices h2 {
  margin: 0;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.12;
}

/* Short laptop screens: the pinned product scene ran under the header. */
@media (width > 800px) and (height <= 920px) {
  .story .story__scene--devices .story__shot--pair {
    height: min(30svh, 280px);
  }
}

.story .faq__group {
  margin: 48px 0 0;
  font-size: 12px;
}

/* Home, phones: the gaps between hero, product and essays were 130-150px. */
@media (width <= 800px) {
  .story.is-flat .story__scene--devices {
    padding-top: 24px;
  }

  .essay {
    padding: 44px 0;
  }
}

/* Closing photo: a 2:3 portrait was cut to a 362x220 strip on phones. */
@media (width <= 800px) {
  .syne-close .syne-close__photos {
    width: min(100%, 420px);
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 1;
  }
}

/* Product page: device illustration under the heading. */
.origin .product__shot {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 36px;
}

@media (width <= 800px) {
  .origin .product__shot {
    margin-bottom: 24px;
  }
}

/* FAQ: header reads left-aligned like the answers below it; each question
   opens on its own (native <details>). */
.faq .faq__head,
.faq .faq__head h1 {
  text-align: start;
}

.faq .faq__qa {
  padding: 0;
}

.faq .faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 0;
  list-style: none;
  cursor: pointer;
}

.faq .faq__q::-webkit-details-marker {
  display: none;
}

.faq .faq__q::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--gold-deep);
  border-bottom: 1.5px solid var(--gold-deep);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.2s;
}

.faq .faq__qa[open] > .faq__q::after {
  transform: translateY(2px) rotate(-135deg);
}

.faq .faq__q:hover h3 {
  color: var(--gold-deep);
}

.faq .faq__q:focus-visible {
  outline: 2px solid var(--gold-deep);
  outline-offset: 2px;
}

.faq .faq__qa > p {
  margin: 0 0 18px;
  max-width: 40em;
}

/* Forms on phones: first and last name share a row. */
@media (width < 720px) {
  .contact__panel .form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 12px;
  }

  .contact__panel .form > * {
    grid-column: 1 / -1;
  }

  .contact__panel .form input {
    width: 100%;
    min-width: 0;
  }

  .contact__panel .form > .field:has([autocomplete="given-name"]),
  .contact__panel .form > .field:has([autocomplete="family-name"]) {
    grid-column: auto;
  }
}

/* Cookie dialog covered ~55% of a phone screen. The copy scrolls inside a
   shorter panel; buttons keep 44px targets. */
.cookie__panel:focus {
  outline: none;
}

@media (width <= 800px) {
  .cookie .cookie__panel {
    padding: 14px 14px 10px;
    border-radius: 18px;
  }

  .cookie .cookie__panel h2 {
    font-size: 19px;
    margin: 4px 0;
  }

  .cookie .cookie__panel p {
    font-size: 13px;
    line-height: 1.4;
    margin-top: 6px;
  }

  .cookie .cookie__copy {
    max-height: 30svh;
  }

  .cookie .cookie__panel button {
    min-height: 44px;
  }
}
