/* AI-limit-watcher landing page. One sheet for EN and PL. */

:root {
  color-scheme: light dark;

  --bg: #fbfbf9;
  --bg-elevated: #f3f3ef;
  --text: #171a17;
  --text-muted: #5a5f5a;
  --line: #dcded8;
  --line-strong: #b9bdb5;
  --accent: #2f7a2c;
  --accent-ink: #ffffff;
  --accent-soft: #e6f1e3;
  --code-bg: #ecede8;
  --bar-track: #d9dbd5;
  --focus: #1f5f1d;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;

  --measure: 62ch;
  --page: 68rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121412;
    --bg-elevated: #1a1d1a;
    --text: #ebece8;
    --text-muted: #a6aaa3;
    --line: #2b2f2b;
    --line-strong: #454a44;
    --accent: #8fd47f;
    --accent-ink: #0e1a0d;
    --accent-soft: #1c2a1a;
    --code-bg: #20241f;
    --bar-track: #2f332e;
    --focus: #b6e8a8;
  }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  margin-bottom: 1.5rem;
  max-width: 24ch;
}

h3 {
  font-size: 1.125rem;
  font-weight: 650;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Layout */

.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--line);
}

/* Header */

.site-header {
  padding-block: 1.25rem;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.wordmark::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  line-height: 1.4;
}

.lang-switch a[aria-current="page"] {
  background: var(--text);
  color: var(--bg);
}

.lang-switch a:not([aria-current]):hover {
  color: var(--text);
}

/* Hero */

.hero {
  padding-block: clamp(3rem, 9vw, 7rem) clamp(3.5rem, 8vw, 6rem);
}

.hero h1 {
  font-size: clamp(2.25rem, 1.4rem + 4.2vw, 4.25rem);
  font-weight: 750;
  max-width: 16ch;
  margin-bottom: 1.5rem;
}

.hero .lead {
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 2.25rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
}

.cta-note {
  margin: 0.9rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font: inherit;
  font-weight: 650;
  line-height: 1.2;
  padding: 0.9rem 1.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 80ms ease, background-color 120ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  filter: brightness(1.08);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line-strong);
}

.button-secondary:hover {
  border-color: var(--text);
}

.button svg {
  width: 1.05em;
  height: 1.05em;
  flex: none;
}

/* Problem */

.problem p {
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3rem);
  line-height: 1.55;
  max-width: 56ch;
}

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

/* What it does */

.does-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.feature-list {
  display: grid;
  gap: 1.75rem;
  max-width: var(--measure);
}

.feature-list p {
  margin: 0;
}

.feature-list strong {
  display: block;
  font-size: 1.125rem;
  font-weight: 650;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.shot {
  margin: 0;
  justify-self: end;
  width: 100%;
  max-width: 360px;
}

.shot img,
.shot-placeholder {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px -16px rgba(0, 0, 0, 0.25);
  background: #ffffff;
}

.shot figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Placeholder that stands in for the English screenshot.
   Drawn in CSS so it reads as an intended layout element, not a broken image. */

.shot-placeholder {
  aspect-ratio: 360 / 461;
  background: var(--bg-elevated);
  padding: 1.25rem;
  display: grid;
  grid-template-rows: auto repeat(6, 1fr);
  gap: 0.6rem;
  overflow: hidden;
}

.shot-placeholder .ph-head {
  height: 0.55rem;
  width: 38%;
  border-radius: 999px;
  background: var(--line-strong);
  margin-bottom: 0.4rem;
}

.shot-placeholder .ph-row {
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.35rem;
  align-content: center;
}

.shot-placeholder .ph-label {
  height: 0.45rem;
  border-radius: 999px;
  background: var(--line-strong);
  opacity: 0.8;
}

.shot-placeholder .ph-bar {
  height: 0.35rem;
  border-radius: 999px;
  background: var(--bar-track);
  position: relative;
  overflow: hidden;
}

.shot-placeholder .ph-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: var(--fill, 40%);
  background: var(--accent);
  border-radius: inherit;
}

/* Four things */

.four-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 3rem;
  counter-reset: four;
}

.four-grid article {
  counter-increment: four;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 1rem;
}

.four-grid article::before {
  content: counter(four, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  padding-top: 0.25rem;
  grid-row: 1 / span 2;
}

.four-grid h3 {
  margin-bottom: 0.4rem;
}

.four-grid p {
  margin: 0;
  color: var(--text-muted);
}

/* What it is not */

.not-box {
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  background: var(--bg-elevated);
}

.not-box h2 {
  margin-bottom: 0.5rem;
}

.not-box .intro {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
}

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

.not-list li {
  max-width: var(--measure);
  padding-left: 1.25rem;
  position: relative;
}

.not-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 0.5rem;
  height: 2px;
  background: var(--line-strong);
}

.not-list strong {
  font-weight: 650;
}

/* Install */

.install-steps {
  margin: 0;
  padding-left: 1.5rem;
  max-width: var(--measure);
  display: grid;
  gap: 0.9rem;
}

.install-steps li::marker {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--accent);
}

.install-steps li {
  padding-left: 0.35rem;
}

.install-after {
  margin-top: 1.75rem;
  color: var(--text-muted);
}

/* Privacy */

.qa {
  display: grid;
  gap: 1.5rem;
  max-width: var(--measure);
}

.qa p {
  margin: 0;
}

.qa strong {
  display: block;
  font-weight: 650;
  margin-bottom: 0.2rem;
}

/* Price question */

.price .section-intro {
  margin-bottom: 2rem;
}

.price-form {
  max-width: 40rem;
}

.price-form fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1.75rem;
  min-width: 0;
}

.price-form legend {
  padding: 0;
  margin-bottom: 0.75rem;
  font-weight: 650;
}

.tiles {
  display: grid;
  gap: 0.6rem;
}

.tile {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.tile:hover {
  border-color: var(--text);
}

.tile input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}

.tile .mark {
  flex: none;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  display: grid;
  place-items: center;
  transition: border-color 120ms ease;
}

.tile .mark::after {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 120ms ease;
}

.tile:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.tile:has(input:checked) .mark {
  border-color: var(--accent);
}

.tile:has(input:checked) .mark::after {
  transform: scale(1);
}

.tile:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.field label {
  font-weight: 650;
}

.field input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  width: 100%;
  max-width: 28rem;
}

.field input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-color: var(--accent);
}

.field .hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-done {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.5rem 1.25rem;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

/* Responsive */

/* Screenshot pair. Two real app windows sit side by side; the Statistics
   window is the wider of the two, so the columns are weighted by the images'
   own pixel widths rather than split evenly. */

.shots-grid {
  display: grid;
  grid-template-columns: minmax(0, 680fr) minmax(0, 600fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
  margin-top: 2.5rem;
}

.shots-grid figure {
  margin: 0;
}

.shots-grid img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px -16px rgba(0, 0, 0, 0.25);
  background: #ffffff;
}

.shots-grid figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {

  .shots-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }

  .does-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .shot {
    justify-self: start;
    max-width: 320px;
  }

  .four-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .cta-row .button {
    width: 100%;
  }

  .site-header .wrap {
    flex-wrap: wrap;
  }
}
