﻿:root {
  --paper: #f7f5f1;
  --ink: #111111;
  --muted: #6b6862;
  --line: #e2ded6;
  --orange: #f77623;
  --pale: #ffcbaa;
  --green: #14522d;
  --steel: #2b3036;
  --good: #1f6b3a;
  --bad: #a3261b;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

button { font: inherit; color: inherit; cursor: pointer; }

.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.placeholder-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(255, 255, 255, 0.35);
  padding: 3px 7px;
}

/* The door */

.door { min-height: 100svh; display: flex; flex-direction: column; }

.door__bar {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.door__logo { width: min(220px, 52vw); height: auto; }

.door__note {
  margin: 14px 0 0;
  max-width: 46ch;
  text-align: center;
  font-size: 15px;
  line-height: 1.55;
  color: #4a4741;
  text-wrap: pretty;
}

.door__note strong { font-weight: 600; color: var(--ink); }

.door__sig {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 10px;
  font-size: 18px;
  color: var(--ink);
}

.door__sig img { width: 30px; height: 30px; }

.door__still {
  position: relative;
  flex: 1;
  margin: 0 12px 12px;
  background:
    radial-gradient(120% 80% at 70% 30%, rgba(190, 200, 210, 0.35), transparent 60%),
    linear-gradient(180deg, #5b6470 0%, #3a4048 55%, #23272c 100%);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.door__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 50%;
}

.door__still::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(10, 12, 16, 0.82) 0%, rgba(10, 12, 16, 0.25) 45%, transparent 70%),
    linear-gradient(90deg, rgba(10, 12, 16, 0.45) 0%, transparent 55%);
  pointer-events: none;
}

.door__words {
  position: relative;
  z-index: 1;
  padding: 0 clamp(20px, 6vw, 72px) clamp(56px, 10vh, 96px);
  color: #fff;
}

.door__words h1 {
  margin: 0;
  font-size: clamp(30px, 6.2vw, 64px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.door__words p {
  margin: 14px 0 0;
  font-size: clamp(17px, 2.2vw, 22px);
  color: rgba(255, 255, 255, 0.82);
}

.door__when { margin: 0 0 4px; text-align: center; font-size: 13px; color: var(--muted); }

.door__scroll {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 1px;
  height: 34px;
  background: rgba(255, 255, 255, 0.6);
  transform-origin: top;
  animation: drip 2.4s ease-in-out infinite;
}

@keyframes drip {
  0% { transform: scaleY(0); opacity: 0; }
  30% { opacity: 1; }
  70% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); opacity: 0; }
}

/* Lede */

.lede {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(64px, 12vh, 120px) 24px 24px;
  text-align: center;
}

