/* ==========================================================================
   Jumoo - design system
   Hand-written, no framework. Tokens first, then elements, then components.
   ========================================================================== */

/* --- Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/barlow-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/barlow-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: "Barlow";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/barlow-700-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

@font-face {
  font-family: "Pacifico";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/pacifico-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

/* --- Tokens -------------------------------------------------------------- */

:root {
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Barlow", var(--font-body);
  --font-mark: "Pacifico", var(--font-head);
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

  --step--1: clamp(0.83rem, 0.81rem + 0.1vw, 0.89rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.13rem);
  --step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.42rem);
  --step-2: clamp(1.44rem, 1.32rem + 0.6vw, 1.8rem);
  --step-3: clamp(1.73rem, 1.53rem + 1vw, 2.27rem);
  --step-4: clamp(2.07rem, 1.75rem + 1.6vw, 2.86rem);
  --step-5: clamp(2.49rem, 1.98rem + 2.55vw, 3.6rem);

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  --radius: 10px;
  --radius-lg: 16px;
  --measure: 68ch;
  --wrap: 1140px;

  /* Light palette */
  --page: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f6;
  --ink: #101a28;
  --ink-2: #46536a;
  --ink-3: #6c7a91;
  --line: #dde3ec;
  --accent: #2f6fe4;
  --accent-ink: #1c4899;
  --accent-wash: #eaf1fe;
  --buy: #2e7d4f;
  --buy-ink: #1f5c39;
  --buy-wash: #e9f5ee;
  --warn-wash: #fdf4e3;
  --warn-line: #e9d9ae;

  --shadow: 0 1px 2px rgba(16, 26, 40, 0.06), 0 8px 24px -12px rgba(16, 26, 40, 0.18);
  --shadow-lg: 0 2px 4px rgba(16, 26, 40, 0.06), 0 24px 48px -20px rgba(16, 26, 40, 0.28);
}

/*
 * Dark palette applies in two cases, both handled here:
 *  - the OS/browser prefers dark and the visitor hasn't overridden it
 *    (:root:not([data-theme="light"]) - the footer toggle hasn't set "light")
 *  - the visitor explicitly chose dark via the footer toggle, regardless of
 *    OS preference (:root[data-theme="dark"], outside the media query)
 * The footer toggle only ever writes "light" or "dark" to data-theme - no
 * value means "follow the system", which is still the default until a
 * visitor clicks it.
 */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0c1118;
    --surface: #141b25;
    --surface-2: #1b2431;
    --ink: #e7edf6;
    --ink-2: #a9b6c9;
    --ink-3: #7e8ca2;
    --line: #26313f;
    --accent: #6d9dff;
    --accent-ink: #a8c4ff;
    --accent-wash: #16233a;
    --buy: #4bbd7c;
    --buy-ink: #7ad3a1;
    --buy-wash: #12251b;
    --warn-wash: #241f14;
    --warn-line: #3d3524;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  --page: #0c1118;
  --surface: #141b25;
  --surface-2: #1b2431;
  --ink: #e7edf6;
  --ink-2: #a9b6c9;
  --ink-3: #7e8ca2;
  --line: #26313f;
  --accent: #6d9dff;
  --accent-ink: #a8c4ff;
  --accent-wash: #16233a;
  --buy: #4bbd7c;
  --buy-ink: #7ad3a1;
  --buy-wash: #12251b;
  --warn-wash: #241f14;
  --warn-line: #3d3524;

  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.4), 0 24px 48px -20px rgba(0, 0, 0, 0.7);
}

