/* Tetherspot website. Colours from Prentspot (app/lib/ui/theme.dart). */

@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(fonts/Nunito-Regular.ttf) format("truetype"); }
@font-face { font-family: Nunito; font-weight: 600; font-display: swap; src: url(fonts/Nunito-SemiBold.ttf) format("truetype"); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(fonts/Nunito-Bold.ttf) format("truetype"); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(fonts/Nunito-ExtraBold.ttf) format("truetype"); }

:root {
  --primary: #4B49AC;
  --primary-hover: #3F3E96;
  --primary-soft: #ECECF8;
  --on-primary: #fff;
  --ink: #1A1D27;
  --muted: #6B7280;
  --canvas: #F0F2F5;
  --surface: #fff;
  --border: #DDE1E9;
  --success: #57B657;
  --warning: #FFC100;
  --stage: #111215;
  --shadow: 0 1px 2px rgba(26, 29, 39, .06), 0 8px 24px rgba(26, 29, 39, .06);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #7D7BEA;
    --primary-hover: #9896F0;
    --primary-soft: #26254A;
    --on-primary: #11121A;
    --ink: #E8EAF0;
    --muted: #9AA1AE;
    --canvas: #15171E;
    --surface: #1D2029;
    --border: #2E323E;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 400 17px/1.6 Nunito, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
a:hover { color: var(--primary-hover); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(820px, 100% - 32px); }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand img { border-radius: 8px; }
.topnav { display: flex; gap: 22px; margin-right: auto; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.topnav a:hover { color: var(--ink); }
.topbar-end { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.langs { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--canvas); border: 1px solid var(--border); }
.langs a { padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.langs a[aria-current] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--ink); }
.btn-light { background: #fff; color: #3F3E96; }
.btn-light:hover { background: #ECECF8; color: #3F3E96; }
.btn-small { padding: 8px 16px; font-size: .9rem; border-radius: 10px; }

/* Hero */
.hero { padding: 72px 0 56px; background: radial-gradient(1200px 500px at 85% -10%, var(--primary-soft), transparent 70%); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.eyebrow { color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; margin-bottom: .8em; }
.lead { font-size: 1.15rem; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 18px; }
.meta { color: var(--muted); font-size: .9rem; }
.hero-shot { margin: 0; }
.hero-shot img { border-radius: 18px; border: 1px solid var(--border); box-shadow: 0 30px 60px -20px rgba(26, 29, 39, .35); }

/* Free */
.free { padding: 8px 0 24px; }
.free-inner {
  display: grid; grid-template-columns: 3fr 2fr; gap: 32px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 36px 40px; box-shadow: var(--shadow);
}
.free-inner h2 { margin-bottom: .3em; }
.free-inner p { color: var(--muted); margin: 0; }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.ticks .icon { color: var(--success); margin-top: .15em; }

/* Sections */
.section { padding: 88px 0; }
.section-tint { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head-left { text-align: left; margin-left: 0; }
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section-tint .card { background: var(--canvas); box-shadow: none; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); font-size: .97rem; }
.badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); margin-bottom: 16px; }
.note { color: var(--muted); font-size: .92rem; margin-top: 24px; }
.center { text-align: center; margin-top: 32px; }

/* Develop */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split-copy p { color: var(--muted); }
.chips { list-style: none; padding: 0; margin: 20px 0 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { padding: 6px 14px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .9rem; }
.phones { display: flex; justify-content: center; gap: 20px; }
.phones img { width: min(250px, 45%); border-radius: 28px; border: 6px solid var(--stage); box-shadow: 0 24px 48px -16px rgba(26, 29, 39, .4); }
.phones img:last-child { margin-top: 56px; }

/* Presets */
.mark { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border-radius: 12px; margin-bottom: 16px; font-weight: 800; background: var(--stage); color: #fff; }
.preset:nth-child(1) .mark { background: #001E36; color: #31A8FF; }
.preset:nth-child(2) .mark { background: linear-gradient(135deg, #3B82F6, #A855F7); }

/* Prentspot */
.prentspot { background: linear-gradient(135deg, #4B49AC, #2F2E7A); color: #fff; }
.prentspot .eyebrow { color: #C9C8F5; }
.prentspot .split-copy p { color: #DCDBF7; }
.ticks-light { margin: 20px 0 28px; }
.ticks-light .icon { color: #9FE39F; }
.split-reverse .flow { order: -1; }
.flow { display: flex; align-items: center; justify-content: center; gap: 12px; }
.flow-step { display: grid; justify-items: center; gap: 10px; font-weight: 700; }
.flow-step .icon, .flow-step img { width: 72px; height: 72px; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); }
.flow-step img { padding: 14px; background: #fff; }
.flow-line { flex: 0 1 64px; height: 2px; margin-bottom: 30px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .6) 0 6px, transparent 6px 12px); }

/* Cameras */
.camera h3 { font-size: 1.25rem; }
.level { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--ink) !important; font-size: .9rem !important; margin-top: 12px; }
.level .icon { color: var(--success); }
.level-basic .icon { color: var(--warning); }
.tips { margin-top: 28px; }
.tips ol { margin: 0; padding-left: 1.3em; color: var(--muted); display: grid; gap: 6px; }

/* Downloads */
.platform { position: relative; display: flex; flex-direction: column; }
.platform .sub { margin-bottom: 18px; }
.dl-list { list-style: none; padding: 0; margin: 0 0 auto; display: grid; gap: 10px; }
.dl-list .btn { width: 100%; justify-content: flex-start; padding: 11px 16px; }
.dl-list .btn span { flex: 1; min-width: 0; text-align: left; }
.dl-list small { font-weight: 600; opacity: .75; }
.platform .note { margin: 16px 0 0; font-size: .85rem; }
.downloads { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform-soon { display: flex; gap: 16px; align-items: center; margin-top: 20px; padding: 18px 24px; }
.platform-soon .badge { margin: 0; }
.platform-soon h3 { margin-bottom: .2em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill-soft { background: var(--primary-soft); color: var(--primary); }
.yours { display: none; position: absolute; top: 16px; right: 16px; padding: 3px 10px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: .75rem; font-weight: 800; }
.is-yours { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.is-yours .yours { display: inline-block; }

/* Versions */
.release { margin-bottom: 16px; }
.release-latest { border-color: var(--primary); }
.release-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.release-head h2 { font-size: 1.25rem; margin: 0; }
.release-head .build { color: var(--muted); font-weight: 600; font-size: 1rem; }
.release-head time { margin-left: auto; color: var(--muted); font-size: .9rem; }
.pill { padding: 2px 10px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-size: .75rem; font-weight: 800; }
.files { width: 100%; border-collapse: collapse; font-size: .95rem; }
.files th, .files td { padding: 9px 0; border-top: 1px solid var(--border); text-align: left; }
.files th { width: 30%; font-weight: 700; }
.files a { font-weight: 700; text-decoration: none; }
.files a:hover { text-decoration: underline; }
.files .size { text-align: right; color: var(--muted); white-space: nowrap; }

/* Footer */
.footer { padding: 40px 0; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.footer-inner p { margin: 0; margin-right: auto; }
.footer nav { display: flex; gap: 18px; }
.footer a { color: var(--muted); }

/* Smaller screens */
@media (max-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .downloads { grid-template-columns: 1fr; }
  .hero-inner, .split, .free-inner { grid-template-columns: 1fr; }
  .hero-inner { gap: 40px; }
  .split { gap: 40px; }
  .split-reverse .flow { order: 0; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .topnav { display: none; }
  .hero { padding: 40px 0 32px; }
  .section { padding: 60px 0; }
  .free-inner { padding: 24px; }
  .grid-4 { grid-template-columns: 1fr; }
  .platform-soon { align-items: flex-start; }
  .phones img:last-child { margin-top: 32px; }
  .flow-step .icon, .flow-step img { width: 56px; height: 56px; padding: 12px; }
  .files th { width: auto; }
}
@media (max-width: 400px) {
  .topbar .btn-small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
