/* freedomsoft.uk, shared styles for every page. */

/* Inter, SIL Open Font License 1.1. Macs use the system font (SF Pro) first. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('fonts/inter-variable.woff2') format('woff2'); }

:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #86868b;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);
  --link: #0066cc;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --accent-fg: #ffffff;
  --nav-bg: rgba(255, 255, 255, 0.8);
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.04), 0 12px 32px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 10px rgba(0, 0, 0, 0.06), 0 22px 48px rgba(0, 0, 0, 0.1);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI Variable Text', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI Variable Display', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --bg-alt: #101012;
    --surface: #1d1d1f;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #86868b;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.2);
    --link: #2997ff;
    --nav-bg: rgba(22, 22, 23, 0.78);
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 22px 48px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-alt: #101012;
  --surface: #1d1d1f;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --faint: #86868b;
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --link: #2997ff;
  --nav-bg: rgba(22, 22, 23, 0.78);
  --shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-hover: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 22px 48px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.53;
  letter-spacing: -0.012em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
main { flex: 1; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-display); color: var(--text); }
p { margin: 0 0 1em; }
img { max-width: 100%; }
.wrap { width: 100%; max-width: 1024px; margin: 0 auto; padding-inline: 22px; }
.wrap-wide { max-width: 1180px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

/* Global navigation */
.site-header { position: sticky; top: 0; z-index: 30; height: 48px; background: var(--nav-bg); border-bottom: 1px solid var(--border); }
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .site-header { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; display: block; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav-link { padding: 6px 12px; color: var(--muted); font-size: 13.5px; letter-spacing: -0.005em; border-radius: 8px; transition: color .2s; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link[aria-current="page"] { color: var(--text); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 0; background: transparent; color: var(--muted);
  cursor: pointer; transition: color .2s, background .2s;
}
.icon-btn:hover { color: var(--text); background: var(--border); text-decoration: none; }
.icon-btn svg { width: 17px; height: 17px; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: block; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: block; }
  :root:not([data-theme="light"]) .i-moon { display: none; }
}

/* Product navigation, below the global bar on each product page */
.local-nav { position: sticky; top: 48px; z-index: 25; height: 52px; background: var(--nav-bg); border-bottom: 1px solid var(--border); }
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .local-nav { -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.local-nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.local-nav .title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); white-space: nowrap; }
.local-nav .title:hover { text-decoration: none; }
.local-nav .title img { width: 26px; height: 26px; }
.local-nav nav { display: flex; align-items: center; gap: 20px; font-size: 12.5px; }
.local-nav nav a:not(.pill) { color: var(--muted); }
.local-nav nav a:not(.pill):hover { color: var(--text); text-decoration: none; }

/* Buttons */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px; border-radius: 980px;
  font-size: 17px; font-weight: 400; letter-spacing: -0.02em; line-height: 1.2;
  background: var(--accent); color: var(--accent-fg); border: 1px solid transparent;
  transition: background .2s;
}
.pill:hover { background: var(--accent-hover); text-decoration: none; }
.pill-small { min-height: 0; padding: 5px 12px; font-size: 12.5px; letter-spacing: 0; }
.pill-outline { background: transparent; color: var(--link); border-color: var(--link); }
.pill-outline:hover { background: var(--link); color: var(--accent-fg); }
.pill-muted { background: var(--bg-alt); color: var(--muted); border-color: var(--border); cursor: default; }
.pill-muted:hover { background: var(--bg-alt); }
.pill svg { width: 17px; height: 17px; flex: none; }
.more::after { content: ' \203A'; font-size: 1.15em; line-height: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; }

/* Sections */
.section { padding-block: 96px; }
.section-alt { background: var(--bg-alt); }
.section-head { text-align: center; margin: 0 auto 56px; max-width: 760px; }
.section-head h2 { margin: 0 0 12px; font-size: clamp(34px, 5vw, 48px); line-height: 1.08; font-weight: 600; letter-spacing: -0.03em; }
.section-head p { margin: 0; font-size: clamp(19px, 2.2vw, 21px); line-height: 1.4; color: var(--muted); letter-spacing: -0.015em; }

