/* Ombro website — one stylesheet for every static page.
   Sizes are in rem and scale fluidly with the viewport (clamp), so the page
   stays wide on big screens and steps down to a single column on phones. */

@font-face {
  font-family: "Geist";
  src: url("/assets/fonts/geist.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("/assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --bg: #f5f4f3;
  --white: #ffffff;
  --panel: #eeeceb;
  --panel-line: #e3e1df;
  --ink: #0b1a1d;
  --ink-soft: #3d4648;
  --muted: #8f8e8d;
  --brand: #0e2c33;
  --brand-hover: #1b4650;
  --brand-tint: #a4d5e2;

  --font: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Ubuntu, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --tracking: -0.005em;

  /* Fluid type: calibrated so a 1440px screen shows the mockups at about 62% */
  --fs-display: clamp(2.25rem, 1.5rem + 1.25vw, 3.25rem);
  --fs-h2: clamp(1.75rem, 1.15rem + 0.95vw, 2.75rem);
  --fs-h3: clamp(1.5rem, 1rem + 0.95vw, 2.375rem);
  --fs-lead: clamp(1.25rem, 0.95rem + 0.55vw, 1.75rem);
  --fs-body-l: clamp(1.0625rem, 0.8rem + 0.5vw, 1.5rem);
  --fs-body: clamp(1rem, 0.8rem + 0.4vw, 1.3rem);
  --fs-body-s: clamp(0.9375rem, 0.8rem + 0.25vw, 1.125rem);
  --fs-ui: clamp(0.8rem, 1.1rem + 0.15vw, 1.1rem);
  --fs-eyebrow: clamp(0.6875rem, 0.62rem + 0.12vw, 0.8125rem);

  --radius: 0.5rem;
  --gutter: clamp(1.25rem, 22vw - 6rem, 16rem);
  --wrap: min(100% - 2 * var(--gutter), 100rem);
  --section: clamp(4rem, 2.5rem + 5vw, 9rem);
  --section-shallow: clamp(2rem, 2.5rem + 5vw, 3rem);
  --stack: clamp(1rem, 0.6rem + 1vw, 2rem);
}

/* ---------- Base ---------- */

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

/* -0.5% tracking on all type, worked out from each element's own size
   (set once on body, an em value would pass down as a fixed length). */
* {
  letter-spacing: var(--tracking);
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: var(--tracking);
  color: var(--ink);
  /* The white wash at the top fades into the page colour */
  background: linear-gradient(var(--white), var(--bg) clamp(18rem, 30vw, 34rem)) no-repeat, var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: var(--tracking);
  text-wrap: balance;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

code {
  font-family: var(--mono);
  font-size: 0.95em;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--brand);
  color: var(--white);
  border-radius: var(--radius);
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Buttons and links ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 2.75em;
  padding: 0.7em 1.6em;
  border-radius: 999px;
  background: var(--brand);
  color: var(--white);
  font-size: var(--fs-ui);
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.button:hover {
  background: var(--brand-hover);
}

.text-link {
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem clamp(1.5rem, 1rem + 1.5vw, 2.75rem);
}

.arrow-link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.6em;
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
  max-width: 18em;
}

.arrow-link svg {
  flex: none;
  width: 1.1em;
  height: 1.1em;
  margin-top: 0.1em;
}

.arrow-link:hover span {
  text-decoration: underline;
}

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

.site-header {
  padding-block: clamp(1.25rem, 0.75rem + 1.5vw, 2.25rem);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-logo {
  flex: none;
}

.site-logo img {
  width: clamp(5.75rem, 4.5rem + 2.6vw, 8.5rem);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.5rem + 2vw, 3rem);
  list-style: none;
  padding: 0;
}

.site-nav a:not(.button) {
  font-size: var(--fs-ui);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:not(.button):hover {
  text-decoration: underline;
}

.site-nav .button {
  padding-inline: clamp(1.1rem, 0.6rem + 1.4vw, 2rem);
}

@media (max-width: 34rem) {
  .site-nav .nav-github {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(2rem, 1rem + 4vw, 5rem);
}

.hero h1 {
  font-size: var(--fs-display);
}

.hero .lead {
  margin-top: 0.75rem;
}

.hero .actions {
  margin-top: clamp(1.75rem, 1rem + 2vw, 3rem);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.3;
}

.hero-shot {
  margin: clamp(2.5rem, 1.5rem + 3vw, 4.5rem) auto 0;
}

.hero-shot img,
.shot img {
  width: 100%;
  border-radius: var(--radius);
}

/* ---------- Statement (icon + words) ---------- */

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

.statement .wrap {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.25rem, 0.5rem + 2.5vw, 3rem);
  max-width: 62rem;
}

.statement img {
  flex: none;
  width: clamp(4.5rem, 3rem + 4vw, 7.5rem);
  margin-top: -0.6rem;
}

.statement p {
  font-size: var(--fs-lead);
  line-height: 1.35;
}

.statement p + p {
  margin-top: 0.6em;
  font-weight: 300;
}

.statement .actions {
  margin-top: clamp(1.25rem, 1rem + 1vw, 2rem);
}

@media (max-width: 40rem) {
  .statement .wrap {
    flex-direction: column;
  }

  .statement img {
    margin-top: 0;
  }
}

/* ---------- Panels ---------- */

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ---------- Benefits (image + words, alternating) ----------
   The image sits flush against the panel's outer edge, inset top and bottom,
   with only its inner corners rounded. */

.benefits {
  display: grid;
  gap: clamp(1rem, 0.75rem + 0.6vw, 1.5rem);
}

.benefit {
  display: grid;
  grid-template-columns: 62fr 38fr;
  align-items: start;
}

.benefit-media {
  margin: clamp(0.75rem, 0.5rem + 0.6vw, 1.25rem) 0;
}

.benefit-media.tone-teal img {
  background: #022b32;
}

.benefit-media.tone-ink img {
  background: #031216;
}

.benefit-media.tone-white img {
  background: var(--white);
}

.benefit-media img {
  width: 100%;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.benefit-text {
  padding: clamp(1.5rem, 1rem + 2vw, 3.5rem) clamp(1.5rem, 1rem + 1.5vw, 3rem);
}

.benefit h2,
.benefit h3 {
  font-size: var(--fs-h2);
}

.benefit-text p {
  margin-top: 0.9em;
  font-size: var(--fs-body-l);
  line-height: 1.35;
}

.benefit-text p + p {
  margin-top: 0.75em;
}

.benefit-text .arrow-link {
  margin-top: clamp(1.5rem, 1rem + 2vw, 3rem);
}

.benefit--flip {
  grid-template-columns: 38fr 62fr;
}

.benefit--flip .benefit-media {
  order: 2;
}

.benefit--flip .benefit-media img {
  border-radius: var(--radius) 0 0 var(--radius);
}

@media (max-width: 52rem) {
  .benefit,
  .benefit--flip {
    grid-template-columns: 1fr;
  }

  .benefit--flip .benefit-media {
    order: 0;
  }

  .benefit-media {
    margin: 0;
  }

  .benefit-media img,
  .benefit--flip .benefit-media img {
    border-radius: 0;
  }
}

.section-title {
  font-size: var(--fs-h2);
  margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
}

/* ---------- What Ombro is (white band, scrolling icon strip) ---------- */

.band {
  background: var(--white);
  padding-block: var(--section);
}

.about {
  position: relative;
  overflow: hidden;
  margin-top: var(--section);
}

.about .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(5.5rem, 3.5rem + 5vw, 9rem);
  gap: clamp(2rem, 1rem + 6vw, 10rem);
}

.about-text {
  max-width: 50rem;
  padding-inline-start: clamp(0rem, -1rem + 2vw, 1.5rem);
}

.about-text h2 {
  font-size: var(--fs-h2);
  margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.75rem);
}

.about-text p {
  font-size: var(--fs-body);
  line-height: 1.45;
}

.about-text p + p {
  margin-top: 0.9em;
}

.about-text .minor {
  font-size: var(--fs-body-s);
  font-weight: 300;
}

.about-text .actions {
  margin-top: clamp(2.75rem, 2rem + 2.5vw, 4.75rem);
}

.icon-strip {
  position: relative;
}

.icon-strip-track {
  position: absolute;
  inset-inline: 0;
  top: calc(-1 * var(--section));
  aspect-ratio: 424 / 8772;
  background: url("/assets/img/vertical-app-graphic-424.webp") repeat-y top center / 100% auto;
}

@media (prefers-reduced-motion: no-preference) {
  .icon-strip-track {
    animation: strip 90s linear infinite;
  }
}

@keyframes strip {
  to {
    transform: translateY(-33.3333%);
  }
}

@media (max-width: 44rem) {
  .about .wrap {
    grid-template-columns: 1fr;
  }

  .icon-strip {
    display: none;
  }
}

/* ---------- Comparison carousel ---------- */

.compare {
  padding-top: var(--section);
}

.compare-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-bottom: clamp(0.75rem, 0.5rem + 0.6vw, 1.25rem);
}

