/* ------------------------------------------------------------------
   Muftar case study - original layout and device frames.
   Archify colors, fonts, light/dark modes and motion are in theme.css.
   Homepage navigation and footer are isolated in chrome.css.
------------------------------------------------------------------- */

:root {
  --bg: #050505;
  --bg-raise: #0c0c0d;
  --ink: #ffffff;
  --ink-dim: rgba(255, 255, 255, 0.8);
  --ink-mute: rgba(255, 255, 255, 0.56);
  --line: rgba(255, 255, 255, 0.14);
  --red: #d3141c;
  --red-hot: #ee1c25;
  --red-deep: #82090f;
  --radius: 12px;
  --gutter: clamp(20px, 6vw, 88px);
  --wrap: 1200px;
  --font-head: "Outfit", "Segoe UI", system-ui, sans-serif;
  --font-body: "Poppins", "Segoe UI", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

main { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }

:where(a, button, input, textarea, select):focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--red); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip:focus { left: 8px; }

/* Case-study hero: original layout and spacing. */
.hero { position: relative; padding: clamp(28px, 5vw, 64px) 0 clamp(36px, 5vw, 64px); overflow: hidden; }
.ghost {
  position: absolute; left: 50%; top: clamp(-6px, 1vw, 12px);
  transform: translateX(-50%);
  font-family: var(--font-head); font-weight: 800; text-transform: uppercase;
  font-size: clamp(120px, 24.5vw, 380px); line-height: 0.9; letter-spacing: -0.02em;
  white-space: nowrap; color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.075);
  pointer-events: none; user-select: none;
}
.hero-grid {
  position: relative; display: grid; gap: 28px; align-items: center;
  padding-top: clamp(24px, 5vw, 64px);
}
.hero h1 {
  margin: 0; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.03; letter-spacing: -0.025em;
}
.hero-side { position: relative; text-align: center; }
.hero-side p { margin: 0 auto 22px; max-width: 460px; font-size: 14px; color: var(--ink-dim); }
/* Button surface, hover and motion come from ../css/buttons.css (shared with the homepage). */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 26px; border: 0; cursor: pointer;
  font-family: var(--font-body); font-weight: 500; font-size: 13px;
}

.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tag {
  font-size: 11.5px; font-weight: 400; letter-spacing: 0.04em;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.03);
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}

/* -------------------------------------------------------- sections */
.rule {
  height: 1px; border: 0; margin: 0 auto; width: min(var(--wrap), 100% - 2 * var(--gutter));
  background: var(--line);
}
.sec { padding: clamp(56px, 8vw, 112px) 0; }
.split { display: grid; gap: clamp(32px, 5vw, 72px); align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 0.85fr 1.15fr; }
  .split.wide-media { grid-template-columns: 0.78fr 1.22fr; }
}
.split > * { min-width: 0; }

.kicker {
  display: inline-flex; align-items: center; gap: 0.65rem; margin-bottom: 16px;
  font: 500 0.7rem/1.5 "Inter", system-ui, sans-serif;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
}
.kicker::before { content: ""; flex: 0 0 5px; width: 5px; height: 5px; background: var(--accent); }

.sec h2 {
  margin: 0 0 20px; font-family: var(--font-head); font-weight: 700;
  font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.05; letter-spacing: -0.025em;
}
.sec p { margin: 0 0 16px; font-size: 14.5px; color: var(--ink-dim); max-width: 56ch; }
.sec p strong { color: #fff; font-weight: 500; }

.checks { display: grid; gap: 10px; margin: 22px 0 6px; }
.checks li {
  position: relative; padding-left: 26px; font-size: 13.5px; color: var(--ink-dim); max-width: 56ch;
}
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 0.4rem; height: 0.4rem; border-radius: 50%;
  background: var(--accent);
}
.checks li b { color: #fff; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chip {
  font-size: 11.5px; padding: 5px 11px; border-radius: 6px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); color: var(--ink-dim);
}

/* ====================================================================
   PRODUCT MEDIA
   Flat surfaces only: the homepage card border and neutral shadow, no glow,
   no gradient. Colours come from the theme tokens in theme.css.
   .win     browser window        .laptop   laptop        .device  framed phone
==================================================================== */
.stage { position: relative; isolation: isolate; }

