/* Glik website. Colours follow the app (app/lib/theme/glik_colors.dart);
   *-ink level colours are darker text variants that keep WCAG contrast. */

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

:root {
  --ground: #f2f2f7;
  --card: #ffffff;
  --ink: #1c1c1e;
  --ink-2: #545458;
  --line: #d8d8de;
  --accent: #007aff;
  --accent-ink: #0060df;
  --accent-soft: #e5f0ff;
  --accent-fill: #0060df;
  --low: #34c759;
  --mid: #ff9500;
  --high: #ff3b30;
  --low-ink: #1d7a34;
  --mid-ink: #a35100;
  --high-ink: #d01d12;
  --low-soft: #e2f6e7;
  --neutral-soft: #e9e9ee;
  --phone: #1c1c1e;
  --shadow: 0 28px 56px -32px rgb(0 0 0 / 0.38);
  --display: "Bricolage", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --text: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #000000;
    --card: #1c1c1e;
    --ink: #ffffff;
    --ink-2: #a8a8ae;
    --line: #38383a;
    --accent: #0a84ff;
    --accent-ink: #5aa9ff;
    --accent-soft: #0c2a4d;
    --accent-fill: #0060df;
    --low: #30d158;
    --mid: #ff9f0a;
    --high: #ff453a;
    --low-ink: #30d158;
    --mid-ink: #ff9f0a;
    --high-ink: #ff6961;
    --low-soft: #11331b;
    --neutral-soft: #2c2c2e;
    --phone: #3a3a3c;
    --shadow: 0 28px 56px -32px rgb(0 0 0 / 0.9);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.55 var(--text);
  overflow-wrap: break-word;
}

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

a { color: var(--accent-ink); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { font-family: var(--display); color: var(--ink); text-wrap: balance; margin: 0; }
h2 {
  font-size: clamp(1.85rem, 1.3rem + 2.3vw, 2.9rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.022em;
}
h3 { font-size: 1.22rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 28px; } }

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

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 10;
  background: var(--card); color: var(--ink); padding: 10px 14px; border-radius: 10px;
}
.skip:focus { top: 12px; }

/* ------------------------------------------------------------ header */

.top-in { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; min-height: 44px; }
.logo-mark { width: 42px; height: 14px; flex: none; }
.f-low { fill: var(--low); } .f-mid { fill: var(--mid); } .f-high { fill: var(--high); }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.55rem; letter-spacing: -0.03em; line-height: 1; }
.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.97rem; border-radius: 10px;
}
.nav a:hover { color: var(--ink); background: var(--card); }
.lang {
  margin-left: auto; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: 0.94rem; background: var(--card);
}
.nav + .lang { margin-left: 8px; }
.lang:hover { border-color: var(--ink-2); }
@media (max-width: 639px) { .nav { display: none; } }

/* ------------------------------------------------------------ hero */

