/* AFOS marketing site — see DESIGN.md for the system this file implements.
   Logical properties throughout: Arabic (RTL) locale planned. */

/* ---------- Fonts (self-hosted, see assets/fonts/fonts.css) ---------- */
@import url("../fonts/fonts.css");

/* ---------- Tokens ---------- */
:root {
  --paper: #ffffff;
  --field: #f6f4f1;
  --ink: #16232e;
  --body: #43525e;
  --faint: #5f6d79;
  --line: #e2ded8;
  --navy: #1d3040;
  --navy-2: #27405a;
  --orange: #ff541e;
  --orange-press: #e2430f;
  --on-orange: #ffffff;
  --petal: #00a1fb;

  --f-gold: #f0b030;
  --f-grain: #f09030;
  --f-green: #5da85c;
  --f-sky: #5aa6c8;
  --f-teal: #3f9f8f;
  --f-clay: #c95f4f;
  --f-blue: #3070b0;
  --f-plum: #7f5fa0;

  --display: "Manrope", "Noto Sans Arabic", system-ui, "Segoe UI", sans-serif;
  --sans: "Manrope", "Noto Sans Arabic", system-ui, "Segoe UI", sans-serif;

  --shadow-float: 0 24px 48px -24px rgb(22 35 46 / 0.25);
  --r-card: 16px;
  --r-img: 12px;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --container: 1440px;
  --header-h: 76px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--body);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.cta-band :focus-visible {
  outline-color: #fff;
}

.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;
  inset-inline-start: 16px;
  inset-block-start: -48px;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: inset-block-start 0.2s var(--ease-out);
}

.skip-link:focus-visible {
  inset-block-start: 12px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(24px, 3vw, 44px);
}

/* ---------- Type helpers ---------- */
.display-1 {
  font-size: clamp(2.6rem, 4.3vw, 4.3rem);
  font-weight: 800;
  letter-spacing: -0.022em;
  line-height: 1.04;
  /* German compounds (Futtermitteloptimierung) outrun the hero column;
     hyphenation only engages when a word would not otherwise fit. */
  hyphens: auto;
  overflow-wrap: break-word;
}

.display-2 {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.lede {
  font-size: 1.1875rem;
  line-height: 1.6;
  max-width: 34em;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 1.1875rem/1.2 var(--sans);
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s var(--ease-out), border-color 0.18s var(--ease-out),
    color 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}

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

/* Hero buttons: arrow hidden until hover/focus — label slides start-ward,
   the curved arrow stays put and draws itself in from the base */
.btn-peek {
  position: relative;
}

.btn-peek .label {
  display: inline-block;
  transition: transform 0.22s var(--ease-out);
}

.btn-peek .arrow {
  position: absolute;
  inset-inline-end: 14px;
  inset-block-start: calc(50% - 8px);
  width: 17px;
  height: 17px;
  opacity: 0;
  transform: none;
  transition: opacity 0.2s var(--ease-out);
}

.btn-peek .arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}

.btn-peek .shaft {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 0.32s var(--ease-out) 0.04s;
}

.btn-peek .head {
  opacity: 0;
  transition: opacity 0.16s var(--ease-out) 0.22s;
}

.btn-peek:hover .label,
.btn-peek:focus-visible .label {
  transform: translateX(-11px);
}

.btn-peek:hover .arrow,
.btn-peek:focus-visible .arrow {
  opacity: 1;
  transform: none;
}

.btn-peek:hover .shaft,
.btn-peek:focus-visible .shaft {
  stroke-dashoffset: 0;
}

.btn-peek:hover .head,
.btn-peek:focus-visible .head {
  opacity: 1;
}

[dir="rtl"] .btn-peek .arrow svg {
  transform: scaleX(-1);
}

[dir="rtl"] .btn-peek:hover .label,
[dir="rtl"] .btn-peek:focus-visible .label {
  transform: translateX(11px);
}

.btn-primary {
  background: var(--orange);
  color: var(--on-orange);
}

.btn-primary:hover {
  background: var(--orange-press);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--ink);
}

.btn-on-orange {
  background: #fff;
  color: var(--ink);
}

.btn-on-orange:hover {
  background: var(--navy);
  color: #fff;
}

.btn-ghost-light {
  background: transparent;
  color: #fff;
  border-color: rgb(255 255 255 / 0.55);
}

.btn-ghost-light:hover {
  border-color: #fff;
  background: rgb(255 255 255 / 0.12);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  inset-block-start: 0;
  z-index: 50;
  background: var(--paper);
  border-block-end: 1px solid transparent;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.site-header.scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 24px -20px rgb(22 35 46 / 0.35);
}

.header-bar {
  display: flex;
  align-items: center;
  /* Fluid below ~1280px so longer locale labels (es, de…) never clip the CTA */
  gap: clamp(14px, 2vw, 28px);
  min-height: var(--header-h);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-link img {
  width: 108px;
}

.site-nav {
  margin-inline-start: clamp(12px, 2vw, 40px);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.42vw, 6px);
}

/* Narrow desktop: the logo already links home — drop the Home item so
   longer locale labels (de, es) never push the CTA out */
@media (min-width: 1081px) and (max-width: 1320px) {
  .nav-list > li:first-child {
    display: none;
  }
}

.nav-list > li > a:not(.btn),
.nav-dd > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px clamp(9px, 1vw, 14px);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s var(--ease-out);
  white-space: nowrap;
}