.lede__big {
  margin: 0;
  font-size: clamp(24px, 3.6vw, 36px);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.lede__small { margin: 18px auto 0; max-width: 46ch; color: var(--muted); text-wrap: balance; }

/* Stage */

.stage {
  max-width: 1040px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  display: grid;
  gap: 48px;
  align-items: center;
  grid-template-columns: 1fr;
  justify-items: center;
}

@media (min-width: 860px) {
  .stage { grid-template-columns: 1fr auto; justify-items: stretch; }
}

.phones { position: relative; display: flex; gap: 24px; justify-content: flex-end; align-items: center; margin-bottom: 32px; }

.try { position: absolute; left: 0; right: 0; bottom: 100%; margin: 0 0 14px; text-align: center; font-size: 17px; color: var(--muted); }
.try[hidden] { display: none; }
.restart {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  width: max-content;
  margin: 0 auto 14px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.restart[hidden] { display: none; }
.phone--rain[hidden] { display: none; }

@media (min-width: 860px) {
  .phones .phone { width: 300px; }
  .narrow-only { display: none !important; }
  .phone--rain { order: 2; }
}

@media (max-width: 859px) {
  .phone--rain { display: none; }
  .wide-only { display: none !important; }
  .notes .note--newer { order: -1; }
}

.stage__words p { margin: 0 0 12px; font-size: 20px; }
.stage__words > div:not([hidden]) { animation: in 0.35s ease both; }
.stage__words p.muted { font-size: 17px; margin-top: 24px; }
.stage__back,
.stage__more {
  display: block;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  color: var(--muted);
  cursor: pointer;
}

.stage__more { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 859px) {
  .stage__words { text-align: center; order: 2; }
}

/* Phone */

.phone {
  position: relative;
  width: min(340px, 88vw);
  aspect-ratio: 9 / 19;
  background: #0d0d0d;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.45), inset 0 0 0 2px #262626;
}

.phone__notch {
  position: absolute;
  top: 22px;
  left: 50%;
  width: 92px;
  height: 24px;
  margin-left: -46px;
  background: #0d0d0d;
  border-radius: 14px;
  z-index: 3;
}

.phone__screen {
  position: relative;
  height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #fff;
}

.screen {
  position: absolute;
  inset: 0;
  padding: 58px 18px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  animation: in 260ms ease;
}

.screen[hidden] { display: none; }

@keyframes in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Lock screen */

.screen--lock {
  background:
    linear-gradient(180deg, rgba(20, 22, 26, 0.55), rgba(20, 22, 26, 0.2) 40%, rgba(20, 22, 26, 0.6)),
    url("assets/photos/home.jpg") 58% 50% / cover;
  color: #fff;
  align-items: center;
  text-align: center;
}

.lock__time { font-size: 64px; font-weight: 300; line-height: 1; margin-top: 30px; }
.lock__date { margin-top: 6px; opacity: 0.8; }

.notes {
  margin-top: auto;
  margin-bottom: 40px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.phones {
  --storm-photo:
    linear-gradient(180deg, rgba(14, 18, 26, 0.6), rgba(14, 18, 26, 0.3) 40%, rgba(14, 18, 26, 0.7)),
    url("assets/photos/storm.jpg") 30% 50% / cover;
  --rain-drops:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.22) 0 2px, transparent 3px) 0 0 / 46px 58px,
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.16) 0 1.5px, transparent 2.5px) 0 0 / 33px 41px,
    repeating-linear-gradient(104deg, transparent 0 9px, rgba(200, 215, 235, 0.12) 9px 10px, transparent 10px 23px);
}

.screen--rain { background: var(--storm-photo); }

.screen--rain::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: var(--rain-drops);
  animation: rain 0.9s linear infinite;
}

.screen--rain > * { position: relative; }

/* Alone on a narrow screen, the lock screen is Monday night. */
@media (max-width: 859px) {
  .screen--rain-narrow { background: var(--storm-photo); }
  .screen--rain-narrow::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--rain-drops);
    animation: rain 0.9s linear infinite;
  }
  .screen--rain-narrow > * { position: relative; }
}

@keyframes rain {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 0, 0 0, -14px 60px; }
}

.note {
  cursor: pointer;
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
}

.note__icon { width: 36px; height: 36px; border-radius: 9px; background: #fff; padding: 3px; }
.note__body { display: flex; flex-direction: column; }
.note__app { font-size: 12px; color: var(--muted); }
.note__who { font-size: 15px; font-weight: 700; margin-top: 1px; }
.note__line { font-size: 15px; }

.pulse { animation: breathe 2.8s ease-in-out infinite; }

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.0); }
  50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.18); }
}

@media (prefers-reduced-motion: reduce) {
  .pulse, .door__scroll, .screen, .screen--rain::before, .screen--rain-narrow::before, .note__line { animation: none; }
}

/* Palfrey app */

.app__top {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  margin-bottom: 16px;
}

.app__car { text-align: center; font-weight: 600; font-size: 15px; }
.app__mark { width: 30px; height: 30px; justify-self: end; }

.back {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  color: var(--ink);
}

/* The apps themselves, built offline into demo/ by tools/demo-build.mjs. app.js zooms each to its frame. */

.screen--frame {
  padding: 0;
  background: #0c1219;
  display: block;
  overflow: hidden;
}

