:root {
  color-scheme: dark;
  --navy: #0a2341;
  --text: #f2f4f6;
  --muted: #a9b7c5;
  --accent: #70afe9;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  background: #0a2341;
  color: #f2f4f6;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus {
  outline: 2px solid #70afe9;
  outline-offset: 7px;
}

a:focus:not(:focus-visible) {
  outline: none;
}

a:focus-visible {
  outline: 2px solid #70afe9;
  outline-offset: 7px;
}

/* Full-height page */

.page {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1800px;
  margin: 0 auto;
  padding: 0 6vw;
  display: flex;
  flex-direction: column;
  background-color: #0a2341;
  box-sizing: border-box;
}

.page > header,
.page > main,
.page > footer {
  flex-shrink: 0;
}

/* Blueprint grid */

.origin-grid {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-image:
    linear-gradient(
      to right,
      rgba(137, 176, 210, .035) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      rgba(137, 176, 210, .035) 1px,
      transparent 1px
    );
}

.origin-pixel {
  position: absolute;
}

/* Header and brand */

header {
  min-height: 112px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: none;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  font-size: 19px;
  font-weight: 550;
  letter-spacing: .29em;
  white-space: nowrap;
}

.brand svg {
  display: block;
  width: 32px;
  height: 32px;
  flex: none;
}

.external {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  font-size: 13px;
  color: #a9b7c5;
  white-space: nowrap;
}

.external:hover {
  color: #fff;
}

.arrow {
  font-size: 18px;
  line-height: 1;
  color: #579ee0;
}

/* Main content */

main, .hero-copy, .art, .overview > * {
  min-width: 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: center;
  gap: 5vw;
  min-height: 520px;
  padding: 70px 0 76px;
}

.eyebrow {
  margin: 0 0 29px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .22em;
  color: #9aafc2;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 26px;
  max-width: 780px;
  font-size: 64px;
  font-size: clamp(48px, 5.4vw, 90px);
  font-weight: 350;
  line-height: 1.07;
  letter-spacing: -.055em;
}

.sub {
  max-width: 450px;
  margin: 0;
  font-size: 18px;
  font-size: clamp(17px, 1.35vw, 21px);
  line-height: 1.6;
  color: #a9b7c5;
}

/* Blueprint artwork */

.art {
  position: relative;
  width: 100%;
  background:
    radial-gradient(
      circle,
      rgba(103, 137, 171, .05),
      transparent 64%
    );
}

.art::before {
  content: "";
  display: block;
  padding-top: 100%;
}