.nav-list > li > a:not(.btn):hover,
.nav-dd > summary:hover {
  background: var(--field);
}

.nav-list > li > a:not(.btn)[aria-current="page"] {
  font-weight: 700;
}

/* Solutions dropdown (native <details> so it works without JS) */
.nav-dd {
  position: relative;
}

.nav-dd > summary {
  list-style: none;
}

.nav-dd > summary::-webkit-details-marker {
  display: none;
}

.nav-dd > summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.15s var(--ease-out);
}

.nav-dd[open] > summary::after {
  transform: rotate(225deg) translateY(-1px);
}

/* The chevron is two logical borders rotated into a caret, so RTL flips which
   corner they meet at — mirror the rotation to keep it pointing down. */
[dir="rtl"] .nav-dd > summary::after {
  transform: rotate(-45deg) translateY(-2px);
}

[dir="rtl"] .nav-dd[open] > summary::after {
  transform: rotate(-225deg) translateY(-1px);
}

.dd-panel {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: calc(100% + 10px);
  min-width: 300px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: 0 24px 48px -28px rgb(22 35 46 / 0.35);
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dd-group-title {
  font: 700 0.8125rem/1.2 var(--sans);
  color: var(--faint);
  margin-block-end: 10px;
}

.dd-panel a {
  display: block;
  padding: 8px 10px;
  margin-inline: -10px;
  border-radius: 8px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.dd-panel a:hover {
  background: var(--field);
}

.dd-group-gap {
  margin-block-start: 18px;
}

.why-cloud-teaser {
  text-align: center;
  margin-block-start: 32px;
}

.header-end {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Locale switcher */
.locale-dd {
  position: relative;
}

.locale-dd > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  white-space: nowrap;
}

.locale-dd > summary::-webkit-details-marker {
  display: none;
}

.locale-dd > summary:hover {
  border-color: var(--ink);
}

.locale-dd .globe {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.locale-panel {
  position: absolute;
  inset-inline-end: 0;
  inset-block-start: calc(100% + 10px);
  min-width: 140px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 24px 48px -28px rgb(22 35 46 / 0.35);
  padding: 8px;
}

.locale-panel a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink);
}

/* Country flags: pre-rendered PNGs so every platform shows the same art */
.locale-panel .flag {
  display: inline-flex;
  align-items: center;
}

.locale-panel .flag img {
  display: block;
  width: 20px;
  height: auto;
}

.locale-panel a:hover {
  background: var(--field);
}

.locale-panel a[aria-current="true"] {
  font-weight: 700;
}

.header-cta {
  min-height: 44px;
  padding-block: 9px;
  flex-shrink: 0;
}

/* "Try for Free" inside the nav panel — mobile only */
.nav-cta-item {
  display: none;
}

@media (max-width: 1080px) {
  .nav-cta-item {
    display: block;
    margin-block-start: 20px;
  }

  .nav-cta-item .btn {
    width: 100%;
  }
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s var(--ease-out), opacity 0.2s;
}

.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  display: grid;
  align-content: center;
  padding-block: clamp(40px, 5vh, 72px);
  overflow: clip;
}

/* Owner-tuned optical center: content sits 50px above true center on desktop */
@media (min-width: 1081px) {
  .hero {
    padding-block-end: calc(clamp(40px, 5vh, 72px) + 100px);
  }
}

/* The old site's hero backsplash (wave lines), edges faded via mask */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline: 0;
  inset-block-end: 0;
  height: min(547px, 90%);
  background: var(--waves, url("../img/bg-lines.svg")) center bottom / max(100%, 1440px) auto no-repeat;
  -webkit-mask-image: radial-gradient(115% 100% at 50% 62%, #000 42%, transparent 74%);
  mask-image: radial-gradient(115% 100% at 50% 62%, #000 42%, transparent 74%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(32px, 5vw, 90px);
}

.hero-copy .display-1 {
  margin-block-end: 22px;
  max-width: 12em;
}

.hero-copy .dot {
  color: var(--orange);
}

.hero-copy .lede {
  margin-block-end: 34px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.app-window {
  margin: 0;
  border-radius: 8px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
  border: 1px solid rgb(22 35 46 / 0.28);
}

.app-window img {
  width: 100%;
}

/* Composition bar — the signature. Real formula from the results chart. */
.formula-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
}

.formula-bar span {
  display: block;
  height: 100%;
}

.js .formula-bar.animate span {
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.js .formula-bar.animate.in span {
  transform: scaleX(1);
  transition: transform 0.7s var(--ease-out);
}

[dir="rtl"] .formula-bar span {
  transform-origin: 100% 50%;
}

.seg-corn { background: var(--f-gold); flex: 48 0 0; }
.seg-soy { background: var(--f-grain); flex: 12 0 0; }
.seg-bran { background: var(--f-green); flex: 10 0 0; }
.seg-rice { background: var(--f-sky); flex: 8 0 0; }
.seg-cotton { background: var(--f-teal); flex: 8 0 0; }
.seg-molasses { background: var(--f-clay); flex: 5 0 0; }
.seg-limestone { background: #d8d3cb; flex: 4 0 0; }
.seg-dical { background: var(--f-blue); flex: 2.5 0 0; }
.seg-salt { background: var(--f-plum); flex: 1.5 0 0; }
.seg-premix { background: #8fd8d8; flex: 1 0 0; }

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(72px, 10vw, 152px);
}

.section-field {
  background: var(--field);
}

/* Soft color ramps instead of hard edges where field sections meet paper */
.section-field.fade-top {
  background: linear-gradient(to bottom, var(--paper), var(--field) clamp(80px, 10vw, 140px));
}

.section-field.fade-both {
  background: linear-gradient(
    to bottom,
    var(--paper),
    var(--field) clamp(80px, 10vw, 140px),
    var(--field) calc(100% - clamp(80px, 10vw, 140px)),
    var(--paper)
  );
}

#the-features {
  padding-block: clamp(56px, 7vw, 104px) clamp(72px, 9vw, 120px);
}

#see-afos {
  padding-block-start: 0;
}

#testimonials {
  padding-block-end: clamp(40px, 5vw, 64px);
}

