/* TV Voice — tvvoice.pl. Colours come from the app icon (tools/build_icons.py). The site is for people who
   see poorly, so: large type, strong contrast, nothing conveyed by colour alone, no third-party requests. */

:root {
  --navy: #0b1f3a;
  --navy-2: #13294a;
  --yellow: #ffd54f;
  --blue: #4fc3f7;
  --paper: #f7f8fa;
  --ink: #0b1f3a;

  --bg: var(--paper);
  --text: var(--ink);
  --muted: #3b4b63;
  --line: #c9d1dc;
  --panel: #ffffff;
  --link: #0a4fa8;
  --mark-bg: var(--yellow);
  --mark-text: var(--navy);
  --focus: #0a4fa8;

  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto,
    Arial, sans-serif;
  --measure: 40rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--navy);
    --text: #ffffff;
    --muted: #c6d2e3;
    --line: #2c426a;
    --panel: var(--navy-2);
    --link: var(--blue);
    --focus: var(--yellow);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: var(--navy);
  --text: #ffffff;
  --muted: #c6d2e3;
  --line: #2c426a;
  --panel: var(--navy-2);
  --link: var(--blue);
  --focus: var(--yellow);
  color-scheme: dark;
}

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

html {
  font-size: 125%; /* 20 px body: comfortable for low vision, still scales with the browser's setting */
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
}

a {
  color: var(--link);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.16em;
}

:focus-visible {
  outline: 0.2rem solid var(--focus);
  outline-offset: 0.2rem;
  border-radius: 0.2rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -10rem;
  background: var(--yellow);
  color: var(--navy);
  padding: 0.5rem 1rem;
  font-weight: 700;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

.wrap {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand img {
  width: 2.2rem;
  height: 2.2rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  font-weight: 700;
  font-size: 0.9rem;
}

.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  border-bottom: 0.2rem solid var(--yellow);
}

/* Home: hero */

.hero {
  display: grid;
  gap: 0 3rem;
  align-items: center;
  padding: 2.5rem 0 1rem;
}

@media (min-width: 62rem) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    padding-top: 3.5rem;
  }
  .hero .intro { grid-column: 1; }
  .hero .figure { grid-column: 2; }
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 16ch;
  font-size: clamp(2.1rem, 6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.hero .lead {
  max-width: var(--measure);
  margin: 0 0 2rem;
  font-size: 1.1rem;
  color: var(--muted);
}

/* Signature: the app's own view. A TV scene seen through the app's 16:9 frame, with the subtitle being read. */

.screen {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 48rem;
  border-radius: 1.1rem;
  background:
    radial-gradient(120% 90% at 30% 20%, #294a78 0%, transparent 60%),
    radial-gradient(90% 80% at 85% 35%, #3a2f55 0%, transparent 55%),
    linear-gradient(180deg, #16294a 0%, #08162b 100%);
  box-shadow: 0 0 0 0.45rem #ffffff, 0 0 0 0.55rem var(--line);
  overflow: hidden;
  color: #ffffff;
}

:root[data-theme="dark"] .screen {
  box-shadow: 0 0 0 0.45rem #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .screen {
    box-shadow: 0 0 0 0.45rem #ffffff;
  }
}

/* The app's frame overlay: gray border, light translucent fill. */
.screen::before {
  content: "";
  position: absolute;
  inset: 5%;
  border: 0.18rem solid rgba(200, 205, 214, 0.85);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 0.3rem;
}

.subtitle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12%;
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: clamp(0.85rem, 3.2vw, 1.55rem);
  line-height: 1.3;
  color: var(--yellow);
  text-shadow:
    0 0 0.12em #000, 0 0 0.12em #000, 0.05em 0.05em 0 #000, -0.05em -0.05em 0 #000;
}

.subtitle span {
  display: block;
}

.reading {
  position: absolute;
  top: 9%;
  right: 8%;
  display: flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.35em 0.8em;
  border-radius: 99rem;
  background: rgba(8, 22, 43, 0.85);
  font-size: clamp(0.7rem, 2vw, 0.95rem);
  font-weight: 700;
}

.bars {
  display: flex;
  align-items: center;
  gap: 0.18em;
  height: 1.1em;
}

.bars i {
  display: block;
  width: 0.22em;
  height: 100%;
  border-radius: 1em;
  background: var(--blue);
  transform-origin: center;
}

.bars i:nth-child(1) { transform: scaleY(0.4); }
.bars i:nth-child(2) { transform: scaleY(0.75); }
.bars i:nth-child(3) { transform: scaleY(1); }
.bars i:nth-child(4) { transform: scaleY(0.65); }
.bars i:nth-child(5) { transform: scaleY(0.35); }

@media (prefers-reduced-motion: no-preference) {
  .bars i {
    animation: talk 0.9s ease-in-out infinite alternate;
  }
  .bars i:nth-child(2) { animation-delay: -0.3s; }
  .bars i:nth-child(3) { animation-delay: -0.6s; }
  .bars i:nth-child(4) { animation-delay: -0.15s; }
  .bars i:nth-child(5) { animation-delay: -0.45s; }
}

@keyframes talk {
  from { transform: scaleY(0.3); }
  to { transform: scaleY(1); }
}

.caption {
  max-width: 48rem;
  margin: 1.2rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Home: sections */

.section {
  padding: 2.5rem 0 0.5rem;
}

.section h2 {
  margin: 0 0 1rem;
  font-size: 1.6rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  padding: 1.2rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--panel);
}

.steps li::before {
  content: counter(step);
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.6rem;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--navy);
  font-weight: 800;
}

.steps strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1.05rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.facts {
  max-width: var(--measure);
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  position: relative;
  padding: 0.55rem 0 0.55rem 1.6rem;
  border-bottom: 1px solid var(--line);
}

.facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1rem;
  width: 0.85rem;
  height: 0.3rem;
  border-radius: 1rem;
  background: var(--yellow);
  box-shadow: 0 0 0 1px rgba(11, 31, 58, 0.25);
}

