/* ============================================================
   Operations Hub website (ADR-0003), second design, 2026-10-27.
   Sam: "the same sleek design as the Tesla website". The site now wears
   the app's own look (hub.css, the minimal look): Carbon, Pearl, one red
   action, one typeface. The home page is a stack of full-screen pictures
   of the app, a title and one line over each, two buttons under them.
   Surfaces step up in shade instead of borders and shadows. Sentence case
   everywhere. The only things that move: each picture drifts slowly while
   it is on screen, and a section's words rise once as it arrives.
   ============================================================ */

:root {
  --bg: #171A20;           /* Carbon: the page */
  --panel: #1F232B;        /* tiles, cards, the notes sheet */
  --raised: #2A2F38;       /* fields, hover, the question card */
  --line: rgba(238, 240, 243, 0.09);
  --text: #EEF0F3;         /* Pearl */
  --muted: #A2A8B2;        /* Slate: secondary text */
  --accent: #E31937;       /* Signal: the one red, for the main action only */
  --accent-text: #FF5C6C;  /* red that reads on carbon */
  --mark: rgba(233, 188, 98, 0.30);   /* the highlighter: evidence, and only evidence */
  --radius: 14px;          /* panels */
  --radius-s: 6px;         /* controls */
  --measure: 66ch;
  --font: "Albert Sans", "Segoe UI", system-ui, sans-serif;
  --header: 72px;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) { :root { color-scheme: dark; } }   /* one look, dark, on every device */

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html:has(body.home) { scroll-snap-type: y proximity; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.6 var(--font); text-rendering: optimizeLegibility; }
img, svg, video { display: block; max-width: 100%; }
a { color: var(--text); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; border-radius: 3px; }
/* Headings (Sam 2026-10-27: centred, more engaging, not flat): the 600 cut, large and tight,
   with a touch of light falling down the letters so they lift off the carbon. */