.curve-bottom {
  border-end-start-radius: 48px;
  border-end-end-radius: 48px;
}

.curve-top {
  border-start-start-radius: 48px;
  border-start-end-radius: 48px;
}

.section-head {
  max-width: 44rem;
  margin-block-end: clamp(36px, 5vw, 56px);
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 30px;
}

.feature-lead {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(30px, 4vw, 48px);
}

.feature-lead h3 {
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: 700;
  margin-block-end: 16px;
  max-width: 14em;
}

.feature-lead p {
  max-width: 58ch;
}

.feature-lead img {
  border-radius: var(--r-img);
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 14px;
}

.card-title-row svg {
  width: 24px;
  height: 24px;
  stroke: var(--navy);
  flex-shrink: 0;
}

.card-title-row h3 {
  font-size: 1.3125rem;
  font-weight: 700;
}

.card p + p {
  margin-block-start: 12px;
}

.card p {
  font-size: 0.9765rem;
  line-height: 1.62;
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-block-start: clamp(36px, 5vw, 52px);
}

/* ---------- 404 ---------- */
.notfound-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 0;
}

.notfound-links a {
  padding-inline: clamp(16px, 2.4vw, 28px);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--ink);
  text-decoration: none;
  border-inline-end: 1px solid var(--line);
  transition: color 0.16s var(--ease-out);
}

.notfound-links a:last-child {
  border-inline-end: 0;
}

.notfound-links a:hover {
  color: var(--orange-press);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------- Proof strip ---------- */
.proof-strip {
  padding-block-start: clamp(56px, 7vw, 96px);
  text-align: center;
}

.proof-strip .tick {
  display: inline-flex;
  height: 8px;
  width: 120px;
  border-radius: 999px;
  overflow: hidden;
  margin-block-end: 26px;
}

.proof-strip .tick span {
  height: 100%;
}

.proof-strip p {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 600;
  color: var(--ink);
  max-width: 26em;
  margin-inline: auto;
  text-wrap: balance;
}

/* ---------- Developed for ---------- */
.audience-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
}

.audience-intro {
  display: flex;
  flex-direction: column;
}

.audience-intro .display-2 {
  margin-block-end: 24px;
}

.audience-intro img {
  border-radius: var(--r-img);
  margin-block-end: 28px;
  flex: 1;
  min-height: 0;
  object-fit: cover;
}

.audience-cards {
  display: grid;
  gap: 24px;
  align-content: space-between;
}

.audience-card .card-title-row {
  margin-block-end: 12px;
}

.audience-card h3 {
  font-size: 1.3125rem;
  font-weight: 700;
}

.audience-card p {
  font-size: 0.9765rem;
  line-height: 1.62;
  margin-block-end: 18px;
  max-width: 64ch;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
}

.read-more .arrow {
  color: var(--orange);
  width: 15px;
  height: 15px;
  opacity: 0;
  transition: opacity 0.2s var(--ease-out);
}

.read-more .arrow svg {
  display: block;
  width: 100%;
  height: 100%;
}

.read-more .shaft {
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  transition: stroke-dashoffset 0.32s var(--ease-out) 0.04s;
}

.read-more .head {
  opacity: 0;
  transition: opacity 0.16s var(--ease-out) 0.22s;
}

.read-more:hover .arrow,
.read-more:focus-visible .arrow {
  opacity: 1;
}

.read-more:hover .shaft,
.read-more:focus-visible .shaft {
  stroke-dashoffset: 0;
}

.read-more:hover .head,
.read-more:focus-visible .head {
  opacity: 1;
}

[dir="rtl"] .read-more .arrow svg {
  transform: scaleX(-1);
}

.read-more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Testimonials ---------- */
/* Testimonial ring: slow continuous loop, pauses for reading */
.testimonial-ring {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}

.ring-track {
  display: flex;
  width: max-content;
}

