/* Shiftally website. Colors and type follow DESIGN.md in the app repo. */

:root {
  --paper: #F5F2E9;
  --surface: #FFFCF5;
  --ink: #192C27;
  --ink-soft: #506058;
  --action: #285B47;
  --panel: #193B32;
  --panel-ink: #FFF8E8;
  --panel-soft: #B9CCC1;
  --amber: #F0C681;
  --rule: rgba(25, 44, 39, 0.16);
  --bezel: #0E1613;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;

  --gutter: clamp(20px, 5vw, 48px);
  --measure: 34rem;
  --wide: 70rem;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #151D1A;
    --surface: #1E2A25;
    --ink: #F6F1E4;
    --ink-soft: #B8C6BD;
    --action: #ACD7BE;
    --panel: #203C33;
    --rule: rgba(246, 241, 228, 0.16);
    --bezel: #060A08;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.55;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--action); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 5.4vw, 3.75rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); letter-spacing: -0.01em; }
h3 { font-size: 1.375rem; }
p { margin: 0; }

.wrap { max-width: var(--wide); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: var(--gutter); top: -4rem;
  background: var(--surface); color: var(--ink); padding: 0.6rem 0.9rem; border-radius: 8px;
}
.skip:focus { top: 0.75rem; }

/* Top bar. Sits on the green panel on the home page, on paper elsewhere. */

.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; color: inherit; text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.25rem; }
.brand svg { width: 2rem; height: 2rem; border-radius: 7px; flex: none; }
.bar nav { display: flex; gap: 1.5rem; }
.bar nav a { color: inherit; text-decoration: none; padding-block: 0.6rem; }
.bar nav a:hover, .bar nav a[aria-current="page"] { text-decoration: underline; }

/* Home: the green panel is the app's "on shift" panel, scaled up to a page opening. */

.panel { background: var(--panel); color: var(--panel-ink); }
.panel a { color: inherit; }

.opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  padding-top: clamp(2rem, 6vw, 4.5rem);
}

.opening .lede { margin-top: 1.5rem; max-width: var(--measure); color: var(--panel-soft); font-size: 1.1875rem; }

.ledger { margin: 2.5rem 0 0; max-width: 26rem; }
.ledger div { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; padding-block: 0.7rem; border-top: 1px solid rgba(255, 248, 232, 0.2); }
.ledger dt { color: var(--panel-soft); }
.ledger dd { margin: 0; font-variant-numeric: tabular-nums; font-size: 1.375rem; font-weight: 600; white-space: nowrap; }
.ledger .verdict { border-top: 2px solid var(--amber); }
.ledger .verdict dt, .ledger .verdict dd { color: var(--amber); }
.ledger-note { margin-top: 0.6rem; color: var(--panel-soft); font-size: 0.9375rem; }

.release { margin-top: 2.5rem; font-size: 1rem; color: var(--panel-soft); }
.release strong { color: var(--panel-ink); font-weight: 600; }

.phone {
  width: min(100%, 19rem);
  padding: 0.5rem;
  background: var(--bezel);
  border-radius: 2.9rem;
  box-shadow: 0 1.5rem 3rem -1rem rgba(8, 20, 16, 0.55);
}
.phone img { border-radius: 2.4rem; aspect-ratio: 660 / 1434; width: 100%; }

.opening .phone { margin-inline: auto; margin-bottom: -5rem; }
.section.after-opening { padding-top: 8.5rem; }

@media (min-width: 56rem) {
  .opening { grid-template-columns: minmax(0, 1fr) 21rem; align-items: start; gap: 4rem; padding-bottom: 4.5rem; }
  .opening .phone { width: 21rem; align-self: end; margin-bottom: -11rem; }
  .section.after-opening { padding-top: 12.5rem; }
}

/* Sections on paper */

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section > .wrap > h2 + p { margin-top: 1rem; max-width: var(--measure); color: var(--ink-soft); }

.steps { list-style: none; margin: 3.5rem 0 0; padding: 0; display: grid; gap: 4rem 3rem; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 1.75rem; justify-items: start; align-content: start; }
.steps .phone { width: min(100%, 17rem); }
.steps h3::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 1.9rem; height: 1.9rem; margin-right: 0.7rem;
  border-radius: 4px; background: var(--panel); color: var(--amber);
  font-family: var(--sans); font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums;
  vertical-align: 0.12em;
}
.steps p { margin-top: 0.75rem; color: var(--ink-soft); max-width: 30rem; }

@media (min-width: 56rem) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.rows { margin: 2.5rem 0 0; border-bottom: 1px solid var(--rule); }
.rows div { display: grid; gap: 0.35rem 2.5rem; padding-block: 1.25rem; border-top: 1px solid var(--rule); }
.rows dt { font-family: var(--serif); font-weight: 600; font-size: 1.1875rem; }
.rows dd { margin: 0; color: var(--ink-soft); max-width: 40rem; }

@media (min-width: 44rem) {
  .rows div { grid-template-columns: 15rem minmax(0, 1fr); align-items: baseline; }
}

.tint { background: var(--surface); border-block: 1px solid var(--rule); }

.table-scroll { margin-top: 2.5rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; vertical-align: top; padding: 0.95rem 1.5rem 0.95rem 0; border-top: 1px solid var(--rule); }
thead th { border-top: 0; font-weight: 600; color: var(--ink-soft); font-size: 0.9375rem; }
tbody th { font-weight: 600; width: 42%; min-width: 11rem; }
tbody tr:last-child > * { border-bottom: 1px solid var(--rule); }
.never { font-weight: 600; }

.more { margin-top: 2rem; }

/* Text pages: privacy and support */

.page { padding-block: clamp(2rem, 6vw, 4rem) clamp(4rem, 8vw, 6rem); }
.page .prose { max-width: 42rem; }
.page h1 { font-size: clamp(2rem, 4.6vw, 3rem); }
.page .dated { margin-top: 0.9rem; color: var(--ink-soft); }
.prose h2 { font-size: 1.625rem; margin-top: 3rem; }
.prose h3 { font-size: 1.1875rem; margin-top: 2rem; }
.prose p, .prose ul, .prose .table-scroll { margin-top: 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose li + li { margin-top: 0.4rem; }
.prose tbody th { width: 38%; }

/* Footer */

.foot { border-top: 1px solid var(--rule); padding-block: 2.5rem 3.5rem; color: var(--ink-soft); font-size: 0.9375rem; }
.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.foot nav { display: flex; gap: 1.5rem; }
.foot a { color: inherit; }
