/*
 * ChiaroPerTe landing page.
 *
 * Fonts under the SIL Open Font License 1.1 (https://openfontlicense.org).
 * Lexend: Copyright 2019 The Lexend Project Authors (https://github.com/googlefonts/lexend).
 * Plus Jakarta Sans: Copyright 2020 The Plus Jakarta Sans Project Authors
 * (https://github.com/tokotype/PlusJakartaSans).
 * Latin subsets as distributed by Google Fonts and Fontsource.
 */

@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/lexend-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/lexend-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/lexend-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/lexend-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-700.woff2') format('woff2');
}

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

:root {
  --petrol-900: #1f4e51;
  --petrol-700: #2e6e72;
  --petrol-100: #e4f1f2;
  --salmon-900: #8f3313;
  --salmon-800: #b5441b;
  --salmon-100: #fceae1;
  --amber-700: #8a5a00;
  --amber-100: #f9eeda;
  --ink-900: #232a31;
  --ink-800: #2d343c;
  --ink-700: #3b424a;
  --ink-600: #4a5158;
  --ink-400: #7d838a;
  --ink-200: #d8d6ce;
  --cream-100: #fbfaf4;
  --cream-200: #f7f6f0;
  --paper: #fffdf9;
  --white: #fff;

  --bg: var(--cream-200);
  --surface: var(--cream-100);
  --text: var(--ink-800);
  --text-muted: var(--ink-600);
  --brand: var(--petrol-700);
  --brand-strong: var(--petrol-900);
  --accent: var(--salmon-800);
  --accent-strong: var(--salmon-900);
  --border: var(--ink-200);
  --focus: #ffdd00;
  --focus-ink: #0b0c0c;

  --font-heading: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:
    'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* The type scale is in points: 14pt for text, then 21, 28, 35 and 56pt. */
  --fs-14: 1.1667rem;
  --fs-21: 1.75rem;
  --fs-28: 2.3333rem;
  --fs-35: 2.9167rem;
  --fs-56: 4.6667rem;
  --fs-h1: var(--fs-56);
  --fs-h2: var(--fs-35);
  --fs-figure: var(--fs-35);

  --header-h: 72px;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1360px;
}

@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }
}

@media (max-width: 760px) {
  :root {
    --fs-h1: var(--fs-35);
    --fs-h2: var(--fs-28);
    --fs-figure: var(--fs-28);
  }
}

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

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  line-height: 1.5;
  letter-spacing: 0.02em;
  word-spacing: 0.16em;
}

h1,
h2,
h3,
h4 {
  color: var(--ink-900);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
  word-spacing: 0.08em;
}

h1,
h2 {
  letter-spacing: 0.03em;
}

a {
  color: var(--brand-strong);
  text-decoration: none;
}

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

/* Browsers reset letter and word spacing on form controls: keep the page's. */
button,
input {
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  word-spacing: inherit;
}

/* Display text: wider tracking than running text. */
.eyebrow,
.carousel-title,
.card-figure,
.photo-title,
.guarantees,
.matrix figcaption b,
.step-number,
.team-motto,
.gap-sentence strong,
.gap-lead,
.gap-bridge {
  letter-spacing: 0.05em;
  word-spacing: 0.08em;
}

/* Running text keeps a reading measure; components set their own widths. */
main
  :where(p, dd, dt, summary span, ul:not([class]) > li, ol:not([class]) > li) {
  max-width: 36em;
}

/* Links inside running text: bold, with an arrow, a diagonal one when they leave the page. */
main :where(p, li, dd) > a:not([class]) {
  border-radius: 3px;
  color: var(--petrol-900);
  font-weight: 700;
}

main :where(p, li, dd) > a:not([class])::after {
  content: '';
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-left: 0.15em;
  vertical-align: -0.08em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='m12 5 7 7-7 7'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

main :where(p, li, dd) > a[href^='http']:not([class])::after {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7h10v10'/%3E%3Cpath d='M7 17 17 7'/%3E%3C/svg%3E");
}

main :where(p, li, dd) > a:not([class]):hover {
  background: var(--petrol-100);
}

/* One focus style for every control: a yellow block with a dark underline. */
:where(a, button, summary, input):focus-visible {
  outline: 3px solid transparent;
  background-color: var(--focus) !important;
  box-shadow:
    0 -2px var(--focus),
    0 4px var(--focus-ink);
  color: var(--focus-ink) !important;
  text-decoration: none;
}

#content:focus {
  outline: none;
}

.icon {
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.container {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  width: auto;
  height: auto;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 700;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: saturate(1.2) blur(6px);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: var(--header-h);
}

.logo {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  border-radius: 6px;
}

.logo img {
  display: block;
  width: auto;
  height: clamp(28px, 8vw, 40px);
}

.menu-button {
  display: none;
}

.site-nav {
  margin-left: auto;
}

.site-nav[hidden] {
  display: block;
}

.site-nav ul {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 4px;
  color: var(--text);
  white-space: nowrap;
}

.site-nav a:hover,
.footer-links a:hover {
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* Below 1024px the links fold under a menu button (shown only once the script runs). */
@media (max-width: 1023px) {
  .site-header .container {
    gap: 8px 12px;
    padding-block: 8px;
  }

  .js .menu-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    margin-left: auto;
    padding: 0 14px;
    border: 1.5px solid var(--text);
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
  }

  .site-nav {
    flex-basis: 100%;
    order: 3;
    margin: 0;
  }

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

  .site-nav ul {
    flex-direction: column;
    padding: 4px 0 8px;
  }

  .site-nav a {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
  }
}

.menu-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
  box-shadow:
    0 -5px currentColor,
    0 5px currentColor;
}

