:root {
  color-scheme: light;
  --space: #eaf3ff;
  --space-2: #d9eafc;
  --panel: #ffffff;
  --panel-2: #edf6ff;
  --ink: #14233e;
  --muted: #53647f;
  --blue: #147fba;
  --cyan: #00a8d8;
  --gold: #e6a900;
  --red: #d74454;
  --line: rgba(20, 127, 186, .22);
  --shadow: 0 22px 70px rgba(32, 74, 110, .18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, .96), transparent 23rem),
    radial-gradient(circle at 84% 8%, rgba(247, 200, 75, .18), transparent 18rem),
    linear-gradient(180deg, #f8fbff, var(--space) 34rem, #f4f8ff 100%);
  font-family: "Trebuchet MS", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

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

a {
  color: inherit;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 58px);
  background: linear-gradient(180deg, rgba(250, 253, 255, .98), rgba(224, 237, 250, .92));
  border-bottom: 1px solid rgba(20, 127, 186, .22);
  box-shadow: 0 10px 34px rgba(32, 74, 110, .12);
  backdrop-filter: blur(12px);
}

.brand img {
  width: clamp(170px, 20vw, 274px);
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(32, 74, 110, .18));
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

nav a {
  color: #253a5c;
  text-decoration: none;
}

nav a:hover {
  color: var(--blue);
}

.hero {
  position: relative;
  min-height: 94svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(240px, 20vw, 280px) clamp(18px, 5vw, 70px) 90px;
}

.starfield,
.starfield::before,
.starfield::after {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(36, 66, 99, .45) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(20,127,186,.45) 0 1px, transparent 1.2px);
  background-size: 90px 90px, 137px 137px;
  background-position: 0 0, 34px 22px;
  opacity: .34;
}

.starfield::before,
.starfield::after {
  content: "";
}

.starfield::before {
  background-size: 180px 180px;
  transform: rotate(7deg) scale(1.25);
  opacity: .2;
}

.starfield::after {
  background: linear-gradient(115deg, transparent 0 42%, rgba(72, 167, 255, .18) 48%, transparent 58% 100%);
  opacity: .8;
}

.starship {
  position: absolute;
  z-index: 1;
  top: clamp(16px, 2vw, 30px);
  right: clamp(-70px, -3vw, -22px);
  width: clamp(220px, 34vw, 430px);
  opacity: 0;
  transform: translate3d(24vw, -7vw, 0) rotate(-8deg) scale(.72);
  animation:
    ship-arrive 2.4s cubic-bezier(.16, .84, .28, 1) .25s forwards,
    ship-idle 7s ease-in-out 2.9s infinite;
  pointer-events: none;
}

.starship svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.starship .hull,
.starship .wing,
.starship .keel,
.starship .core {
  stroke: rgba(20, 35, 62, .62);
  stroke-width: 3;
  stroke-linejoin: round;
}

.starship .hull {
  fill: url("#shipHull");
}

.starship .wing {
  fill: rgba(255, 255, 255, .74);
}

.starship .wing.right {
  fill: rgba(180, 217, 236, .82);
}

.starship .keel {
  fill: rgba(67, 111, 149, .56);
}

.starship .core,
.starship .window {
  fill: url("#shipBlue");
}

.starship .window {
  opacity: .76;
}

.starship .ship-trail {
  stroke: rgba(0, 168, 216, .38);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 12 18;
  animation: trail-fade 2.8s ease-out forwards;
}

.starship .ship-trail.secondary {
  stroke: rgba(230, 169, 0, .26);
  stroke-width: 4;
  animation-delay: .14s;
}

@keyframes ship-arrive {
  0% {
    opacity: 0;
    transform: translate3d(24vw, -7vw, 0) rotate(-8deg) scale(.72);
  }
  48% {
    opacity: 1;
  }
  76% {
    transform: translate3d(-10px, 4px, 0) rotate(1.5deg) scale(1.02);
  }
  100% {
    opacity: .48;
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
}

@keyframes ship-idle {
  0%, 100% {
    transform: translate3d(0, 0, 0) rotate(0) scale(1);
  }
  50% {
    transform: translate3d(0, -7px, 0) rotate(.6deg) scale(1);
  }
}

@keyframes trail-fade {
  0% {
    opacity: 0;
    stroke-dashoffset: 90;
  }
  24% {
    opacity: .9;
  }
  100% {
    opacity: 0;
    stroke-dashoffset: 0;
  }
}

.hero-frame {
  position: absolute;
  left: 0;
  right: 0;
  height: 78px;
  background-repeat: repeat-x;
  background-size: auto 100%;
  opacity: .9;
  pointer-events: none;
}

.hero-frame.top {
  top: 108px;
  background-image: url("../images/frame-top.png");
}

.hero-frame.bottom {
  bottom: 18px;
  background-image: url("../images/frame-bottom.png");
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1040px, 100%);
  padding: clamp(30px, 6vw, 70px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(228, 242, 255, .84)),
    repeating-linear-gradient(0deg, rgba(20, 35, 62, .035) 0 1px, transparent 1px 6px);
  box-shadow: var(--shadow), inset 0 0 48px rgba(72, 167, 255, .13);
}

