/* ==========================================================================
   All In One Work Hub
   Direction: machined instrument panel. The product is one surface holding
   small instruments, so the site is built from panels, hairlines, mono
   readouts, and aligned numerals. No cards: a card says "seven separate
   things", and the whole point of the product is that they share a surface.

   Three structural devices, reused everywhere:
     .surface-grid  cells sharing one dark frame, divided by hairlines only
     .rows / .row   a label column and a text column, separated by hairlines
     .split         a sticky mono rail beside a reading column
   Amber is the only accent and it means one thing: live, or now.
   ========================================================================== */

:root {
  /* Metal ramp for light surfaces. Every value sits on the same 205deg hue
     so the ramp reads as one material rather than five decisions. */
  --metal-050: #f5f7f9;
  --metal-100: #e6ecf1;
  --metal-200: #d4dee7;
  --metal-400: #8fa3b5;
  --metal-600: #4a6a83;
  --metal-700: #37556b;
  --metal-900: #1c2e3a;

  /* Instrument ink. The dark band is the product's own dark mode, so the
     site shows both faces of the surface instead of describing one. */
  --ink-900: #101d26;
  --ink-800: #172934;
  --ink-line: #2b4453;
  --ink-text: #cfdbe4;
  --ink-muted: #8ba4b5;

  /* Backlit amber. Used only for live or now: the active pane, a running
     readout, the rule that opens a section. Never for decoration. */
  --signal: #f2a33c;

  --color-primary: var(--metal-700);
  --color-accent: var(--metal-900);
  --color-bg: var(--metal-050);
  --color-bg-alt: #ffffff;
  --color-panel: var(--metal-100);
  --color-text: var(--metal-900);
  --color-text-muted: var(--metal-600);
  --color-border: var(--metal-200);
  --color-hairline: var(--metal-400);

  --font-heading: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;

  /* Polished-edge treatment: a light top inset reads as a machined bevel. */
  --bevel: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --lift: 0 1px 2px rgba(28, 46, 58, 0.06), 0 6px 18px rgba(28, 46, 58, 0.06);

  --wrap: 1200px;
  --measure: 68ch;
  --rail: 210px;
  --gap: 24px;
}

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

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

/* The footer sits at the bottom of the viewport on short pages instead of
   riding up into the middle of the screen. */
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: inherit;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0 0 12px 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 5.4vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); font-weight: 650; }
h3 { font-size: 1.18rem; font-weight: 600; letter-spacing: -0.02em; }

p { margin: 0 0 1rem 0; }
p:last-child { margin-bottom: 0; }

a { color: var(--color-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--color-accent); }
img { max-width: 100%; height: auto; display: block; }
ul { margin: 0 0 1rem 0; padding-left: 1.15rem; }
li { margin-bottom: 0.35rem; }

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 12px; top: 12px; }

/* --- Panel legend: the structural device. Labels an instrument the way a
   label sits on real equipment, in the mono face the product uses for its
   own readouts. Not a step number, because none of this is a sequence. --- */
.legend {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 10px 0;
}
.legend::before {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 2px;
  background: var(--signal);
}
.legend-plain { display: inline-block; }
.legend-plain::before { content: none; }

/* --- Nav ----------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 247, 249, 0.9);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.06rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  color: var(--color-text);
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; }
.brand em { font-style: normal; color: var(--color-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--color-text); border-bottom-color: var(--color-hairline); }
.nav-links a[aria-current="page"] { color: var(--color-text); border-bottom-color: var(--signal); }

.nav-toggle {
  display: none;
  width: 42px;
  height: 38px;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--bevel);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--color-text);
  position: relative;
}
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 17px;
  height: 1.5px;
  background: var(--color-text);
}
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }

/* --- Bands --------------------------------------------------------------- */
.band { padding-block: clamp(52px, 7vw, 96px); }
.band-alt { background: var(--color-bg-alt); border-block: 1px solid var(--color-border); }
.band-tight { padding-block: clamp(36px, 5vw, 60px); }