.menu-button[aria-expanded='true'] .menu-icon {
  box-shadow: none;
  transform: rotate(45deg);
}

.menu-button[aria-expanded='true'] .menu-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: currentColor;
  transform: rotate(90deg);
}

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

.section {
  padding-block: clamp(56px, 7vw, 104px);
}

.section h2 {
  max-width: 26em;
  margin: 0 0 18px;
  font-size: var(--fs-h2);
  line-height: 1.18;
}

.section--problem,
.section--comparison,
.section--roadmap {
  background: var(--salmon-100);
}

/* The carousel's side cards reach past the screen's edge on phones. */
.section--problem {
  overflow-x: clip;
}

.section--solution,
.section--security,
.section--faq {
  background: var(--petrol-100);
}

.section-head {
  margin: 0 0 36px;
}

.section-intro {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-family: var(--font-heading);
  font-weight: 500;
}

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

.hero {
  padding-block: clamp(48px, 6vw, 88px) clamp(32px, 4vw, 56px);
}

.hero .eyebrow {
  margin-bottom: 14px;
}

.hero h1 {
  max-width: 14em;
  margin: 0 0 18px;
  font-size: var(--fs-h1);
  line-height: 1.06;
}

.hero-promise {
  max-width: 36em;
  margin: 0 0 22px;
  color: var(--ink-700);
  font-size: var(--fs-21);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  word-spacing: 0.08em;
}

.hero-promise span {
  display: block;
}

.hero-demos {
  margin-top: clamp(48px, 6vw, 80px);
}

.demo {
  max-width: 1040px;
  margin: 0;
}

.demo + .demo {
  margin-top: clamp(56px, 7vw, 96px);
}

.demo-caption {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.4;
}

.demo-caption > span {
  display: block;
}

.demo--receive .demo-caption,
.demo-question {
  color: var(--ink-900);
  font-size: var(--fs-21);
  font-weight: 600;
  line-height: 1.3;
}

.demo-question {
  margin-bottom: 4px;
}

@media (max-width: 760px) {
  .hero-promise {
    font-size: 1.25rem;
  }

  .demo--receive .demo-caption,
  .demo-question {
    font-size: 1.375rem;
  }
}

/* Steps above each tablet: they drive the demo, so they appear only with the script. */
.steps {
  display: none;
}

.js .steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.steps button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 8px 14px;
  border: 0;
  border-top: 4px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1.3;
  text-align: left;
  cursor: pointer;
}

.steps button:hover {
  color: var(--ink-900);
}

.steps button.is-done {
  border-top-color: var(--brand);
}

.steps button[aria-current='step'] {
  border-top-color: var(--brand-strong);
  color: var(--ink-900);
}

.step-number {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--petrol-100);
  color: var(--brand-strong);
  font-family: var(--font-heading);
}

.steps button[aria-current='step'] .step-number {
  background: var(--brand-strong);
  color: var(--white);
}

@media (max-width: 700px) {
  .js .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps button {
    min-height: 48px;
    border-top: 0;
    border-left: 4px solid var(--border);
  }

  .steps button.is-done {
    border-left-color: var(--brand);
  }

  .steps button[aria-current='step'] {
    border-left-color: var(--brand-strong);
  }
}

/* The tablet frame, with its camera and two buttons on the top edge. */
.tablet {
  position: relative;
  padding: 22px 14px 14px;
  border-radius: 28px;
  background: linear-gradient(
    150deg,
    var(--ink-800) 0%,
    var(--ink-900) 55%,
    var(--ink-800) 100%
  );
  box-shadow:
    0 34px 60px -34px rgb(35 42 49 / 55%),
    inset 0 2px 0 rgb(251 250 244 / 6%),
    inset 0 0 0 1.5px var(--ink-600);
}

.tablet::before,
.tablet::after {
  content: '';
  position: absolute;
  top: -3px;
  height: 4px;
  border-radius: 3px 3px 0 0;
  background: var(--ink-800);
}

.tablet::before {
  right: 150px;
  width: 46px;
}

.tablet::after {
  right: 96px;
  width: 34px;
}

.tablet-camera {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  border-radius: 50%;
  background: var(--ink-900);
  box-shadow: 0 0 0 1.5px var(--ink-600);
}

/* ---------- The app on the tablet's screen ---------- */

/* Both demos share one frame; from 761px the screen scrolls inside it. */
.app {
  display: flex;
  flex-direction: column;
  height: 780px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--cream-200);
  color: var(--ink-900);
}

:where(.app p) {
  margin: 0;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 16px 2px;
  background: var(--cream-100);
  font-weight: 700;
}

.status-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-signal {
  width: 14px;
  height: 9px;
  background: linear-gradient(
    90deg,
    var(--ink-900) 0 2px,
    transparent 2px 4px,
    var(--ink-900) 4px 6px,
    transparent 6px 8px,
    var(--ink-900) 8px 10px,
    transparent 10px 12px,
    var(--ink-900) 12px 14px
  );
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
}

.status-battery {
  position: relative;
  width: 20px;
  height: 10px;
  border: 1.5px solid var(--ink-900);
  border-radius: 3px;
}

.status-battery::after {
  content: '';
  position: absolute;
  inset: 1.5px 5px 1.5px 1.5px;
  border-radius: 1px;
  background: var(--ink-900);
}

.app-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--cream-100);
}

.app-brand {
  font-weight: 700;
  white-space: nowrap;
}

.app-workspace {
  padding-left: 12px;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.app-topbar-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
}

.app-user {
  padding: 0 8px;
  color: var(--text-muted);
  white-space: nowrap;
}

