/* ==========================================================================
   The Global Domination Company — homepage index

   Standalone: this page shares nothing with the app pages' dossier stylesheet.
   It is one centred column on a dark ground, and the app icons are the only
   colour on it. Deliberately dark-only — the mark and the layout were designed
   for it — so every colour is stated outright rather than inherited.
   ========================================================================== */

:root {
  --bg: #0b0b0c;
  --ink: #f2f2f3;
  --ink-soft: #8d8f94;
  --rule: #232427;
  --rule-hover: #3a3c41;

  --sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  color-scheme: dark;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.index {
  max-width: 34rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 12vh, 7rem) clamp(1.25rem, 6vw, 2rem) 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Mark ---------------------------------------------------------------- */

.mark {
  margin: 0;
  width: clamp(6rem, 26vw, 9rem);
}
.mark svg {
  display: block;
  width: 100%;
  height: auto;
  color: var(--ink);
}

.blurb {
  margin: 1.6rem 0 0;
  color: var(--ink-soft);
  font: 400 0.85rem/1.6 var(--mono);
  letter-spacing: 0.02em;
  text-align: center;
  text-wrap: balance;
}

/* --- App list ------------------------------------------------------------ */

.apps {
  list-style: none;
  margin: clamp(2.75rem, 8vh, 4.5rem) 0 0;
  padding: 0;
  width: 100%;
  border-top: 1px solid var(--rule);
}

.apps li { border-bottom: 1px solid var(--rule); }

.apps a,
.apps .row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0.25rem;
  text-decoration: none;
  color: inherit;
  transition: padding-left 0.16s ease, border-color 0.16s ease;
}

.apps a:hover,
.apps a:focus-visible {
  padding-left: 0.75rem;
}

/* Not shipped yet. A plain row rather than a disabled link: there is no page to
   go to, so there should be nothing to click and nothing in the tab order. The
   icon keeps most of its colour — it is the only colour on the page — while the
   text recedes. */
.apps .soon { cursor: default; }
.apps .soon .name { color: var(--ink-soft); }
.apps .soon .what { color: #5f6167; }
.apps .soon img { opacity: 0.5; }

.tag {
  margin-left: auto;
  padding-left: 1rem;
  flex: 0 0 auto;
  font: 400 0.68rem/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f6167;
  white-space: nowrap;
}

.apps a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.apps img {
  width: 3rem;
  height: 3rem;
  border-radius: 0.7rem;
  flex: 0 0 auto;
}

.app { display: flex; flex-direction: column; min-width: 0; }

.name {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.what {
  margin-top: 0.1rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.4;
}

/* The arrow is decorative and lives here rather than in the markup. */
.apps a::after {
  content: "→";
  margin-left: auto;
  padding-left: 1rem;
  color: var(--rule-hover);
  transition: color 0.16s ease, transform 0.16s ease;
}
.apps a:hover::after,
.apps a:focus-visible::after {
  color: var(--ink);
  transform: translateX(2px);
}

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

.index-foot {
  margin-top: clamp(3rem, 10vh, 5rem);
  width: 100%;
  /* Stacked on purpose: the two lines together overrun the 34rem column at this
     size, and a deliberate stack reads better than a near-miss single row. */
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font: 400 0.72rem/1.7 var(--mono);
  color: var(--ink-soft);
}

.index-foot a { color: var(--ink-soft); text-decoration: none; }
.index-foot a:hover { color: var(--ink); }

@media (max-width: 26rem) {
  .apps img { width: 2.5rem; height: 2.5rem; }
  .apps a::after { display: none; }
  /* The tag drops under the name rather than squeezing the description. */
  .apps .row { flex-wrap: wrap; }
  .tag { margin-left: 4rem; padding-left: 0; margin-top: 0.35rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; }
}