/* Heading row: title at inline-start, prev/next arrows at inline-end */
.ring-head {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.ring-head h2 {
  max-width: 44rem;
}

.ring-nav {
  display: flex;
  gap: 10px;
  margin-block-end: 4px;
}

.ring-nav[hidden] {
  display: none;
}

.ring-btn {
  inline-size: 44px;
  block-size: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ring-btn:hover {
  border-color: var(--orange);
  color: var(--orange);
}

[dir="rtl"] .ring-btn svg {
  transform: scaleX(-1);
}

@media (max-width: 767px) {
  .ring-nav {
    display: none;
  }
}

.ring-set {
  display: flex;
  align-items: stretch;
  gap: 24px;
  padding-inline-end: 24px;
}

.ring-set .testimonial {
  width: 400px;
  flex-shrink: 0;
  margin-block-end: 0;
  display: flex;
}

.ring-set .testimonial blockquote {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ring-set .attribution {
  margin-block-start: auto;
}

@media (min-width: 768px) {
  .js .ring-track {
    will-change: transform;
  }

  /* Long quotes clamp; per-card Read more (JS adds the button) unclamps */
  .js .ring-set .quote-body {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 10;
    overflow: hidden;
  }

  .js .ring-set .testimonial.open .quote-body {
    display: block;
    -webkit-line-clamp: none;
  }
}

.quote-toggle {
  align-self: flex-start;
  margin-block: 8px 20px;
  border: 0;
  background: none;
  padding: 0;
  font: 600 0.875rem var(--sans);
  color: var(--orange-press);
  cursor: pointer;
}

.quote-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* No JS: static scrollable row. Reduced motion: same. */
.testimonial-ring {
  overflow-x: auto;
}

.js .testimonial-ring {
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .js .testimonial-ring {
    overflow-x: auto;
  }

  .ring-dupe {
    display: none !important;
  }
}

/* Mobile: vertical stack, 4 + show all (ring behavior off) */
@media (max-width: 767px) {
  .ring-track {
    display: block;
    width: auto;
  }

  .ring-set {
    display: grid;
    gap: 20px;
    padding-inline-end: 0;
  }

  .ring-dupe {
    display: none;
  }

  .ring-set .testimonial {
    width: auto;
  }

  .testimonial-ring {
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.testimonial {
  break-inside: avoid;
  margin-block-end: 24px;
}

.testimonial {
  background: #f0ece5;
  border: 0;
  padding: 32px;
}

.testimonial blockquote {
  margin: 0;
}

.testimonial .org-head {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding-block-end: 16px;
  border-block-end: 1px solid rgb(22 35 46 / 0.12);
  margin-block-end: 24px;
}

.testimonial .org-head .org-logo {
  max-height: 44px;
  max-width: 190px;
  width: auto;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.75;
  mix-blend-mode: multiply;
  transition: filter 0.25s var(--ease-out), opacity 0.25s var(--ease-out);
}

.testimonial h3 {
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin-block-end: 12px;
}

.testimonial h3::before {
  content: "\201C";
  display: block;
  font-family: var(--sans); /* quote-glyph-font */
  font-size: 3rem;
  font-weight: 700;
  line-height: 0.6;
  color: var(--orange);
  margin-block: 12px 4px;
}

.testimonial .quote-body {
  font-size: 0.9688rem;
  line-height: 1.66;
  margin-block-end: 24px;
}

.testimonial .quote-body p + p {
  margin-block-start: 10px;
}

.attribution {
  display: flex;
  align-items: center;
  gap: 12px;
}

.attribution img.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2.5px solid #241f31;
}

.attribution .who {
  min-width: 0;
}

.attribution .name {
  font-style: normal;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink);
  display: block;
}

.attribution .where {
  font-size: 0.8438rem;
  color: var(--faint);
  display: block;
}

.testimonial:hover .org-logo {
  filter: none;
  opacity: 1;
}

/* Mobile: show 4 testimonials, expand on demand (all visible without JS) */
.show-testimonials {
  display: none;
}

@media (max-width: 767px) {
  .js .testimonial-ring:not(.expanded) .testimonial:nth-of-type(n + 5) {
    display: none;
  }

  .js .show-testimonials {
    display: flex;
    justify-content: center;
    margin-block-start: 4px;
  }

  .js .show-testimonials.hidden {
    display: none;
  }
}

/* ---------- Product proof media ---------- */
.media-row {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: clamp(32px, 5vw, 56px);
}

.media-row > figure,
.media-row > .video-facade {
  width: min(100%, 880px);
}

.media-row > figure {
  margin: 0;
}

.video-facade {
  position: relative;
  display: block;
  border-radius: var(--r-img);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--navy);
  box-shadow: var(--shadow-float);
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-facade .play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
  transition: background-color 0.18s var(--ease-out), transform 0.18s var(--ease-out);
}

.video-facade:hover .play {
  background: var(--orange-press);
  transform: scale(1.05);
}

.video-facade .play svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  margin-inline-start: 4px;
}

.video-facade iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Formula bar as the CTA band's top edge */
.formula-bar.band-edge {
  margin-block: 0;
  border-radius: 0;
  height: 10px;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--orange);
  color: var(--on-orange);
  text-align: center;
  padding-block: clamp(64px, 8vw, 104px);
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(1.75rem, 3.2vw, 2.6rem);
  font-weight: 700;
  max-width: 18em;
  margin-inline: auto;
  margin-block-end: 34px;
  letter-spacing: -0.01em;
}

.cta-band .btn-row {
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgb(255 255 255 / 0.82);
  padding-block: clamp(56px, 7vw, 88px) 40px;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  padding-block-end: clamp(40px, 5vw, 64px);
  border-block-end: 1px solid rgb(255 255 255 / 0.14);
}

.footer-brand img {
  width: 132px;
  margin-block-end: 18px;
}

.footer-brand p {
  max-width: 24em;
  line-height: 1.6;
}

.footer-col h3 {
  color: #fff;
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-block-end: 16px;
}

.footer-col a {
  display: inline-block;
  padding-block: 5px;
  color: rgb(255 255 255 / 0.82);
  text-decoration: none;
}

.footer-col a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}







.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
  padding-block-start: 28px;
}

.footer-meta .social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgb(255 255 255 / 0.82);
  text-decoration: none;
  font-weight: 600;
}