h1, h2, h3 { font-family: var(--font); line-height: 1.04; letter-spacing: -.03em; margin: 0 0 .5em; font-weight: 600; }
h1, h2 { color: var(--text); background: linear-gradient(180deg, #FFFFFF 0%, #EEF0F3 55%, #B9C0CB 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.0); display: inline-block; max-width: 100%; }
h1 { font-size: clamp(2.8rem, 6.4vw, 5.4rem); }
h2 { font-size: clamp(2.2rem, 4.2vw, 3.5rem); }
h3 { font-size: 1.3rem; font-weight: 500; letter-spacing: -.01em; }
.section-title { display: block; text-align: center; width: min(1160px, 100% - 32px); margin: 0 auto clamp(28px, 4vw, 44px); }
.section-title h2, h2.section-title { display: block; margin: 0 auto; }
.page-head h1, .panel-text h1, .panel-text h2, .closing h2, .band-head h2 { display: block; }
.band-head { text-align: center; margin-inline: auto; }
.proof-grid h2 { max-width: none; }
p, ul, ol { margin: 0 0 1em; max-width: var(--measure); }
li + li { margin-top: .35em; }
strong { font-weight: 500; }
mark { background: var(--mark); color: var(--text); padding: 0 .12em; border-radius: 2px; }
.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 16px; }

/* ---- buttons: two shapes, one red ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-width: min(264px, 100%); height: 44px; padding: 0 22px;
  border-radius: var(--radius-s); font: 500 .95rem/1 var(--font); text-decoration: none; border: 0; transition: background-color .2s, filter .2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); color: #fff; }
.btn-plain { background: rgba(238, 240, 243, 0.14); color: var(--text); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-plain:hover { background: rgba(238, 240, 243, 0.22); }

/* ---- header: thin, over the picture ---- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 5; background: linear-gradient(to bottom, rgba(23, 26, 32, 0.75), rgba(23, 26, 32, 0)); }
body:not(.home) .top { background: rgba(23, 26, 32, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
body:not(.home) main { padding-top: var(--header); }
.top-row { display: flex; align-items: center; gap: 24px; min-height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 500 1.05rem var(--font); }
.brand-mark { width: 26px; height: 26px; fill: none; stroke: var(--text); stroke-width: 2.2; stroke-linecap: round; }
.brand-mark circle { fill: var(--accent); stroke: none; }
.nav { display: flex; align-items: center; gap: 24px; flex: 1; }
.nav-links { display: flex; gap: 22px; flex: 1; justify-content: center; }
.nav-links a, .login { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .9; }
.nav-links a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--text); }
.nav-links a:hover, .login:hover { opacity: 1; }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-actions .btn { min-width: 0; height: 36px; padding: 0 16px; font-size: .9rem; }
.menu-btn { display: none; margin-left: auto; background: rgba(238, 240, 243, 0.14); border: 0; color: var(--text); border-radius: var(--radius-s); padding: .5em .9em; font: 500 .95rem var(--font); }
@media (max-width: 860px) {
  .menu-btn { display: block; position: relative; z-index: 6; }
  .nav { display: none; position: fixed; left: 0; right: 0; top: 0; bottom: 0; background: rgba(23, 26, 32, 0.97); flex-direction: column; align-items: stretch; padding: calc(var(--header) + 8px) 24px 28px; overflow: auto; }
  .nav.open { display: flex; }
  .nav-links { flex-direction: column; gap: 4px; justify-content: flex-start; }
  .nav-links a { padding: 12px 0; font-size: 1.15rem; }
  .nav-actions { justify-content: space-between; padding-top: 16px; border-top: 1px solid var(--line); }
}

/* ---- the panels: one per room, the picture framed and comfortable ----
   Sam (2026-10-27, after the full-screen version): "reduce the size of the
   pictures, nice and comfortable, not big and clunky". So: the picture sits
   inside the page margin with rounded corners, about two thirds of the
   screen tall, the title and one line above it, the buttons below. */
.panel { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; scroll-snap-align: start; padding: calc(var(--header) + 3vh) 0 4vh; }
.panel-text { text-align: center; padding: 0 16px; }
.panel-text h1, .panel-text h2 { margin: 0 0 .3em; }
.panel-text p { margin: 0 auto; max-width: 44ch; font-size: clamp(1.02rem, 1.3vw, 1.15rem); color: var(--muted); }
.panel-text { order: 1; } .panel-pic { order: 2; } .panel-actions { order: 3; } .panel-small { order: 4; }   /* the words first, whatever the markup order */
.panel-pic { display: block; width: min(920px, 100% - 32px); height: auto; max-height: 52vh; aspect-ratio: 1440 / 830; object-fit: cover; object-position: center top;
  margin: clamp(22px, 3.5vh, 36px) auto 0; border-radius: var(--radius); background: var(--panel); }
video.panel-pic { aspect-ratio: 1920 / 1000; }
.panel-space { display: none; }
.panel-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; padding: clamp(22px, 3.5vh, 36px) 16px 0; }
.panel-small { text-align: center; color: var(--muted); font-size: .92rem; margin: 0; padding: 14px 16px 0; }
@media (prefers-reduced-motion: no-preference) {
  .panel-text, .panel-pic, .panel-actions, .panel-small { opacity: 0; transform: translateY(14px); transition: opacity .9s ease, transform .9s ease; }
  .panel-pic { transition-delay: .1s; }
  .panel.in img.panel-pic { animation: drift 24s ease-in-out .9s infinite alternate; }
  @keyframes drift { from { object-position: center top; } to { object-position: center 30%; } }
  .panel-actions, .panel-small { transition-delay: .2s; }
  .panel.in .panel-text, .panel.in .panel-pic, .panel.in .panel-actions, .panel.in .panel-small { opacity: 1; transform: none; }
}
@media (max-width: 700px) {
  .panel { min-height: 0; padding-top: calc(var(--header) + 2vh); padding-bottom: 6vh; justify-content: flex-start; }
  .panel + .panel { padding-top: 6vh; }
  .panel-pic { max-height: none; }
  .panel-actions { flex-direction: column; align-items: stretch; }
  .panel-actions .btn { width: 100%; }
}

/* ---- page sections (not full screen): a measured column with a margin note ---- */
.sheet-section { padding: clamp(56px, 8vw, 110px) 0; }
.sheet-section + .sheet-section { border-top: 1px solid var(--line); }
.annotated { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 0 48px; }
.annotated > .margin { color: var(--muted); font-size: .92rem; line-height: 1.45; padding-top: .45em; border-right: 1px solid var(--line); padding-right: 24px; }
.annotated > .margin p { margin: 0 0 .8em; }
@media (max-width: 860px) {
  .annotated { grid-template-columns: 1fr; }
  .annotated > .margin { border-right: 0; border-left: 2px solid var(--line); padding: 0 0 0 12px; margin-bottom: 18px; order: 2; }
  .annotated > .main { order: 1; }
}
.lede { font-size: 1.2rem; color: var(--muted); max-width: 58ch; }
.page-head { padding: clamp(40px, 7vw, 90px) 0 clamp(20px, 3vw, 36px); text-align: center; }
.page-head h1 { margin-bottom: .3em; }
.page-head .lede { margin: 0 auto; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-actions .btn { min-width: 0; padding: 0 26px; }
.hero-small { margin-top: 14px; color: var(--muted); font-size: .95rem; }

/* ---- the proof: notes, a highlighted line, a question tied to it ---- */
.proof-section { padding: clamp(56px, 8vw, 110px) 0; scroll-snap-align: start; }
.proof-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.proof-grid h2 { max-width: 14ch; }
.proof { position: relative; display: flex; flex-direction: column; }
.notes { background: var(--panel); border-radius: var(--radius); padding: 26px 28px 26px 56px; width: 90%;
  background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--line) 31px 32px); background-position: 0 58px;
  line-height: 32px; font-size: 1.02rem; position: relative; }
