:root {
  --paper: #ffffff;
  --paper-deep: #f3f6f6;
  --ink: #1d1d1f;
  --muted: #6b6c6c;
  --rule: #cccfcf;
  --accent: #0066cc;
  --accent-dark: #004f9e;
  --slate: #444545;
  --max: 1120px;
}

html {
  background: var(--paper);
}

body,
body.bg-ink {
  background: var(--paper);
  color: var(--ink);
  font-family:
    "SF Pro Text",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body .bg-ink,
body #app.bg-ink,
body .section-dark,
body .section-light {
  background: var(--paper);
  color: var(--ink);
}

body main > div > section:nth-of-type(even) {
  background: var(--paper-deep);
}

h1,
h2,
h3,
h4,
.headline {
  color: var(--ink);
  font-family:
    "SF Pro Display",
    "SF Pro Text",
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-weight: 600;
}

h1,
h2,
h3,
.headline {
  letter-spacing: -0.04em;
}

h1 {
  line-height: 1.04;
}

h2,
h3,
.headline {
  line-height: 1.08;
}

a,
body .section-dark a,
body .on-dark a {
  color: var(--accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

a:hover,
body .section-dark a:hover,
body .on-dark a:hover {
  color: var(--accent-dark);
}

::selection {
  background: rgb(0 102 204 / 18%);
  color: var(--ink);
}

/* Pragith-style global navigation. */
.glass-nav {
  background: rgb(255 255 255 / 86%);
  border-bottom: 1px solid rgb(0 0 0 / 12%);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.glass-nav > div {
  width: min(var(--max), calc(100% - 64px));
  min-height: 48px;
  padding: 0 !important;
}

.glass-nav a,
.glass-nav button {
  color: var(--slate) !important;
}

.glass-nav > div > a {
  color: var(--ink) !important;
}

.glass-nav > div > a > span:first-child[aria-hidden="true"] {
  display: none;
}

.glass-nav nav {
  gap: 21px;
}

.glass-nav nav > div > button {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.glass-nav nav > div > div {
  background: rgb(255 255 255 / 96%) !important;
  border: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  box-shadow: 0 18px 50px -28px rgb(29 29 31 / 24%);
}

.glass-nav nav > div > div a,
.glass-nav nav > div > div button {
  border-radius: 0 !important;
}

.glass-nav nav > div > div a:hover,
.glass-nav nav > div > div button:hover {
  background: var(--paper-deep) !important;
  color: var(--accent) !important;
}

/* Match the 1120px editorial measure used throughout pragith.net. */
body .max-w-\[1280px\],
body .max-w-7xl {
  max-width: var(--max);
}

body .section-dark,
body .section-light {
  border-bottom: 1px solid var(--rule);
  padding-block: 58px !important;
}

body main > div > section:first-of-type {
  padding-block: 78px 66px !important;
}

body .section-dark .text-white,
body .section-dark .text-white\/90,
body .section-dark .text-white\/80,
body .section-dark .text-white\/70,
body .section-dark .text-white\/60,
body .section-dark .text-white\/50,
body .section-dark .text-white\/40,
body .section-dark .text-white\/30,
body .section-dark .text-white\/20,
body .text-charcoal {
  color: var(--ink) !important;
}

body .text-charcoal\/80,
body .text-charcoal\/70,
body .text-charcoal\/60,
body .text-charcoal\/50,
body .text-gray-400,
body .text-gray-500 {
  color: var(--muted) !important;
}

body .text-accent,
body .text-link,
body .text-link-bright {
  color: var(--accent) !important;
}

/* Editorial cards: structure comes from rules, not floating tiles. */
body .card,
body .section-dark .card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--ink);
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  padding-left: 0 !important;
  padding-right: 0 !important;
  transition: border-color 160ms ease;
}

body .card:hover {
  border-color: var(--accent);
  box-shadow: none;
  transform: none;
}

body .card p {
  color: var(--muted);
}

body .border-white\/10,
body .border-white\/15,
body .border-white\/20,
body .border-black\/5,
body .border-black\/10 {
  border-color: var(--rule) !important;
}

body .bg-haze,
body .bg-white\/5,
body .bg-white\/10,
body .bg-accent\/10 {
  background: var(--paper-deep) !important;
}

body pre,
body code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

body pre {
  background: var(--paper-deep) !important;
  border: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  color: var(--slate) !important;
}

/* Pragith's CTAs are typographic links with a firm underline. */
body .btn-pill,
body .btn-primary,
body .btn-ghost {
  display: inline-flex;
  width: auto;
  min-height: 0;
  padding: 10px 0 !important;
  border: 0;
  border-bottom: 2px solid currentColor;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent) !important;
  font-weight: 700;
  line-height: 1.2;
}

body .btn-ghost {
  color: var(--ink) !important;
}

body .btn-pill:hover,
body .btn-primary:hover,
body .btn-ghost:hover {
  background: transparent;
  box-shadow: none;
  color: var(--accent-dark) !important;
  transform: none;
}

body footer.section-dark {
  background: var(--paper-deep);
  border-top: 0;
  border-bottom: 0;
  padding-block: 58px 64px !important;
}

body footer .grid {
  column-gap: 38px;
}

body footer a > span:first-child[aria-hidden="true"] {
  display: none;
}

body footer h4 {
  color: var(--ink) !important;
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}

body footer a,
body footer p,
body footer li {
  color: var(--muted) !important;
}

body footer a:hover {
  color: var(--accent) !important;
}

body footer > div:last-child {
  border-color: var(--rule) !important;
}

.reveal,
.reveal-delay-1,
.reveal-delay-2,
.reveal-delay-3 {
  animation-duration: 360ms;
  transform: translateY(8px);
}

@media (max-width: 1023px) {
  .glass-nav > div {
    position: relative;
    width: min(var(--max), calc(100% - 32px));
    min-height: 52px;
  }

  .glass-nav > div > div:last-child {
    background: var(--paper) !important;
    border-color: var(--rule) !important;
    padding: 10px 16px 24px !important;
  }

  .glass-nav > div > div:last-child > nav > div > div {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    border-bottom: 1px solid var(--paper-deep) !important;
  }

  .glass-nav > div > div:last-child p {
    color: var(--ink) !important;
  }
}

@media (max-width: 680px) {
  body .section-dark,
  body .section-light {
    padding-block: 46px !important;
  }

  body main > div > section:first-of-type {
    padding-block: 44px !important;
  }

  body h1 {
    font-size: 43px !important;
  }

  body footer.section-dark {
    padding-block: 48px 56px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-delay-1,
  .reveal-delay-2,
  .reveal-delay-3 {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
