/* PatchWard — overview site.

   Direction: light, quiet, roomy. The only things allowed to be dramatic are
   the product's own screens — they are dark, so on a near-white page they read
   as objects sitting on a table. All the 3D is applied to those screens and to
   the pieces of interface lifted out of them (the navigation column, a wave
   card): perspective, layered depth and pointer parallax, no abstract shapes.

   Palette comes from the logo: navy ink, steel blue, paper white. Status colour
   (green) appears only where it means something, borrowed from the app.
   No external assets. */

:root {
  --navy:   #1b2559;   /* logo ink */
  --navy-2: #2c3a7a;
  --steel:  #4356a8;
  --ink:    #171d33;
  --body:   #545d78;
  --mute:   #858da5;
  --line:   #e3e7f0;
  --paper:  #ffffff;
  --page:   #f4f6fb;
  --tint:   #eef1f9;
  --ok:     #16a06a;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;

  --pad-x: clamp(18px, 5vw, 78px);
  --band-y: clamp(64px, 8vw, 122px);
  --lift: 0 30px 60px -34px rgba(23, 29, 51, .45);
  --lift-lg: 0 50px 90px -40px rgba(23, 29, 51, .5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
/* Anchor targets clear the sticky bar instead of hiding under it. */
section[id], main[id] { scroll-margin-top: 84px; }

body {
  margin: 0;
  background: var(--page);
  color: var(--body);
  font: 400 16px/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 3px; }

h1, h2, h3 { color: var(--ink); margin: 0 0 .5em; letter-spacing: -.025em; }
h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); font-weight: 800; line-height: 1.04; }
h1 .accent { color: var(--steel); }
h2 { font-size: clamp(1.6rem, 2.9vw, 2.4rem); font-weight: 750; line-height: 1.12; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1rem; }

.eyebrow {
  font: 600 .69rem/1 var(--mono); letter-spacing: .2em; text-transform: uppercase;
  color: var(--steel); margin: 0 0 16px;
}
.fineprint { font: 500 .76rem/1.6 var(--mono); letter-spacing: .04em; color: var(--mute); margin: 18px 0 0; }