.app-body {
  display: grid;
  flex: 1;
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 0;
}

.app-sidebar {
  padding: 14px 10px;
  border-right: 1px solid var(--border);
}

.app-sidebar ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
}

.app-nav-item.is-current {
  background: var(--petrol-100);
  box-shadow: inset 3px 0 0 var(--ink-900);
}

.app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 14px 18px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.app-main:focus-visible {
  outline: 3px solid var(--focus-ink);
  outline-offset: -3px;
}

.app-main::-webkit-scrollbar {
  width: 10px;
}

.app-main::-webkit-scrollbar-track {
  border-radius: 10px;
  background: var(--cream-200);
}

.app-main::-webkit-scrollbar-thumb {
  border: 2px solid var(--cream-200);
  border-radius: 10px;
  background: var(--ink-400);
}

@supports (scrollbar-color: auto) {
  .app-main {
    scrollbar-width: thin;
    scrollbar-color: var(--ink-400) var(--cream-200);
  }
}

.app-analysis-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.app-title {
  margin-bottom: 6px;
  font-size: var(--fs-21);
  font-weight: 700;
  line-height: 1.2;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.chip {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 6px;
  background: var(--petrol-100);
  color: var(--ink-900);
  font-weight: 700;
}

.chip--tense {
  background: var(--amber-100);
}

.chip--tense::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--amber-700);
  vertical-align: 0.1em;
}

.app-button-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--cream-100);
  font-weight: 700;
}

.app-button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--petrol-900);
  color: var(--white);
  font-weight: 700;
}

button.app-button-primary,
button.app-button-secondary {
  cursor: pointer;
}

.app-views,
.app-view:not([hidden]) {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.app-card {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream-100);
}

.app-original {
  margin-bottom: 14px;
  padding: 12px 14px;
}

.app-label {
  color: var(--text-muted);
}

.app-original .app-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.app-meta {
  margin-top: 2px;
  color: var(--text-muted);
}

.app-subject {
  margin-top: 6px;
  font-weight: 700;
}

.app-email {
  margin-top: 8px;
}

.role-pill {
  display: inline-block;
  max-width: 100%;
  margin-left: 4px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--petrol-100);
  color: var(--petrol-900);
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}

/* The signals of pressure: numbered in the original text while their list is open. */
.signal-number {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.45em;
  height: 1.45em;
  margin-right: 0.3em;
  border-radius: 50%;
  background: var(--accent-strong);
  color: var(--white);
  font-size: 0.8em;
  font-weight: 700;
  line-height: 1;
  vertical-align: 0.1em;
}

.signal .signal-number {
  display: none;
}

.app[data-signals='yes'] .signal {
  border-radius: 3px;
  background: var(--salmon-100);
  box-shadow: 0 0 0 2px var(--salmon-100);
}

.app[data-signals='yes'] .signal .signal-number {
  display: inline-flex;
}

.app-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.app-tab {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
}

.app-tab[aria-selected='true'] {
  border-bottom-color: var(--ink-900);
  color: var(--ink-900);
  font-weight: 700;
}

.preferences-note {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--petrol-100);
  color: var(--brand-strong);
  font-weight: 700;
}

.app-box {
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream-100);
}

.app-box ul {
  margin: 6px 0 0;
  padding-left: 1.2em;
}

.app-box li + li {
  margin-top: 4px;
}

.app-box-title {
  font-weight: 700;
}

.app-box-subtitle {
  display: block;
  color: var(--text-muted);
  font-weight: 400;
}

.app-box .todo-list {
  padding-left: 0;
  list-style: none;
}

.todo-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.todo-check {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 0.2em;
  border: 2px solid var(--ink-900);
  border-radius: 4px;
}

.app-box-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.app-box-pair .app-box {
  margin-top: 0;
}

.key-points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.key-points li {
  display: grid;
  grid-template-columns: 11em minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.key-point-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.key-point-label .icon,
.icon-list-icon {
  color: var(--petrol-900);
}

.app-rows {
  display: grid;
  margin: 0;
}

.app-rows > div {
  display: grid;
  grid-template-columns: 9em 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.app-rows dt {
  color: var(--text-muted);
}

.app-rows dd {
  margin: 0;
}

.tone-detected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-weight: 700;
}

.signal-list {
  display: grid;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.signal-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 6px;
}

.signal-list b {
  display: block;
}

.signal-list .signal-number {
  margin-top: 0.2em;
}

.icon-list {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.icon-list li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.icon-list-icon {
  display: inline-flex;
  margin-top: 3px;
}

.app-footer {
  margin-top: auto;
  padding-top: 16px;
}

.app-footer .app-button-primary {
  width: 100%;
  min-height: 48px;
}

.app-back-row {
  margin-bottom: 4px;
}

.app-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--petrol-900);
  font-weight: 700;
  cursor: pointer;
}

.app-reply-title {
  font-weight: 700;
}

.app-reply-title:focus {
  outline: none;
}

.app-reply-title:focus-visible {
  outline: 3px solid var(--focus-ink);
  outline-offset: 3px;
}

.app-meta.app-reply-meta {
  margin: 4px 0 10px;
}

.app-intro {
  margin-bottom: 12px;
  color: var(--text-muted);
}

.tone-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin: 6px 0 12px;
  padding: 0;
  border: 0;
}

.tone-options legend {
  margin-bottom: 6px;
  padding: 0;
  font-weight: 700;
}

.tone-option {
  position: relative;
  display: block;
  padding: 8px 10px 8px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cream-100);
  cursor: pointer;
}

.tone-option input {
  position: absolute;
  top: 11px;
  left: 10px;
  margin: 0;
  accent-color: var(--petrol-900);
}