.compare-tabs button {
  appearance: none;
  border: 0;
  background: none;
  padding: 0.5rem 0.25rem;
  font: inherit;
  font-size: var(--fs-ui);
  font-weight: 500;
  letter-spacing: var(--tracking);
  color: var(--ink);
  cursor: pointer;
}

.compare-tabs button:hover {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.compare-tabs button[aria-selected="true"] {
  color: var(--muted);
  cursor: default;
  text-decoration: none;
}

.compare-panel {
  display: grid;
  grid-template-columns: 70fr 30fr;
  grid-template-rows: auto 1fr;
}

.compare-title {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  padding: clamp(1.75rem, 1rem + 2vw, 3.5rem) clamp(1.5rem, 1rem + 2vw, 4rem) 0;
  font-size: var(--fs-h2);
  white-space: nowrap;
}

.compare-text,
.compare-media {
  grid-row: 2;
}

.compare-media {
  grid-column: 2;
  grid-row: 1 / -1;
}

.compare-panel[hidden] {
  display: none;
}

@media (prefers-reduced-motion: no-preference) {
  .compare-panel {
    animation: fade-in 0.35s ease;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.compare-text {
  grid-column: 1;
  padding: 0 clamp(1.5rem, 1rem + 2vw, 4rem) clamp(1.75rem, 1rem + 2vw, 3.5rem);
}

.compare-text p {
  margin-top: 1.1em;
  max-width: 30em;
  font-size: var(--fs-body);
  line-height: 1.4;
}

.compare-text ul {
  margin-top: 0.9em;
  padding-left: 1.2em;
  font-size: var(--fs-body);
  line-height: 1.4;
}

.compare-media {
  position: relative;
  min-height: 14rem;
}

.compare-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}

@media (max-width: 48rem) {
  .compare-tabs {
    flex-direction: column;
    align-items: flex-start;
  }

  .compare-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .compare-title {
    white-space: normal;
  }

  /* Narrow screens: the whole image at its own height, never cropped */
  .compare-media {
    min-height: 0;
  }

  .compare-media img {
    position: static;
    height: auto;
  }

  .compare-title,
  .compare-text,
  .compare-media {
    grid-column: 1;
    grid-row: auto;
  }
}

/* ---------- Use cases ---------- */

.uses {
  padding-top: var(--section);
}

.uses-intro {
  max-width: 34em;
  font-size: var(--fs-body-l);
  line-height: 1.35;
}

.cases {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 0.5rem + 1.5vw, 2.25rem);
  margin-top: clamp(2.5rem, 1.5rem + 3vw, 4.5rem);
}

.case {
  display: flex;
  flex-direction: column;
}

.case--wide {
  grid-column: 1 / -1;
}

.case img {
  width: 100%;
  aspect-ratio: 1524 / 786;
  object-fit: cover;
}

.case--wide img {
  aspect-ratio: 3192 / 786;
}

.case-text {
  padding: clamp(1.25rem, 1rem + 1vw, 2rem) clamp(1.25rem, 1rem + 1.2vw, 2.25rem) clamp(2rem, 1.5rem + 2.5vw, 5rem);
}

.case--wide .case-text p {
  max-width: 34em;
}

.eyebrow {
  display: block;
  font-size: var(--fs-eyebrow);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.case h3 {
  margin-top: 0.35em;
  font-size: var(--fs-h3);
}

.case p {
  margin-top: 1em;
  font-size: var(--fs-body);
  line-height: 1.4;
}

@media (max-width: 44rem) {
  .cases {
    grid-template-columns: 1fr;
  }

  .case--wide img {
    aspect-ratio: 1524 / 786;
  }
}

/* ---------- Two-column lists ---------- */

.list-section {
  padding-top: clamp(2.5rem, 1.75rem + 2.5vw, 4.5rem);
}

.columns-list {
  columns: 2;
  column-gap: clamp(2rem, 1rem + 4vw, 6rem);
  max-width: 64rem;
  padding-left: 1.1em;
  font-size: var(--fs-body-s);
  line-height: 1.4;
}

.columns-list li {
  break-inside: avoid;
  padding-left: 0.2em;
  margin-bottom: 0.85em;
}

.columns-list li::marker {
  font-size: 0.8em;
}

.list-section .actions {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

@media (max-width: 44rem) {
  .columns-list {
    columns: 1;
  }
}

.do-section {
  padding-top: var(--section);
  padding-bottom: var(--section);
}

/* ---------- More (white fading to the page colour) ---------- */

.more {
  background: linear-gradient(var(--white) 55%, var(--bg));
  padding-block: var(--section);
}

.more .intro {
  max-width: 38em;
  margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.5rem);
  font-size: var(--fs-body-s);
}

.more .section-title + .intro {
  margin-top: calc(-0.5 * clamp(1.5rem, 1rem + 1.5vw, 2.5rem));
}

.security {
  margin-top: var(--section);
}

/* ---------- Sign-off ---------- */

.signoff {
  padding-top: calc(var(--section) * 0.5);
  padding-bottom: var(--section);
}

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

.site-footer {
  background: var(--white);
  padding-block: clamp(3rem, 2rem + 3vw, 5rem) clamp(2.5rem, 2rem + 2vw, 4rem);
  font-size: var(--fs-ui);
  font-weight: 500;
}

.site-footer .wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  row-gap: clamp(4rem, 3rem + 6vw, 10rem);
  padding-inline: clamp(0rem, -1rem + 3vw, 2.5rem);
}

.footer-nav {
  grid-column: 1 / -1;
}

.footer-nav ul {
  list-style: none;
  padding: 0;
}

.footer-nav ul + ul {
  margin-top: 1.75em;
}

.footer-nav li + li {
  margin-top: 0.6em;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.site-footer small {
  font-size: inherit;
  font-weight: 400;
}

.site-footer .footer-logo img {
  width: clamp(5.5rem, 4.5rem + 2vw, 7.25rem);
}

/* ---------- Download page ---------- */

.cli {
  padding-top: var(--section-shallow);
}

.cli h2 {
  font-size: var(--fs-lead);
  margin-top: 3rem;
  margin-bottom: clamp(1.25rem, 1rem + 1vw, 2rem);
}

.cli p {
  font-size: var(--fs-body-s);
}

.cli p + .code {
  margin-top: 1rem;
}

.cli .code + p {
  margin-top: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}

.code {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(1rem, 0.75rem + 0.8vw, 1.6rem) clamp(1rem, 0.75rem + 1vw, 1.75rem);
}

.code pre {
  flex: 1;
  margin: 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: var(--fs-body-s);
  line-height: 1.5;
}

.copy-button {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: none;
  color: var(--ink);
  cursor: pointer;
}

.copy-button:hover {
  background: var(--bg);
}

.copy-button svg {
  width: 1.15rem;
  height: 1.15rem;
}

.copy-button .icon-check,
.copy-button.is-copied .icon-copy {
  display: none;
}

.copy-button.is-copied .icon-check {
  display: block;
}

.github-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  margin-top: clamp(2.5rem, 2rem + 2vw, 4rem);
  font-size: var(--fs-lead);
  text-decoration: none;
}

.github-link img {
  width: 1.6em;
  height: 1.6em;
}

.github-link:hover span {
  text-decoration: underline;
}

.shot {
  margin: clamp(2.5rem, 2rem + 2vw, 4rem) 0 0;
}

/* ---------- Terms page ---------- */

.legal {
  padding-top: clamp(3rem, 2rem + 4vw, 6rem);
  padding-bottom: var(--section);
}

.legal section + section {
  margin-top: clamp(3rem, 2rem + 4vw, 6rem);
}

.legal h2 {
  font-size: var(--fs-h3);
  margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.75rem);
}