/* ---------------------------------------------------- browser window */
.win {
  --ar: 16 / 10;
  position: relative; overflow: hidden; border-radius: var(--radius);
  background: var(--card-surface); border: 1px solid var(--theme-border);
  box-shadow: var(--media-shadow);
}
.win-bar {
  display: flex; align-items: center; gap: 12px; height: 38px; padding: 0 14px;
  background: var(--media-bar);
  border-bottom: 1px solid var(--theme-border);
}
.win-dots { display: flex; gap: 7px; flex: none; }
.win-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--media-dot); }
.win-title { flex: 1; display: flex; justify-content: center; min-width: 0; }
.win-title span {
  position: relative; display: block; min-width: 0; max-width: 100%;
  padding: 4px 16px 4px 30px; border-radius: 7px; background: color-mix(in srgb, var(--ink) 6%, transparent);
  font-family: var(--font-body); font-weight: 400; font-size: 11px; line-height: 1.5; color: var(--ink-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win-title span::before {
  content: ""; position: absolute; left: 14px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px;
  background: var(--accent);
}
.win-tag {
  flex: none; font-size: 9px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute);
}
.win img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; object-position: top; background: var(--media-fill); }
.win.ar-16-9 { --ar: 16 / 9; }

.win.sm .win-bar { height: 28px; padding: 0 10px; gap: 8px; }
.win.sm .win-dots { gap: 5px; }
.win.sm .win-dots i { width: 7px; height: 7px; }
.win.sm .win-title span { font-size: 9.5px; padding: 2px 10px 2px 22px; }
.win.sm .win-title span::before { left: 10px; }
.win.sm .win-tag { display: none; }
.win.sm { border-radius: 9px; }

/* Focused crop of a real screenshot: --z zoom, --x/--y offset (share of the
   zoomed image). Pure framing, the pixels are never edited. */
.crop { position: relative; overflow: hidden; aspect-ratio: var(--ar, 16 / 10); background: var(--media-fill); }
.win .crop img, .laptop .lid .crop img {
  position: absolute; left: 0; top: 0; max-width: none; width: calc(var(--z, 1) * 100%); height: auto;
  aspect-ratio: auto; object-fit: fill; transform: translate(var(--x, 0%), var(--y, 0%));
}

/* ----------------------------------------------------------- laptop */
.laptop { --ar: 16 / 10; position: relative; width: 100%; }
.laptop .lid {
  position: relative; padding: 2.1% 2.1% 2.5%;
  background: var(--media-lid);
  border: 1px solid var(--media-lid-edge); border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: var(--media-shadow);
}
.laptop .lid::before {
  content: ""; position: absolute; top: 0.9%; left: 50%; width: 5px; height: 5px; transform: translateX(-50%);
  border-radius: 50%; background: var(--media-lid-edge);
}
.laptop .lid img {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top;
  border-radius: 3px; background: var(--media-fill);
}
.laptop .base {
  position: relative; height: 15px; width: 108%; margin-left: -4%;
  background: var(--media-base);
  border-radius: 0 0 var(--radius) var(--radius);
}
.laptop .base::after {
  content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: 15%; height: 6px; background: var(--media-lid-edge); border-radius: 0 0 9px 9px;
}

/* ----------------------------------------------------- framed phone
   The driver screenshots ship with their own bezel and a transparent
   background, so the image is the device: no CSS chrome, just a neutral
   shadow that follows the silhouette. */
.device {
  display: block; width: 100%; height: auto; aspect-ratio: 426 / 861;
  filter: var(--device-shadow);
}

/* ------------------------------------------------ gallery controls */
.g-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-top: 22px; }
.sec p.caption { margin: 0; max-width: none; font-size: 12.5px; line-height: 1.6; color: var(--ink-mute); min-height: 3.2em; }
.sec p.caption b { color: #fff; font-weight: 500; }
.g-nav { display: flex; align-items: center; gap: 10px; flex: none; }
.g-nav button {
  display: grid; place-items: center; cursor: pointer;
}
.g-nav svg { width: 14px; height: 14px; }
.g-count { min-width: 38px; text-align: center; font-size: 11.5px; letter-spacing: 0.06em; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.tab {
  padding: 6px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  font-size: 11.5px; font-weight: 400; color: var(--ink-dim);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04);
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}

.phone-gallery { display: grid; justify-items: center; }
.phone-gallery .stage { width: min(290px, 62vw); }
.phone-gallery .g-meta { width: 100%; justify-content: center; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.phone-gallery .tabs { justify-content: center; }

.sec p.note { margin: 18px 0 0; max-width: none; font-size: 11.5px; color: var(--ink-mute); }
.phone-gallery p.note { text-align: center; }

/* ----------------------------------------------- family composition */
.showcase { padding: 0 0 clamp(48px, 7vw, 96px); }
/* Laptop in front, the two web apps beside it with only a small overlap so
   their screens stay readable, phone on the laptop's right shoulder. */
.family { position: relative; width: 100%; aspect-ratio: 2.4 / 1; margin-inline: auto; }
.family > * { position: absolute; }
.family .f-console { left: 0; top: 34%; width: 35%; z-index: 1; }
.family .f-brokers { right: 0; top: 1%; width: 35%; z-index: 1; }
.family .f-carriers { left: 26%; top: 8%; width: 48%; z-index: 2; }
.family .f-driver { left: 73%; bottom: 9%; width: 11.5%; z-index: 3; }
.family { isolation: isolate; }

.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin: clamp(34px, 4vw, 56px) 0 0; }
.legend a {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px;
  font-size: 12.5px; font-weight: 400; color: var(--ink-dim);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); transition: border-color .2s, color .2s, transform .2s;
}
.legend a i {
  font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: "Inter", system-ui, sans-serif; font-weight: 600; font-size: 10.5px; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: 0; color: #fff;
  background: var(--accent);
}
@media (hover: hover) and (pointer: fine) {
  .legend a:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
}
.legend a:active { transform: translateY(1px) scale(0.98); transition-duration: 100ms; }

