/*
 * tryggtap.com
 *
 * Light and calm, with the product's own blue and Barlow, so the site and the dashboard read
 * as one thing. The cards are what a supervisor sees, in outline: outcomes, never mechanism.
 *
 * Fonts are served from this site. A font service would be a third party seeing every visitor.
 */

@font-face { font-family: 'Barlow'; font-weight: 400; font-display: swap; src: url('fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-weight: 600; font-display: swap; src: url('fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 600; font-display: swap; src: url('fonts/barlow-semi-condensed-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-weight: 700; font-display: swap; src: url('fonts/barlow-semi-condensed-latin-700-normal.woff2') format('woff2'); }

:root {
  color-scheme: light;

  --bg: #f7f9fc;
  --tint: #e9f0f8;
  --paper: #ffffff;
  --text: #101820;
  --muted: #4b5763;
  --faint: #6b7682;
  --line: #e4e8ee;
  --field: #cdd4dc;
  --accent: #1c4e80;
  --accent-hover: #163f68;

  /* Status, as in the product. Never decoration. */
  --ok: #1d6b3f;
  --ok-bg: #e9f6ee;
  --warn: #8a5a00;
  --warn-bg: #fdf3e0;
  --alert: #b3261e;

  --font-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Barlow Semi Condensed', 'Barlow', system-ui, sans-serif;

  --shadow: 0 1px 2px rgb(16 24 32 / 0.06), 0 28px 60px -24px rgb(16 24 32 / 0.28);
  --radius: 16px;
  --gutter: clamp(16px, 5vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-head); margin: 0; text-wrap: balance; }
p, dl, dd, ol { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: 1280px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 8px 12px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: 600 16px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.button:hover { background: var(--accent-hover); }
.button:disabled { opacity: 0.6; cursor: progress; }
.button-lg { min-height: 52px; padding: 0 26px; font-size: 17px; }

.text-link { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1.5px solid var(--field); padding-bottom: 2px; }
.text-link:hover { border-color: var(--text); }

/* ── Cards and pills ─────────────────────────────────────────────────────── */

.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); }

.kicker { font: 600 13px/1.2 var(--font-head); letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.mini-title { font: 700 32px/1.1 var(--font-head); margin-top: 6px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero { background: linear-gradient(180deg, var(--tint), var(--bg) 88%); padding-bottom: clamp(24px, 4vw, 48px); }

.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 88px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { border-radius: 8px; }
.brand span { font: 600 23px/1 var(--font-head); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.button) { color: var(--muted); text-decoration: none; font-size: 16px; }
.nav-links a:not(.button):hover { color: var(--text); }
@media (max-width: 760px) {
  .nav-links { gap: 18px; }
  .hide-sm { display: none; }
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  padding-top: clamp(32px, 6vw, 72px);
}
h1 { font-weight: 700; font-size: clamp(2.6rem, 1.4rem + 4.2vw, 5rem); line-height: 1; letter-spacing: -0.01em; text-wrap: pretty; }
.lede { margin-top: 26px; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.55; color: var(--muted); max-width: 31em; text-wrap: pretty; }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }

.hero-cards { position: relative; height: 470px; }
.mini { position: absolute; width: min(390px, 100%); padding: 26px 28px; }
.mini .pill { margin-top: 14px; }
.mini-row { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); }
.mini-row b { color: var(--text); font-weight: 600; }
.c1 { left: 0; top: 30px; }
.c2 { right: 0; top: 240px; }

.hero-copy > *, .mini { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) backwards; }
.hero-copy > :nth-child(2) { animation-delay: 0.06s; }
.hero-copy > :nth-child(3) { animation-delay: 0.12s; }
.c1 { animation-delay: 0.2s; }
.c2 { animation-delay: 0.45s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-cards { height: auto; display: grid; gap: 16px; }
  .mini { position: static; width: auto; max-width: 400px; }
  .c2 { justify-self: end; width: 100%; }
}

/* ── Sections ────────────────────────────────────────────────────────────── */

.section { padding: clamp(72px, 9vw, 120px) 0; }
h2 { font-weight: 700; font-size: clamp(2rem, 1.3rem + 2.4vw, 3.1rem); line-height: 1.05; letter-spacing: -0.005em; max-width: 18ch; }
.intro { margin-top: 18px; font-size: 1.15rem; color: var(--muted); max-width: 36em; }

.product-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
}
@media (max-width: 900px) { .product-grid { grid-template-columns: 1fr; } }

.points { display: grid; gap: 0; border-top: 1px solid var(--line); }
.points > div { padding: 24px 0; border-bottom: 1px solid var(--line); }
.points h3 { font-weight: 600; font-size: 1.4rem; line-height: 1.2; }
.points p { margin-top: 8px; color: var(--muted); }

.history { padding: 26px 28px 12px; }
.history-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.history-head .mini-title { margin-top: 0; font-size: 28px; }
.history ol { list-style: none; padding: 0; }
.history li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.history li:last-child { border-bottom: 0; }
.history time { font-variant-numeric: tabular-nums; color: var(--faint); font-size: 16px; }
.history .event { font-weight: 600; line-height: 1.25; }
.history .event small { display: block; font-weight: 400; color: var(--faint); font-size: 14px; }
@media (max-width: 420px) {
  .history li { grid-template-columns: 48px 1fr; }
  .history li .pill { grid-column: 2; justify-self: start; }
}

/* Privacy. */
.privacy { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.privacy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr; } }
.facts { display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: 13em 1fr; gap: 6px 24px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.facts > div:first-child { border-top: 1px solid var(--line); }
@media (max-width: 560px) { .facts > div { grid-template-columns: 1fr; } }
.facts dt { font-weight: 600; }
.facts dd { color: var(--muted); }

/* Contact. */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.note { margin-top: 24px; color: var(--faint); font-size: 1rem; }

.form { padding: clamp(22px, 3vw, 34px); display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
@media (max-width: 520px) { .form { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 15px; font-weight: 600; }
.field label span { font-weight: 400; color: var(--faint); margin-left: 4px; }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: 400 16px/1.4 var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; }
.field textarea::placeholder { color: #9aa3ad; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(28 78 128 / 0.14); }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--alert); }

/* Hidden from people, not from bots: off-screen rather than display:none, which some skip. */
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.send { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 4px; }
.form-status { font-size: 15px; }
.form-status[data-tone='bad'] { color: var(--alert); }
.form-note { grid-column: 1 / -1; font-size: 14px; line-height: 1.5; color: var(--faint); }

.form.is-sent > :not(.form-done) { display: none; }
.form-done { display: none; grid-column: 1 / -1; padding: 12px 0; }
.form.is-sent .form-done { display: block; }
.form-done:focus { outline: none; }
.done-title { margin-top: 16px; font: 700 30px/1.15 var(--font-head); }
.form-done p:last-child { margin-top: 8px; color: var(--muted); }

/* Footer. */
.footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--faint); font-size: 15px; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 28px; }
.footer .brand span { font-size: 19px; }
.footer a:not(.brand) { color: var(--muted); text-decoration: none; }
.footer a:not(.brand):hover { color: var(--text); }

/* The pages a form post without JavaScript lands on. */
.notice { padding: clamp(32px, 7vw, 96px) 0 120px; }
.notice h1 { font-size: clamp(2.2rem, 1.6rem + 2.4vw, 3.4rem); }
.notice p { margin-top: 18px; max-width: 34em; color: var(--muted); font-size: 1.15rem; }
.notice .button { margin-top: 32px; }