.tone-option strong,
.tone-option span {
  display: block;
}

.tone-option span {
  color: var(--text-muted);
}

.tone-option:has(input:checked) {
  border-color: var(--petrol-900);
  background: var(--petrol-100);
  box-shadow: inset 0 0 0 1px var(--petrol-900);
}

.app-draft {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--cream-100);
}

.app-context {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 4px solid var(--petrol-900);
  border-radius: 0 8px 8px 0;
  background: var(--petrol-100);
}

.app-context b {
  display: block;
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.app-status {
  color: var(--petrol-700);
  font-weight: 700;
}

.proposal-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
  margin: 4px 0 12px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--cream-200);
}

.segmented label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 7px;
  font-weight: 700;
  cursor: pointer;
}

.segmented input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented label:has(input:checked) {
  background: var(--petrol-900);
  color: var(--white);
}

.segmented label:has(input:focus-visible) {
  outline: 3px solid var(--focus-ink);
  outline-offset: 2px;
}

.app-edit-note {
  color: var(--text-muted);
}

.proposal-card {
  margin-bottom: 12px;
}

.proposal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.proposal-head .app-button-secondary {
  flex: none;
}

.proposal-name {
  font-size: var(--fs-21);
  font-weight: 700;
}

.proposal-description {
  margin: 2px 0 8px;
  color: var(--text-muted);
}

.proposal .app-draft {
  margin-top: 10px;
  border: 0;
  background: var(--cream-200);
}

.proposal .app-status {
  margin-top: 6px;
}

/* Wide boxes inside the app span their column; the reading measure is for running text. */
.preferences-note,
.app-box-title,
.app-box li,
.app-draft,
.app-context,
.app-actions,
.app-footer,
.app-back-row,
.app-edit-note,
.proposal-description {
  max-width: none;
}

@media (max-width: 900px) {
  .app-workspace,
  .app-user,
  .app-sidebar {
    display: none;
  }

  .app-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-analysis-head {
    flex-direction: column;
  }

  .app-rows > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .tone-options {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* On phones the screen grows with its content instead of scrolling inside the page. */
@media (max-width: 760px) {
  .app {
    height: auto;
  }

  .app-main {
    overflow: visible;
  }

  .app-box-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .key-points li {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
}

/* ---------- Guarantees ---------- */

.guarantees {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 40px;
  max-width: 1040px;
  margin: 32px 0 0;
  padding: 0;
  color: var(--ink-900);
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: 1.35;
  list-style: none;
}

.guarantees li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.guarantee-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--petrol-100);
  color: var(--brand-strong);
}

@media (max-width: 560px) {
  .guarantees {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Problem: the story, the team scene and the facts ---------- */

.story {
  max-width: 46em;
  margin: 0 0 8px;
}

.story p {
  margin: 0 0 16px;
  line-height: 1.7;
}

.disclaimer {
  max-width: 46em;
  margin: 24px 0 0;
  color: var(--text-muted);
}

.scene {
  max-width: 1104px;
  margin: 48px auto 0;
}

.team-scene {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 10px;
  max-width: 640px;
  margin: 0 auto 36px;
}

.office-frame {
  grid-column: 1 / -1;
  grid-row: 2;
  container-type: inline-size;
}

.colleagues {
  display: contents;
  list-style: none;
}

.colleague {
  position: relative;
  z-index: 2;
  grid-row: 1;
  margin: 0;
}

.colleague--1 {
  transform: rotate(-2deg);
}

.colleague--2 {
  transform: rotate(1.5deg);
}

.colleague--3 {
  transform: rotate(2deg);
}

.colleague--4 {
  transform: rotate(-1.5deg);
}

.colleague-photo {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 4px solid var(--cream-100);
  border-radius: 4px;
  background: var(--cream-200);
  box-shadow:
    0 10px 22px -12px rgb(35 42 49 / 55%),
    0 1px 3px rgb(35 42 49 / 20%);
}

.colleague-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.colleague-name {
  margin: 6px 0 0;
  color: var(--ink-900);
  line-height: 1.15;
  text-align: center;
}

.threads {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.thread-halo,
.thread-line {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 7 6;
}

.thread-halo {
  stroke: var(--cream-100);
  stroke-width: 4.5;
}

.thread-line {
  stroke: var(--petrol-900);
  stroke-width: 2;
}

.threads circle {
  fill: var(--petrol-900);
  stroke: var(--cream-100);
  stroke-width: 2;
}

.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--cream-200);
  box-shadow:
    0 22px 40px -26px rgb(35 42 49 / 45%),
    0 2px 4px rgb(35 42 49 / 12%);
}

/* The office photo shows its top part only; main.js maps the threads onto that crop. */
.photo-img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1104 / 828;
  object-fit: cover;
  object-position: 50% 0;
}

.photo-title {
  position: absolute;
  bottom: 3.5cqw;
  left: 3.5cqw;
  z-index: 3;
  margin: 0;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--cream-100);
  font-size: var(--fs-21);
}

@media (max-width: 767px) {
  .photo-title {
    position: static;
    display: inline-block;
    margin: 12px 0 0;
  }
}