@media (max-width: 760px) {
  .family { aspect-ratio: 1.3 / 1; }
  .family .f-console, .family .f-brokers { display: none; }
  .family .f-carriers { left: 0; top: 3%; width: 84%; }
  .family .f-driver { left: auto; right: 1%; bottom: -3%; width: 27%; }
}

/* console: two staggered browser windows */
.duo { position: relative; width: 100%; aspect-ratio: 1.18 / 1; }
.duo > * { position: absolute; width: 80%; }
.duo .d-back { left: 0; top: 0; z-index: 1; }
.duo .d-front { right: 0; bottom: 0; z-index: 2; }

/* three-up strip */
.strip { display: grid; gap: 26px; margin-top: clamp(40px, 5vw, 72px); }
@media (min-width: 760px) { .strip { grid-template-columns: repeat(3, 1fr); } }
.strip figure { margin: 0; }
.strip .win { transition: transform 450ms var(--ease-out), box-shadow 450ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .strip figure:hover .win { transform: translateY(-8px); box-shadow: var(--media-shadow-hover); }
}
.strip figcaption { margin-top: 14px; font-size: 12.5px; color: var(--ink-mute); line-height: 1.5; }
.strip figcaption b { display: block; color: #fff; font-weight: 500; font-size: 13.5px; margin-bottom: 2px; }

/* ------------------------------------------------------------------
   #disclaimer - "Notice panel with spec bar"
   One cool-slate glass panel: outlined badge, heading, a lead paragraph
   with two supporting ones, and a three-cell spec bar along the bottom.
   Neutral graphite surfaces, off-white type, one desaturated steel accent.
   Every selector is scoped to #disclaimer.
------------------------------------------------------------------- */

#disclaimer {
  --nt-edge: rgba(196, 208, 224, 0.17);
  --nt-hair: rgba(196, 208, 224, 0.13);
  --nt-accent: #9fb3c8;
  --nt-ink: #f1f4f8;
  --nt-body: rgba(231, 236, 243, 0.8);
  --nt-pad: clamp(24px, 4.2vw, 56px);
}

/* ------------------------------------------------------------ panel */
#disclaimer .nt-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--nt-edge);
  background: var(--card-surface);
  box-shadow: 0 12px 35px #00000020;
}

/* ------------------------------------------------------------- body */
#disclaimer .nt-main {
  padding: var(--nt-pad);
  padding-bottom: calc(var(--nt-pad) * 0.9);
}

#disclaimer .nt-head {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 18px;
  padding-bottom: clamp(22px, 3vw, 34px);
  margin-bottom: clamp(22px, 3vw, 34px);
  border-bottom: 1px solid var(--nt-hair);
}

/* outlined display word, the same device as the hero .ghost; desktop only */
#disclaimer .nt-ghost { display: none; }

#disclaimer .nt-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(196, 208, 224, 0.28);
  background: rgba(196, 208, 224, 0.05);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(241, 244, 248, 0.86);
}
#disclaimer .nt-badge-ico {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--nt-accent);
}

#disclaimer .nt-title {
  margin: 0;
  max-width: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.95rem, 3.4vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--nt-ink);
  text-wrap: balance;
}
/* keep each phrase whole so a narrow screen breaks between them */
#disclaimer .nt-title span { white-space: nowrap; }

