/* ==========================================================================
   Magnolia — site styles (v3)
   Dark slate canvas, IBM Plex, hairline rules, Magnolia red as the accent.
   ========================================================================== */

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 700;
  src: url("fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --canvas: #171b22;
  --deep: #12151b;
  --surface: #1f242d;
  --surface-strong: #29303b;
  --ink: #f2f4f8;
  --muted: #b4bcc9;
  --subtle: #939cab;
  --line: #353d4a;
  --line-strong: #6f7a8c;

  --accent: #f0697e;        /* Magnolia red, lifted for dark backgrounds */
  --link: #f59aa8;
  --action: #c0283f;        /* the app icon's red */
  --action-hover: #a32035;
  --action-border: #e0566b;
  --focus: #ffc2cb;

  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 24px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

h1, h2, h3, h4, p, figure, dl, dd { margin: 0; }
h1, h2, h3 {
  font-weight: 550;
  letter-spacing: -0.035em;
  line-height: 1.12;
  text-wrap: balance;
}
h1 { font-size: clamp(38px, 4.8vw, 64px); }
h2 { font-size: clamp(30px, 3.4vw, 44px); }
h3 { font-size: 25px; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 5px; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.container { width: min(1280px, 100% - 96px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.muted { color: var(--muted); }

.eyebrow {
  display: block;
  margin-bottom: 24px;
  color: var(--accent);
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.lead {
  color: var(--muted);
  font-size: clamp(18px, 1.65vw, 21px);
  line-height: 1.6;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--link);
  font-weight: 500;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 99;
  padding: 12px 24px;
  background: var(--ink);
  color: var(--canvas);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

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

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  transition: background 0.16s, border-color 0.16s;
}
.button svg { width: 16px; height: 16px; flex-shrink: 0; }
.button.primary { background: var(--action); border-color: var(--action-border); color: #fff; }
.button.primary:hover { background: var(--action-hover); border-color: var(--accent); }
.button.secondary { background: var(--surface-strong); border-color: var(--line-strong); color: var(--ink); }
.button.secondary:hover { background: #343c49; border-color: var(--muted); }
.button.outline { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.button.outline:hover { background: var(--surface); border-color: var(--accent); }

.compact { gap: 8px; }
.compact .button { min-height: 40px; padding: 9px 14px; font-size: 13px; gap: 7px; }

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

.site-header {
  position: relative;
  z-index: 20;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 32px; min-height: 80px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.045em;
  text-decoration: none;
}
.brand img { width: 34px; height: 34px; margin: -2px; }

.desktop-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; }
.desktop-nav a {
  padding-block: 12px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  text-decoration: none;
}
.desktop-nav a:hover,
.desktop-nav a[aria-current] { color: var(--ink); }
.desktop-nav a[aria-current] {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 10px;
}
.desktop-actions { margin-left: 8px; }

.mobile-menu { display: none; margin-left: auto; }
.mobile-menu summary {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  list-style: none;
}
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary svg { width: 20px; height: 20px; }
.mobile-menu .icon-close,
.mobile-menu[open] .icon-open { display: none; }
.mobile-menu[open] .icon-close { display: block; }
.mobile-menu nav {
  position: absolute;
  inset: 100% 0 auto;
  display: grid;
  gap: 4px;
  padding: 20px 24px 24px;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 24px #0006;
}
.mobile-menu nav > a {
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.mobile-menu .actions { margin-top: 16px; }
.mobile-menu .actions .button { flex: 1; }

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

.hero { position: relative; padding: 72px 0 0; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    linear-gradient(#5d6b80 1px, transparent 1px),
    linear-gradient(90deg, #5d6b80 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(90deg, transparent 25%, #000);
  mask-image: linear-gradient(90deg, transparent 25%, #000);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: center;
  gap: 56px;
  padding-bottom: 56px;
}
.hero-grid > * { min-width: 0; }
.hero .eyebrow { display: flex; align-items: center; gap: 10px; }
.hero .eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--accent); }
.hero h1 {
  margin-bottom: 24px;
  font-size: clamp(42px, 4.6vw, 66px);
  letter-spacing: -0.05em;
  line-height: 1.04;
}
.hero h1 span { color: var(--accent); }
.hero .lead { max-width: 44ch; margin-bottom: 30px; font-size: 18px; }
.hero .actions { gap: 10px; }
.hero .button { padding-inline: 16px; font-size: 14px; }

.release-line {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 32px;
  color: var(--muted);
  font: 12px/1.5 var(--mono);
}
.release-line a { color: var(--ink); text-decoration: none; }
.release-line a:hover { text-decoration: underline; }
.release-line .dot { width: 6px; height: 6px; border-radius: 50%; background: #5fd08a; box-shadow: 0 0 0 3px #5fd08a26; }
.release-line .sep { color: var(--line-strong); }
.release-line [hidden] { display: none; }

.platforms { display: inline-flex; align-items: center; gap: 12px; }
.platforms span { display: inline-flex; align-items: center; gap: 5px; }
.platforms svg { width: 12px; height: 12px; }

.hero-media { margin-right: -88px; }

/* Product screenshots: cropped macOS windows with their own frame. */
.shot { position: relative; }
.shot picture { display: block; }
.shot img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 0 0 1px #ffffff14, 0 24px 70px #0007;
}

/* ---------- Workflow strip ---------- */

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 28px 0 32px;
  border-top: 1px solid var(--line);
}
.workflow-strip span { display: block; margin-bottom: 8px; color: var(--accent); font: 12px var(--mono); letter-spacing: 0.06em; }
.workflow-strip h2 { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.workflow-strip p { margin-top: 4px; color: var(--subtle); font-size: 14px; line-height: 1.55; }

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

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

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 36px;
  margin-bottom: 48px;
}
.section-heading h2 { max-width: 720px; }
.section-heading .lead { max-width: 560px; margin-top: 20px; }
.section-heading .text-link { flex-shrink: 0; padding-bottom: 4px; font-size: 15px; }

.story-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 72px;
}
.story-grid > * { min-width: 0; }
.story-grid.reverse { grid-template-columns: 1.2fr 0.8fr; }
.story-grid.reverse > :first-child { order: 2; }
.story-grid h2 { margin-bottom: 24px; }
.story-grid p { color: var(--muted); }
.story-grid p + p { margin-top: 16px; }
.story-grid .text-link { margin-top: 24px; }

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

/* Numbered points */
.step-list { margin-top: 32px; }
.step-list > div {
  display: flex;
  gap: 20px;
  padding-block: 16px;
  border-top: 1px solid var(--line);
}
.step-list .number { padding-top: 3px; color: var(--link); font: 12px var(--mono); }
.step-list h3 { margin-bottom: 4px; font-size: 17px; letter-spacing: -0.01em; }
.step-list p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* Screenshot view switcher */
.view-tabs {
  display: inline-flex;
  gap: 2px;
  margin-bottom: 16px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--deep);
}
.view-tabs button {
  padding: 6px 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--muted);
  font: 500 12px var(--mono);
  cursor: pointer;
}
.view-tabs button:hover { color: var(--ink); }
.view-tabs button[aria-selected="true"] { background: var(--surface-strong); color: var(--ink); }
.view-panels > [hidden] { display: none; }

/* ---------- Principles (about) ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.principle {
  padding: 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.principle .mono { color: var(--accent); font-size: 12px; }
.principle h3 { margin: 12px 0 8px; font-size: 21px; }
.principle p { color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ---------- Analysis tools list ---------- */

.feature-rows { border-top: 1px solid var(--line); }
.feature-row {
  display: grid;
  grid-template-columns: 50px 1fr 1.2fr;
  align-items: baseline;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.feature-row > .mono { color: var(--subtle); font-size: 12px; }
.feature-row h3 { font-size: 22px; }
.feature-row h3 a { text-decoration: none; }
.feature-row h3 a:hover { text-decoration: underline; }
.feature-row p { color: var(--muted); font-size: 16px; }

/* Screenshots under each analysis tool. The images are Retina captures
 * of very different sizes, so each shows at its natural size (its width
 * attribute) rather than stretching to the column. */
.tool-shots { grid-column: 2 / -1; margin-top: -8px; }
.tool-shots .shot img { width: auto; max-width: 100%; height: auto; }

/* The screenshots start collapsed so the list stays short. */
.tool-shots summary {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--link);
  font: 500 12px var(--mono);
  cursor: pointer;
  list-style: none;
}
.tool-shots summary::-webkit-details-marker { display: none; }
.tool-shots summary::before {
  content: "+";
  color: var(--accent);
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s;
}
.tool-shots summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.tool-shots[open] summary::before { transform: rotate(45deg); }
.tool-shots summary .opened,
.tool-shots[open] summary .closed { display: none; }
.tool-shots[open] summary .opened { display: inline; }
.tool-shots[open] summary { margin-bottom: 16px; }

/* ---------- Comparison table ---------- */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 4px; }
.compare { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 15px; }
.compare th,
.compare td { padding: 18px 24px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare thead th {
  background: var(--surface);
  color: var(--subtle);
  font: 500 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.compare tbody th { width: 22%; font-weight: 500; }
.compare td { color: var(--muted); }
.compare .is-mag { background: #c0283f12; color: var(--ink); }
.compare thead .is-mag { background: #c0283f26; color: var(--link); }
.compare td.is-mag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 10px 2px 0;
  background: var(--accent);
}
.fineprint { margin-top: 18px; color: var(--subtle); font-size: 13px; }
.fineprint a { color: var(--link); }

/* ---------- Formats ---------- */

.formats { border-top: 1px solid var(--line); }
.format-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.format-row h3 { font-size: 18px; letter-spacing: -0.01em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span {
  padding: 4px 10px;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 12px var(--mono);
}

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

.site-footer { padding-top: 64px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 64px;
}
.footer-brand p { max-width: 380px; margin-top: 20px; color: var(--muted); font-size: 15px; }
.footer-grid h2 { margin: 8px 0 18px; font-size: 14px; font-weight: 500; letter-spacing: 0; }
.footer-grid > div > a:not(.brand) {
  display: block;
  width: fit-content;
  padding-block: 5px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.footer-grid a:not(.brand):hover { color: var(--ink); text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 26px;
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font: 11px/1.6 var(--mono);
}
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { text-decoration: underline; }

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

.page-intro { position: relative; padding-block: 72px 56px; overflow: hidden; }
.page-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.14;
  background-image:
    linear-gradient(#5d6b80 1px, transparent 1px),
    linear-gradient(90deg, #5d6b80 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: linear-gradient(90deg, transparent 40%, #000);
  mask-image: linear-gradient(90deg, transparent 40%, #000);
}
.page-intro .container { position: relative; }
.page-intro h1 { max-width: 850px; margin-bottom: 24px; }
.page-intro .lead { max-width: 710px; }
.page-intro .actions { margin-top: 32px; }
.breadcrumb { margin-bottom: 32px; color: var(--muted); font-size: 13px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb span { margin-inline: 8px; color: var(--line-strong); }

.faq-layout { padding-block: 24px 104px; }
.faq-layout .faq { max-width: 960px; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: grid;
  grid-template-columns: 44px 1fr 20px;
  align-items: baseline;
  gap: 16px;
  padding: 24px 0;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .mono { color: var(--subtle); font-size: 12px; }
.faq summary h2 { font-size: 21px; letter-spacing: -0.02em; }
.faq summary:hover h2 { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font: 20px/1 var(--mono);
  transition: transform 0.2s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 36px 28px 60px; color: var(--muted); }
.faq .answer p + p { margin-top: 14px; }

/* ---------- Responsive ---------- */

@media (max-width: 1200px) {
  .hero-media { margin-right: -48px; }
  .hero-grid { gap: 40px; }
}

@media (max-width: 760px) {
  .desktop-nav, .desktop-actions { display: none; }
  .mobile-menu { display: block; }
}

@media (max-width: 980px) {
  .container { width: min(1280px, 100% - 64px); }
  .section { padding-block: 80px; }
  .hero { padding-top: 56px; }
  .hero-grid,
  .story-grid,
  .story-grid.reverse { grid-template-columns: 1fr; gap: 40px; }
  .story-grid.reverse > :first-child { order: 0; }
  .hero-media { margin-right: 0; }
  .workflow-strip { grid-template-columns: repeat(2, 1fr); row-gap: 28px; }
  .section-heading { flex-direction: column; align-items: start; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 68px; }
  .hero h1 { font-size: 40px; }
  .hero .actions { flex-direction: column; align-items: stretch; }
  .workflow-strip { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .principle { padding: 22px; }
  .feature-row { grid-template-columns: 36px 1fr; gap: 6px 14px; }
  .feature-row p { grid-column: 2; }
  .tool-shots { grid-column: 1 / -1; margin-top: 6px; }
  .tool-shots summary { margin-left: 50px; }
  .format-row { grid-template-columns: 1fr; gap: 10px; }
  .compare th, .compare td { padding: 14px 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .faq summary { grid-template-columns: 1fr 20px; }
  .faq summary .mono { display: none; }
  .faq .answer { padding: 0 0 24px; }
}