.footer-meta .social:hover {
  color: #fff;
}

.footer-meta .social svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-meta .copyright {
  margin-inline-start: auto;
  color: rgb(255 255 255 / 0.62);
}

.footer-locales {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  /* seven language names in one row overflow a phone otherwise */
  max-width: 100%;
}

.footer-locales a {
  color: rgb(255 255 255 / 0.62);
  text-decoration: none;
}

.footer-locales a:hover,
.footer-locales a[aria-current="true"] {
  color: #fff;
}

/* ---------- Reveal on scroll (JS-gated: fully visible without JS) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.js .reveal.d1 { transition-delay: 0.08s; }
.js .reveal.d2 { transition-delay: 0.16s; }
.js .reveal.d3 { transition-delay: 0.24s; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-grid .card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1080px) {
  .site-nav {
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    z-index: 60;
    width: min(340px, 88vw);
    background: var(--paper);
    border-inline-start: 1px solid var(--line);
    box-shadow: -24px 0 48px -32px rgb(22 35 46 / 0.4);
    padding: 96px 28px 28px;
    margin: 0;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s var(--ease-out), visibility 0.3s;
    overflow-y: auto;
  }

  [dir="rtl"] .site-nav {
    transform: translateX(-100%);
    box-shadow: 24px 0 48px -32px rgb(22 35 46 / 0.4);
  }

  .nav-open .site-nav {
    transform: none;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }

  .nav-list > li > a:not(.btn),
  .nav-dd > summary {
    display: flex;
    width: 100%;
    justify-content: space-between;
    font-size: 1.0625rem;
    padding: 12px 14px;
  }

  .nav-dd .dd-panel {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 4px 14px 12px;
    grid-template-columns: 1fr;
    gap: 16px;
    min-width: 0;
  }

  .nav-toggle {
    display: inline-flex;
    z-index: 70;
  }

  .header-cta {
    display: none;
  }

}

@media (max-width: 991px) {
  .hero-grid,
  .audience-grid,
  .media-row {
    grid-template-columns: 1fr;
  }

  .audience-intro {
    position: static;
  }

  .audience-intro img {
    max-height: 340px;
    width: 100%;
    object-fit: cover;
  }

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

  .testimonial-columns {
    columns: 1;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  }

@media (max-width: 640px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid .card:last-child {
    grid-column: auto;
  }

  .curve-bottom {
    border-end-start-radius: 28px;
    border-end-end-radius: 28px;
  }

  .curve-top {
    border-start-start-radius: 28px;
    border-start-end-radius: 28px;
  }

  .btn-row .btn {
    flex: 1 1 auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-meta .copyright {
    margin-inline-start: 0;
    flex-basis: 100%;
  }

  }

/* ---------- Coarse pointers: 44px touch floor ---------- */
@media (pointer: coarse) {
  .footer-col a,
  .footer-locales a,
  .footer-meta .social,
  .read-more,
  .dd-panel a,
  .locale-panel a {
    padding-block: 10px;
  }

  .locale-dd > summary {
    min-height: 44px;
  }
}

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

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

  .js .reveal,
  .js .formula-bar.animate span {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Subpages ---------- */
.page-hero {
  position: relative;
  padding-block: clamp(48px, 7vh, 88px) clamp(36px, 5vh, 60px);
  overflow: clip;
}

.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset-inline: 0;
  inset-block-end: 0;
  height: 100%;
  background: var(--waves, url("../img/bg-lines.svg")) center bottom / max(100%, 1440px) auto no-repeat;
  -webkit-mask-image: radial-gradient(115% 115% at 50% 58%, #000 30%, transparent 66%), linear-gradient(to bottom, #000 62%, transparent 94%);
  -webkit-mask-composite: source-in;
  mask-image: radial-gradient(115% 115% at 50% 58%, #000 30%, transparent 66%), linear-gradient(to bottom, #000 62%, transparent 94%);
  mask-composite: intersect;
  pointer-events: none;
}

.page-hero-grid {
  max-width: 54rem;
  margin-inline: auto;
  text-align: center;
}

.page-hero-grid h1 {
  transform: translate(5px, 7.5px);
  margin-block-start: -20px;
}

.page-hero-grid p {
  margin-inline: auto;
}

.page-hero .formula-bar {
  margin-inline: auto;
}

.page-hero-intro {
  margin-block-start: 26px;
}

.page-hero .formula-bar {
  margin-block: 26px 0;
  max-width: 190px;
  height: 8px;
}

.page-hero-grid p {
  max-width: 70ch;
}

.page-hero-grid p + p {
  margin-block-start: 12px;
}

.section-sub {
  margin-block-start: 14px;
  max-width: 52ch;
}

#feature-gallery {
  padding-block-start: clamp(48px, 6vw, 88px);
}

/* Feature gallery: two-column masonry of product tiles */
.feature-masonry {
  columns: 2;
  column-gap: 24px;
  max-width: 1080px;
  margin-inline: auto;
}

.feature-tile {
  break-inside: avoid;
  margin-block-end: 24px;
  padding: 28px;
}

/* Gallery screenshots ship at wildly different native sizes, so each tile
   used to be a different height and the UI read at a different zoom.
   One frame per tile; per-image framing is tuned below. */
.tile-shot {
  aspect-ratio: 16 / 10;
  margin-block-end: 22px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
}

.tile-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  margin: 0;
}

