/* Nicotine Away website. Colours come from the app (lib/core/app_theme.dart)
   and the logo: forest greens, the mint and teal of the butterfly, and the
   pale lime the app uses for highlights. No web fonts: the site loads
   nothing from other hosts, so the type is the device's own. */

:root {
  --bg: #f2f6f3;
  --surface: #ffffff;
  --surface-2: #e6eee9;
  --ink: #0f2a20;
  --ink-2: #3d5a4e;
  --line: #cfddd5;
  --brand: #176b57;
  --brand-ink: #ffffff;
  --mint: #2f9e7d;
  --teal: #1aa7b8;
  --lime: #d8e8b0;
  --forest: #0f2a20;
  --forest-2: #1d4f40;
  --on-forest: #eaf3ee;
  --on-forest-2: #b9d3c6;
  --shadow: 0 1px 2px rgba(15, 42, 32, .06), 0 8px 24px rgba(15, 42, 32, .08);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "Noto Serif", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --step-h1: clamp(2rem, 1.25rem + 3.4vw, 3.35rem);
  --step-h2: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1c16;
    --surface: #11261f;
    --surface-2: #15302a;
    --ink: #e3eee8;
    --ink-2: #a6c0b4;
    --line: #26453a;
    --brand: #5cc6a3;
    --brand-ink: #0b1c16;
    --mint: #5cc6a3;
    --teal: #4cc6d4;
    --forest: #0d251c;
    --forest-2: #1a4638;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.65 var(--sans);
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .18em; }
h1, h2, h3 {
  font-family: var(--serif);
  line-height: 1.15;
  text-wrap: balance;
  margin: 0 0 .5em;
  /* German nouns such as "Gesundheitseinrichtungen" are wider than a phone;
     hyphenate by the page's language, and break as a last resort. */
  hyphens: auto;
  overflow-wrap: break-word;
}
p, li, dd, figcaption, summary { overflow-wrap: break-word; hyphens: auto; }
h1 { font-size: var(--step-h1); font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: var(--step-h2); font-weight: 700; }
h3 { font-size: 1.12rem; font-weight: 700; }
:lang(ar) :is(h1, h2, h3), :lang(hi) :is(h1, h2, h3) { font-family: var(--sans); letter-spacing: 0; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 640px) { .wrap { padding-inline: 24px; } }

.measure { max-width: 62ch; }
.lead { font-size: 1.12rem; }
.small { font-size: .9rem; color: var(--ink-2); }

.skip {
  position: absolute; inset-inline-start: 8px; top: -60px;
  background: var(--brand); color: var(--brand-ink); padding: 8px 14px; z-index: 50;
  border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 8px; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 12px 24px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.05rem; }
.site-nav {
  display: flex; gap: 20px; order: 3; width: 100%;
  overflow-x: auto; white-space: nowrap; padding-bottom: 4px; scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .95rem; padding-block: 4px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--ink); }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--mint); }
@media (min-width: 900px) {
  .site-nav { order: 0; width: auto; flex: 1; justify-content: center; padding-bottom: 0; }
}

.lang { position: relative; margin-inline-start: auto; }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-2); font-size: .92rem; font-weight: 600; background: var(--surface);
}
.lang summary::-webkit-details-marker { display: none; }
.lang ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 40;
  margin: 0; padding: 6px; list-style: none; min-width: 190px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow);
}
.lang li a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.lang li a:hover { background: var(--surface-2); }
.lang li a[aria-current="true"] { font-weight: 700; color: var(--brand); }

/* Buttons */
.btn-play {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--lime); color: #0f2a20; text-decoration: none; font-weight: 700;
  padding: 13px 22px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-play:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, .22); }
[dir="rtl"] .btn-play svg { transform: scaleX(-1); }
.btn-line {
  display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px;
  border: 1.5px solid var(--brand); color: var(--brand); text-decoration: none; font-weight: 600;
  overflow-wrap: anywhere;
}

