/* Site foundation: existing DP Designs tokens, typography, navigation and footer.
   About uses this focused shell instead of the legacy all-page stylesheet. */
@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@500;600&family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --color-black: #050505;
  --color-black-soft: #0b0b0c;
  --color-surface: #111113;
  --color-surface-raised: #18181b;
  --color-red: #f01823;
  --color-red-hover: #ff303a;
  --color-action: #e01823;
  --color-action-hover: #c7141f;
  --color-burgundy: #64151b;
  --color-burgundy-deep: #321014;
  --color-white: #f7f7f5;
  --color-text: #eeeeec;
  --color-muted: #b8b8b8;
  --color-border: #343438;
  --color-border-strong: #55555b;
  --color-focus: #ff5962;
  --text-xs: clamp(0.75rem, 0.72rem + 0.1vw, 0.82rem);
  --text-sm: clamp(0.875rem, 0.84rem + 0.15vw, 0.95rem);
  --text-base: clamp(1rem, 0.96rem + 0.18vw, 1.125rem);
  --text-lg: clamp(1.2rem, 1.08rem + 0.45vw, 1.5rem);
  --text-xl: clamp(1.55rem, 1.3rem + 0.9vw, 2.25rem);
  --text-2xl: clamp(2.2rem, 1.65rem + 2vw, 4.25rem);
  --text-hero: clamp(3rem, 2rem + 4.5vw, 7.5rem);
  --container-wide: 1280px;
  --container-main: 1160px;
  --container-reading: 760px;
  --header-height: 76px;
  --page-gutter: clamp(16px, 4vw, 48px);
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-emphasis: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-depth: 0 24px 64px rgba(0, 0, 0, 0.32);
}

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

html {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-height) + 24px);
  background: var(--color-black);
}