.feature-tile h2 {
  font-size: 1.3125rem;
  font-weight: 700;
  margin-block-end: 10px;
}

.feature-tile p {
  font-size: 0.9765rem;
  line-height: 1.62;
}

.feature-tile p + p {
  margin-block-start: 10px;
}

.feature-tile-cta .btn {
  margin-block-start: 18px;
}

/* Divider between the gallery and the closer */
.gallery-divider {
  border: 0;
  border-block-start: 1px solid rgb(22 35 46 / 0.14);
  width: min(440px, 60%);
  margin: clamp(48px, 6vw, 72px) auto 0;
}

/* Custom features closer: centered CTA under the gallery */
.custom-cta {
  max-width: 640px;
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding: clamp(32px, 4vw, 44px);
  text-align: center;
  background: #f0ece5;
  border: 0;
}

.custom-cta h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-block-end: 12px;
}

.custom-cta p {
  font-size: 0.9765rem;
  line-height: 1.62;
  max-width: 48ch;
  margin-inline: auto;
}

.custom-cta p + p {
  margin-block-start: 8px;
}

.custom-cta .btn {
  margin-block-start: 22px;
}

#cloud-benefits {
  padding-block-start: clamp(40px, 5vw, 72px);
}

/* Cloud benefits: tick-divided trio grid */
.cloud-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 48px);
}

.benefit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-block-end: 12px;
}

.benefit-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  padding: 6px;
  border-radius: 10px;
  color: var(--navy);
  background: rgb(29 48 64 / 0.06);
}

.cloud-benefit h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
}

.cloud-benefit p {
  font-size: 0.9765rem;
  line-height: 1.62;
  max-width: 44ch;
}

/* TCO */
.tco-figure {
  margin: 0 auto;
  max-width: 760px;
}

.tco-figure img {
  mix-blend-mode: multiply;
}

.tco-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  max-width: 1000px;
  margin: clamp(28px, 4vw, 44px) auto 0;
}

.tco-copy p {
  font-size: 0.9765rem;
  line-height: 1.62;
}

@media (max-width: 991px) {
  .feature-masonry {
    columns: 1;
  }

  .cloud-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tco-copy {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .cloud-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Industries ---------- */
#industry-grid {
  padding-block-start: clamp(48px, 6vw, 88px);
}

.industry-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 1240px;
  margin-inline: auto;
}

.industry-card {
  display: flex;
  flex-direction: column;
  padding: 24px 24px 28px;
}

.industry-photo {
  border-radius: 8px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-block-end: 20px;
}

.industry-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.industry-card .card-title-row h2 {
  font-size: 1.3125rem;
  font-weight: 700;
}

.industry-card p {
  font-size: 0.9765rem;
  line-height: 1.62;
}

.industry-card .read-more {
  margin-block-start: 14px;
  align-self: start;
}

@media (max-width: 991px) {
  .industry-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .industry-cards {
    grid-template-columns: 1fr;
  }
}

/* ---------- Audience pages ---------- */
.audience-photo-band {
  padding-block: clamp(8px, 2vw, 24px) 0;
}

.audience-photo {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 50% 45%;
  border-radius: var(--r-img);
}

#audience-benefits {
  padding-block-start: clamp(48px, 6vw, 88px);
}

#audience-benefits .cloud-benefit p + p {
  margin-block-start: 8px;
}

/* ---------- FAQ ---------- */
#faq-list {
  padding-block-start: clamp(48px, 6vw, 88px);
}

.faq-items {
  max-width: 860px;
  margin-inline: auto;
  display: grid;
  gap: 14px;
}

.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary h3 {
  font-size: 1.1875rem;
  font-weight: 700;
  margin: 0;
}

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 0;
  width: 100%;
  height: 2.25px;
  border-radius: 2px;
  background: var(--orange);
  transition: transform 0.22s var(--ease-out);
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-icon::after {
  transform: rotate(0deg);
}

.faq-answer {
  padding: 0 26px 24px;
  max-width: 72ch;
}

.faq-answer p {
  font-size: 0.9765rem;
  line-height: 1.64;
}

.faq-answer p + p {
  margin-block-start: 10px;
}

/* ---------- Form pages (demo, contact) ---------- */
.form-hero {
  padding-block-end: clamp(64px, 8vw, 120px);
}

.form-hero .page-hero-grid,
.form-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
  max-width: none;
  margin-inline: 0;
  text-align: start;
}

.form-hero .formula-bar {
  margin-inline: 0;
  max-width: 190px;
  margin-block: 26px 0;
}

.form-hero h1 {
  transform: none;
  margin-block-start: 0;
}

.form-page-intro {
  margin-block-start: 24px;
  max-width: 46ch;
}

.contact-info {
  margin-block-start: 36px;
  display: grid;
  gap: 24px;
}

.contact-info h2 {
  font-family: var(--sans);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  margin-block-end: 6px;
}

.contact-info a {
  font-weight: 600;
  color: var(--ink);
}

.form-card {
  padding: clamp(28px, 4vw, 44px);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.form-field label {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  font: 500 0.9375rem/1.4 var(--sans);
  color: var(--ink);
  transition: border-color 0.15s var(--ease-out);
}

.form-field textarea {
  resize: vertical;
}

.form-field input:hover,
.form-field select:hover,
.form-field textarea:hover {
  border-color: var(--faint);
}

.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible {
  outline: 2px solid var(--orange-press);
  outline-offset: 0;
  border-color: transparent;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--faint);
}

