/* wrktrkr.com: the public site for Work Tracker. Colours, type and corners are the phone app's
   (apps/mobile/src/theme.ts): a night-shift desk, near-black glass, one volt-green signal.
   No inline styles and no scripts anywhere: the Content-Security-Policy allows neither. */

@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('fonts/space-grotesk-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------------------------------
   Tokens: the app's dark palette by default, its light palette when the device asks for light. */

:root {
  color-scheme: dark light;
  --canvas: #07080a;
  --surface: #121418;
  --raised: #1c1f25;
  --fg: #f4f6f8;
  --muted: #a3a9b2;
  --subtle: #858c97;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --accent: #c5f82a;
  --accent-ink: #c5f82a;
  --selection: rgba(197, 248, 42, 0.28);
  /* The W Tick's square: a card's surface with a thin light edge on the dark page. */
  --tile: #121418;
  --tile-edge: rgba(255, 255, 255, 0.1);
  /* The phone's frame around the screenshot. */
  --bezel: #1a1c21;
  --bezel-edge: rgba(255, 255, 255, 0.08);
  --bezel-shadow: none;
  /* Workstream colours from the app's rotation, for the small squares beside group names. */
  --ws-1: #4c8dff;
  --ws-2: #b15cff;
  --ws-3: #ff5fa2;

  --display: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --text: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'Geeza Pro', Tahoma,
    sans-serif;
  --mono: ui-monospace, Menlo, Consolas, 'SF Mono', 'Liberation Mono', monospace;

  --page: 1152px;
  --gutter: 32px;
}

@media (prefers-color-scheme: light) {
  :root {
    --canvas: #f2f3f5;
    --surface: #ffffff;
    --raised: #e9ebee;
    --fg: #0b0d10;
    --muted: #4b5260;
    --subtle: #646b77;
    --line: rgba(11, 13, 16, 0.08);
    --line-strong: rgba(11, 13, 16, 0.14);
    --accent-ink: #3f7300;
    --selection: rgba(63, 115, 0, 0.18);
    /* In the light the square keeps the icon's own night-desk ground, as the app's mark does. */
    --tile: #07080a;
    --tile-edge: transparent;
    --bezel: #0b0d10;
    --bezel-edge: transparent;
    --bezel-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    /* The bright workstream colours taken a quarter toward black, as the app does on white. */
    --ws-1: #396abf;
    --ws-2: #8545bf;
    --ws-3: #bf477a;
  }
}

/* ---------------------------------------------------------------------------------------------
   Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--canvas);
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--fg);
  font: 400 17px/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-strong);
  transition: color 150ms cubic-bezier(0.22, 1, 0.36, 1),
    text-decoration-color 150ms cubic-bezier(0.22, 1, 0.36, 1);
}
a:hover {
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection {
  background: var(--selection);
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  text-wrap: balance;
}
p {
  margin: 0;
  text-wrap: pretty;
}
bdi,
.ltr {
  unicode-bidi: isolate;
}

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

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -64px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--fg);
  z-index: 10;
}
.skip:focus {
  top: 12px;
}

/* ---------------------------------------------------------------------------------------------
   Header */

.site-header {
  border-bottom: 1px solid var(--line);
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font: 600 18px/1 var(--display);
  white-space: nowrap;
}
.tile {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--tile);
  box-shadow: inset 0 0 0 1px var(--tile-edge);
}
.tile img {
  width: 32px;
  height: 32px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current='page'] {
  color: var(--fg);
}

/* ---------------------------------------------------------------------------------------------
   Hero: the words on one side, the app on a phone rising from the bottom edge on the other. */