.band-dark {
  background: var(--ink-900);
  color: var(--ink-text);
}
.band-dark h1,
.band-dark h2,
.band-dark h3 { color: #fff; }
.band-dark .legend { color: var(--ink-muted); }
.band-dark .lede { color: var(--ink-muted); }
.band-dark a { color: #fff; }

.lede {
  font-size: 1.14rem;
  color: var(--color-text-muted);
  max-width: 58ch;
}

/* --- Page head: two columns, so a heading never sits alone against the
   left edge of an empty 1200px row. ---------------------------------------- */
.page-head { padding-top: clamp(40px, 5.5vw, 72px); padding-bottom: clamp(6px, 2vw, 20px); }

.head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(20px, 4vw, 64px);
  align-items: end;
}
.head-grid h1 { margin-bottom: 0; }
.head-grid .lede { margin-bottom: 4px; }

/* --- Split: a sticky mono rail beside the reading column. Interior pages
   use the full width instead of a single column pinned left. --------------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, var(--rail)) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: start;
}

.rail {
  position: sticky;
  top: 96px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  border-top: 2px solid var(--color-text);
  padding-top: 14px;
}
.rail ol,
.rail ul {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rail;
}
.rail li { margin: 0 0 2px 0; counter-increment: rail; }
.rail a {
  display: block;
  padding: 5px 0;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}
.rail a:hover { color: var(--color-text); border-bottom-color: var(--color-hairline); }
.rail-title {
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin: 0 0 10px 0;
  font-size: 0.72rem;
}
.rail p { font-size: 0.82rem; margin-bottom: 0.7rem; }

/* --- Hero ---------------------------------------------------------------- */
.hero { padding-top: clamp(40px, 6vw, 76px); padding-bottom: clamp(40px, 6vw, 76px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: clamp(28px, 5vw, 56px);
  align-items: center;
}

.hero-copy p { font-size: 1.14rem; color: var(--color-text-muted); max-width: 46ch; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.note-inline {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius);
  background: var(--color-primary);
  box-shadow: var(--bevel), var(--lift);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease;
}
.btn:hover { background: var(--color-accent); border-color: var(--color-accent); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-quiet {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border-color: var(--color-border);
  box-shadow: var(--bevel);
}
.btn-quiet:hover { background: var(--color-panel); color: var(--color-text); border-color: var(--color-hairline); }

.band-dark .btn-quiet {
  background: transparent;
  color: #fff;
  border-color: var(--ink-line);
  box-shadow: none;
}
.band-dark .btn-quiet:hover { background: var(--ink-800); border-color: var(--ink-muted); color: #fff; }

/* --- The instrument panel: the hero signature ----------------------------- */
.panel {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--bevel), var(--lift);
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--color-border);
}
.panel-head .brand { font-size: 0.96rem; }

.panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.module {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 13px 14px;
  min-width: 0;
}
.module-wide { grid-column: 1 / -1; }

/* The hero panel is deliberately left exactly as it was: no signal dash on
   its legends, no mono readouts, original label color. The redesign stops at
   the edge of the panel. */
.panel .legend {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--color-hairline);
  margin: 0 0 6px 0;
}
.panel .legend::before { content: none; }

/* Clock module */
.clock-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
  font-size: 0.9rem;
}
.clock-row + .clock-row { border-top: 1px dotted var(--color-border); }
.clock-city { color: var(--color-text-muted); }
.clock-time { font-weight: 600; letter-spacing: -0.01em; }
.clock-primary .clock-time { font-size: 1.5rem; color: var(--color-primary); }
.clock-primary .clock-city { font-weight: 600; color: var(--color-text); }

/* Calendar module */
.cal-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-month { font-weight: 600; font-size: 0.92rem; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-size: 0.7rem;
  text-align: center;
}
.cal-grid span { padding: 3px 0; border-radius: 4px; color: var(--color-text-muted); }
.cal-grid .dow { color: var(--color-hairline); font-weight: 600; }
.cal-grid .today {
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
}

/* Task module */
.task {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 0;
  font-size: 0.9rem;
}
.task + .task { border-top: 1px dotted var(--color-border); }
.tick {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--color-hairline);
  border-radius: 4px;
}
.task.done .tick { background: var(--color-primary); border-color: var(--color-primary); }
.task.done span { color: var(--color-text-muted); text-decoration: line-through; }

/* --- The surface: cells sharing one frame. The 1px gap over an ink
   background draws every divider, so no cell owns a border of its own and
   the whole thing reads as one instrument face. --------------------------- */
.surface-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--ink-line);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: clamp(28px, 4vw, 44px);
}

.cell {
  background: var(--ink-900);
  padding: clamp(20px, 2.4vw, 30px);
  min-width: 0;
}
.cell:hover { background: var(--ink-800); }
.cell h3 { margin-bottom: 7px; }
.cell p { color: var(--ink-muted); font-size: 0.97rem; }
.cell .legend { color: var(--ink-muted); margin-bottom: 12px; }
.cell-wide { grid-column: 1 / -1; }

.surface-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}
.live {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px rgba(242, 163, 60, 0.18);
}

/* --- Rows: the label column and the text column. This replaces cards
   everywhere. Hairlines only, and the rows share the full width. ---------- */
.rows { margin-top: clamp(24px, 3.5vw, 40px); border-bottom: 1px solid var(--color-border); }