@media (min-width: 1000px) {
  .team-scene {
    grid-template-columns: minmax(140px, 1fr) minmax(0, 680px) minmax(
        140px,
        1fr
      );
    grid-template-rows: auto auto;
    column-gap: clamp(24px, 3.4vw, 52px);
    row-gap: 0;
    max-width: none;
  }

  .office-frame {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .colleague {
    width: 100%;
    max-width: 210px;
  }

  .colleague--1 {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
    justify-self: end;
    margin-top: 6%;
  }

  .colleague--2 {
    grid-column: 1;
    grid-row: 2;
    align-self: end;
    justify-self: start;
    margin-bottom: 20%;
  }

  .colleague--3 {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    justify-self: start;
    margin-top: 22%;
  }

  .colleague--4 {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    justify-self: end;
    margin-bottom: 9%;
  }
}

@media (max-width: 480px) {
  .team-scene {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 14px;
  }

  .colleague--1,
  .colleague--2 {
    grid-row: 1;
  }

  .colleague--3,
  .colleague--4 {
    grid-row: 2;
  }

  .office-frame {
    grid-row: 3;
  }
}

.facts {
  max-width: 980px;
  margin: 40px auto 0;
  container-type: inline-size;
}

.carousel {
  position: relative;
}

.carousel-head {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 0 16px 14px;
}

.carousel-title {
  margin: 0;
  padding: 6px 14px;
  border-radius: 10px;
  background: var(--cream-100);
  box-shadow: 0 2px 8px -2px rgb(35 42 49 / 30%);
  font-size: var(--fs-14);
  line-height: 1.3;
  text-align: center;
}

.carousel-arrow {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid var(--petrol-900);
  border-radius: 50%;
  background: var(--cream-100);
  color: var(--petrol-900);
  cursor: pointer;
}

.carousel-arrow:hover {
  background: var(--petrol-100);
}

.carousel-arrow[aria-disabled='true'] {
  opacity: 0.45;
  cursor: default;
}

/* The cards stack: the one in front, one on each side, the rest hidden behind. */
.cards {
  --card-width: min(340px, 78cqw);
  --drag: 0px;
  position: relative;
  height: 420px;
  margin: 0;
  padding: 0;
  list-style: none;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
  touch-action: pan-y;
}

.cards.is-dragging {
  cursor: grabbing;
}

.cards:focus-visible {
  outline: none;
}

.cards:focus-visible .card[data-pos='0'] {
  outline: 3px solid var(--focus-ink);
  outline-offset: 4px;
  box-shadow:
    0 0 0 9px var(--focus),
    0 18px 34px -18px rgb(35 42 49 / 55%);
}

.card {
  --shift: 0%;
  --scale: 1;
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: var(--card-width);
  padding: 24px 24px 26px;
  border-radius: 22px;
  background: var(--cream-100);
  box-shadow:
    0 18px 34px -18px rgb(35 42 49 / 55%),
    0 1px 3px rgb(35 42 49 / 18%);
  transform: translateX(calc(-50% + var(--shift) + var(--drag)))
    scale(var(--scale));
  transform-origin: 50% 0;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.35s ease;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgb(247 246 240 / 0%);
  transition: background 0.35s ease;
  pointer-events: none;
}

.card[data-pos='-1'],
.card[data-pos='1'] {
  --scale: 0.8;
  z-index: 2;
  cursor: pointer;
}

.card[data-pos='-1'] {
  --shift: -30%;
}

.card[data-pos='1'] {
  --shift: 30%;
}

.card[data-pos='-1']::after,
.card[data-pos='1']::after {
  background: rgb(247 246 240 / 58%);
}

.card[data-pos='-1'] > :not(.card-head, .card-figure),
.card[data-pos='1'] > :not(.card-head, .card-figure) {
  visibility: hidden;
}

.card[data-pos='-2'],
.card[data-pos='2'] {
  --scale: 0.64;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
}

.card[data-pos='-2'] {
  --shift: -66%;
}

.card[data-pos='2'] {
  --shift: 66%;
}

.cards.is-dragging .card {
  transition: none;
}

.card p {
  margin: 0;
}

.card-head,
.load-note-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--petrol-100);
  color: var(--brand-strong);
}

.card-source {
  color: var(--text-muted);
  font-weight: 700;
  line-height: 1.3;
}

.card-figure {
  color: var(--brand-strong);
  font-family: var(--font-heading);
  font-size: var(--fs-figure);
  font-weight: 600;
  line-height: 1;
}

.card-figure sup {
  position: relative;
  top: 0.1em;
  margin-left: 0.12em;
  color: var(--brand);
  font-size: var(--fs-14);
  vertical-align: top;
}

.card-text {
  color: var(--ink-900);
}

.card-reading {
  color: var(--brand-strong);
  line-height: 1.45;
}

.card-reading-label {
  display: block;
  margin-bottom: 2px;
}

.carousel-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  max-width: none;
  margin: 8px 16px 0;
  color: var(--text-muted);
}

.carousel-hint .icon {
  margin-right: 8px;
}

.load-note {
  margin: 28px 0 0;
  padding: 20px 24px;
  border-radius: 18px;
  background: var(--cream-100);
  box-shadow: 0 18px 34px -24px rgb(35 42 49 / 45%);
}

.load-note p {
  max-width: none;
  margin: 0;
}