/* --- Reset / elements ---------------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h1 {
  font-size: var(--step-5);
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
}
h4 {
  font-size: var(--step-0);
}

p,
ul,
ol,
dl,
table,
pre,
blockquote,
figure {
  margin: 0 0 var(--space-5);
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent);
}

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

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

code,
kbd,
pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--surface-2);
  padding: 0.15em 0.4em;
  border-radius: 5px;
}

pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--space-7) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}

th,
td {
  text-align: left;
  padding: var(--space-3);
  border-bottom: 1px solid var(--line);
}

th {
  font-family: var(--font-head);
  font-weight: 600;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-4);
  color: var(--ink-2);
}

/* --- Utilities ----------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.wrap--prose {
  max-width: calc(var(--measure) + 2 * var(--space-5));
}

.muted {
  color: var(--ink-3);
  font-size: var(--step--1);
}

.plain {
  list-style: none;
  padding: 0;
}

.plain li {
  margin-bottom: var(--space-2);
}

.center {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  z-index: 100;
}

.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

.ext {
  font-size: 0.8em;
  margin-left: 0.15em;
  opacity: 0.6;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1.2;
  padding: 0.7em 1.3em;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--lg {
  font-size: var(--step-1);
  padding: 0.75em 1.5em;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  color: #fff;
}

.btn--buy {
  background: var(--buy);
  border-color: var(--buy);
  color: #fff;
}

.btn--buy:hover {
  background: var(--buy-ink);
  border-color: var(--buy-ink);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* --- Header / nav -------------------------------------------------------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--font-mark);
  font-size: var(--step-2);
  color: var(--ink);
  text-decoration: none;
  line-height: 1;
}

.wordmark:hover {
  color: var(--accent);
}

.wordmark--footer {
  display: inline-block;
  margin-bottom: var(--space-3);
}

.site-nav ul {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.site-nav a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: var(--ink-2);
  text-decoration: none;
  padding: var(--space-2) 0;
  border-bottom: 2px solid transparent;
  display: inline-block;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

/* CSS-only mobile nav: checkbox toggles, no JavaScript. */
.nav-toggle,
.nav-toggle__label {
  display: none;
}

@media (max-width: 800px) {
  .nav-toggle__label {
    display: block;
    cursor: pointer;
    padding: var(--space-3);
    margin-right: calc(-1 * var(--space-3));
  }

  .nav-toggle__bars,
  .nav-toggle__bars::before,
  .nav-toggle__bars::after {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    content: "";
  }

  .nav-toggle__bars::before {
    transform: translateY(-7px);
  }

  .nav-toggle__bars::after {
    transform: translateY(5px);
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
  }

  .nav-toggle:checked ~ .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding-bottom: var(--space-4);
  }

  .site-nav li + li {
    border-top: 1px solid var(--line);
  }

  .site-nav a {
    padding: var(--space-3) 0;
    border-bottom: 0;
    font-size: var(--step-0);
    text-transform: none;
  }
}

/* --- Page heads ---------------------------------------------------------- */

.page-head {
  padding: var(--space-8) 0 var(--space-6);
}

.page-head h1 {
  margin-bottom: var(--space-3);
}

.standfirst {
  font-size: var(--step-1);
  color: var(--ink-2);
  max-width: 60ch;
  margin-bottom: 0;
  text-wrap: pretty;
}

.product-head {
  padding: var(--space-8) 0 var(--space-7);
  background: linear-gradient(160deg, var(--accent-wash), var(--page) 75%);
  border-bottom: 1px solid var(--line);
}

.product-head--translate {
  background: linear-gradient(160deg, var(--buy-wash), var(--page) 75%);
}

.product-head__eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-ink);
  margin-bottom: var(--space-3);
}

.product-head--translate .product-head__eyebrow {
  color: var(--buy-ink);
}

.product-head h1 {
  margin-bottom: var(--space-4);
  max-width: 26ch;
}

.product-head__cta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-6) 0 0;
}

/* --- Product sub-nav ----------------------------------------------------- */

.product-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}

.product-nav::-webkit-scrollbar {
  display: none;
}

.product-nav ul {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

.product-nav a {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step--1);
  color: var(--ink-2);
  text-decoration: none;
  padding: var(--space-4) 0;
  border-bottom: 2px solid transparent;
}

.product-nav a:hover {
  color: var(--ink);
}

.product-nav a[aria-current="page"] {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
}

/* --- Prose --------------------------------------------------------------- */

.prose {
  padding-block: var(--space-7) var(--space-9);
}

.prose > h2 {
  margin-top: var(--space-7);
}

.prose > h3 {
  margin-top: var(--space-6);
}

.prose > :first-child {
  margin-top: 0;
}

.prose li {
  margin-bottom: var(--space-2);
}

.prose--wide {
  max-width: var(--wrap);
}

.lead {
  font-size: var(--step-1);
  color: var(--ink-2);
}