.hero { padding: 20px 0 56px; }
.hero-in { display: grid; gap: 40px; align-items: center; }
.hero h1 {
  font-size: clamp(2.3rem, 1.25rem + 4.6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
  max-width: 15ch;
}
.lead { margin-top: 20px; font-size: 1.16rem; line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.hero-meta { margin-top: 14px; font-size: 0.95rem; color: var(--ink-2); }
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.badge { display: inline-block; border-radius: 9px; }
.badge img { height: 48px; width: auto; }
.hero-shot { margin: 0; justify-self: center; width: min(290px, 74vw); }
@media (min-width: 760px) {
  .hero { padding: 32px 0 80px; }
  .hero-in { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); gap: 40px; }
  .hero-shot { justify-self: end; width: 100%; max-width: 310px; }
}
@media (min-width: 1100px) { .hero-in { gap: 64px; } }

.phone {
  border: 9px solid var(--phone);
  border-radius: 44px;
  overflow: hidden;
  background: var(--ground);
  box-shadow: var(--shadow);
}
.phone img { width: 100%; }

/* ------------------------------------------------------------ sections */

.demo, .features, .honest, .buy, .faq { padding: 64px 0; }
@media (min-width: 900px) { .demo, .features, .honest, .buy, .faq { padding: 96px 0; } }
.section-lead { margin-top: 16px; font-size: 1.1rem; color: var(--ink-2); max-width: 40em; }

/* ------------------------------------------------------------ demo */

.demo { background: var(--card); }
.demo-panel {
  margin-top: 36px;
  background: var(--ground);
  border-radius: 28px;
  padding: 20px 16px 24px;
}
@media (min-width: 720px) { .demo-panel { padding: 32px 36px 36px; } }

.demo-products { border: 0; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.demo-products legend { font-weight: 600; color: var(--ink-2); font-size: 0.95rem; padding: 0; margin-bottom: 10px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px;
  background: var(--card); color: var(--ink); border-radius: 999px; font-weight: 600; font-size: 0.97rem;
  box-shadow: inset 0 0 0 1px var(--line);
}
.chip input:checked + span { background: var(--accent-fill); color: #fff; box-shadow: none; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }


.demo-product-name { font-weight: 600; font-size: 1.05rem; }

.demo-readout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border-radius: 22px;
}
.tile { padding: 18px 12px 22px; text-align: center; min-width: 0; container-type: inline-size; }
.tile + .tile { border-left: 1px solid var(--line); }
.tile-label { font-weight: 600; color: var(--ink-2); font-size: 0.98rem; }
.tile-num {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.6rem, 2rem + 9vw, 8.5rem);
  /* Sized to the tile by the number's length (data-chars, set by the build
     and site.js): "70" stays big, "114,5" (about 2.5em wide) still fits. The
     box keeps one height, so the layout does not jump while sliding. */
  --fit: 2.75;
  font-size: clamp(2.2rem, 100cqi / var(--fit), 8.5rem);
  height: clamp(2.2rem, 100cqi / 1.3, 8.5rem);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums lining-nums;
  margin: 10px 0 12px;
  white-space: nowrap;
}
@media (prefers-reduced-motion: no-preference) { .tile-num { transition: color 0.25s ease; } }
.tile-num[data-chars="1"], .tile-num[data-chars="2"] { --fit: 1.3; }
.tile-num[data-chars="3"] { --fit: 1.85; }
.tile-num[data-chars="4"] { --fit: 2.3; }
.lvl-low { color: var(--low-ink); }
.lvl-mid { color: var(--mid-ink); }
.lvl-high { color: var(--high-ink); }
.level { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.level .shape { width: 0.95em; height: 0.95em; flex: none; }
.level.lvl-low .shape { fill: var(--low); }
.level.lvl-mid .shape { fill: var(--mid); }
.level.lvl-high .shape { fill: var(--high); }
.tile-level .level { font-size: 1.05rem; }

.demo-portion { margin-top: 22px; display: grid; gap: 18px; }
.demo-presets { border: 0; margin: 0; padding: 0; }
.demo-presets legend { font-weight: 600; color: var(--ink-2); font-size: 0.95rem; padding: 0; margin-bottom: 10px; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.preset {
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--card); color: var(--ink); font: 600 0.97rem/1 var(--text);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer;
}
.preset[aria-pressed="true"] { background: var(--ink); color: var(--card); box-shadow: none; }
.demo-range { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 6px 16px; }
.demo-range label { grid-column: 1 / -1; font-weight: 600; color: var(--ink-2); font-size: 0.95rem; }
.demo-range input { width: 100%; min-height: 44px; accent-color: var(--accent); margin: 0; }
.demo-range output { font-family: var(--display); font-weight: 700; font-size: 1.35rem; min-width: 4.2ch; text-align: right; font-variant-numeric: tabular-nums; }

.formula { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; color: var(--ink-2); }
.formula-calc { font-family: var(--display); font-weight: 700; color: var(--ink); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.demo-nojs { margin-top: 16px; color: var(--ink-2); }
.demo-note { margin-top: 18px; color: var(--ink-2); font-size: 0.95rem; max-width: 48em; }

.demo-table { margin-top: 20px; }
.demo-table summary, .faq summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.demo-table summary { font-weight: 600; color: var(--accent-ink); width: fit-content; }
.table-scroll { overflow-x: auto; margin-top: 8px; border-radius: 14px; }
table { border-collapse: collapse; width: 100%; background: var(--ground); font-size: 0.96rem; }
caption { text-align: left; padding: 12px 14px 4px; color: var(--ink-2); font-size: 0.9rem; }
th, td { text-align: left; padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
thead th { border-top: 0; color: var(--ink-2); font-weight: 600; }
tbody th { font-weight: 500; }
tr.group th { padding-top: 16px; font-weight: 700; color: var(--ink); }
tr.group .src { display: block; font-weight: 400; font-size: 0.86rem; color: var(--ink-2); overflow-wrap: anywhere; }
tr.group + tr th, tr.group + tr td { border-top: 0; }
th, td { padding-inline: 8px; }
tbody th { hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 399px) { table { font-size: 0.9rem; } }
td { white-space: nowrap; }
.cell-num { font-weight: 700; font-variant-numeric: tabular-nums; display: block; }
td .level { font-size: 0.92rem; display: flex; margin-top: 2px; }
@media (min-width: 640px) {
  th, td { padding-inline: 14px; }
  .cell-num { display: inline-block; min-width: 3ch; }
  td .level { display: inline-flex; margin: 0 0 0 6px; }
}

/* ------------------------------------------------------------ features */

.gallery {
  margin: 40px -16px 0;
  padding: 4px 16px 20px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 76%);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  overscroll-behavior-x: contain;
}
.shot { margin: 0; scroll-snap-align: start; }
.shot .phone { width: min(250px, 100%); }
.shot figcaption { margin-top: 18px; max-width: 30ch; }
.shot figcaption p { margin-top: 6px; color: var(--ink-2); }
@media (min-width: 720px) {
  .gallery { margin-inline: -28px; padding-inline: 28px; scroll-padding-inline: 28px; grid-auto-columns: minmax(250px, 42%); }
}
@media (min-width: 960px) {
  .gallery { margin-inline: 0; padding-inline: 0; grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; gap: 40px; }
}

.more { margin-top: 48px; display: grid; gap: 16px; }
.more-list { margin: 0; padding-left: 1.2em; display: grid; gap: 10px; color: var(--ink); max-width: 72ch; }
.more-list li::marker { color: var(--ink-2); }
@media (min-width: 900px) {
  .more { grid-template-columns: 1fr 3fr; gap: 40px; }
  .more-list { display: block; columns: 2; column-gap: 40px; }
  .more-list li { break-inside: avoid; margin-bottom: 12px; }
}

/* ------------------------------------------------------------ honest, buy */

.honest { background: var(--card); }
.honest-in { display: grid; gap: 20px; }
.honest-text { display: grid; gap: 14px; max-width: 44em; font-size: 1.08rem; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
.pill-measured { background: var(--low-soft); color: var(--low-ink); }
.pill-estimated { background: var(--neutral-soft); color: var(--ink-2); }
@media (min-width: 900px) { .honest-in { grid-template-columns: 1fr 2fr; gap: 40px; } }

.buy-in { display: grid; gap: 16px; }
.buy-in > p { max-width: 42em; font-size: 1.08rem; }
.buy .badges { margin-top: 8px; }

/* ------------------------------------------------------------ faq */

.faq { background: var(--card); }
.faq-list { margin-top: 28px; border-top: 1px solid var(--line); max-width: 860px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; justify-content: space-between; gap: 16px; padding: 14px 0;
  font-family: var(--display); font-weight: 700; font-size: 1.18rem; line-height: 1.3;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 12px; height: 12px; margin-right: 4px;
  border-right: 2.5px solid var(--ink-2); border-bottom: 2.5px solid var(--ink-2);
  transform: translateY(-3px) rotate(45deg);
}
.faq details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
.faq details p { padding: 0 0 20px; color: var(--ink-2); max-width: 66ch; }
.faq-contact { margin-top: 28px; }

/* ------------------------------------------------------------ footer */

.foot { padding: 40px 0 56px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.93rem; }
.foot .wrap { display: grid; gap: 12px; }
.foot-disclaimer { color: var(--ink); font-weight: 600; max-width: 60em; }
.foot-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot-links li { padding: 4px 0; }
.foot-small { font-size: 0.82rem; }

/* ------------------------------------------------------------ document pages */

.doc { max-width: 780px; padding-top: 24px; padding-bottom: 72px; }
.doc h1 { font-size: clamp(2.2rem, 1.5rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -0.028em; line-height: 1.05; }
.doc-updated { margin-top: 12px; color: var(--ink-2); }
.toc { margin-top: 28px; background: var(--card); border-radius: 18px; padding: 18px 22px; }
.toc h2 { font-size: 1.1rem; letter-spacing: 0; }
.toc ol { margin: 10px 0 0; padding-left: 1.4em; columns: 2 220px; column-gap: 32px; }
.toc li { padding: 3px 0; break-inside: avoid; }
.doc section { margin-top: 40px; }
.doc section h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.8rem); }
.doc section p, .doc section ul { margin-top: 12px; }
.doc section ul { padding-left: 1.3em; }
.doc section li + li { margin-top: 6px; }

/* ------------------------------------------------------------ root, 404 */

.root { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding-block: 48px; max-width: 640px; }
.root-brand { display: flex; align-items: center; gap: 12px; }
.root-brand .logo-mark { width: 60px; height: 20px; }
.root-brand .brand-name { font-size: 2.4rem; }
.root-langs { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 12px; }
.root-langs a {
  display: grid; gap: 4px; padding: 18px 22px; background: var(--card); border-radius: 18px;
  color: var(--ink); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line);
}
.root-langs a:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.root-langs strong { font-family: var(--display); font-size: 1.4rem; }
.root-langs span { color: var(--ink-2); }
.nf { margin-top: 32px; }
.nf h1, .nf h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; }
.nf p { margin-top: 8px; color: var(--ink-2); }

/* ------------------------------------------------------------ forced colours (last, so it wins) */

.chip span, .preset { border: 1px solid transparent; }

/* Windows high contrast and other forced colours: keep the outlines and
   show the chosen product and portion with the system highlight. */
@media (forced-colors: active) {
  .chip span, .preset { border: 2px solid ButtonText; }
  .chip input:checked + span, .preset[aria-pressed="true"] {
    forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight;
  }
  .chip input:focus-visible + span { outline-color: Highlight; }
  .level .shape { forced-color-adjust: none; }
}