.load-note .load-note-head {
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.load-note-title {
  color: var(--petrol-900);
  font-family: var(--font-heading);
  font-size: var(--fs-21);
  font-weight: 600;
}

.load-note-title sup {
  margin-left: 0.15em;
  color: var(--brand);
  font-size: var(--fs-14);
}

.sources {
  max-width: none;
  margin: 18px 0 0;
  color: var(--text-muted);
}

/* ---------- Solution ---------- */

.solution-promise {
  max-width: 36em;
  margin: 0 0 28px;
  color: var(--ink-900);
  font-family: var(--font-heading);
  font-size: var(--fs-21);
  font-weight: 500;
  line-height: 1.35;
}

.solution-sub {
  max-width: 36em;
  margin: -8px 0 36px;
  color: var(--ink-700);
  font-size: var(--fs-21);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .solution-sub {
    font-size: 1.25rem;
  }
}

/* The 19% panel: the facts in words, then 100 people for Italy and for the EU. */
.gap-panel {
  padding: 32px clamp(20px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--cream-100);
}

.gap-sentence {
  max-width: 40em;
  margin: 0;
  color: var(--ink-900);
  line-height: 1.55;
}

.gap-sentence strong {
  color: var(--brand-strong);
  font-family: var(--font-heading);
  font-weight: 600;
}

.gap-examples {
  margin: 8px 0 16px;
  padding-left: 1.4em;
}

.gap-examples li + li {
  margin-top: 6px;
}

.gap-lead {
  margin: 28px 0 18px;
  color: var(--ink-900);
  font-family: var(--font-heading);
  font-size: var(--fs-21);
  font-weight: 600;
}

.matrices {
  display: flex;
  flex-wrap: wrap;
  gap: 20px clamp(24px, 6vw, 72px);
}

.matrix {
  margin: 0;
  color: var(--accent);
  text-align: center;
}

.matrix--eu {
  color: var(--brand);
}

.matrix svg {
  display: block;
  width: 176px;
  height: auto;
}

.matrix .filled {
  fill: currentColor;
}

.matrix .empty {
  fill: none;
  stroke: var(--ink-600);
  stroke-width: 1.1;
}

.matrix figcaption {
  margin-top: 10px;
  color: var(--ink-900);
  line-height: 1.35;
}

.matrix figcaption b {
  display: block;
  color: var(--brand-strong);
  font-family: var(--font-heading);
  font-size: var(--fs-21);
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.matrix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 14px 0 0;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}

.legend-filled,
.legend-empty {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-filled {
  background: var(--ink-600);
}

.legend-empty {
  border: 1.5px solid var(--ink-600);
}

.gap-source {
  max-width: 46em;
  margin: 18px 0 0;
  color: var(--text-muted);
}

.gap-bridge {
  max-width: 34em;
  margin: 22px 0 0;
  color: var(--ink-800);
  line-height: 1.4;
}

@media (max-width: 520px) {
  .matrix svg {
    width: 140px;
  }
}

@media (min-width: 1000px) {
  .gap-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    column-gap: clamp(40px, 5vw, 72px);
  }

  .gap-source,
  .gap-bridge {
    grid-column: 1 / -1;
  }

  .gap-lead {
    margin-top: 0;
  }

  .gap-source {
    margin-top: 24px;
  }

  .gap-bridge {
    margin-top: 16px;
  }
}

/* ---------- Recognition ---------- */

.programs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.program {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--cream-100);
}

.program-logo {
  display: flex;
  align-items: center;
  height: 80px;
}

.program-logo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 72px;
}

.program-text p {
  margin: 0;
  color: var(--ink-900);
  line-height: 1.55;
}

.program-text p + p {
  margin-top: 8px;
}

.program-text .program-outcome {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: none;
  color: var(--brand-strong);
  font-family: var(--font-heading);
  font-weight: 600;
}

.program-outcome .icon {
  color: var(--accent-strong);
}

@media (max-width: 960px) {
  .programs {
    grid-template-columns: minmax(0, 1fr);
  }

  .program-logo {
    height: auto;
  }
}

/* ---------- Comparison: the positioning map ---------- */

/* Below 1100px: axis names above and below the plane, the two sides under it. */
.map {
  margin: 0;
}

.map-axes {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 30px 12px;
  padding: 16px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgb(31 78 81 / 9%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(31 78 81 / 9%) 1px, transparent 1px);
  background-position: -1px -1px;
  background-size: 24px 24px;
}

.axis-label {
  max-width: none;
  margin: 0;
  color: var(--ink-900);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
}

.axis-label--top,
.axis-label--bottom {
  grid-column: 1 / -1;
  text-align: center;
}

.axis-label--top {
  grid-row: 1;
}

.quadrant-names--top {
  grid-row: 2;
}

.map-plane {
  position: relative;
  grid-column: 1 / -1;
  grid-row: 3;
  margin: 0 26px;
}

.quadrant-names--bottom {
  grid-row: 4;
}

.axis-label--bottom {
  grid-row: 5;
}

.axis-label--left {
  grid-column: 1;
  grid-row: 6;
}

.axis-label--right {
  grid-column: 2;
  grid-row: 6;
  text-align: right;
}

.axis-label--left::before {
  content: '← ';
}

.axis-label--right::after {
  content: ' →';
}

.quadrant-names {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
  column-gap: 48px;
}

.quadrant-names--bottom {
  align-items: start;
}

.quadrant-name {
  display: flex;
  align-items: baseline;
  gap: 10px;
  max-width: 24em;
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.35;
}

.quadrant-name::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-1px);
}

.quadrant-name:nth-child(2) {
  flex-direction: row-reverse;
  justify-self: end;
  text-align: right;
}

.quadrant-name.is-ours {
  color: var(--petrol-700);
}

.quadrant-name.is-others {
  color: var(--salmon-800);
}

.map-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: 1fr 1fr;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.quadrant {
  position: relative;
  height: clamp(150px, 40vw, 240px);
}

.quadrant ul {
  position: absolute;
  inset: 24px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.map-point {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  transform: translateY(-50%);
}

.map-point::before {
  content: '';
  flex: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink-600);
}

.map-point[data-product='fyxer'] {
  top: 26%;
  left: 44%;
}

.map-point[data-product='everway'] {
  top: 62%;
  right: 3%;
}

.map-point[data-product='grammarly'] {
  top: 90%;
  left: 24%;
}