.hero {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 384px;
  column-gap: 96px;
  min-height: 640px;
}
.hero-copy {
  align-self: center;
  padding-block: 64px;
}
.hero h1 {
  max-width: 13em;
  font-size: 64px;
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.lede {
  max-width: 34rem;
  margin-top: 24px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.5;
}
/* The download area: plain text until the App Store link exists. */
.get {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  max-width: 34rem;
}
.status {
  font: 500 18px/1.4 var(--display);
}

.hero-visual {
  align-self: end;
  height: 576px;
  padding-top: 56px;
}
.phone {
  margin: 0;
  width: 384px;
  height: 640px;
  padding: 12px;
  border-radius: 64px;
  background: var(--bezel);
  box-shadow: inset 0 0 0 1px var(--bezel-edge), var(--bezel-shadow);
}
.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 52px;
  background: #07080a;
}
/* The Dynamic Island: the screenshot is taken without it. */
.screen::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 50%;
  width: 108px;
  height: 32px;
  margin-left: -54px;
  border-radius: 16px;
  background: #000;
}
.screen img {
  width: 100%;
}

/* ---------------------------------------------------------------------------------------------
   What it does: groups shaped like the app's workstreams, rows numbered like its ledger. */

.features {
  padding-block: 96px;
}
.features-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 640px);
  column-gap: 96px;
  align-items: start;
}
.features-intro {
  position: sticky;
  top: 32px;
}
.features-intro h2 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.features-intro p {
  margin-top: 16px;
  max-width: 26rem;
  color: var(--muted);
}

.groups {
  display: grid;
  gap: 48px;
}
.group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-inline-start: 4px;
}
.group-head h3 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.swatch {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--ws-1);
}
.group:nth-child(2) .swatch {
  background: var(--ws-2);
}
.group:nth-child(3) .swatch {
  background: var(--ws-3);
}
.num {
  font-family: var(--mono);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--subtle);
  letter-spacing: 0;
}
.group-head .num {
  font-size: 15px;
}

.rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
}
.row > .num {
  padding-top: 20px;
  padding-inline-start: 24px;
  font-size: 13px;
  line-height: 24px;
}
.row-body {
  padding-block: 18px;
  padding-inline-end: 24px;
  border-top: 1px solid var(--line);
}
.row:first-child .row-body {
  border-top: 0;
}
.row h4 {
  font-size: 18px;
  line-height: 26px;
  letter-spacing: -0.005em;
}
.row p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}
.row .typed {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--raised);
  color: var(--fg);
  font: 400 14px/1.5 var(--mono);
  overflow-wrap: anywhere;
}
.row .typed + p {
  margin-top: 8px;
}

/* ---------------------------------------------------------------------------------------------
   Closing */

.closing {
  border-top: 1px solid var(--line);
  padding-block: 80px;
}
.closing h2 {
  font-size: 36px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.closing p {
  margin-top: 12px;
  color: var(--muted);
}
.closing a,
.doc a {
  color: var(--fg);
}

/* ---------------------------------------------------------------------------------------------
   Footer */

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--subtle);
  font-size: 15px;
}
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  padding-block: 32px 40px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.foot a {
  color: var(--muted);
  text-decoration: none;
}
.foot a:hover {
  color: var(--fg);
}

/* ---------------------------------------------------------------------------------------------
   Policy pages: the existing privacy and support text, in English and then Arabic. */