/* Home hero */
.hero { padding-block: 88px 96px; text-align: center; }
.hero-icons { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin: 0 0 44px; padding: 0; list-style: none; }
.hero-icons a { display: block; border-radius: 22%; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.hero-icons a:hover { transform: translateY(-4px) scale(1.04); }
.hero-icons img { display: block; width: 76px; height: 76px; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.14)); }
.hero h1 { margin: 0 auto 18px; max-width: 14ch; font-size: clamp(44px, 8vw, 80px); line-height: 1.04; font-weight: 700; letter-spacing: -0.045em; text-wrap: balance; }
.hero .lead { margin: 0 auto 34px; max-width: 34em; font-size: clamp(19px, 2.4vw, 24px); line-height: 1.38; color: var(--muted); letter-spacing: -0.02em; text-wrap: pretty; }

/* Page heads (products, about) */
.page-head { padding-block: 88px 24px; text-align: center; }
.page-head h1 { margin: 0 0 14px; font-size: clamp(40px, 6.5vw, 64px); line-height: 1.06; font-weight: 700; letter-spacing: -0.04em; }
.page-head p { margin: 0 auto; max-width: 36em; font-size: clamp(19px, 2.2vw, 22px); line-height: 1.42; color: var(--muted); }

/* Application tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tile {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 44px 30px 34px; border-radius: 28px;
  background: var(--surface); box-shadow: var(--shadow);
  transition: box-shadow .3s, transform .3s;
}
.tile:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tile .app-icon { width: 88px; height: 88px; margin-bottom: 22px; }
.tile h3 { margin: 0 0 8px; font-size: 26px; line-height: 1.12; font-weight: 600; letter-spacing: -0.025em; }
.tile p { margin: 0 0 22px; color: var(--muted); font-size: 16px; line-height: 1.45; }
.tile .links { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 16px; }
.tile-wide { align-items: flex-start; text-align: left; padding: 36px; }
.tile-wide .tile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.tile-wide .app-icon { width: 64px; height: 64px; margin: 0; }
.tile-wide h3 { margin: 0; }
.tile-wide .links { justify-content: flex-start; }
.tiles-2 { grid-template-columns: repeat(2, 1fr); }
/* A screenshot at the top of each card on the Products page. */
.tile-shot { display: block; width: 100%; margin: 0 0 26px; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--bg-alt); }
.tile-shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.tile-wide:hover .tile-shot img { transform: scale(1.025); }
.tile-shot .dark { display: none; }
:root[data-theme="dark"] .tile-shot.has-dark .light { display: none; }
:root[data-theme="dark"] .tile-shot.has-dark .dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tile-shot.has-dark .light { display: none; }
  :root:not([data-theme="light"]) .tile-shot.has-dark .dark { display: block; }
}
.soon { display: inline-block; margin-top: 4px; padding: 3px 10px; border-radius: 980px; background: var(--bg-alt); border: 1px solid var(--border); color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.principles div { text-align: center; }
.principles svg { width: 34px; height: 34px; color: var(--text); margin-bottom: 16px; }
.principles h3 { margin: 0 0 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.principles p { margin: 0 auto; max-width: 30ch; color: var(--muted); font-size: 16px; line-height: 1.5; }

/* Product page hero */
.product-hero { padding-block: 72px 64px; text-align: center; }
.product-hero .app-icon { width: 128px; height: 128px; margin: 0 auto 26px; display: block; filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.16)); }
.product-hero h1 { margin: 0 0 10px; font-size: clamp(44px, 7vw, 72px); line-height: 1.04; font-weight: 700; letter-spacing: -0.045em; }
.product-hero .lead { margin: 0 auto 32px; max-width: 30em; font-size: clamp(20px, 2.6vw, 26px); line-height: 1.34; color: var(--muted); letter-spacing: -0.02em; text-wrap: balance; }
.product-hero .platforms { margin: 22px 0 0; font-size: 14px; color: var(--faint); }