.legal ol {
  max-width: 42rem;
  padding-left: 1.5em;
  font-size: max(0.9375rem, var(--fs-body-l) * 0.7);
  line-height: 1.4;
}

.legal ol ol {
  font-size: 1em;
  list-style-type: lower-alpha;
  margin-top: 0.9em;
  padding-left: 1.6em;
}

.legal ol ol ol {
  list-style-type: lower-roman;
}

.legal li {
  padding-left: 0.25em;
}

.legal li + li {
  margin-top: 0.9em;
}

.legal h3 {
  font-size: var(--fs-body-l);
  font-weight: 500;
  margin-top: clamp(1.75rem, 1.4rem + 1vw, 2.5rem);
  margin-bottom: 0.6em;
}

.legal h2 + h3 {
  margin-top: 0;
}

.legal p {
  max-width: 42rem;
  font-size: max(0.9375rem, var(--fs-body-l) * 0.7);
  line-height: 1.5;
}

.legal p + p {
  margin-top: 0.9em;
}

.legal a {
  color: inherit;
}

.legal-updated {
  margin-top: 1rem;
  font-size: var(--fs-body-s);
  color: var(--muted);
}

/* ---------- Not found ---------- */

.not-found {
  padding-block: clamp(3rem, 2rem + 6vw, 9rem);
}

/* ---------- Scroll reveal ----------
   Lower sections ease in as they scroll into view. Pure CSS: browsers
   without scroll-driven animations (or with reduced motion) show them as-is. */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 5% entry 60%;
    }
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
}