.doc {
  max-width: 46rem;
  margin: 0 auto;
  padding: 64px var(--gutter) 96px;
}
.doc section + section {
  margin-top: 64px;
  padding-top: 48px;
  border-top: 1px solid var(--line);
}
.doc h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.doc h2 {
  margin: 40px 0 12px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.doc p,
.doc ul,
.doc ol {
  margin: 0 0 12px;
}
.doc ul,
.doc ol {
  padding-inline-start: 1.25rem;
}
.doc li {
  margin-bottom: 8px;
}
.doc li::marker {
  color: var(--subtle);
}
.doc strong {
  font-weight: 600;
}
.doc a {
  overflow-wrap: anywhere;
}
.doc .updated {
  margin-top: 12px;
  color: var(--subtle);
  font-size: 15px;
}
.doc .lang-switch {
  margin: 8px 0 32px;
  font-size: 15px;
}
.doc .contact {
  padding: 16px 20px;
  border-radius: 14px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.doc .related {
  margin-top: 48px;
  color: var(--muted);
  font-size: 15px;
}

/* The 404 page */

.missing {
  max-width: 40rem;
  margin: 0 auto;
  padding: 128px var(--gutter);
}
.missing h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.missing p {
  margin-top: 12px;
  color: var(--muted);
}
.missing p[lang='ar'] {
  margin-top: 32px;
}

/* ---------------------------------------------------------------------------------------------
   Arabic: no letter spacing (it pulls joined letters apart), more room for dots and marks. */

[lang='ar'] {
  letter-spacing: 0;
}
[lang='ar'] h1,
[lang='ar'] h2,
[lang='ar'] h3,
[lang='ar'] h4 {
  letter-spacing: 0;
  line-height: 1.4;
}
[lang='ar'] body,
body[lang='ar'],
section[lang='ar'] {
  line-height: 1.8;
}
.doc section[lang='ar'] {
  font-size: 18px;
}
[lang='ar'] .hero h1 {
  max-width: 12em;
  font-size: 56px;
  line-height: 1.3;
}
/* Arabic reads smaller than Latin at the same size, so its text steps up one size. */
body[lang='ar'],
[lang='ar'] body {
  font-size: 18px;
}
[lang='ar'] .lede {
  font-size: 21px;
  line-height: 1.8;
}
[lang='ar'] .row p,
[lang='ar'] .features-intro p,
[lang='ar'] .closing p {
  font-size: 17px;
  line-height: 1.8;
}
/* The typed line holds Arabic, which a monospaced face draws badly: the reading face instead. */
[lang='ar'] .row .typed {
  font: 400 16px/1.7 var(--text);
}
[lang='ar'] .row h4 {
  line-height: 30px;
}
[lang='ar'] .row > .num {
  padding-top: 22px;
}

/* ---------------------------------------------------------------------------------------------
   Narrower screens */

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) 336px;
    column-gap: 56px;
  }
  .phone {
    width: 336px;
    height: 600px;
    border-radius: 56px;
    padding: 11px;
  }
  .screen {
    border-radius: 45px;
  }
  .screen::before {
    width: 96px;
    height: 28px;
    margin-left: -48px;
    border-radius: 14px;
  }
  .hero h1 {
    font-size: 56px;
  }
  .features-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 48px;
  }
  .features-intro {
    position: static;
  }
  .features-intro p {
    max-width: 36rem;
  }
}

@media (max-width: 760px) {
  :root {
    --gutter: 20px;
  }
  body {
    font-size: 16px;
  }
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .hero-copy {
    padding-block: 48px 40px;
  }
  .hero h1 {
    font-size: 40px;
    line-height: 1.08;
    letter-spacing: -0.02em;
  }
  [lang='ar'] .hero h1 {
    font-size: 36px;
    line-height: 1.35;
  }
  .lede {
    margin-top: 16px;
    font-size: 18px;
  }
  [lang='ar'] .lede {
    font-size: 19px;
  }
  .get {
    margin-top: 24px;
  }
  .hero-visual {
    justify-self: center;
    height: 440px;
    padding-top: 0;
  }
  .phone {
    width: 300px;
    height: 520px;
    border-radius: 50px;
    padding: 10px;
  }
  .screen {
    border-radius: 40px;
  }
  .screen::before {
    top: 9px;
    width: 86px;
    height: 25px;
    margin-left: -43px;
    border-radius: 13px;
  }
  .features {
    padding-block: 64px;
  }
  .features-intro h2,
  .closing h2 {
    font-size: 28px;
  }
  .groups {
    gap: 40px;
  }
  .row {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .row > .num {
    padding-inline-start: 16px;
  }
  .row-body {
    padding-inline-end: 16px;
  }
  .row h4 {
    font-size: 17px;
  }
  .row p {
    font-size: 15px;
  }
  .closing {
    padding-block: 56px;
  }
  .doc {
    padding-block: 40px 64px;
  }
  .doc h1,
  .missing h1 {
    font-size: 30px;
  }
  .doc h2 {
    font-size: 20px;
  }
  .missing {
    padding-block: 80px;
  }
}

@media (max-width: 520px) {
  .nav .wide {
    display: none;
  }
}