.status {
  max-width: var(--measure);
  margin: 0;
  padding: 1.2rem 1.4rem;
  border-left: 0.35rem solid var(--yellow);
  background: var(--panel);
  border-radius: 0 0.8rem 0.8rem 0;
}

.status strong {
  display: block;
  font-size: 1.1rem;
}

/* Document pages (privacy, security) */

.doc {
  max-width: var(--measure);
  padding: 2.5rem 0 1rem;
}

.doc h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.doc .meta {
  margin: 0 0 2rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.doc h2 {
  margin: 2.4rem 0 0.6rem;
  font-size: 1.35rem;
  line-height: 1.25;
}

.doc h3 {
  margin: 1.6rem 0 0.4rem;
  font-size: 1.1rem;
}

.doc p,
.doc ul,
.doc dl {
  margin: 0 0 1rem;
}

.doc ul {
  padding-left: 1.3rem;
}

.doc li {
  margin-bottom: 0.4rem;
}

.summary {
  margin: 0 0 2rem;
  padding: 1.3rem 1.4rem;
  border: 0.15rem solid var(--text);
  border-radius: 0.8rem;
  background: var(--panel);
}

.summary h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
}

.summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.summary li {
  margin: 0;
  padding: 0.35rem 0;
}

.summary li strong {
  background: var(--mark-bg);
  color: var(--mark-text);
  padding: 0 0.2em;
  border-radius: 0.15em;
}

.toc {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.toc ol {
  margin: 0.3rem 0 0;
  padding-left: 1.3rem;
}

.data-table {
  width: 100%;
  margin: 0.5rem 0 1.2rem;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th,
.data-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  font-weight: 800;
}

.table-scroll {
  overflow-x: auto;
}

/* Placeholders still to be filled in before publishing. */
.todo {
  background: repeating-linear-gradient(45deg, #fff3c4, #fff3c4 0.4rem, #ffe38a 0.4rem, #ffe38a 0.8rem);
  color: #3a2a00;
  padding: 0 0.25em;
  border-radius: 0.2em;
  font-weight: 700;
}

/* Footer */

.site-footer {
  margin-top: 3.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-top: 1.4rem;
  padding-bottom: 2rem;
}

.site-footer p {
  margin: 0;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