.hero-inner > :not(.starship) {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  font-size: clamp(48px, 7.4vw, 106px);
  text-transform: uppercase;
  color: #182947;
  text-shadow: 0 2px 0 rgba(255, 255, 255, .8);
}

h2 {
  font-size: clamp(36px, 5.3vw, 76px);
}

h3 {
  font-size: clamp(24px, 2.3vw, 34px);
}

.hero-copy {
  max-width: 820px;
  margin: 24px 0 0;
  color: #42546f;
  font-size: clamp(18px, 1.8vw, 24px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-weight: 900;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.button.primary {
  color: #10213a;
  border-color: var(--gold);
  background: linear-gradient(180deg, #ffe485, var(--gold));
}

.button.ghost {
  color: var(--blue);
  background: rgba(255, 255, 255, .72);
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-block: 1px solid var(--line);
  background: var(--line);
}

.signal-strip div {
  min-height: 168px;
  padding: clamp(22px, 3vw, 34px);
  background: rgba(255, 255, 255, .82);
}

.signal-strip strong {
  display: block;
  color: var(--blue);
  font-size: clamp(22px, 2.3vw, 34px);
  line-height: 1.05;
}

.signal-strip span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.projects-section,
.services-section,
.mission-section,
.stack-section {
  padding: clamp(68px, 9vw, 136px) clamp(18px, 5vw, 70px);
}

.mission-section {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: start;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, .78), rgba(224, 239, 255, .7)),
    radial-gradient(circle at 78% 20%, rgba(0, 168, 216, .14), transparent 24rem);
}

.mission-section p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 21px);
}

.section-heading {
  max-width: 850px;
  margin-bottom: clamp(30px, 5vw, 62px);
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(235, 246, 255, .96));
  box-shadow: var(--shadow);
}

.project-card.featured {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
}

.project-image {
  min-height: 292px;
  background: var(--panel);
  text-decoration: none;
}

.featured .project-image {
  min-height: 430px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.project-content {
  padding: clamp(24px, 3vw, 38px);
}

.project-content span {
  display: inline-block;
  margin-bottom: 13px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.project-content h3 a {
  color: var(--ink);
  text-decoration: none;
}

.project-content h3 a:hover {
  color: var(--blue);
}

.project-content p,
.services-grid p,
.stack-section p {
  color: var(--muted);
  font-size: 17px;
}

.project-content ul,
.stack-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.project-content li,
.stack-list li {
  padding: 7px 10px;
  border: 1px solid rgba(112, 242, 255, .25);
  border-radius: 4px;
  color: var(--blue);
  background: rgba(20, 127, 186, .07);
  font-size: 13px;
  font-weight: 900;
}

.services-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(224, 239, 255, .86)),
    radial-gradient(circle at 20% 30%, rgba(235, 79, 94, .08), transparent 30rem);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.services-grid div {
  min-height: 260px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.services-grid h3 {
  color: var(--blue);
  font-size: 26px;
}

.stack-section {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: center;
}

.stack-list {
  margin: 0;
}

.stack-list li {
  padding: 12px 14px;
  color: var(--ink);
  border-color: rgba(247, 200, 75, .36);
  background: rgba(247, 200, 75, .13);
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(18px, 5vw, 70px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #e6f0fb;
}

.site-footer img {
  width: 190px;
}

.site-footer p {
  margin: 0;
  font-weight: 700;
}

@media (max-width: 1050px) {
  .signal-strip,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card.featured,
  .mission-section,
  .stack-section {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: absolute;
    align-items: flex-start;
  }

  nav {
    display: none;
  }

  .hero {
    min-height: 90svh;
    padding-top: 190px;
  }

  .hero-frame.top {
    top: 92px;
  }

  .hero-inner {
    padding: 26px 20px;
  }

  .starship {
    top: 8px;
    right: -86px;
    width: 260px;
  }

  h1 {
    font-size: clamp(40px, 13vw, 68px);
  }

  .signal-strip,
  .project-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .project-image,
  .featured .project-image {
    min-height: 250px;
  }

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