/* ── top bar ─────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: 26px;
  padding: 12px var(--pad-x);
  background: rgba(244, 246, 251, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand-mark { width: 30px; height: auto; }
.brand-name {
  display: flex; flex-direction: column; line-height: 1.15;
  font: 800 1rem/1.15 var(--sans); color: var(--navy); letter-spacing: -.02em;
}
.brand-name i {
  font: 500 .58rem/1 var(--mono); font-style: normal;
  letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin-top: 3px;
}
.topnav { display: flex; gap: 24px; margin-left: auto; }
.topnav a {
  font: 600 .82rem/1 var(--sans); color: var(--body); text-decoration: none;
  padding: 6px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s;
}
.topnav a:hover { color: var(--navy); border-bottom-color: var(--steel); }

/* ── buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-block; text-decoration: none; white-space: nowrap;
  font: 650 .9rem/1 var(--sans); padding: 13px 22px; border-radius: 10px;
  transition: transform .18s, box-shadow .18s, background .18s, color .18s, border-color .18s;
}
.btn-sm { padding: 10px 16px; font-size: .82rem; }
.btn-lg { padding: 16px 28px; font-size: .95rem; }
.btn-solid { background: var(--navy); color: #fff; box-shadow: 0 14px 26px -16px var(--navy); }
.btn-solid:hover { background: var(--navy-2); transform: translateY(-2px); box-shadow: 0 20px 32px -16px var(--navy); }
.btn-line { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover { border-color: var(--steel); color: var(--navy); transform: translateY(-2px); }
.btn-invert { background: #fff; color: var(--navy); }
.btn-invert:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -18px rgba(0, 0, 0, .6); }

/* ── hero ────────────────────────────────────────────────────────── */
.hero {
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: clamp(28px, 4vw, 64px); align-items: center;
  max-width: 1360px; margin: 0 auto;
  padding: clamp(40px, 6vw, 86px) var(--pad-x) clamp(56px, 7vw, 104px);
}
.hero-copy { position: relative; z-index: 2; }
.lede { font-size: 1.05rem; max-width: 33em; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* The stage: the console screen on a plane, with two pieces of the interface
   lifted off it. Depth is real (translateZ on a shared perspective) and the
   pointer turns the whole group, so the layers separate as you look around. */
.stage { perspective: 1500px; perspective-origin: 55% 45%; }
.depth {
  position: relative; transform-style: preserve-3d;
  transform: rotateY(var(--ry, -17deg)) rotateX(var(--rx, 6deg));
  transition: transform .7s cubic-bezier(.2, .8, .3, 1);
}
.plate { position: absolute; margin: 0; transform-style: preserve-3d; }
.plate-screen {
  position: relative; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(23, 29, 51, .12); background: #0b0e17;
  box-shadow: var(--lift-lg);
  transform: translateZ(0);
}
.plate-menu { left: -13%; top: 12%; transform: translateZ(84px); }
.plate-card { right: -11%; top: 56%; transform: translateZ(128px); }

/* Crops of the real screenshots: not a second copy of the image, just a window
   onto it, so a re-captured screenshot updates these too. */
.crop {
  background-repeat: no-repeat; background-color: #0f1320;
  border-radius: 10px; border: 1px solid rgba(23, 29, 51, .1);
  box-shadow: var(--lift);
}
.crop-menu {
  width: 182px; height: 492px;   /* ends just below the last nav item */
  background-image: url("../img/dashboard.jpg");
  background-position: 0 0;
}
.crop-card {
  width: 300px; height: 132px;
  background-image: url("../img/waves.jpg");
  background-position: -275px -228px;
}
.callout {
  position: absolute; margin: 0; padding: 7px 13px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 999px;
  font: 600 .72rem/1 var(--mono); letter-spacing: .05em; color: var(--navy);
  box-shadow: var(--lift); white-space: nowrap;
}
.callout-menu { left: -17%; top: 2%; transform: translateZ(96px); }
.callout-card { right: -13%; top: 49%; transform: translateZ(140px); }

/* ── rail ────────────────────────────────────────────────────────── */
.rail {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: 1360px; margin: 0 auto; padding: 0 var(--pad-x);
  border-top: 1px solid var(--line);
}
.rail div { padding: 24px 26px 24px 0; }
.rail div + div { padding-left: 26px; border-left: 1px solid var(--line); }
.rail b { display: block; color: var(--ink); font-size: 1.02rem; font-weight: 750; letter-spacing: -.02em; }
.rail span { font-size: .86rem; color: var(--mute); }

/* ── bands ───────────────────────────────────────────────────────── */
.band { padding: var(--band-y) var(--pad-x); max-width: 1280px; margin: 0 auto; }
.band-tint { background: var(--tint); max-width: none; }
.band-tint > * { max-width: 1280px; margin-inline: auto; }
.band-head { max-width: 40em; margin-bottom: clamp(34px, 4vw, 56px); }
.band-head .sub { font-size: 1.02rem; margin: 10px 0 0; }

/* ── deck ────────────────────────────────────────────────────────── */
.deck-wrap { perspective: 1700px; }
/* Height tracks the card's own aspect (screenshots are 1291x924, ~0.72), so
   the active card can never overlap the caption and arrows below it. */
.deck { position: relative; height: clamp(320px, 44vw, 580px); transform-style: preserve-3d; }
.card {
  position: absolute; left: 50%; top: 50%; width: min(56vw, 745px); margin: 0;
  border-radius: 12px; overflow: hidden; background: #0b0e17;
  border: 1px solid rgba(23, 29, 51, .12);
  box-shadow: var(--lift-lg);
  transform-style: preserve-3d;
  transition: transform .8s cubic-bezier(.25, .9, .3, 1), opacity .6s, filter .6s;
  cursor: pointer;
}
.card:not(.is-on) { filter: saturate(.7) brightness(.82); }
.deck-ui { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3vw, 34px); margin-top: clamp(24px, 3vw, 44px); }
.deck-btn {
  width: 42px; height: 42px; border-radius: 10px; cursor: pointer;
  background: var(--paper); border: 1px solid var(--line); color: var(--navy); font-size: 1rem;
  transition: border-color .2s, transform .2s;
}
.deck-btn:hover { border-color: var(--steel); transform: translateY(-2px); }
/* The caption is the label for whatever is on screen — it has to be readable
   from across the room, not a grey line squeezed between two arrows. */
.deck-cap { min-width: min(58vw, 600px); text-align: center; }
.deck-count {
  margin: 0 0 8px; font: 600 .72rem/1 var(--mono); letter-spacing: .18em; color: var(--steel);
}
.deck-title {
  margin: 0; font-size: clamp(1.15rem, 1.7vw, 1.5rem); font-weight: 750;
  color: var(--ink); letter-spacing: -.02em;
}
.deck-text {
  margin: 8px auto 0; max-width: 46em; font-size: 1rem; color: var(--body);
}

/* ── slabs ───────────────────────────────────────────────────────── */
.slabs { display: grid; gap: clamp(48px, 7vw, 96px); perspective: 1800px; }
.slab {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(26px, 4vw, 64px);
  align-items: center; transform-style: preserve-3d;
}
.slab:nth-child(even) .slab-face { order: 2; }
.shot {
  margin: 0; border-radius: 12px; overflow: hidden; background: #0b0e17;
  border: 1px solid rgba(23, 29, 51, .12); box-shadow: var(--lift-lg);
  transform: rotateY(var(--ry, 12deg)) rotateX(var(--rx, 2deg));
  transition: transform .8s cubic-bezier(.2, .8, .3, 1);
}
.slab:nth-child(even) .shot { --ry: -12deg; }
.slab-copy p:last-child { margin-bottom: 0; }

/* ── loop ────────────────────────────────────────────────────────── */
.loop {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; perspective: 1200px;
}
.loop li {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 22px 28px; transform-style: preserve-3d;
  transition: transform .4s cubic-bezier(.2, .8, .3, 1), box-shadow .4s;
}
.loop li:hover { transform: translateZ(30px) translateY(-4px); box-shadow: var(--lift); }
.loop-n {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--tint); color: var(--navy);
  font: 700 .82rem/1 var(--mono); margin-bottom: 18px;
}
.loop h3 { font-size: 1rem; }
.loop p { font-size: .92rem; margin: 0; }

