:root {
  color-scheme: light;
  --paper: #e8ebf0;
  --paper-strong: #f8fafc;
  --ink: #070a10;
  --muted: #626c79;
  --coal: #05070b;
  --coal-soft: #111722;
  --navy: #07162d;
  --charcoal: #161b22;
  --black: #030407;
  --royal: #1d4ed8;
  --line: rgba(10, 16, 28, 0.16);
  --line-light: rgba(214, 222, 232, 0.2);
  --teal: #1d4ed8;
  --teal-soft: #dbe6ff;
  --amber: #aab4c0;
  --amber-soft: #d7dee8;
  --red: #8f1d2c;
  --sage: #46515f;
  --cyan: #c6ced8;
  --shadow: 0 24px 70px rgba(4, 8, 18, 0.24);
  --radius: 8px;
  --max: 1160px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(29, 78, 216, 0.07) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(0deg, rgba(170, 180, 192, 0.1) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--paper);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

body.dialog-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(calc(100% - 32px), var(--max));
  min-height: 72px;
  margin: 16px auto 0;
  padding: 12px 14px;
  color: var(--paper-strong);
  background: rgba(5, 7, 11, 0.76);
  border: 1px solid rgba(214, 222, 232, 0.2);
  border-radius: var(--radius);
  backdrop-filter: blur(18px);
  transition:
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.site-header.scrolled {
  color: var(--ink);
  background: rgba(248, 250, 252, 0.9);
  border-color: rgba(10, 16, 28, 0.12);
  box-shadow: 0 12px 36px rgba(4, 8, 18, 0.14);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 760;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--paper-strong);
  background: linear-gradient(135deg, var(--royal, #1d4ed8), var(--red));
  border: 1px solid rgba(214, 222, 232, 0.32);
  border-radius: 50%;
  font-size: 0.78rem;
}

.brand-name {
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a {
  padding: 10px 12px;
  border-radius: 999px;
  color: currentColor;
  font-size: 0.92rem;
  font-weight: 640;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: rgba(214, 222, 232, 0.16);
  outline: none;
}

.site-header.scrolled .site-nav a:hover,
.site-header.scrolled .site-nav a:focus-visible {
  background: rgba(29, 78, 216, 0.12);
}

.nav-toggle {
  display: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid currentColor;
  border-radius: var(--radius);
  color: currentColor;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2px 0;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: min(840px, 88svh);
  display: grid;
  align-items: end;
  padding: 150px 20px 64px;
  color: var(--paper-strong);
  background:
    linear-gradient(115deg, rgba(29, 78, 216, 0.34) 0%, transparent 43%),
    linear-gradient(145deg, transparent 45%, rgba(143, 29, 44, 0.24) 72%, transparent 100%),
    linear-gradient(90deg, rgba(3, 4, 7, 0.99) 0%, rgba(7, 22, 45, 0.96) 56%, rgba(22, 27, 34, 0.92) 100%),
    var(--coal);
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(90deg, rgba(198, 206, 216, 0.1) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(0deg, rgba(198, 206, 216, 0.06) 1px, transparent 1px) 0 0 / 96px 96px;
  -webkit-mask-image: linear-gradient(90deg, black, transparent 74%);
  mask-image: linear-gradient(90deg, black, transparent 74%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(214, 222, 232, 0.2);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(100%, var(--max));
  margin: 0 auto;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--amber-soft);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section-kicker {
  color: var(--teal);
}

.hero h1,
.section h2,
.contact-section h2 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 520;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 760px;
  font-size: 4.15rem;
  line-height: 1.02;
}

.hero-copy {
  max-width: 720px;
  margin: 22px 0 0;
  color: rgba(229, 235, 244, 0.84);
  font-size: 1.14rem;
}

.hero-actions {
  margin-top: 26px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1.1;
  transition:
    transform 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.button:hover,
.button:focus-visible,
.project-card:hover,
.project-card:focus-visible {
  transform: translateY(-2px);
}

.button:focus-visible,
.project-card:focus-visible,
.dialog-close:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid rgba(170, 180, 192, 0.54);
  outline-offset: 3px;
}

.button.primary {
  color: var(--paper-strong);
  background: linear-gradient(135deg, var(--royal), var(--navy));
}

.button.secondary {
  color: var(--paper-strong);
  border-color: rgba(214, 222, 232, 0.36);
  background: rgba(214, 222, 232, 0.08);
}

.button.ghost {
  color: var(--ink);
  border-color: var(--line);
  background: var(--paper-strong);
}

.button.primary:hover,
.button.primary:focus-visible {
  background: linear-gradient(135deg, #245be8, #0b1f3d);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(214, 222, 232, 0.16);
}

.button.ghost:hover,
.button.ghost:focus-visible {
  border-color: rgba(29, 78, 216, 0.42);
}

.signal-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 1120px;
  margin: 42px 0 0;
}

.signal-strip div {
  position: relative;
  min-height: 154px;
  padding: 18px;
  border: 1px solid rgba(214, 222, 232, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(214, 222, 232, 0.13), rgba(214, 222, 232, 0.04)),
    rgba(17, 23, 34, 0.48);
  box-shadow: inset 0 1px 0 rgba(214, 222, 232, 0.2);
  overflow: hidden;
}

.signal-strip div::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 2px;
  background: var(--cyan);
  box-shadow:
    -18px -16px 0 rgba(29, 78, 216, 0.9),
    -46px -2px 0 rgba(143, 29, 44, 0.82);
}

.signal-strip div + div {
  padding-left: 18px;
}

.signal-label {
  display: block;
  color: var(--amber-soft);
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 780;
  text-transform: uppercase;
}

.signal-value {
  display: block;
  margin-top: 6px;
  color: rgba(229, 235, 244, 0.86);
  font-size: 0.92rem;
  font-weight: 660;
  line-height: 1.42;
}

.section {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  padding: 96px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.5fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 34px;
}

.section-heading.compact {
  display: block;
  max-width: 820px;
}

.section-heading h2,
.contact-section h2 {
  font-size: 5rem;
}

.section-heading p:last-child {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
}

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

.project-card {
  min-height: 450px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(29, 78, 216, 0.04), rgba(170, 180, 192, 0.05)),
    var(--paper-strong);
  box-shadow: 0 18px 50px rgba(4, 8, 18, 0.1);
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.project-card:hover,
.project-card:focus-visible {
  border-color: rgba(29, 78, 216, 0.44);
  box-shadow: var(--shadow);
}

.project-visual {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(120deg, rgba(29, 78, 216, 0.22), transparent 44%),
    linear-gradient(135deg, var(--teal-soft), #f2f5f9);
}

.project-visual::before,
.project-visual::after {
  content: "";
  position: absolute;
}

.project-visual::before {
  left: 28px;
  bottom: 18px;
  width: 58px;
  height: 104px;
  border: 2px solid rgba(7, 10, 16, 0.78);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(5, 7, 11, 0.94), rgba(17, 23, 34, 0.66)),
    linear-gradient(90deg, rgba(29, 78, 216, 0.56) 28%, transparent 28% 42%, rgba(170, 180, 192, 0.76) 42% 58%, transparent 58%);
  box-shadow:
    76px -10px 0 -16px rgba(7, 22, 45, 0.76),
    88px 22px 0 -20px rgba(29, 78, 216, 0.9),
    134px -42px 0 -22px rgba(170, 180, 192, 0.88),
    172px 10px 0 -24px rgba(143, 29, 44, 0.78);
}

.project-visual::after {
  inset: 16px 18px 16px 106px;
  border-radius: var(--radius);
  border: 1px solid rgba(10, 16, 28, 0.16);
  background:
    radial-gradient(circle at 18% 38%, var(--teal) 0 4px, transparent 5px),
    radial-gradient(circle at 48% 22%, var(--amber) 0 4px, transparent 5px),
    radial-gradient(circle at 75% 58%, var(--red) 0 4px, transparent 5px),
    linear-gradient(24deg, transparent 0 34%, rgba(10, 16, 28, 0.32) 35% 36%, transparent 37%),
    linear-gradient(150deg, transparent 0 43%, rgba(10, 16, 28, 0.28) 44% 45%, transparent 46%),
    linear-gradient(90deg, rgba(10, 16, 28, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(0deg, rgba(10, 16, 28, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    rgba(248, 250, 252, 0.5);
}

.project-visual[data-tone="amber"] {
  background:
    linear-gradient(120deg, rgba(170, 180, 192, 0.38), transparent 44%),
    linear-gradient(135deg, #d7dee8, #f7f9fb);
}

.project-visual[data-tone="red"] {
  background:
    linear-gradient(120deg, rgba(143, 29, 44, 0.24), transparent 44%),
    linear-gradient(135deg, #ead8dd, #f8f2f4);
}

.project-visual[data-tone="sage"] {
  background:
    linear-gradient(120deg, rgba(70, 81, 95, 0.28), transparent 44%),
    linear-gradient(135deg, #d9dee5, #f3f5f7);
}

.project-visual[data-tone="coal"] {
  background:
    linear-gradient(120deg, rgba(29, 78, 216, 0.22), transparent 44%),
    linear-gradient(135deg, var(--black), var(--charcoal));
}

.project-visual[data-tone="coal"]::before {
  border-color: rgba(214, 222, 232, 0.54);
  background:
    linear-gradient(180deg, rgba(214, 222, 232, 0.18), rgba(5, 7, 11, 0.62)),
    linear-gradient(90deg, rgba(29, 78, 216, 0.62) 28%, transparent 28% 42%, rgba(170, 180, 192, 0.78) 42% 58%, transparent 58%);
}

.project-visual[data-category="connected"]::after {
  background:
    radial-gradient(circle at 18% 38%, var(--cyan) 0 4px, transparent 5px),
    radial-gradient(circle at 48% 22%, var(--amber) 0 4px, transparent 5px),
    radial-gradient(circle at 75% 58%, var(--teal) 0 4px, transparent 5px),
    radial-gradient(circle at 62% 78%, var(--red) 0 3px, transparent 4px),
    linear-gradient(24deg, transparent 0 34%, rgba(10, 16, 28, 0.34) 35% 36%, transparent 37%),
    linear-gradient(150deg, transparent 0 43%, rgba(10, 16, 28, 0.28) 44% 45%, transparent 46%),
    linear-gradient(90deg, rgba(10, 16, 28, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(0deg, rgba(10, 16, 28, 0.08) 1px, transparent 1px) 0 0 / 22px 22px,
    rgba(248, 250, 252, 0.5);
}

.project-visual[data-category="prototypes"]::before {
  border-radius: 50%;
  width: 86px;
  height: 86px;
  bottom: 30px;
  background:
    radial-gradient(circle, rgba(248, 250, 252, 0.9) 0 18%, transparent 19%),
    conic-gradient(from 40deg, var(--teal), var(--amber), var(--red), var(--teal));
}

.project-visual[data-category="native-ios"]::before {
  width: 66px;
  height: 108px;
  border-radius: 18px;
}

.project-visual[data-category="react-native"]::after {
  border-style: dashed;
}

.project-visual.has-media {
  height: 220px;
  display: grid;
  place-items: start center;
  padding: 18px;
  background:
    linear-gradient(120deg, rgba(29, 78, 216, 0.44), transparent 44%),
    linear-gradient(135deg, var(--black), var(--navy) 58%, var(--red));
}

.project-visual.has-media[data-tone="amber"] {
  background:
    linear-gradient(120deg, rgba(214, 222, 232, 0.34), transparent 44%),
    linear-gradient(135deg, var(--black), #17345f 48%, #aab4c0);
}

.project-visual.has-media::before,
.project-visual.has-media::after {
  display: none;
}

.project-visual.has-media img {
  width: auto;
  height: 260px;
  max-width: 78%;
  border-radius: 22px;
  object-fit: contain;
  box-shadow:
    0 26px 60px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(214, 222, 232, 0.24);
}

.project-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  text-transform: uppercase;
}

.project-card h3 {
  margin: 0;
  font-size: 1.48rem;
  line-height: 1.05;
}

.project-card p {
  margin: 14px 0 0;
  color: var(--muted);
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 24px;
}

.project-tags span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.contact-section {
  padding-top: 8px;
  padding-bottom: 72px;
}

.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(260px, 0.42fr);
  gap: 36px;
  align-items: end;
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-strong);
  box-shadow: 0 18px 50px rgba(4, 8, 18, 0.1);
}

.contact-panel p:not(.section-kicker) {
  max-width: 650px;
  color: var(--muted);
}

.contact-actions {
  justify-content: flex-end;
  margin-top: 0;
}

.site-footer {
  width: min(calc(100% - 40px), var(--max));
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  padding: 26px 0 40px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 740;
}

.case-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper-strong);
  box-shadow: var(--shadow);
  overflow: auto;
}

.case-dialog::backdrop {
  background: rgba(3, 4, 7, 0.76);
  backdrop-filter: blur(6px);
}

.dialog-close {
  position: sticky;
  top: 14px;
  left: calc(100% - 56px);
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 14px 14px -56px auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(248, 250, 252, 0.92);
  cursor: pointer;
  font-size: 1.8rem;
  line-height: 1;
}

.dialog-body {
  padding: 40px;
}

.dialog-body .project-visual {
  height: 180px;
  margin: -40px -40px 30px;
}

.dialog-body .case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.dialog-body .case-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--paper-strong);
  background: linear-gradient(135deg, var(--navy), var(--charcoal));
  font-size: 0.74rem;
  font-weight: 760;
}

.dialog-body h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 4rem;
  font-weight: 520;
  line-height: 1;
}

.dialog-body .case-summary {
  margin: 18px 0 30px;
  color: var(--muted);
  font-size: 1.08rem;
}

.case-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -12px 0 30px;
}

.case-links .button {
  min-height: 40px;
  padding: 9px 12px;
  font-size: 0.86rem;
}

.dialog-body .project-visual.has-media {
  height: 320px;
  place-items: center;
}

.dialog-body .project-visual.has-media img {
  height: 360px;
  max-width: 70%;
}

.case-detail-grid {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}

.case-detail-grid h3 {
  margin: 0;
  color: var(--teal);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.case-detail-grid p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 920px) {
  .hero h1 {
    font-size: 3.35rem;
  }

  .section-heading h2,
  .contact-section h2 {
    font-size: 3.9rem;
  }

  .signal-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .contact-panel {
    grid-template-columns: 1fr;
  }

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

  .contact-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .site-header {
    width: min(calc(100% - 24px), var(--max));
    margin-top: 12px;
  }

  .brand-name {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 8px;
    border: 1px solid rgba(214, 222, 232, 0.18);
    border-radius: var(--radius);
    background: rgba(3, 4, 7, 0.95);
    color: var(--paper-strong);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 13px 14px;
  }

  .hero {
    min-height: 84svh;
    padding: 124px 18px 42px;
    background:
      linear-gradient(125deg, rgba(29, 78, 216, 0.28), transparent 44%),
      linear-gradient(90deg, rgba(3, 4, 7, 0.98), rgba(7, 22, 45, 0.9)),
      var(--coal);
  }

  .hero h1 {
    font-size: 2.35rem;
  }

  .hero-copy {
    font-size: 1.04rem;
  }

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

  .signal-strip div,
  .signal-strip div + div {
    padding: 16px;
  }

  .section {
    width: min(calc(100% - 28px), var(--max));
    padding: 70px 0;
  }

  .section-heading {
    gap: 18px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 410px;
  }

  .section-heading h2,
  .contact-section h2 {
    font-size: 3.1rem;
  }

  .contact-panel {
    padding: 24px;
  }

  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .site-footer {
    width: min(calc(100% - 28px), var(--max));
    flex-direction: column;
  }

  .dialog-body {
    padding: 28px;
  }

  .dialog-body h2 {
    font-size: 2.75rem;
  }

  .dialog-body .project-visual {
    margin: -28px -28px 24px;
  }

  .case-detail-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 380px) {
  .hero h1 {
    font-size: 2rem;
  }

  .section-heading h2,
  .contact-section h2 {
    font-size: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