/* --- Cards and grids ----------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin-bottom: var(--space-6);
  padding: 0;
  list-style: none;
}

.grid > li {
  margin: 0;
}

/* A linked card in a list item fills the cell, so a row of cards lines up. */
.grid > li > .card {
  height: 100%;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.card > :last-child {
  margin-bottom: 0;
}

.card h3 {
  margin-bottom: var(--space-2);
}

.card__foot {
  margin-top: auto;
  padding-top: var(--space-4);
  font-size: var(--step--1);
}

.card--link {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.card--link:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  color: inherit;
}

.tag {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step--1);
  padding: 0.15em 0.6em;
  border-radius: 999px;
  background: var(--accent-wash);
  color: var(--accent-ink);
}


.tag--free {
  background: var(--buy-wash);
  color: var(--buy-ink);
}

.note {
  background: var(--accent-wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
}

.note > :last-child {
  margin-bottom: 0;
}

.note--warn {
  background: var(--warn-wash);
  border-color: var(--warn-line);
}

/* --- Sections ------------------------------------------------------------ */

.section {
  padding-block: var(--space-9);
}

.section--surface {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 60ch;
  margin-bottom: var(--space-7);
}

.section__head h2 {
  margin-bottom: var(--space-3);
}

/* --- Home ---------------------------------------------------------------- */

.hero {
  padding-block: var(--space-9) var(--space-8);
  background:
    radial-gradient(60rem 30rem at 15% -10%, var(--accent-wash), transparent 70%),
    radial-gradient(50rem 26rem at 95% 0%, var(--buy-wash), transparent 70%);
}

.hero h1 {
  max-width: 24ch;
  margin-bottom: var(--space-5);
}

.hero .standfirst {
  font-size: var(--step-2);
  max-width: 48ch;
}

.hero__mark {
  font-family: var(--font-mark);
  font-size: var(--step-3);
  color: var(--accent-ink);
  margin-bottom: var(--space-3);
}

.product-cards {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow);
}

.product-card h2 {
  margin-bottom: 0;
}

.product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-5);
}

.product-card img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

/* --- Feature rows -------------------------------------------------------- */

.feature-row {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  align-items: center;
  margin-bottom: var(--space-8);
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row--flip > :first-child {
  order: 2;
}

@media (max-width: 700px) {
  .feature-row--flip > :first-child {
    order: 0;
  }
}

.feature-row img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

/* --- Feature page groups (translate/features) ---------------------------- */

.jump-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6);
}

.prose .jump-links li {
  margin: 0;
}

.jump-links a {
  display: inline-block;
  padding: 0.35em 0.9em;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step--1);
  text-decoration: none;
}

.jump-links a:hover {
  border-color: var(--accent);
}

.feature-group {
  padding-top: var(--space-8);
  margin-top: var(--space-8);
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--space-5);
}

.feature-group__eyebrow {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  margin: 0 0 var(--space-2);
}

.feature-group > h2 {
  margin-top: 0;
  max-width: 32ch;
}

.feature-group > .lead {
  max-width: var(--measure);
  margin-bottom: var(--space-6);
}

.ticks {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-5);
  display: grid;
  gap: var(--space-2) var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.feature-row .ticks {
  grid-template-columns: 1fr;
}

.ticks li {
  position: relative;
  padding-left: 1.6em;
  margin: 0;
}

.ticks li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  font-weight: 700;
  color: var(--buy);
}

.logo-groups {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  margin-bottom: var(--space-7);
}

.logo-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.logo-group h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--step-0);
}

.logo-group > p {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.logo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  list-style: none;
  padding: 0;
  margin: var(--space-4) 0 0;
}

.prose .logo-chips li {
  margin: 0;
}

/* Third-party logos sit on a white chip, as on the connector cards, so dark
   artwork stays visible in dark mode. */
.logo-chips img {
  display: block;
  height: 1.9rem;
  width: auto;
  max-width: 8rem;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.3rem 0.5rem;
  box-sizing: content-box;
}

.logo-chips .logo-chips__text {
  display: block;
  padding: 0.55rem 0.7rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step--1);
  line-height: 1.2;
}

.shot {
  margin: 0;
}

/* Tall, narrow screenshots (dialogs) would otherwise fill a whole column. */
.shot--narrow img {
  display: block;
  max-width: 22rem;
  margin-inline: auto;
}

.shot--narrow figcaption {
  text-align: center;
}

/* Wide, short screenshots get their own row at their natural size. */
.shot--wide {
  margin-bottom: var(--space-7);
}

.shot--wide img {
  width: auto;
  max-width: 100%;
}

.shot figcaption {
  margin-top: var(--space-2);
  font-size: var(--step--1);
  color: var(--ink-3);
}