/* ── evidence ────────────────────────────────────────────────────── */
.evidence {
  display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(28px, 5vw, 76px);
  align-items: center; perspective: 1600px;
}
.paper {
  margin: 0; border-radius: 10px; overflow: hidden; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--lift-lg);
  transform: rotateY(13deg) rotateX(5deg) rotateZ(-1deg);
  transition: transform .8s cubic-bezier(.2, .8, .3, 1);
}
.paper:hover { transform: rotateY(2deg) rotateX(1deg) rotateZ(0); }
.ticks { list-style: none; margin: 20px 0 0; padding: 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: 9px; font-size: .95rem; }
.ticks li::before {
  content: ""; position: absolute; left: 3px; top: .5em;
  width: 9px; height: 5px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}

/* ── trial ───────────────────────────────────────────────────────── */
.trial { padding: var(--band-y) var(--pad-x); }
.trial-inner {
  max-width: 780px; margin: 0 auto; text-align: center;
  background: linear-gradient(150deg, var(--navy), var(--navy-2) 62%, var(--steel));
  color: rgba(255, 255, 255, .88);
  border-radius: 22px; padding: clamp(34px, 5vw, 60px);
  box-shadow: 0 40px 70px -40px rgba(27, 37, 89, .8);
}
.trial-inner h2 { color: #fff; }
.trial-inner p { max-width: 46em; margin-inline: auto; }
.trial-mark { width: 54px; margin: 0 auto 18px; filter: brightness(0) invert(1); opacity: .95; }
.trial .fineprint { color: rgba(255, 255, 255, .7); }

/* ── q&a ─────────────────────────────────────────────────────────── */
.qa { max-width: 820px; }
.qa details {
  background: var(--paper); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 22px; margin-bottom: 10px;
}
.qa summary {
  cursor: pointer; list-style: none; color: var(--ink); font-weight: 650;
  display: flex; justify-content: space-between; gap: 20px;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after { content: "+"; color: var(--steel); font-weight: 700; }
.qa details[open] summary::after { content: "−"; }
.qa p { margin: 12px 0 0; font-size: .95rem; max-width: 64ch; }

/* ── foot ────────────────────────────────────────────────────────── */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 26px var(--pad-x); border-top: 1px solid var(--line); background: var(--paper);
  font-size: .86rem; color: var(--mute);
}
.foot-brand { display: flex; align-items: center; gap: 11px; }
.foot-brand img { width: 24px; }
.foot b { color: var(--ink); }
.foot > a { margin-left: auto; color: var(--navy); font-weight: 650; text-decoration: none; }

/* ── responsive ──────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .stage { margin-top: 26px; }
  .depth { --ry: -10deg; --rx: 4deg; }
  /* Nothing lifted off the screen may hang past the edge of the page: the
     hero is full width here, so there is no column gutter to hang into. */
  .plate-menu { left: 0; }
  .plate-card { right: 0; }
  .callout-menu { left: 0; }
  .callout-card { right: 0; }
  .slab { grid-template-columns: 1fr; }
  .slab:nth-child(even) .slab-face { order: 0; }
  .shot { --ry: 0deg; --rx: 0deg; }
  .evidence { grid-template-columns: 1fr; }
  .loop { grid-template-columns: 1fr 1fr; }
  .rail { grid-template-columns: 1fr 1fr; }
  .topnav { display: none; }
  /* The card is wider here, so the deck has to grow with it — otherwise the
     active screen lands on top of the caption and the arrows. The viewport
     height is the other limit: a phone held sideways is 390px tall, and a
     card measured only against the width would not fit on the screen. */
  .deck { --cw: min(84vw, 105vh); height: calc(var(--cw) * .72); }
  .card { width: var(--cw); }
  .deck-cap { min-width: 0; flex: 1; }
  .deck-text { font-size: .92rem; }
}
@media (max-width: 640px) {
  .loop, .rail { grid-template-columns: 1fr; }
  .rail div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .depth { --ry: 0deg; --rx: 0deg; }
  .plate-menu, .plate-card, .callout { display: none; }
  .btns .btn { flex: 1; text-align: center; }

  /* One line of brand, one button — the tagline wrapped to three lines and
     made the sticky bar taller than the content it sits over. */
  .topbar { gap: 12px; padding: 10px var(--pad-x); }
  .brand-name i { display: none; }

  /* No coverflow on a phone: the neighbours are off-screen slivers that only
     push the page sideways. One screen at a time, swiped or stepped. */
  .deck-ui { flex-wrap: wrap; row-gap: 18px; }
  .deck-cap { order: -1; flex: 1 0 100%; }
  .deck-btn { width: 48px; height: 48px; }

  /* Hover is the only thing that straightens these; a touch screen never
     gets it, so they would stay skewed for the whole visit. */
  .paper { transform: none; }
  .loop li:hover { transform: none; box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