.map-point[data-product='copilot'] {
  top: 14%;
  right: 3%;
}

.map-point[data-product='gemini'] {
  top: 42%;
  right: 3%;
}

.map-point[data-product='deepl'] {
  top: 84%;
  left: 6%;
}

.map-point[data-product='capito'] {
  top: 22%;
  left: 16%;
}

.map-point[data-product='summ'] {
  top: 54%;
  left: 30%;
}

.map-point--ours {
  top: 16%;
  right: 3%;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  color: var(--brand-strong);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
}

.map-point--ours::before {
  content: none;
}

.map-point--ours img {
  flex: none;
  width: auto;
  height: 28px;
}

.axis {
  position: absolute;
  background: var(--ink-800);
  pointer-events: none;
}

.axis--y {
  top: -24px;
  bottom: -24px;
  left: 50%;
  width: 2px;
  margin-left: -1px;
}

.axis--x {
  top: 50%;
  right: -24px;
  left: -24px;
  height: 2px;
  margin-top: -1px;
}

.axis::before,
.axis::after {
  content: '';
  position: absolute;
  background: var(--ink-800);
}

.axis--y::before,
.axis--y::after {
  left: 50%;
  width: 14px;
  height: 12px;
  margin-left: -7px;
}

.axis--y::before {
  top: -2px;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.axis--y::after {
  bottom: -2px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.axis--x::before,
.axis--x::after {
  top: 50%;
  width: 12px;
  height: 14px;
  margin-top: -7px;
}

.axis--x::before {
  left: -2px;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}

.axis--x::after {
  right: -2px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

@media (min-width: 761px) {
  .map-axes {
    padding: 24px;
  }
}

/* On phones the four quadrant names stack, each with a mark that shows its corner. */
@media (max-width: 560px) {
  .quadrant-names {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 10px;
  }

  .quadrant-name:nth-child(2) {
    flex-direction: row;
    justify-self: start;
    text-align: left;
  }

  .quadrant-name::before {
    width: 14px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    background: linear-gradient(currentColor, currentColor) 0 0 / 50% 50%
      no-repeat;
    transform: translateY(1px);
  }

  .quadrant-names--top .quadrant-name:nth-child(2)::before {
    background-position: 100% 0;
  }

  .quadrant-names--bottom .quadrant-name:nth-child(1)::before {
    background-position: 0 100%;
  }

  .quadrant-names--bottom .quadrant-name:nth-child(2)::before {
    background-position: 100% 100%;
  }

  .map-plane {
    margin: 0 12px;
  }

  .axis--x {
    right: -12px;
    left: -12px;
  }

  .quadrant ul {
    inset: 12px;
  }

  .map-point--ours {
    top: 30%;
    right: auto;
    left: 0;
    gap: 4px;
    font-size: 0.9375rem;
    letter-spacing: 0;
  }

  .map-point--ours img {
    height: 24px;
  }
}

/* From 1100px: the sides beside the plane, the quadrant names in the map's corners. */
@media (min-width: 1100px) {
  .map-axes {
    grid-template-columns: minmax(0, 8.5em) minmax(0, 1fr) minmax(0, 8.5em);
    gap: 32px 34px;
  }

  .axis-label--top {
    grid-column: 2;
    grid-row: 1;
    min-height: 5.2em;
  }

  .axis-label--left {
    grid-column: 1;
    grid-row: 2;
    text-align: right;
  }

  .map-plane {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
  }

  .axis-label--right {
    grid-column: 3;
    grid-row: 2;
    text-align: left;
  }

  .axis-label--bottom {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    grid-column: 2;
    grid-row: 3;
    min-height: 5.2em;
  }

  .axis-label--left::before,
  .axis-label--right::after {
    content: none;
  }

  .quadrant-names {
    display: contents;
  }

  .quadrant-name {
    position: absolute;
    max-width: 18em;
    padding: 4px 6px;
    border-radius: 6px;
    background: var(--paper);
  }

  .quadrant-names--top .quadrant-name:nth-child(1) {
    top: 16px;
    left: 16px;
  }

  .quadrant-names--top .quadrant-name:nth-child(2) {
    top: 16px;
    right: 16px;
  }

  .quadrant-names--bottom .quadrant-name:nth-child(1) {
    bottom: 16px;
    left: 16px;
  }

  .quadrant-names--bottom .quadrant-name:nth-child(2) {
    right: 16px;
    bottom: 16px;
  }

  .quadrant {
    height: 270px;
  }

  .map-point--ours {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    font-size: var(--fs-21);
  }

  .map-point--ours img {
    height: 44px;
  }
}

/* ---------- Security ---------- */

.section--security .section-head {
  margin-bottom: 28px;
}

.security-list {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--ink-200);
  list-style: none;
}

.security-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 17em) minmax(0, 1fr);
  align-items: start;
  gap: 4px 24px;
  padding: 22px 0;
  border-top: 1px solid var(--ink-200);
}

.security-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cream-100);
  color: var(--brand-strong);
}

.security-list h3 {
  margin: 10px 0 0;
  font-size: 1.375rem;
  line-height: 1.3;
}

.security-text {
  min-width: 0;
}

.security-text p {
  margin: 10px 0 0;
  color: var(--ink-900);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .security-list li {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 4px 16px;
  }

  .security-text {
    grid-column: 2;
  }
}

/* ---------- Team ---------- */

.founders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 28px 22px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.avatar {
  display: block;
  width: 96px;
  height: 96px;
  margin-bottom: 14px;
  border: 3px solid var(--brand);
  border-radius: 50%;
  background: var(--white);
  object-fit: cover;
}

.person h3 {
  margin: 0;
  font-size: var(--fs-21);
}