/* --- Pricing ------------------------------------------------------------- */

.price-cards {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-7);
  align-items: stretch;
}

/* With exactly 4 cards (uSync.Complete's licence tiers), auto-fit's 18rem
   minimum only fits 3 across the wrap width, so a lone 4th card drops to its
   own row. Force 4 columns once there is room for them; below that width
   auto-fit's wrapping still applies. */
@media (min-width: 860px) {
  .price-cards[data-count="4"] {
    grid-template-columns: repeat(4, 1fr);
  }
}

.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-align: center;
}

.price-card--feature {
  border-color: var(--buy);
  border-width: 2px;
  box-shadow: var(--shadow-lg);
}

/* Reserve two lines for the name, even for a one-line title like "Free
   trial" - otherwise a longer name like "Single project subscription"
   wrapping to two lines pushes its price down, and the prices stop lining up
   across the row. */
.price-card h3 {
  margin-bottom: 0;
  min-height: 2.4em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-card__price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--step-4);
  line-height: 1;
  color: var(--ink);
}

.price-card__price small {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--step--1);
  color: var(--ink-3);
  margin-top: var(--space-2);
}

/* Same reasoning as the h3 rule above: without a reserved height here, a
   longer blurb like "Per project. Never expires for Umbraco v8 to v20."
   wraps to more lines than a short one like "Unlimited projects, billed
   annually.", and the lists below start at different heights across the row. */
.price-card > p.muted {
  min-height: 3.3em;
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
  font-size: var(--step--1);
}

.price-card li {
  padding: var(--space-2) 0;
  border-top: 1px solid var(--line);
}

.price-card__action {
  margin-top: auto;
  padding-top: var(--space-5);
}

.price-card__action .btn {
  width: 100%;
  justify-content: center;
}

/* --- Connector cards ---------------------------------------------------- */

.connectors {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.connector {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* Connector logos are third-party artwork, often black-on-transparent, so they
   sit on their own light chip rather than on the card - otherwise half of them
   vanish in dark mode. */
.connector__logo {
  height: 2.75rem;
  width: auto;
  max-width: 12rem;
  object-fit: contain;
  object-position: left center;
  align-self: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.4rem 0.6rem;
  box-sizing: content-box;
}

.connector h3 {
  margin: 0;
  font-size: var(--step-0);
}

.connector p {
  margin: 0;
  font-size: var(--step--1);
  color: var(--ink-2);
}

.connector__req {
  font-size: var(--step--1);
  color: var(--ink-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  margin-top: auto;
}

.connector__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--step--1);
}

/* --- Forms --------------------------------------------------------------- */

.form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: grid;
  gap: var(--space-4);
}

.field {
  display: grid;
  gap: var(--space-2);
}

label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--step--1);
}

input[type="text"],
input[type="email"],
select,
textarea {
  font: inherit;
  font-size: var(--step-0);
  color: var(--ink);
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6em 0.75em;
  width: 100%;
}

textarea {
  min-height: 10rem;
  resize: vertical;
}

/* Honeypot - real people never see or fill this. */
.hp {
  position: absolute;
  left: -9999px;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: var(--space-8) var(--space-6);
  margin-top: var(--space-9);
  font-size: var(--step--1);
}

.site-footer__cols {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}

.site-footer h2 {
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: var(--space-4);
}

.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.site-footer__legal {
  margin: var(--space-8) 0 0;
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.site-footer__legal p {
  margin: 0;
}

/* --- Theme toggle ---------------------------------------------------------
   No default is being asserted here on purpose - with no data-theme
   attribute the site follows the OS/browser preference, same as before this
   existed. The toggle only sets an explicit "light" or "dark" once clicked;
   see the two dark-palette blocks above for how that value takes precedence
   over prefers-color-scheme in both directions. */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--accent);
}

.theme-toggle__icon {
  width: 1.1rem;
  height: 1.1rem;
}

/* Light is the assumed starting point (no data-theme, system prefers light):
   show the moon (the action available is "switch to dark"). The dark cases
   below flip which icon is visible - same :root selectors as the palette. */
.theme-toggle__icon--sun {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .theme-toggle__icon--sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .theme-toggle__icon--moon {
    display: none;
  }
}

:root[data-theme="dark"] .theme-toggle .theme-toggle__icon--sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .theme-toggle__icon--moon {
  display: none;
}

/* --- Motion / print ------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .product-nav,
  .skip-link {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
