/* Shortener landing page (UI.md §10.2) — the panel's tokens and Instrument Sans; light/dark via prefers-color-scheme or
   the toggle (data-theme on <html>). Assets are versioned in the file name (immutable cache): bump v2 → v3 on change.
   The hero repeats the sign-in panel's one orchestrated moment: a long URL steps back, its short link drops in, the
   click line draws (once; none with reduced motion). */
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url("instrument-sans-latin.v1.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  src: url("instrument-sans-tr.v1.woff2") format("woff2");
  unicode-range: U+011E-011F, U+0130, U+015E-015F;
}

:root {
  --bg: #F2F5F4;
  --fg: #1B2523;
  --muted: #56635F;
  --card: #FFFFFF;
  --subtle: #F6F8F7;
  --border: #DCE3E1;
  --primary: #0B6E69;
  --primary-hover: #095B57;
  --primary-fg: #FFFFFF;
  --accent: #075450;
  --tint: #E2F0EE;
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1312; --fg: #E4ECEA; --muted: #98A8A4; --card: #141C1B; --subtle: #1A2422; --border: #26322F;
    --primary: #3BC2B4; --primary-hover: #5ED3C6; --primary-fg: #04201D; --accent: #7FDCD1; --tint: #0F2E2B; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1312; --fg: #E4ECEA; --muted: #98A8A4; --card: #141C1B; --subtle: #1A2422; --border: #26322F;
  --primary: #3BC2B4; --primary-hover: #5ED3C6; --primary-fg: #04201D; --accent: #7FDCD1; --tint: #0F2E2B; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
img, svg { display: block; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* header (sits on the petrol hero on the home page, on the canvas on legal pages) */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px) saturate(1.3); border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.top .wrap { display: flex; align-items: center; gap: 1rem; height: 4rem; }
.brand { display: flex; align-items: center; gap: .625rem; font-weight: 650; font-stretch: 88%; font-size: 1.125rem;
  color: var(--fg); text-decoration: none; letter-spacing: -0.01em; }
.brand svg { width: 1.875rem; height: 1.875rem; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.lang { color: var(--muted); text-decoration: none; font-size: .9375rem; font-weight: 500; }
.lang:hover { color: var(--fg); }
.toggle { border: 1px solid var(--border); background: var(--card); color: var(--fg); border-radius: 999px;
  width: 2.25rem; height: 2.25rem; cursor: pointer; font-size: 1rem; line-height: 1; }

/* buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .75rem 1.375rem;
  border-radius: 11px; font-weight: 600; text-decoration: none; border: 1px solid transparent;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s, translate .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); translate: 0 -1px; }
.btn-ghost { border-color: var(--border); color: var(--fg); background: var(--card); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: .5rem .95rem; font-size: .9375rem; }

/* language hint */
.hint { display: none; background: var(--subtle); border-bottom: 1px solid var(--border); font-size: .9375rem; }
.hint.show { display: block; }
.hint .wrap { display: flex; gap: 1rem; align-items: center; justify-content: center; padding-top: .5rem; padding-bottom: .5rem; }
.hint button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; }

/* sections */
section { padding: 5rem 0; }
section + section { border-top: 1px solid var(--border); }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.12; margin: 0 0 1rem; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 650; font-stretch: 85%; max-width: 22ch; }
h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: .375rem; letter-spacing: -0.01em; }
.lead { font-size: 1.1875rem; color: var(--muted); max-width: 40rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.short { color: var(--accent); font-weight: 600; }

/* hero: petrol in both themes */
.hero { position: relative; overflow: hidden; padding: 5.5rem 0 6rem; color: #fff; border-top: 0;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(38, 170, 160, .45) 0%, transparent 60%),
    radial-gradient(90% 70% at 100% 100%, rgba(3, 30, 28, .55) 0%, transparent 70%),
    linear-gradient(160deg, #0B6E69 0%, #075450 55%, #053936 100%); }
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 60rem) { .hero .wrap { grid-template-columns: 1.1fr 1fr; } }
.hero h1 { font-size: clamp(2.5rem, 5.5vw, 4.25rem); font-weight: 650; font-stretch: 80%; letter-spacing: -0.03em; line-height: 1.02;
  max-width: 14ch; animation: rise .7s var(--ease) backwards; }
.hero .lead { color: rgba(255, 255, 255, .84); animation: rise .7s var(--ease) .08s backwards; }
.hero .actions { animation: rise .7s var(--ease) .16s backwards; }
.hero .btn-primary { background: #fff; color: #0B6E69; }
.hero .btn-primary:hover { background: #E2F0EE; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.hero .btn-ghost:hover { border-color: #fff; }
.hero a:focus-visible { outline-color: #fff; }

.link-demo { max-width: 30rem; padding: 1.375rem 1.5rem 1.125rem; border: 1px solid rgba(255, 255, 255, .18); border-radius: 20px;
  background: rgba(255, 255, 255, .07); backdrop-filter: blur(6px); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .55);
  animation: rise .7s var(--ease) .2s backwards; }
.link-demo-long { font-size: .875rem; line-height: 1.5; color: rgba(255, 255, 255, .85); overflow-wrap: anywhere;
  animation: step-back .6s var(--ease) 1s both; }
.link-demo-short { display: flex; align-items: center; gap: .125rem; margin-top: 1rem; font-size: 1.625rem; font-weight: 600;
  font-stretch: 92%; letter-spacing: -0.01em; animation: drop-in .6s var(--ease) 1.25s backwards; }
.link-demo-host { color: rgba(255, 255, 255, .72); font-weight: 450; }
.link-demo-slug { color: #fff; }
.link-demo-chart { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem; margin-top: 1.125rem; padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, .14); }
.link-demo-chart svg { width: 100%; height: auto; overflow: visible; }
.link-demo-line { stroke-dasharray: 100; stroke-dashoffset: 0; animation: draw 1.1s var(--ease) 1.7s backwards; }
.link-demo-area { animation: fade .8s ease 2.3s backwards; }
.link-demo-count { display: grid; text-align: right; font-size: 1.625rem; font-weight: 600; font-stretch: 85%; line-height: 1.1;
  font-variant-numeric: tabular-nums; animation: rise .5s var(--ease) 2.4s backwards; }
.link-demo-count small { font-size: .75rem; font-weight: 500; font-stretch: 100%; color: rgba(255, 255, 255, .7); }

/* features */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); margin-top: 2.5rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.375rem;
  transition: border-color .2s, translate .25s var(--ease), box-shadow .25s var(--ease); }
.card:hover { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); translate: 0 -2px;
  box-shadow: 0 16px 32px -20px rgba(16, 42, 39, .3); }
.card p { margin: 0; color: var(--muted); font-size: .96875rem; }
.icon { width: 2.5rem; height: 2.5rem; border-radius: 12px; display: grid; place-items: center; margin-bottom: 1rem;
  background: var(--tint); color: var(--accent); }
.icon svg { width: 1.375rem; height: 1.375rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* performance */
.stats { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); margin-top: 2.5rem; }
.stat { border-left: 3px solid var(--primary); padding: .25rem 0 .25rem 1.125rem; }
.stat strong { display: block; font-size: 2.25rem; font-weight: 650; font-stretch: 78%; letter-spacing: -0.03em; line-height: 1.1;
  font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .9375rem; }

/* privacy checklist */
.list { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: .875rem; max-width: 46rem; }
.list li { position: relative; padding-left: 2.125rem; color: var(--muted); }
.list li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.375rem; height: 1.375rem; border-radius: 50%; background: var(--tint); }
.list li::after { content: ""; position: absolute; left: .45rem; top: calc(.2em + .34rem); width: .5rem; height: .3rem;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

/* contact */
.cta { text-align: center; background: var(--tint); }
.cta h2 { margin-left: auto; margin-right: auto; }
.cta .lead { margin: 0 auto; }
.cta .actions { justify-content: center; }

footer { border-top: 1px solid var(--border); padding: 2rem 0 3rem; color: var(--muted); font-size: .9375rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 1rem; margin-left: auto; }
footer a { color: var(--muted); }

.legal { max-width: 46rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 650; font-stretch: 85%; }
.legal .notice { background: var(--subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes step-back { to { opacity: .55; letter-spacing: -0.02em; } }
@keyframes drop-in { from { opacity: 0; transform: translateY(-10px) scale(.94); } 60% { opacity: 1; transform: scale(1.02); } }
@keyframes draw { from { stroke-dashoffset: 100; } }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 40rem) {
  .top .btn-ghost { display: none; }
  .top nav { gap: .5rem; }
  section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0 4rem; }
}
@media (max-width: 24rem) { .top .btn-primary { display: none; } }