.art svg {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.art-caption {
  position: absolute;
  bottom: 2%;
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-size: 9px;
  line-height: 1.5;
  letter-spacing: .19em;
  color: #6b8399;
}

/* Company section */

.overview {
  display: grid;
  grid-template-columns: minmax(0, .55fr) minmax(0, 1.45fr);
  align-items: start;
  gap: 6vw;
  padding: 36px 0 44px;
  border: none;
}

.overview .eyebrow {
  margin: 5px 0 0;
}

.overview p {
  max-width: 790px;
  margin: 0;
  font-size: 17px;
  line-height: 1.8;
  color: #a6b4c1;
}

.overview strong {
  font-weight: 400;
  color: #edf0f3;
}

/* Footer */

footer {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  padding: 25px 0 29px;
  border: none;
  font-size: 12px;
  color: #94a8bb;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Push the footer to the bottom when content is short. */

.page > footer {
  margin-top: auto;
}

.sync {
  font-size: 10px;
  letter-spacing: .24em;
  color: #aebfce;
}

.footer-info {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0 8px;
  min-width: 0;
}

.footer-links {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 4px;
}

.footer-links a {
  white-space: nowrap;
  padding: 6px 0;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-links > span {
  margin-right: 5px;
}

/* Navigation */

button, input {
  font: inherit;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible, input:focus-visible {
  outline: 2px solid #70afe9;
  outline-offset: 5px;
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  font-size: 13px;
  color: var(--muted);
}

.main-navigation > a {
  padding: 12px 0;
}

.main-navigation > a:hover,
.main-navigation > a[aria-current="page"] {
  color: var(--text);
}

.search-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  background: none;
  padding: 12px 0;
}

.search-toggle svg {
  width: 18px;
  height: 18px;
}

.main-navigation .search-toggle {
  order: 5;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #33516c;
  background: transparent;
  padding: 11px;
}

.menu-toggle span {
  display: block;
  height: 1px;
  background: var(--text);
  margin: 5px 0;
}

/* Follow Gridtek on X */

.follow-button {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  width: 100%;
  max-width: 310px;
  min-height: 62px;
  margin-top: 30px;
  padding: 16px 22px;
  border: 1px solid #537594;
  background: rgba(63, 113, 157, .1);
  font-size: 14px;
  text-align: center;
}

.follow-button:hover {
  border-color: #70afe9;
  background: rgba(63, 113, 157, .2);
}

.follow-button span {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #70afe9;
  font-size: 22px;
}

/* Search dialog styles retained for compatibility */

.search-dialog {
  color: var(--text);
  background: #0a2341;
  border: 1px solid #537594;
  padding: 28px;
  width: min(560px, calc(100% - 36px));
  max-height: 80vh;
  overflow: auto;
}

.search-dialog::backdrop {
  background: rgba(1, 10, 20, .8);
}

.search-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.search-heading h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 400;
}

.search-close {
  border: 0;
  background: transparent;
  padding: 10px;
  font-size: 22px;
}

.search-dialog label {
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
}

.search-dialog input {
  width: 100%;
  padding: 14px;
  background: #071b30;
  border: 1px solid #537594;
  color: var(--text);
}

.search-note, .search-status {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.search-results {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.search-results a {
  display: block;
  padding: 14px 0;
  border-top: 1px solid #29445d;
}

.search-results a:hover {
  color: #70afe9;
}

.search-results small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.6;
}

/* Supporting page styles */

.content-page {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 75px auto 110px;
  width: 100%;
}

.content-page h1 {
  font-size: clamp(40px, 5vw, 66px);
}

.content-page p {
  max-width: 760px;
  line-height: 1.8;
  color: var(--muted);
}

.content-page .eyebrow {
  margin-bottom: 18px;
}

.search-form {
  display: flex;
  gap: 12px;
  max-width: 700px;
  margin: 30px 0;
}

.search-form input {
  flex: 1;
  min-width: 0;
  padding: 14px;
  color: var(--text);
  background: #071b30;
  border: 1px solid #537594;
}

.search-form button {
  padding: 12px 24px;
  border: 1px solid #537594;
  background: rgba(63, 113, 157, .1);
}

.search-list {
  padding: 0;
  margin: 28px 0;
  list-style: none;
}

.search-list li {
  border-top: 1px solid #29445d;
  padding: 16px 0;
}

.search-list a {
  font-size: 19px;
}

.search-list p {
  margin: 6px 0 0;
  font-size: 14px;
}

/* Larger desktop */

@media (min-width: 1600px) {
  .hero {
    min-height: 640px;
  }
}

/* Tablet navigation fallback */

@media (max-width: 800px) {
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    display: none;
    position: absolute;
    z-index: 10;
    top: calc(100% - 5px);
    right: 0;
    min-width: 210px;
    padding: 14px 22px;
    border: 1px solid #33516c;
    background: #0a2341;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .main-navigation.is-open {
    display: flex;
  }

  .main-navigation > a,
  .search-toggle {
    padding: 14px 0;
  }
}

/* Mobile */

@media (max-width: 700px) {
  .page {
    padding-right: 26px;
    padding-left: 26px;
  }

  header {
    min-height: 88px;
  }

  .brand {
    gap: 11px;
    font-size: 15px;
  }

  .brand svg {
    width: 26px;
    height: 26px;
  }

  .external {
    font-size: 11px;
  }

  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    min-height: 0;
    padding: 45px 0 30px;
    text-align: center;
  }

  .hero-copy {
    width: 100%;
  }

  .hero .eyebrow {
    margin-bottom: 23px;
    font-size: 8px;
    letter-spacing: .17em;
  }

  h1 {
    margin: 0 auto 22px;
    font-size: 38px;
    font-size: clamp(35px, 9.8vw, 63px);
    line-height: 1.11;
    letter-spacing: -.045em;
  }

  .sub {
    max-width: 320px;
    margin: 0 auto;
    font-size: 16px;
  }

  .art {
    width: 100%;
    max-width: 340px;
    margin: 24px auto 10px;
    flex: none;
  }

  .art-caption {
    font-size: 7px;
  }

  .overview {
    grid-template-columns: 1fr;
    gap: 13px;
    padding: 27px 0 32px;
    text-align: center;
  }

  .overview .eyebrow {
    font-size: 9px;
  }

  .overview p {
    margin: 0 auto;
    font-size: 14px;
  }

  footer {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 15px;
    padding: 22px 0 25px;
    text-align: center;
    font-size: 10px;
  }

  .sync {
    font-size: 9px;
    letter-spacing: .17em;
  }

  .footer-info {
    flex-wrap: wrap;
    gap: 0 7px;
    justify-content: center;
    width: 100%;
  }

  .footer-links {
    justify-content: center;
  }

  .follow-button {
    margin: 26px auto 0;
    text-align: center;
  }

  .content-page {
    margin: 48px auto 75px;
  }

  .search-form {
    flex-direction: column;
  }
}

/* Small phones */

@media (max-width: 360px) {
  .page {
    padding-right: 18px;
    padding-left: 18px;
  }

  header {
    gap: 12px;
  }

  .brand {
    font-size: 13px;
    letter-spacing: .2em;
  }

  .external {
    gap: 7px;
    font-size: 10px;
  }
}

@media (max-width: 300px) {
  .brand {
    gap: 8px;
    font-size: 11px;
    letter-spacing: .16em;
  }

  .brand svg {
    width: 22px;
    height: 22px;
  }

  .external {
    gap: 5px;
    font-size: 9px;
  }

  h1 {
    font-size: 30px;
  }
}

/* Fallback for browsers without CSS Grid */

@supports not (display: grid) {
  .hero, .overview {
    display: block;
  }

  .art {
    max-width: 450px;
    margin: 32px auto;
  }

  .overview .eyebrow {
    margin-bottom: 16px;
  }
}

/* Subtle animated pixels */

@keyframes pixel-breathe {
  0%, 100% {
    opacity: .55;
  }

  50% {
    opacity: 1;
  }
}

.origin-pixel {
  animation: pixel-breathe 68s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .origin-pixel {
    animation: none;
  }
}

/* Desktop navigation beside the logo */

@media (min-width: 801px) {
  .site-header {
    display: flex;
    justify-content: flex-start;
    gap: 32px;
  }

  .site-header .main-navigation {
    margin-left: 0;
    margin-right: auto;
    flex: 0 1 auto;
  }
}