.row {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(14px, 3vw, 56px);
  padding-block: clamp(22px, 2.6vw, 30px);
  border-top: 1px solid var(--color-border);
}
.row-label h3 { margin-bottom: 0; }
.row-body p { color: var(--color-text-muted); max-width: var(--measure); }
.row-body p:first-child { margin-top: 0; }

/* A tighter variant for short statements, where a paragraph does not need
   its own column. */
.rows-tight .row { padding-block: clamp(16px, 2vw, 22px); }

/* --- Prose --------------------------------------------------------------- */
.prose { max-width: var(--measure); }
.prose > h2:first-child { margin-top: 0; }
.prose h2 { margin-top: 2.4rem; scroll-margin-top: 96px; }
.prose h3 { margin-top: 1.6rem; }
.prose p { color: var(--color-text-muted); }
.prose ul { color: var(--color-text-muted); }
.prose strong { color: var(--color-text); }

/* --- FAQ: a hairline list, not a stack of boxes -------------------------- */
.faq-list { margin-top: clamp(20px, 3vw, 34px); border-bottom: 1px solid var(--color-border); }

.faq-item { border-top: 1px solid var(--color-border); }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  padding: 20px 0;
  background: none;
  border: 0;
  font-family: var(--font-heading);
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
  text-align: left;
  cursor: pointer;
}
.faq-q:hover { color: var(--color-primary); }
.faq-q::after {
  content: "";
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 1.5px solid var(--color-hairline);
  border-bottom: 1.5px solid var(--color-hairline);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 160ms ease;
}
.faq-q[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-3px, -3px); }

.faq-a { max-height: 0; overflow: hidden; transition: max-height 200ms ease, padding 200ms ease; }
.faq-a[data-open="true"] { padding-bottom: 22px; max-height: 720px; }
.faq-a p { color: var(--color-text-muted); max-width: var(--measure); margin-bottom: 0; }

/* --- Forms --------------------------------------------------------------- */
.form { max-width: 46rem; }
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 7px;
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
}
.field input:focus,
.field textarea:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary); }
.field textarea { min-height: 172px; resize: vertical; }

.overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(16, 29, 38, 0.6);
  z-index: 60;
}
.overlay[data-open="true"] { display: flex; }
.overlay-card {
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  box-shadow: var(--lift);
  padding: 32px;
  max-width: 420px;
  text-align: center;
}
.overlay-card p { color: var(--color-text-muted); }

/* --- Toggle groups (uninstall page) -------------------------------------- */
.toggle-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.toggle {
  padding: 9px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
  box-shadow: var(--bevel);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  cursor: pointer;
}
.toggle:hover { color: var(--color-text); border-color: var(--color-hairline); }
.toggle[aria-pressed="true"] {
  background: var(--color-text);
  border-color: var(--color-text);
  color: #fff;
  box-shadow: inset 0 -2px 0 var(--signal);
}
.pane { display: none; margin-top: 18px; }
.pane[data-active="true"] { display: block; }

.steps { counter-reset: s; list-style: none; padding-left: 0; max-width: var(--measure); }
.steps li {
  counter-increment: s;
  position: relative;
  padding-left: 38px;
  margin-bottom: 12px;
  color: var(--color-text-muted);
}
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 3px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--color-hairline);
}

/* --- Closing call to action ---------------------------------------------- */
.closer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  padding-top: clamp(28px, 4vw, 44px);
  border-top: 2px solid var(--color-text);
}
.closer h2 { margin-bottom: 6px; }
.closer p { color: var(--color-text-muted); margin-bottom: 0; }

/* --- Footer -------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  padding-block: 36px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 2px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-links a {
  padding: 5px 10px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  text-decoration: none;
}
.footer-links a:hover { color: var(--color-text); }
.copyright { font-family: var(--font-mono); font-size: 0.78rem; color: var(--color-text-muted); margin: 0; }

/* --- Responsive ---------------------------------------------------------- */
@media (max-width: 1000px) {
  .surface-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .rail { position: static; }
  .rail ol, .rail ul { display: flex; flex-wrap: wrap; gap: 2px 14px; }
  .rail a { border-bottom: 0; }
  .head-grid { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .closer { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy p { max-width: none; }

  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 14px 14px;
    background: var(--color-bg-alt);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--lift);
  }
  .nav-links[data-open="true"] { display: flex; }
  .nav-links a { padding: 12px 8px; border-bottom: 1px solid var(--color-border); }
  .site-nav .wrap { position: relative; }
}

@media (max-width: 620px) {
  .surface-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 460px) {
  body { font-size: 16px; }
  .panel-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