.frame { position: absolute; inset: 0; overflow: hidden; }
/* Clear of the notch, the way the phone's status bar keeps the app below it. */
.frame[data-frame="palfrey"] { top: 34px; }
.screen--frame { background: #f4f1ea; }

/* Beside the phone, standing in for a swipe across the record: Map, Debrief, Live, Graph. */
.swipe {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 40px;
  height: 64px;
  margin-top: -32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  font: 600 28px/1 var(--font);
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(0, 0, 0, 0.3);
}
.swipe:hover { border-color: var(--ink); }
.swipe:disabled { opacity: 0.35; cursor: default; }
.swipe[hidden] { display: none; }
.swipe--left { right: calc(100% + 12px); }
.swipe--right { left: calc(100% + 12px); }

@media (max-width: 859px) {
  /* Room for the buttons on a phone-width page. */
  .phone[aria-live] { width: min(340px, calc(100vw - 112px)); }
  .swipe { width: 36px; }
  .swipe--left { right: calc(100% + 8px); }
  .swipe--right { left: calc(100% + 8px); }
}
.sheet {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background: rgba(28, 25, 21, 0.38);
  animation: in 0.2s ease both;
}
.sheet[hidden] { display: none; }
.sheet__card { width: 100%; padding: 18px 18px 14px; border-radius: 22px; background: #fffcf7; color: #1c1915; font-size: 15px; line-height: 1.45; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.4); }
.sheet__card p { margin: 0 0 10px; }
.sheet__title { font-weight: 700; font-size: 17px; }
.sheet__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.sheet__actions button:focus:not(:focus-visible) { outline: none; }
.sheet__actions button { white-space: nowrap; padding: 8px 14px; border-radius: 999px; border: 0; background: #f77623; color: #1c1915; font: 600 14px/1 var(--font); cursor: pointer; }
.frame__note { margin: 40px 22px; color: #c9d1db; font-size: 14px; line-height: 1.5; }
.frame__note code { color: #fff; word-break: break-all; }
.frame iframe { display: block; border: 0; background: #f3f5f7; }
.frame[data-frame="palfrey"] iframe { background: #f4f1ea; }

.sample-note {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 12px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 859px) {
  /* The note hangs below the phone; leave its three lines room before the words. */
  .phones { margin-bottom: 84px; }
  .sample-note { max-width: 340px; margin: 12px auto 0; }
}

/* Severity colors match the app's .paw classes in TriniTach/app/sketch.html. */
[data-severity="quiet"] { --sev: 55, 214, 122; }
[data-severity="watch"] { --sev: 255, 176, 32; }
[data-severity="nonnominal"] { --sev: 192, 132, 252; }
[data-severity="alert"] { --sev: 255, 122, 48; }
[data-severity="critical"] { --sev: 255, 90, 90; }

.note__line[data-severity] {
  text-shadow:
    0 0 2px rgba(var(--sev), 0.35),
    0 0 14px rgba(var(--sev), 0.55),
    0 0 30px rgba(var(--sev), 0.3);
  animation: glow 2.6s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.08); }
}

.trace { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.trace--mph { stroke: var(--ink); }
.trace--pad-coolant { stroke: var(--green); stroke-width: 3; opacity: 0.75; }

/* What's in it */

.box {
  max-width: 1040px;
  margin: 0 auto;
  padding: 72px 24px;
  display: grid;
  gap: 40px;
  align-items: center;
  border-top: 1px solid var(--line);
}

@media (min-width: 860px) {
  .box { grid-template-columns: 1fr 1fr; }
}

.shell {
  display: block;
  width: 100%;
  height: auto;
  background: #1d2024;
}

.shell-fig { margin: 0; }
.shell__note { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

.box h2 { margin: 0 0 18px; font-size: 28px; letter-spacing: -0.01em; }

.kit { list-style: none; margin: 0 0 20px; padding: 0; }
.kit li { font-size: 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.padshot { grid-column: 1 / -1; margin: 24px auto 0; width: min(880px, 100%); }

.padshot__screen {
  position: relative;
  background: #f3f5f7;
  border: 12px solid #111;
  border-bottom-width: 16px;
  border-radius: 16px 16px 4px 4px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.padshot__base {
  height: 14px;
  margin: 0 -4%;
  background: linear-gradient(180deg, #cfcfcf, #9a9a9a);
  border-radius: 0 0 14px 14px;
}

.padshot__caption { margin-top: 14px; text-align: center; font-size: 14px; color: var(--muted); }
.padshot__caption .stage__more { display: inline; margin: 0 0 0 6px; }

/* Too small to use at phone width: a tap opens it full size instead. */
.padshot__open { display: none; position: absolute; inset: 0; z-index: 2; border: 0; background: transparent; cursor: zoom-in; }

@media (max-width: 760px) {
  .padshot__screen { border-width: 8px; border-bottom-width: 12px; }
  .padshot__open { display: block; }
}

/* Password */

.password {
  padding: 88px 24px 112px;
  display: grid;
  place-items: center;
}

.signup { width: min(520px, 100%); text-align: center; }
.signup label { display: block; font-size: 24px; font-weight: 600; margin-bottom: 18px; }

.signup__row { display: flex; gap: 8px; }

.signup input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 14px 16px;
  border: 1px solid #cfcac1;
  border-radius: 12px;
  background: #fff;
}

.signup input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }

.signup button {
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  background: var(--orange);
  color: #fff;
  font-weight: 600;
}

.signup__note { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.signup__thanks { margin: 14px 0 0; font-weight: 600; }

/* Footer */

.foot {
  border-top: 1px solid var(--line);
  padding: 28px 24px 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  max-width: 1040px;
  margin: 0 auto;
}

.foot__marks { display: flex; gap: 22px; align-items: center; }
.foot__tach { width: 96px; opacity: 0.75; }
.foot__paddocks { width: 92px; opacity: 0.75; }
.foot__note { margin: 0; font-size: 13px; color: var(--muted); }
.foot__links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot__links a:hover { color: var(--ink); }

/* Paddocks laptop */

.laptop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(20, 20, 20, 0.55);
  display: grid;
  place-items: center;
  padding: 28px;
  animation: in 220ms ease;
}

.laptop[hidden] { display: none; }

/* Full size means the window: the screen fills it, and the app is zoomed to the screen's width. */
.laptop__body { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; }

.laptop__screen {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #f3f5f7;
  border: 12px solid #111;
  border-bottom-width: 16px;
  border-radius: 16px 16px 4px 4px;
  overflow: hidden;
}

.frame--pad { overflow: auto; }

.laptop__base {
  flex: none;
  height: 14px;
  margin: 0 -14px;
  background: linear-gradient(180deg, #cfcfcf, #9a9a9a);
  border-radius: 0 0 14px 14px;
}

/* Off the screen's corner, so it never covers the app's own header controls. */
.pad__close {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.85);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 640px) {
  .laptop { padding: 20px 12px; }
  .laptop__screen { border-width: 8px; }
  .laptop__base { margin: 0 -8px; }
  .pad__close { top: -14px; right: -8px; }
}
/* How the drive is sealed */

.flow { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; flex: none; }

.flow__step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid #e4ddd4;
  border-radius: 16px;
  background: #fffcf7;
  font-size: 13px;
  line-height: 1.3;
  color: var(--muted);
}

.flow__step + .flow__step { margin-top: 26px; }

/* The arrow between two steps. */
.flow__step + .flow__step::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -21px;
  width: 2px;
  height: 12px;
  margin-left: -1px;
  background: #c9c1b5;
}

.flow__step + .flow__step::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -11px;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top: 6px solid #c9c1b5;
  border-bottom: 0;
}

.flow__step b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 1px; }
.flow__step svg { flex: none; width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.flow__step--seal { border: 1.5px solid #f77623; background: #fff6ee; }
.flow__step--seal svg { stroke: #f77623; }

.flow__words { margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--ink); flex: none; }
.flow__words p { margin: 0 0 10px; }

@media (max-width: 859px) {
  [data-screen="seal"] .app__car { font-size: 14px; white-space: nowrap; }
  .flow__step { padding: 8px 12px; font-size: 12px; }
  .flow__step b { font-size: 14px; }
  .flow__step + .flow__step { margin-top: 20px; }
  .flow__step + .flow__step::before { top: -17px; height: 9px; }
  .flow__step + .flow__step::after { top: -9px; }
  .flow__words { margin-top: 12px; font-size: 13px; line-height: 1.4; }
  .flow__words p { margin-bottom: 7px; }
}