.notes::before { content: ""; position: absolute; left: 38px; top: 0; bottom: 0; width: 1.5px; background: rgba(233, 188, 98, 0.35); }
.notes h3 { font: 500 1.05rem/32px var(--font); margin: 0; }
.notes p { margin: 0; }
.qcard { position: relative; align-self: flex-end; margin-top: 56px; width: min(340px, 78%); background: var(--raised); border-radius: var(--radius); padding: 18px 20px; }
.qcard .q { font: 500 1.05rem/1.3 var(--font); margin: 0 0 12px; }
.qcard ol { list-style: none; padding: 0; margin: 0 0 12px; }
.qcard li { padding: 6px 10px; border-radius: var(--radius-s); font-size: .95rem; background: rgba(238, 240, 243, 0.06); }
.qcard li + li { margin-top: 6px; }
.qcard li.right { background: rgba(238, 240, 243, 0.16); font-weight: 500; }
.qcard .from { font-size: .86rem; color: var(--muted); margin: 0; }
.qcard .checked { display: flex; gap: 6px; align-items: center; font-size: .86rem; color: var(--text); font-weight: 500; margin: 6px 0 0; }
.tether { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tether path { fill: none; stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 5 6; opacity: .8; }
.tether circle { fill: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .tether path.draw { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.1s .5s ease-out forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; stroke-dasharray: 5 6; } }
}
@media (max-width: 960px) {
  .proof-grid { grid-template-columns: 1fr; gap: 40px; }
  .notes { width: 100%; padding-left: 48px; }
  .notes::before { left: 30px; }
  .qcard { width: 100%; margin-top: 18px; }
  .tether { display: none; }
}

/* ---- the three steps (a real sequence) ---- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; counter-reset: step; max-width: none; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 20px; padding: 22px 0; border-top: 1px solid var(--line); margin: 0; }
.steps li::before { content: counter(step); font: 300 2rem/1 var(--font); color: var(--muted); }
.steps h3 { margin-bottom: .25em; }
.steps p { margin: 0; color: var(--muted); }

/* ---- feature rooms: uneven, not a card wall ---- */
.rooms { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px 40px; }
.room { grid-column: span 2; }
.room.wide { grid-column: span 3; }
.room p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .rooms { grid-template-columns: 1fr; } .room, .room.wide { grid-column: auto; } }

/* ---- product bands on the inner pages: the app, edge to edge ---- */
.band { padding: clamp(40px, 6vw, 80px) 0 0; }
.band + .band { padding-top: clamp(24px, 4vw, 48px); }
.band-head { max-width: var(--measure); margin-bottom: clamp(20px, 3vw, 32px); }
.band-head h2 { margin-bottom: .25em; }
.band-head p { color: var(--muted); margin: 0; }
.band-shot { margin: 0; width: 100%; background: var(--bg); overflow: hidden; }
.band-shot img { width: 100%; height: auto; max-height: 82vh; object-fit: cover; object-position: left 70%; }
.band-shot figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.band-center .band-shot img { object-position: center 40%; }
@media (prefers-reduced-motion: no-preference) {
  .band-shot img { transform: scale(1.03); transition: transform 1.8s ease; }
  .band.in .band-shot img { transform: scale(1); }
}
@media (max-width: 700px) { .band-shot img { aspect-ratio: 4 / 3; max-height: none; } }
@media (min-width: 1700px) { .band-shot { width: min(100%, 1700px); margin-inline: auto; } }
.band + .sheet-section { border-top: 0; }

/* ---- check stages (How it checks): a real sequence ---- */
.stages { list-style: none; padding: 0; margin: 0; max-width: none; border-left: 2px solid var(--line); counter-reset: st; }
.stages li { counter-increment: st; position: relative; padding: 0 0 26px 28px; margin: 0; }
.stages li::before { content: counter(st); position: absolute; left: -15px; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--raised); color: var(--text); font: 500 .85rem/28px var(--font); text-align: center; }
.stages h3 { margin-bottom: .2em; font-size: 1.12rem; }
.stages p { margin: 0; color: var(--muted); }