.form-submit {
  margin-block-start: 26px;
  width: 100%;
}

@media (max-width: 991px) {
  .form-page-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Legal prose ---------- */
.legal-section {
  padding-block-start: 0;
}

.legal-prose {
  max-width: 70ch;
  margin-inline: auto;
}

.legal-prose p {
  margin-block-end: 16px;
  font-size: 0.9765rem;
  line-height: 1.7;
}

.legal-prose strong {
  color: var(--ink);
}

/* ---------- TMR ---------- */
#tmr-value {
  padding-block-start: clamp(48px, 6vw, 88px);
}

.tmr-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
  max-width: 1120px;
  margin-inline: auto;
}

.tmr-photo {
  border-radius: var(--r-img);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.tmr-blurbs {
  display: grid;
  gap: clamp(24px, 3vw, 40px);
}

/* These blurbs sit in one wide column, not the three-up grid the
   .cloud-benefit measure was tuned for — let the text fill its column. */
.tmr-blurbs .cloud-benefit p {
  max-width: 58ch;
}

.tmr-figure {
  margin: 0 auto;
  max-width: 1100px;
  text-align: center;
}

.tmr-figure img {
  border: 1px solid rgb(22 35 46 / 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow-float);
}

.tmr-figure figcaption {
  margin-block-start: 14px;
  font-size: 0.8438rem;
  color: var(--faint);
}

#tmr-screenshot {
  padding-block-start: clamp(40px, 5vw, 72px);
}

@media (max-width: 991px) {
  .tmr-grid {
    grid-template-columns: 1fr;
  }

  .tmr-photo {
    aspect-ratio: 16 / 10;
  }
}

/* ---------- Case studies ---------- */
#case-studies {
  padding-block-start: clamp(48px, 6vw, 88px);
}

/* Case studies: alternating editorial rows — text one side, media the other.
   One uniform media frame; the copy column carries the rhythm. */
.case-study {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(40px, 5vw, 88px);
  align-items: center;
}

.case-study:nth-of-type(even) .case-body {
  grid-column: 2;
  grid-row: 1;
}

.case-study:nth-of-type(even) .case-stage {
  grid-column: 1;
  grid-row: 1;
}

.case-study + .case-study {
  margin-block-start: clamp(80px, 9vw, 136px);
}

.case-study h2 {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 700;
  margin-block-end: 18px;
  max-width: 18em;
}

.case-body {
  max-width: 58ch;
}

.case-body p {
  font-size: 0.9765rem;
  line-height: 1.66;
}

.case-body p + p {
  margin-block-start: 12px;
}

/* Technical perspective: quiet inline disclosure, no box */
.case-tech {
  margin-block-start: 18px;
}

.case-tech summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--ink);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-block: 4px;
  transition: color 0.16s var(--ease-out);
}

.case-tech summary:hover {
  color: var(--orange-press);
}

.case-tech summary::-webkit-details-marker {
  display: none;
}

.case-tech summary::before {
  content: "";
  width: 7px;
  height: 7px;
  border-inline-end: 2px solid var(--orange);
  border-block-end: 2px solid var(--orange);
  transform: rotate(-45deg);
  transition: transform 0.2s var(--ease-out);
}

.case-tech[open] summary::before {
  transform: rotate(45deg);
}

/* Same logical-border caret: mirror it so RTL points at the text, not away */
[dir="rtl"] .case-tech summary::before {
  transform: rotate(45deg);
}

[dir="rtl"] .case-tech[open] summary::before {
  transform: rotate(-45deg);
}

.case-tech-body {
  margin-block-start: 12px;
  padding-inline-start: 20px;
  border-inline-start: 1px solid var(--line);
}

.case-tech-body p {
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--faint);
}

.case-tech-body p + p {
  margin-block-start: 10px;
}

/* Uniform media frame */
.case-stage {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  aspect-ratio: 5 / 4;
  padding: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.case-illustration {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Owner-tuned framing (slider session): stages in DOM order
   farm, sap, dash, ai, waste */
.case-study:nth-of-type(2) .case-illustration {
  transform: scale(1.29);
}

.case-study:nth-of-type(4) .case-illustration {
  transform: translate(-31%, 19%) scale(1.31);
}

.case-study:nth-of-type(5) .case-illustration {
  transform: translate(6.5%, 9.5%) scale(1.13);
}

#case-studies .section-cta {
  margin-block-start: clamp(72px, 8vw, 112px);
}

@media (max-width: 991px) {
  .case-study,
  .case-study:nth-of-type(even) {
    display: block;
  }

  .case-study + .case-study {
    margin-block-start: 64px;
  }

  .case-stage {
    margin-block-start: 28px;
    aspect-ratio: auto;
    max-height: 420px;
  }

  .case-illustration {
    height: auto;
    max-height: 380px;
  }
}

/* The TCO chart has no heading of its own, so a full section's padding on
   both sides of this junction reads as a hole (owner feedback). */
#cloud-benefits {
  padding-block-end: clamp(32px, 4vw, 56px);
}

#tco {
  padding-block-start: clamp(40px, 5vw, 64px);
}

@media (max-width: 767px) {
  /* one column on a phone: a taller frame gives the screenshot more room */
  .tile-shot {
    aspect-ratio: 4 / 3;
  }
}

/* Portrait and near-square screenshots sit whole in the frame (set by JS) */
.tile-shot.shot-contain img {
  object-fit: contain;
}