/* Hero */
.hero {
  background: radial-gradient(120% 90% at 85% 0%, var(--forest-2) 0%, var(--forest) 62%);
  color: var(--on-forest);
  padding-block: 56px 64px;
}
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 920px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 56px; } }
.kicker {
  color: var(--lime); text-transform: uppercase; letter-spacing: .12em;
  font-size: .8rem; font-weight: 700; margin-bottom: 14px;
}
:lang(ar) .kicker, :lang(hi) .kicker { letter-spacing: 0; }
.hero h1 { color: #fff; }
.hero .lead { color: var(--on-forest-2); max-width: 54ch; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 26px; }
.trial { color: var(--on-forest-2); font-size: .95rem; }

/* The gap picture */
.gap {
  --tick: var(--lime); --rule: rgba(234, 243, 238, .16); --lab: var(--on-forest-2);
  margin: 0; display: grid; gap: 14px;
}
.gap-row { display: grid; grid-template-columns: minmax(64px, auto) 1fr; align-items: center; gap: 14px; }
.gap-label { color: var(--lab); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; font-variant-numeric: tabular-nums; }
:lang(ar) .gap-label, :lang(hi) .gap-label { letter-spacing: 0; }
.gap-line { width: 100%; height: 24px; overflow: visible; }
.gap-line line { stroke: var(--rule); stroke-width: 2; }
.gap-line rect { fill: var(--tick); }
[dir="rtl"] .gap-line { transform: scaleX(-1); }
.gap figcaption { color: var(--lab); font-size: .9rem; margin-top: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .gap-row { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--row) * 110ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
.how-side .gap { --tick: var(--mint); --rule: var(--line); --lab: var(--ink-2); }

/* Bands */
.band { padding-block: 56px; }
.band-soft { background: var(--surface-2); }
.page-head { padding-block: 48px 8px; }

.pillars { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 20px; }
.pillar { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.pillar p { color: var(--ink-2); margin: 0; }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(64vw, 240px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px max(16px, calc((100vw - 1120px) / 2 + 24px)) 20px;
  scrollbar-width: thin;
}
.shot { margin: 0; scroll-snap-align: start; }
.shot img { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.shot figcaption { color: var(--ink-2); font-size: .9rem; margin-top: 10px; }

.two-col { display: grid; gap: 40px; }
@media (min-width: 880px) { .two-col { grid-template-columns: 1fr 1fr; gap: 56px; } }

.qa { border-bottom: 1px solid var(--line); padding-block: 12px; }
.qa summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--mint); font-size: 1.3rem; line-height: 1; }
.qa[open] summary::after { content: "−"; }
.qa p { color: var(--ink-2); margin: 10px 0 4px; }

.closing { background: var(--forest); color: var(--on-forest); padding-block: 44px; }
.closing h2 { color: #fff; margin-bottom: 4px; }
.closing p { color: var(--on-forest-2); margin: 0; }
.closing-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }

/* How it works */
.how-grid { display: grid; gap: 40px; }
@media (min-width: 920px) { .how-grid { grid-template-columns: 1.1fr 1fr; align-items: start; } .how-side { position: sticky; top: 96px; } }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 22px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 3rem 1fr; column-gap: 14px; }
.steps li::before {
  content: counter(step); grid-row: span 2;
  font: 700 2rem/1 var(--serif); color: var(--mint); font-variant-numeric: lining-nums;
}
.steps h3 { margin-bottom: 4px; }
.steps p { color: var(--ink-2); margin: 0; }
.how-side { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }

/* Tools */
.tools-grid { display: grid; gap: 24px; }
@media (min-width: 920px) { .tools-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.fields { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 18px; }
.fields label { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.fields input {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%;
  font-variant-numeric: tabular-nums;
}
.result { margin: 0 0 12px; }
.result-main { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 16px; background: var(--surface-2); border-radius: 12px; }
.result-main dt { color: var(--ink-2); font-weight: 600; }
.result-main dd { margin: 0; font: 700 1.6rem/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-bottom: 12px; }
.table th, .table td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: start; }
.table th { font-size: .82rem; color: var(--ink-2); font-weight: 700; }
.table td + td, .table th + th { text-align: end; }

/* Institutions and press */
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; }
.ticks li::before { content: ""; width: 10px; height: 10px; margin-top: .55em; border-radius: 3px; background: var(--mint); }
.pdf-link { margin: 20px 0 0; }
.pdf-link a { color: var(--brand); font-weight: 600; text-underline-offset: 3px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 24px; align-self: start; }
.facts { margin: 0; display: grid; gap: 0; }
.facts div { padding-block: 12px; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .8rem; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
:lang(ar) .facts dt, :lang(hi) .facts dt { letter-spacing: 0; }
.facts dd { margin: 2px 0 0; }
.plain { padding-inline-start: 1.1rem; }
.plain li { margin: 4px 0; }

/* The app video, first in the strip of screens */
.shot-video video {
  width: 100%; height: auto; display: block; border-radius: 18px;
  border: 1px solid var(--line); box-shadow: var(--shadow); background: #0f2a20;
}

/* Social accounts and the store page */
.social { display: flex; flex-wrap: wrap; gap: 8px; }
.social a {
  display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: .88rem; font-weight: 600; background: var(--surface);
}
.social a:hover { border-color: var(--brand); color: var(--brand); }
.press-links { margin: 16px 0 6px; }

/* Footer */
.site-foot { background: var(--surface-2); color: var(--ink-2); padding-block: 36px 28px; font-size: .92rem; border-top: 1px solid var(--line); }
.foot-grid { display: grid; gap: 14px; }
.foot-social { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.foot-play { font-weight: 700; color: var(--brand); }
.foot-follow { color: var(--ink-2); }
.foot-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a { color: var(--ink-2); }
.foot-note { margin: 0; max-width: 70ch; }
.foot-copy { margin: 0; }

/* Language chooser and 404 */
.chooser { min-height: 100vh; display: grid; place-items: center; }
.chooser-main { text-align: center; padding-block: 48px; display: grid; justify-items: center; gap: 8px; }
.chooser-list { list-style: none; padding: 0; margin: 10px 0 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 560px; }
.chooser-list a {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600;
}
.chooser-list a:hover { border-color: var(--brand); }