body {
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background: var(--color-black);
  color: var(--color-text);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  font-size: var(--text-base);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

main,
.site-header,
.site-footer,
main>section {
  width: 100%;
  max-width: none;
  margin-inline: 0;
}

body.menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
summary {
  -webkit-tap-highlight-color: transparent;
}

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

::selection {
  background: var(--color-red);
  color: var(--color-white);
}

h1,
h2,
h3,
h4,
p,
ul,
ol {
  margin-top: 0;
}

h1,
h2,
h3,
h4 {
  color: var(--color-white);
  font-family: "Space Grotesk", "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-2xl);
}

h3 {
  font-size: var(--text-xl);
}

p,
li {
  color: var(--color-muted);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 12px 16px;
  transform: translateY(-150%);
  border-radius: 4px;
  background: var(--color-white);
  color: var(--color-black);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

.container,
.container-wide,
.reading-container {
  width: 100%;
  max-width: calc(var(--container-main) + var(--page-gutter) + var(--page-gutter));
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.container-wide {
  max-width: calc(var(--container-wide) + var(--page-gutter) + var(--page-gutter));
}

.reading-container {
  max-width: calc(var(--container-reading) + var(--page-gutter) + var(--page-gutter));
}

/* Actions */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  color: var(--color-red-hover);
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.4;
  text-transform: uppercase;
}
.button {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 18px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 30px;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-size: var(--text-sm);
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition:
    background-color 140ms var(--ease-standard),
    border-color 140ms var(--ease-standard),
    color 140ms var(--ease-standard);
}
.button--primary {
  background: var(--color-action);
  color: var(--color-white);
}

/* Navigation: one opaque surface at every scroll position. */
.site-header {
  position: relative;
  z-index: 100;
  height: var(--header-height);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-black);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}


.header-inner {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  color: var(--color-white);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
}

.brand-name {
  letter-spacing: -0.02em;
}

.menu-toggle {
  display: none;
  min-height: 46px;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: 5px;
  background: var(--color-black-soft);
  color: var(--color-white);
  cursor: pointer;
  font-family: "IBM Plex Mono", Consolas, monospace;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.menu-icon {
  position: relative;
  width: 20px;
  height: 14px;
}

.menu-icon::before,
.menu-icon::after {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  content: "";
  transition: transform 260ms var(--ease-standard), top 260ms var(--ease-standard);
}

.menu-icon::before {
  top: 2px;
}

.menu-icon::after {
  top: 10px;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
  top: 6px;
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
  top: 6px;
  transform: rotate(-45deg);
}

.site-nav ul {
  counter-reset: navigation-item;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  counter-increment: navigation-item;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 10px 12px;
  color: var(--color-muted);
  font-family: "Space Grotesk", sans-serif;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: color 140ms ease;
}

.site-nav a:focus-visible,
.site-nav a[aria-current="page"] {
  color: var(--color-white);
}

.site-nav a[aria-current="page"]::after {
  position: absolute;
  right: 12px;
  bottom: 5px;
  left: 12px;
  height: 2px;
  background: var(--color-red);
  content: "";
}

.site-nav .nav-cta {
  min-height: 44px;
  margin-left: 8px;
  padding-inline: 15px;
  border-radius: 30px;
  background: var(--color-action);
  color: var(--color-white);
}

.site-nav .nav-cta:focus-visible {
  background: var(--color-action-hover);
  color: var(--color-white);
}

.site-nav .nav-cta::after {
  display: none;
}

/* Theme switcher */
.site-nav {
  margin-left: auto;
}

.header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  width: 70px;
  min-width: 70px;
  min-height: 44px;
  display: grid;
  padding: 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  place-items: center;
}

.theme-toggle__track {
  position: relative;
  width: 62px;
  height: 34px;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(247, 247, 245, 0.2);
  border-radius: 999px;
  background:
    radial-gradient(circle at 78% 50%, rgba(240, 24, 35, 0.24), transparent 42%),
    #151317;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.28),
    0 8px 22px rgba(0, 0, 0, 0.2);
  transition:
    border-color 280ms var(--ease-standard),
    background 280ms var(--ease-standard),
    box-shadow 280ms var(--ease-standard);
}

.theme-toggle__thumb {
  position: absolute;
  z-index: 1;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  transform: translateX(28px);
  border-radius: 50%;
  background: #f7f7f5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.34);
  transition:
    transform 420ms var(--ease-emphasis),
    background-color 280ms var(--ease-standard),
    box-shadow 280ms var(--ease-standard);
}

.theme-toggle__icon {
  position: absolute;
  z-index: 2;
  top: 8px;
  width: 16px;
  height: 16px;
  display: grid;
  color: rgba(247, 247, 245, 0.46);
  place-items: center;
  transition:
    color 280ms var(--ease-standard),
    transform 420ms var(--ease-emphasis);
}

.theme-toggle__icon svg {
  width: 16px;
  height: 16px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.theme-toggle__icon--sun {
  left: 8px;
  color: #f4b83f;
}

.theme-toggle__icon--moon {
  right: 8px;
  color: #17151a;
}


html[data-theme="light"] .theme-toggle__track {
  border-color: rgba(36, 87, 214, 0.28);
  background:
    radial-gradient(circle at 22% 50%, rgba(244, 184, 63, 0.42), transparent 42%),
    linear-gradient(90deg, #ffe8a3, #dde8ff);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.55),
    0 8px 22px rgba(36, 87, 214, 0.16);
}

html[data-theme="light"] .theme-toggle__thumb {
  transform: translateX(0);
  background: #fffdf8;
  box-shadow: 0 4px 12px rgba(76, 61, 45, 0.22);
}

html[data-theme="light"] .theme-toggle__icon--sun {
  color: #7c5000;
  transform: rotate(90deg);
}

html[data-theme="light"] .theme-toggle__icon--moon {
  color: rgba(36, 87, 214, 0.56);
}

/* Footer */
.site-footer {
  padding-block: 44px 22px;
  background: transparent;
}

.footer-grid {
  display: grid;
  gap: 40px;
}

.footer-brand-copy {
  max-width: 520px;
}

.footer-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand-copy .brand {
  margin-bottom: 18px;
}

.footer-contact {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.footer-contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  width: fit-content;
  color: var(--color-text);
  text-decoration: none;
  transition:
    color 160ms var(--ease-standard);
}

.footer-contact a:focus-visible {
  color: var(--color-red-hover);
}

.footer-nav h2 {
  margin-bottom: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: var(--text-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-nav ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  color: var(--color-muted);
  text-decoration: none;
}

.footer-nav a:focus-visible {
  color: var(--color-white);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 0;
}

.footer-bottom p {
  margin: 0;
  font-size: var(--text-xs);
}

/* Preserve the current-page navigation marker without entrance effects. */
.site-nav li:not(:last-child) a {
  color: var(--color-text);
  font-weight: 650;
}
.site-nav a[aria-current="page"]::before {
  position: absolute;
  top: 3px;
  left: 12px;
  color: var(--color-red);
  font: 700 0.43rem "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  content: counter(navigation-item, decimal-leading-zero);
}
.site-nav a[aria-current="page"]::after {
  transform: scaleX(0.42);
  transform-origin: left;
}

/* Theme changes only happen through the theme control. */
html[data-theme="light"] {
  --color-black: #f5f1e8;
  --color-black-soft: #efe8dd;
  --color-surface: #fffcf7;
  --color-surface-raised: #ffffff;
  --color-red: #d61f2c;
  --color-red-hover: #b91422;
  --color-action: #d61f2c;
  --color-action-hover: #b91422;
  --color-burgundy: #ffd6d8;
  --color-burgundy-deep: #f5c4c9;
  --color-white: #17151a;
  --color-text: #29262d;
  --color-muted: #5d5962;
  --color-border: #d9d2c8;
  --color-border-strong: #a69c91;
  --color-focus: #2457d6;
  --shadow-depth: 0 24px 64px rgba(70, 57, 45, 0.16);
  background: #f5f1e8;
}

html[data-theme="light"] .button--primary,
html[data-theme="light"] .site-nav .nav-cta {
  color: #fff;
}
html[data-theme="light"] .site-header {
  box-shadow: 0 12px 32px rgba(70, 57, 45, 0.1);
}
html[data-theme="light"] .menu-toggle {
  background: #fffcf7;
}

/* Input feedback: no lift, shimmer, glow or page transition. */
.button:focus-visible,
.site-nav .nav-cta:focus-visible {
  background: var(--color-action-hover);
}
@media (hover: hover) and (pointer: fine) {
  .button--primary:hover,
  .site-nav .nav-cta:hover {
    background: var(--color-action-hover);
  }
  .theme-toggle:hover .theme-toggle__track {
    border-color: rgba(240, 24, 35, 0.58);
  }
}

@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.4fr 0.8fr 0.8fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 1024px) {
  .footer-grid { grid-template-columns: 1.6fr 0.7fr 0.8fr; }
}
@media (max-width: 899px) {
  html:not(.js) .site-header {
    position: relative;
    height: auto;
  }

  html:not(.js) .header-inner {
    height: auto;
    flex-wrap: wrap;
    padding-block: 12px;
  }

  html:not(.js) .site-nav {
    width: 100%;
  }

  html:not(.js) .site-nav a {
    padding-inline: 10px;
  }

  .js .menu-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    max-height: calc(100vh - var(--header-height));
    max-height: calc(100svh - var(--header-height));
    padding: 16px 20px 24px;
    overflow-y: auto;
    border-bottom: 1px solid var(--color-border);
    background: rgba(5, 5, 5, 0.99);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    visibility: hidden;
    transition:
      opacity 260ms var(--ease-standard),
      transform 260ms var(--ease-standard),
      visibility 260ms;
  }

  .js .site-nav.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    width: 100%;
    min-height: 52px;
    padding-inline: 10px;
  }

  .site-nav a[aria-current="page"]::after {
    top: 12px;
    right: auto;
    bottom: 12px;
    left: 0;
    width: 3px;
    height: auto;
  }

  .site-nav .nav-cta {
    justify-content: center;
    margin: 10px 0 0;
  }

  .brand-name {
    font-size: 0.95rem;
  }

  .header-inner { gap: 10px; }
  .header-actions { margin-left: auto; }
  .site-nav { margin-left: 0; }
  .js .site-nav {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    background: var(--color-black);
  }
  html[data-theme="light"] .site-nav { background: #fffcf7; }
}
@media (max-width: 520px) {
  .brand-name {
    display: none;
  }

  .js .menu-toggle {
    width: 46px;
    min-width: 46px;
    justify-content: center;
    padding-inline: 8px;
  }

  .menu-toggle>span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

@media (max-width: 420px) {
  .theme-toggle {
    width: 62px;
    min-width: 62px;
    padding-inline: 1px;
  }

  .theme-toggle__track {
    width: 58px;
  }

  .theme-toggle__thumb {
    transform: translateX(24px);
  }

  html[data-theme="light"] .theme-toggle__thumb {
    transform: translateX(0);
  }
}

@media (max-width: 420px) {
  .brand img { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.menu-backdrop {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 90;
  padding: 0;
  border: 0;
  background: transparent;
}