/* Click a feature screenshot to see it full size */
.tile-shot.zoomable {
  cursor: zoom-in;
}

.tile-shot.zoomable:focus-visible {
  outline: 2px solid var(--orange-press);
  outline-offset: 3px;
}

.shot-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 56px);
  background: rgb(22 35 46 / 0.82);
  cursor: zoom-out;
  animation: shot-in 0.18s var(--ease-out);
}

.shot-lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 32px 64px -24px rgb(0 0 0 / 0.6);
  background: var(--paper);
}

@keyframes shot-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .shot-lightbox {
    animation: none;
  }
}

/* ---------- Plans ---------- */
#plans {
  padding-block-start: clamp(48px, 6vw, 88px);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1240px;
  margin-inline: auto;
}

.plan-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-block-end: 6px;
}

.plan-tagline {
  font-size: 0.9375rem;
  color: var(--faint);
  margin-block-end: 18px;
  min-height: 2.6em;
}

.plan-card ul {
  display: grid;
  gap: 10px;
}

.plan-card li {
  position: relative;
  padding-inline-start: 22px;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.plan-card li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 0.42em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--f-gold);
}

.plan-card li:nth-child(2n)::before { background: var(--f-green); }
.plan-card li:nth-child(3n)::before { background: var(--f-sky); }
.plan-card li:nth-child(4n)::before { background: var(--f-grain); }

.plan-highlight {
  border-color: var(--orange);
  border-width: 2px;
}

.addons-title {
  text-align: center;
  margin-block: clamp(48px, 6vw, 72px) clamp(24px, 3vw, 40px);
}

.addons-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1160px;
}

@media (max-width: 991px) {
  .addons-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 820px;
  }
}

.plans-cta {
  justify-content: center;
  margin-block-start: clamp(36px, 5vw, 56px);
}

/* Comparison table */
#pricing-info {
  padding-block-start: clamp(48px, 6vw, 88px);
  /* the proof strip below brings its own top padding; a full section's worth
     under the table's hard bottom edge reads as a hole */
  padding-block-end: clamp(32px, 4vw, 56px);
}

.compare-scroll {
  overflow-x: auto;
  max-width: 1080px;
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare-table thead th {
  position: sticky;
  inset-block-start: 0;
  background: var(--navy);
  color: #fff;
  font: 700 0.9375rem var(--sans);
  padding: 14px 16px;
  text-align: center;
}

.compare-table thead th:first-child {
  text-align: start;
  background: var(--navy);
}

.compare-table tbody th {
  font-weight: 500;
  color: var(--body);
  text-align: start;
  padding: 9px 16px;
}

.compare-table .cat-row th {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--field);
  padding-block: 12px;
}

.compare-table td {
  text-align: center;
  padding: 9px 16px;
  border-block-start: 1px solid rgb(22 35 46 / 0.06);
}

.compare-table tbody tr:not(.cat-row) th {
  border-block-start: 1px solid rgb(22 35 46 / 0.06);
}

/* Narrow screens scroll the table sideways; pin the feature name so you can
   still tell which row you are reading. */
@media (max-width: 860px) {
  .compare-table tbody th,
  .compare-table thead th:first-child {
    position: sticky;
    inset-inline-start: 0;
    z-index: 1;
    background: var(--paper);
    box-shadow: 1px 0 0 rgb(22 35 46 / 0.08);
  }

  .compare-table thead th:first-child {
    background: var(--navy);
    z-index: 2;
  }

  /* the category row spans every column, so pin its label rather than the
     cell — otherwise the band scrolls away empty */
  .compare-table .cat-row th {
    background: var(--field);
    position: static;
  }

  .compare-table .cat-label {
    position: sticky;
    inset-inline-start: 0;
    display: inline-block;
  }
}

.tick-yes {
  width: 18px;
  height: 18px;
  color: var(--f-green);
  display: inline-block;
  vertical-align: middle;
}

.tick-no {
  color: rgb(22 35 46 / 0.22);
}

.cell-value {
  font-size: 0.8438rem;
  font-weight: 600;
  color: var(--body);
}

.pd-block-flat {
  padding-block: clamp(40px, 5vw, 64px) clamp(48px, 6vw, 72px);
}

@media (max-width: 991px) {
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .plan-grid,
  .addons-grid {
    grid-template-columns: 1fr;
  }
}

/* Wider hero intro for list-style copy (title keeps the default measure) */
.hero-wide .page-hero-grid {
  max-width: 68rem;
}

.hero-wide .page-hero-grid h1 {
  max-width: 42rem;
  margin-inline: auto;
}

.hero-wide .page-hero-grid p {
  max-width: 90ch;
}

/* ---------- Split hero (copy left, photo right) ---------- */
.hero-split {
  padding-block-end: clamp(48px, 6vw, 80px);
}

.hero-split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-split-copy {
  text-align: start;
}

.hero-split-copy h1 {
  transform: none;
  margin-block-start: 0;
}

.hero-split .formula-bar {
  margin-inline: 0;
  margin-block: 24px 0;
  max-width: 190px;
}

.hero-split-copy p {
  margin-block-start: 24px;
  max-width: 46ch;
}

.hero-split-photo {
  width: 100%;
  max-width: 620px;
  margin-inline-start: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 24px;
}

@media (max-width: 991px) {
  .hero-split-grid {
    grid-template-columns: 1fr;
  }

  .hero-split-photo {
    aspect-ratio: 4 / 3;
  }
}
