/* The colors and fonts of the CodeRing brochure (www.code-ring.com). */
:root {
  color-scheme: light;
  --navy: #13213a;
  --lime: #c2e35f;
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1a1f2b;
  --muted: #5d6472;
  --line: #dcd8ce;
  --accent: #2f4a7a;
  --on-accent: #ffffff;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'IBM Plex Sans', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

/* Dark: by the device's setting, unless the switch says otherwise (theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0e1626;
    --surface: #17233a;
    --ink: #eef1f6;
    --muted: #a9b3c7;
    --line: #2b3a56;
    --accent: #c2e35f;
    --on-accent: #13213a;
  }
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0e1626;
  --surface: #17233a;
  --ink: #eef1f6;
  --muted: #a9b3c7;
  --line: #2b3a56;
  --accent: #c2e35f;
  --on-accent: #13213a;
}

/* Each app's screenshot follows the page's theme. */
.for-dark {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .for-light {
    display: none;
  }
  :root:not([data-theme='light']) .for-dark {
    display: block;
  }
}
:root[data-theme='dark'] .for-light {
  display: none;
}
:root[data-theme='dark'] .for-dark {
  display: block;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.12;
}

.wrap {
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}

.hero {
  padding: 28px 0 112px;
  background: var(--navy);
  color: #fff;
}

.hero .wrap {
  position: relative;
}

.theme {
  position: absolute;
  top: 2px;
  right: clamp(16px, 4vw, 40px);
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font: 500 0.9rem var(--sans);
  cursor: pointer;
}

.theme:hover {
  border-color: var(--lime);
}

.theme:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

.theme[hidden] {
  display: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  text-decoration: none;
}

.eyebrow {
  margin: 56px 0 12px;
  color: var(--lime);
  font: 500 0.8rem var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  max-width: 18em;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
}

.lede {
  max-width: 38em;
  margin: 20px 0 0;
  color: #dfe4ee;
  font-size: 1.1rem;
}

.apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: -72px;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(19, 33, 58, 0.12);
}

/* A click anywhere on a card follows its See more link: the link's hit area covers the card. */
.app:hover {
  border-color: var(--accent);
}

.more::after {
  content: '';
  position: absolute;
  inset: 0;
}

.btn.primary {
  position: relative;
  z-index: 1;
}

.shot {
  display: block;
  border-bottom: 1px solid var(--line);
}

.body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.kind {
  margin: 0 0 8px;
  color: var(--muted);
  font: 500 0.72rem var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h2 {
  font-size: 1.8rem;
}

.pitch {
  margin: 12px 0 0;
}

ul {
  margin: 16px 0 24px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.95rem;
}

li + li {
  margin-top: 6px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--accent);
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.btn.primary:hover {
  filter: brightness(1.12);
}

a:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 2px;
}

.foot {
  margin-top: 64px;
  padding: 36px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}

.foot p {
  margin: 0;
}

.foot a {
  color: inherit;
  font-weight: 600;
}

.foot .small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

/* The mark is black; the header is navy. */
.brand img {
  filter: brightness(0) invert(1);
}