#disclaimer .nt-copy {
  display: grid;
  gap: 20px;
  max-width: 46rem;
}
#disclaimer .nt-copy p {
  margin: 0;
  max-width: none;
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.75;
  color: var(--nt-body);
  text-wrap: pretty;
}
#disclaimer .nt-copy .nt-lead {
  font-size: clamp(1.02rem, 1.2vw + 0.5rem, 1.28rem);
  line-height: 1.62;
  font-weight: 300;
  color: var(--nt-ink);
}
#disclaimer .nt-support { display: grid; gap: 14px; }

/* -------------------------------------------------------- spec bar */
#disclaimer .nt-specs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--nt-hair);
  background: transparent;
}
#disclaimer .nt-spec {
  display: grid;
  align-content: start;
  gap: 4px;
  padding: 20px var(--nt-pad);
  min-width: 0;
}
#disclaimer .nt-spec + .nt-spec { border-top: 1px solid var(--nt-hair); }

#disclaimer .nt-k {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nt-accent);
}
#disclaimer .nt-k::before {
  content: "";
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
#disclaimer .nt-v {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  white-space: nowrap;
  color: var(--nt-ink);
}
#disclaimer .nt-d {
  display: block;
  max-width: 32ch;
  text-wrap: balance;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--nt-body);
}

/* ------------------------------------------------------ breakpoints */
@media (min-width: 480px) and (max-width: 719px) {
  #disclaimer .nt-spec {
    grid-template-columns: minmax(9.6rem, 11rem) 1fr;
    column-gap: 22px;
    row-gap: 2px;
    align-items: center;
  }
  #disclaimer .nt-k { grid-column: 1 / -1; }
  #disclaimer .nt-d { max-width: none; }
}

@media (min-width: 720px) {
  #disclaimer .nt-specs { grid-template-columns: repeat(3, 1fr); }
  #disclaimer .nt-spec { padding: 24px clamp(20px, 2.6vw, 40px) 26px; }
  #disclaimer .nt-spec:first-child { padding-left: var(--nt-pad); }
  #disclaimer .nt-spec + .nt-spec { border-top: 0; border-left: 1px solid var(--nt-hair); }
}

@media (min-width: 1000px) {
  #disclaimer .nt-ghost {
    display: block;
    position: absolute;
    right: 0;
    top: -4px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: clamp(70px, 7.6vw, 108px);
    line-height: 0.9;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px rgba(196, 208, 224, 0.13);
    pointer-events: none;
    user-select: none;
  }
}

@media (min-width: 1080px) {
  #disclaimer .nt-copy {
    max-width: none;
    grid-template-columns: 1.08fr 1fr;
    gap: clamp(36px, 5vw, 72px);
    align-items: start;
  }
  #disclaimer .nt-copy p { max-width: 62ch; }
  #disclaimer .nt-support {
    padding-left: clamp(24px, 3.2vw, 44px);
    border-left: 1px solid var(--nt-hair);
  }
}

/* ---------------------------------------------------------- lifecycle */
.lifecycle { display: grid; gap: 14px; }
.lc-pain {
  display: flex; flex-wrap: wrap; gap: 8px; padding: 18px; border-radius: var(--radius);
  border: 1px dashed var(--line); background: color-mix(in srgb, var(--ink) 2%, transparent);
}
.lc-pain small { flex: 1 1 100%; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 2px; }
.pain {
  font-size: 12px; padding: 5px 11px; border-radius: 999px; color: var(--ink-dim);
  background: color-mix(in srgb, var(--ink) 5%, transparent); border: 1px solid var(--line); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--accent) 80%, transparent);
}
.lc-arrow { display: grid; place-items: center; color: var(--red-hot); }
.lc-arrow svg { width: 22px; height: 22px; }
.lc-flow { display: grid; gap: 10px; }
.lc-step {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: var(--radius);
  position: relative; overflow: hidden;
  background: var(--card-surface); border: 1px solid var(--theme-border);
  box-shadow: 0 12px 35px #00000020;
}
.lc-step i {
  font-style: normal; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 17px;
  background: transparent; box-shadow: none;
}
.lc-step b { display: block; font-family: var(--font-head); font-weight: 600; font-size: 16px; line-height: 1.2; }
.lc-step span { font-size: 12.5px; color: var(--ink-mute); line-height: 1.5; display: block; margin-top: 2px; }

/* Motion */
.reveal { transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); }
.js .reveal:not(.in) { opacity: 0; transform: translateY(22px); }
.reveal.d1 { transition-delay: 110ms; }
.reveal.d2 { transition-delay: 220ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal:not(.in) { opacity: 1; transform: none; }
  .reveal { transition: none; }
  * { animation: none !important; }
}

@media (max-width: 560px) {
  .win-bar { height: 32px; padding: 0 10px; }
  .win-tag { display: none; }
  .g-meta { flex-direction: column; gap: 12px; }
}
