/* Tripi website. Matches the locked app design: black, #1C1C1E cards, one green accent,
   score colors only on scores, stamps in their country's ink, Apple's system font. */
:root {
  color-scheme: dark;
  --bg: #000000;
  --card: #1C1C1E;
  --raised: #2C2C2E;
  --line: rgba(84, 84, 88, 0.65);
  --text: #FFFFFF;
  --text-2: rgba(235, 235, 245, 0.6);
  --text-3: rgba(235, 235, 245, 0.32);
  --green: #38D27A;
  --red: #FF6F61;
  --ink-italy: #5AA9FF;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: var(--ease);
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.006, 0.025 2.8%, 0.101 6.1%, 0.539 18.9%, 0.721 25.3%, 0.849 31.5%, 0.937 38.1%, 0.968 41.8%, 0.991 45.7%, 1.006 50.1%, 1.015 55%, 1.017 63.9%, 1.001);
    --bounce: linear(0, 0.009, 0.035 2.1%, 0.141, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017, 1.077, 1.121, 1.149 24.3%, 1.159, 1.163, 1.161, 1.154 29.9%, 1.129 32.8%, 1.051 39.6%, 1.017 43.1%, 0.991, 0.977 51%, 0.974 53.8%, 0.975 57.1%, 0.997 69.8%, 1.003 76.9%, 1);
  }
}

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.47 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }

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

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
}

/* Top bar and footer */

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: max(14px, env(safe-area-inset-top, 0px)) 14px;
}

.wordmark {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.foot {
  border-top: 0.5px solid var(--line);
  margin-top: 96px;
  padding-block: 28px max(28px, env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  color: var(--text-2);
}

.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

/* Buttons: white pills like the app's primary buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: #000000;
  font: 600 17px/1 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.4s var(--spring), background-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { transform: scale(1.03); }
.btn:active { transform: scale(0.96); transition-duration: 0.1s; }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-small { min-height: 36px; padding: 0 16px; font-size: 15px; }

.btn-glass {
  background: rgba(44, 44, 46, 0.66);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 0.5px rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
}

.btn .done { display: none; }
.btn.copied .label { display: none; }
.btn.copied .done { display: inline-flex; align-items: center; gap: 8px; animation: pop 0.5s var(--bounce); }

.note { font-size: 15px; color: var(--text-2); }

/* Phone pictures. The screens are the locked app boards, 402 by 874 points. */

.phone {
  --w: 300px;
  position: relative;
  width: var(--w);
  max-width: 100%;
  margin: 0;
  padding: calc(var(--w) * 0.032);
  border-radius: calc(var(--w) * 0.175);
  background: #0A0A0B;
  box-shadow:
    inset 0 0 0 1.5px #3A3A3D,
    inset 0 0 0 3px #0A0A0B,
    inset 0 0 0 4px rgba(255, 255, 255, 0.06),
    0 50px 100px -20px rgba(0, 0, 0, 0.9),
    0 30px 60px -30px rgba(56, 210, 122, 0.12);
  flex-shrink: 0;
}

.phone .screen {
  position: relative;
  aspect-ratio: 402 / 874;
  border-radius: calc(var(--w) * 0.145);
  overflow: hidden;
  background: #000000;
  isolation: isolate;
}

.phone .screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A soft light behind a phone, like the glow on the app's Welcome screen */
.glow::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 46%;
  width: 190%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0.03) 40%, rgba(255, 255, 255, 0) 68%);
  pointer-events: none;
}

/* The app's parts, drawn for the web */

.ring {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--green);
}

.stamp { color: var(--ink-italy); }
.stamp text { fill: currentColor; font-family: var(--font); }

/* Scroll reveals: only hidden once the script is running, so the page is whole without it */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease), transform 1.1s var(--spring);
  transition-delay: var(--delay, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: none; }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* Simple pages: support, privacy, terms */

.doc { max-width: 720px; padding-block: 40px 0; }
.doc h1 { font-size: clamp(34px, 6vw, 48px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.doc .lede { margin-top: 14px; font-size: 19px; color: var(--text-2); }
.doc h2 { margin-top: 44px; font-size: 22px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; }
.doc h3 { margin-top: 26px; font-size: 17px; font-weight: 600; }
.doc p, .doc ul { margin-top: 12px; color: rgba(235, 235, 245, 0.82); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a { color: var(--text); text-decoration-color: var(--text-3); text-underline-offset: 3px; }
.doc a:hover { text-decoration-color: var(--text); }

.updated { margin-top: 12px; font-size: 15px; color: var(--text-2); }


.toc {
  margin-top: 28px;
  padding: 6px 0;
  border-radius: 22px;
  background: var(--card);
  list-style: none;
  columns: 2 220px;
  column-gap: 0;
  font-size: 15px;
}
.doc .toc { padding-left: 0; }
.toc li { break-inside: avoid; margin: 0 !important; }
.toc a { display: block; padding: 9px 18px; text-decoration: none; color: var(--text-2); }
.toc a:hover { color: var(--text); }

.doc section { scroll-margin-top: 24px; }

.summary {
  margin-top: 28px;
  display: grid;
  gap: 2px;
  border-radius: 22px;
  overflow: hidden;
}
.summary div { background: var(--card); padding: 16px 20px; }
.summary b { display: block; font-size: 17px; font-weight: 600; color: var(--text); }
.summary span { display: block; margin-top: 2px; font-size: 15px; color: var(--text-2); }