.person-role {
  margin: 4px 0 0;
  color: var(--brand);
  font-weight: 700;
}

.person-title {
  margin: 8px 0 0;
  color: var(--ink-900);
  line-height: 1.45;
}

.team-motto {
  margin: 28px 0 0;
  color: var(--brand-strong);
  font-family: var(--font-heading);
  font-size: var(--fs-21);
  font-weight: 500;
  line-height: 1.4;
}

.advisors-title {
  margin: 36px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-14);
}

.advisors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.advisors li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 20px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.advisors .avatar {
  width: 56px;
  height: 56px;
  margin: 0 0 8px;
  border-width: 2px;
}

.advisors strong {
  color: var(--ink-900);
}

.advisors span {
  color: var(--text-muted);
  line-height: 1.35;
}

.advisors .advisor-focus {
  color: var(--brand-strong);
  font-weight: 700;
}

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

@media (max-width: 760px) {
  .founders,
  .advisors {
    grid-template-columns: minmax(0, 1fr);
  }

  .advisors li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: start;
    gap: 2px 14px;
  }

  .advisors .avatar {
    grid-row: 1 / span 3;
    margin: 0;
  }

  .advisors li > :not(.avatar) {
    grid-column: 2;
    justify-self: start;
  }
}

/* ---------- Roadmap ---------- */

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.milestone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-right: 28px;
}

.milestone::before {
  content: '';
  position: absolute;
  top: calc(1.3em + 12px + 22px);
  right: 0;
  left: 0;
  border-top: 4px solid var(--petrol-700);
}

.milestone--next::before {
  border-top-style: dashed;
}

.milestone--open::before {
  right: 14px;
  border-top: 4px dashed var(--ink-600);
}

.milestone--open::after {
  content: '';
  position: absolute;
  top: calc(1.3em + 12px + 15px);
  right: 0;
  width: 16px;
  height: 18px;
  background: var(--ink-600);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.milestone-when {
  margin: 0 0 12px;
  color: var(--ink-900);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
}

.milestone-mark {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 3px solid var(--petrol-700);
  border-radius: 50%;
  background: var(--petrol-700);
  color: var(--white);
}

.milestone--next .milestone-mark {
  background: var(--cream-100);
  color: var(--petrol-900);
}

.milestone--open .milestone-mark {
  border-color: var(--ink-600);
  background: var(--cream-100);
  color: var(--ink-900);
}

.milestone-body {
  align-self: stretch;
  margin-top: 16px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--cream-100);
}

.milestone-body h3 {
  margin: 0 0 10px;
  font-size: var(--fs-21);
  line-height: 1.25;
}

.milestone--done .milestone-body h3 {
  color: var(--petrol-900);
}

.milestone-body ul {
  margin: 0;
  padding-left: 1.2em;
}

.milestone-body li + li {
  margin-top: 8px;
}

@media (min-width: 900px) {
  .milestone-body {
    flex: 1;
  }
}

@media (max-width: 899px) {
  .timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  .milestone {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 16px;
    padding: 0 0 28px;
  }

  .milestone-when {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
  }

  .milestone-mark {
    grid-column: 1;
    grid-row: 1;
  }

  .milestone-body {
    grid-column: 2;
    grid-row: 2;
    margin-top: 10px;
  }

  .milestone::before {
    top: 48px;
    right: auto;
    bottom: 0;
    left: 22px;
    border-top: 0;
    border-left: 4px solid var(--petrol-700);
  }

  .milestone--next::before {
    border-left-style: dashed;
  }

  .milestone--open::before {
    right: auto;
    bottom: 16px;
    border-top: 0;
    border-left: 4px dashed var(--ink-600);
  }

  .milestone--open::after {
    top: auto;
    right: auto;
    bottom: 0;
    left: 15px;
    width: 18px;
    height: 16px;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
  }
}

/* ---------- FAQ ---------- */

.faq-controls {
  display: none;
  margin: 24px 0 0;
}

.js .faq-controls {
  display: block;
}

.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 2px solid var(--brand-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--brand-strong);
  font-weight: 700;
  cursor: pointer;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 880px;
  margin: 14px 0 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 16px 20px;
  border-radius: 16px;
  color: var(--ink-900);
  font-weight: 700;
  line-height: 1.4;
  list-style: none;
  cursor: pointer;
}

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

.faq-icon {
  color: var(--brand);
  transition: transform 0.2s;
}

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

.faq-answer {
  padding: 0 20px 18px;
}

.faq-answer p {
  max-width: 62em;
  margin: 0;
  line-height: 1.6;
}

.glossary {
  display: grid;
  gap: 10px;
  margin: 0;
}

.glossary div {
  display: grid;
  grid-template-columns: minmax(0, 11em) minmax(0, 1fr);
  gap: 4px 20px;
}

.glossary dt {
  color: var(--ink-900);
  font-weight: 700;
}

.glossary dd {
  margin: 0;
}

@media (max-width: 560px) {
  .glossary div {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Contact ---------- */

.section--contact .eyebrow {
  margin-bottom: 8px;
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-size: 1.125rem;
}

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

.site-footer {
  padding-block: 56px 32px;
  background: var(--petrol-900);
  color: var(--ink-200);
}

.site-footer a {
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 2fr);
  gap: 32px;
}

.footer-logo {
  display: inline-block;
  border-radius: 6px;
}

.footer-logo img {
  display: block;
  width: auto;
  height: 40px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: var(--ink-200);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border-radius: 4px;
}

.footer-legal {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--ink-600);
  line-height: 1.6;
}

.footer-legal p {
  margin: 0 0 4px;
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

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

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

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