/* ---- pricing ---- */
.billing { display: inline-flex; background: var(--panel); border-radius: 999px; padding: 3px; margin: 0 0 32px; }
.billing button { border: 0; background: none; color: var(--text); font: 500 .95rem var(--font); padding: .5em 1.1em; border-radius: 999px; cursor: pointer; }
.billing button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.plans { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 16px; align-items: stretch; }
.plan { padding: 28px 26px 30px; display: flex; flex-direction: column; background: var(--panel); border-radius: var(--radius); }
.plan.lead { background: var(--raised); box-shadow: inset 0 3px 0 var(--accent); }
.plan h3 { font-size: 1.5rem; margin-bottom: .1em; font-weight: 400; }
.plan .for { color: var(--muted); margin: 0 0 18px; min-height: 3.2em; }
.price { font: 300 2.8rem/1 var(--font); letter-spacing: -.02em; margin: 0; }
.price small { font: 400 1rem var(--font); color: var(--muted); }
.price-note { color: var(--muted); font-size: .92rem; margin: 6px 0 20px; min-height: 1.5em; }
.plan ul { padding-left: 1.1em; margin: 0 0 24px; flex: 1; }
.plan .btn { align-self: stretch; min-width: 0; }
.sets { font-weight: 500; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan .for { min-height: 0; } }
.compare { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .98rem; }
.compare th, .compare td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-weight: 500; font-size: 1.05rem; }
.compare tbody th { font-weight: 400; }
.compare .grp th { padding-top: 26px; font-weight: 500; font-size: 1.05rem; border-bottom: 1px solid var(--text); }
.table-scroll { overflow-x: auto; }

/* ---- questions and answers ---- */
.faq details { border-top: 1px solid var(--line); padding: 4px 0; max-width: 78ch; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font: 500 1.08rem/1.35 var(--font); padding: 14px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 300; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--muted); }

/* ---- prose pages (legal, about, security) ---- */
.prose { max-width: 72ch; margin-inline: auto; }
.prose h2 { margin-top: 1.6em; font-size: 1.6rem; }
.prose h3 { margin-top: 1.3em; }
.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.2em; font-size: .97rem; }
.prose th, .prose td { text-align: left; border-bottom: 1px solid var(--line); padding: 9px 8px; vertical-align: top; }
.draft-note { border-left: 3px solid var(--accent); background: var(--panel); padding: 12px 16px; max-width: 72ch; margin: 0 auto; font-size: .95rem; border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.wrap > .draft-note { margin-top: 24px; }
.callout { border-radius: var(--radius); background: var(--panel); padding: 22px 24px; max-width: 72ch; }
.callout p:last-child { margin-bottom: 0; }

/* ---- two-up layouts for account pages ---- */
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.task-list { list-style: none; padding: 0; max-width: none; }
.task-list li { border-top: 1px solid var(--line); padding: 14px 0; margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
.task-list li span { color: var(--muted); grid-column: 1; font-size: .95rem; }
.task-list li strong { grid-column: 1; }
.task-list li .where { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: .9rem; text-align: right; }

/* ---- forms (sign up, log in, account) ---- */
input, select, textarea, button { font: inherit; }
input:not([type="checkbox"]):not([type="radio"]), select, textarea { background: var(--raised); color: var(--text); border: 0; border-radius: var(--radius-s); padding: 10px 12px; width: 100%; }

/* ---- changelog ---- */
.log-entry { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 0 40px; padding: 26px 0; border-top: 1px solid var(--line); }
.log-entry time { color: var(--muted); font-weight: 500; }
.log-entry ul { margin: 0; }
@media (max-width: 700px) { .log-entry { grid-template-columns: 1fr; } }

/* ---- closing call ---- */
.closing { padding: clamp(64px, 9vw, 120px) 0; text-align: center; }
.closing h2 { max-width: 20ch; margin-inline: auto; }
.closing .lede { margin-inline: auto; }
.closing .hero-actions { justify-content: center; }

/* ---- footer: small, quiet ---- */
.foot { border-top: 1px solid var(--line); padding: 48px 0 28px; }
.foot-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; }
.foot-col h2 { font: 500 .95rem var(--font); margin: 0 0 10px; letter-spacing: 0; }
.foot-col ul { list-style: none; padding: 0; margin: 0; }
.foot-col li { margin: 0 0 6px; }
.foot-col a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.foot-col a:hover { color: var(--text); text-decoration: underline; }
.foot-base { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 18px; color: var(--muted); font-size: .9rem; }
.foot-base p { margin: 0; }
.foot-made { margin: 24px 0 0; font-size: .85rem; color: var(--muted); text-align: center; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- checkout ---- */
.checkout-box { max-width: 560px; }
.status-line { padding: 12px 16px; border-radius: var(--radius-s); background: var(--panel); }