/* Screenshot gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.gallery li { margin: 0; }
.thumb {
  display: block; width: 100%; padding: 0; margin: 0 0 12px;
  border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  background: var(--surface); cursor: zoom-in;
  box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s;
}
.thumb:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.thumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.gallery p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); }
.thumb .dark { display: none; }
/* Only a screenshot that has a dark version swaps to it. */
:root[data-theme="dark"] .thumb.has-dark .light { display: none; }
:root[data-theme="dark"] .thumb.has-dark .dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .thumb.has-dark .light { display: none; }
  :root:not([data-theme="light"]) .thumb.has-dark .dark { display: block; }
}
.gallery-hint { margin: 26px 0 0; text-align: center; font-size: 13px; color: var(--faint); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: grid; grid-template-rows: 56px 1fr auto; align-items: center;
  background: rgba(0, 0, 0, 0.9); color: #f5f5f7;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility 0s .25s;
}
@supports (backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px)) {
  .lightbox { background: rgba(0, 0, 0, 0.82); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
}
.lightbox.open { opacity: 1; visibility: visible; transition: opacity .25s; }
html.lb-open { overflow: hidden; }
.lb-top { display: flex; align-items: center; justify-content: space-between; padding: 0 16px 0 24px; font-size: 14px; color: #a1a1a6; }
.lb-stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 0; height: 100%; padding: 0 72px; }
.lb-stage img {
  max-width: 100%; max-height: calc(100vh - 190px); width: auto; height: auto;
  border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  transform: scale(.97); transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}
.lightbox.open .lb-stage img { transform: none; }
.lb-caption { margin: 0 auto; padding: 18px 24px 28px; max-width: 64ch; text-align: center; font-size: 15px; line-height: 1.5; color: #d2d2d7; }
.lb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.12); color: #f5f5f7; transition: background .2s;
}
.lb-btn:hover { background: rgba(255, 255, 255, 0.24); }
.lb-btn svg { width: 20px; height: 20px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Overview: prose and the feature panel */
.overview { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: start; }
.prose p { font-size: 17px; line-height: 1.6; color: var(--text); }
.prose b { font-weight: 600; }
.panel { padding: 32px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--faint); }
.panel h3 + ul + h3 { margin-top: 26px; }
.checks { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.checks li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; font-size: 15.5px; line-height: 1.45; }
.checks svg { width: 16px; height: 16px; margin-top: 3px; color: var(--accent); }
.meta { margin: 26px 0 0; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14.5px; line-height: 1.45; }
.meta dt { color: var(--faint); font-size: 13px; }
.meta dd { margin: 2px 0 12px; }
.meta dd:last-child { margin-bottom: 0; }

/* Download */
.platforms-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 820px; margin: 0 auto; }
.platform { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 36px 28px; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.platform svg.os { width: 36px; height: 36px; color: var(--text); }
.platform h3 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.025em; }
.platform .buttons { display: flex; flex-direction: column; align-items: stretch; gap: 10px; width: 100%; max-width: 320px; margin-top: 4px; }
.platform .pill { font-size: 15px; white-space: nowrap; }
.download-note { margin: 34px auto 0; max-width: 62ch; text-align: center; font-size: 14px; line-height: 1.55; color: var(--muted); }
.download-links { margin-top: 18px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; font-size: 16px; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 56px; align-items: start; }
.about-block + .about-block { margin-top: 72px; }
.about-block h2 { margin: 0 0 18px; font-size: clamp(30px, 4vw, 40px); line-height: 1.1; font-weight: 600; letter-spacing: -0.03em; }

/* 404 */
.notfound { padding-block: 120px; text-align: center; }
.notfound .code { margin: 0 0 12px; font-size: 15px; color: var(--faint); }

/* Footer */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding-block: 40px 28px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.foot-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.foot-cols h2 { margin: 0 0 10px; font-family: var(--font); font-size: 12.5px; font-weight: 600; color: var(--text); letter-spacing: 0; }
.foot-cols ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.foot-cols a { color: var(--muted); }
.foot-cols a:hover { color: var(--text); text-decoration: underline; }
.foot-brand { display: flex; align-items: flex-start; gap: 12px; }
.foot-brand img { width: 32px; height: 32px; flex: none; }
.foot-brand p { margin: 0; max-width: 40ch; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; color: var(--faint); }
.foot-legal p { margin: 0; }

@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}
@media (max-width: 860px) {
  .overview, .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .principles { grid-template-columns: 1fr; gap: 40px; }
  .tiles-2 { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .section { padding-block: 64px; }
  .hero, .page-head { padding-block: 56px 64px; }
  .hero-icons { gap: 9px; margin-bottom: 32px; }
  .hero-icons img { width: 46px; height: 46px; }
  .tiles { grid-template-columns: 1fr; }
  .platforms-grid { grid-template-columns: 1fr; }
  .gallery { gap: 16px 12px; }
  .gallery p { font-size: 13px; }
  .nav-link { padding: 6px 8px; }
  .local-nav nav a:not(.pill) { display: none; }
  .local-nav .title { font-size: 17px; }
  .lb-stage { padding: 0 12px; }
  .lb-prev, .lb-next { top: auto; bottom: -58px; transform: none; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
  .lb-caption { padding-top: 70px; font-size: 14px; }
  .tile-wide { padding: 28px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0s !important; transition: none !important; }
}
