:root {
  --ink: #0a1628;
  --ink-soft: #172b46;
  --muted: #66758a;
  --line: #dce5ee;
  --paper: #f7fafc;
  --white: #ffffff;
  --cyan: #1bb8c5;
  --cyan-dark: #07828e;
  --teal-pale: #e3f7f7;
  --shadow: 0 18px 50px rgba(10, 22, 40, 0.08);
  --radius: 22px;
  --max: 1160px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  line-height: 1.6;
  overflow-x: clip;
}

a { color: inherit; }
button { font: inherit; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: .65rem .9rem;
  background: var(--cyan);
  color: var(--ink);
  font-weight: 800;
  border-radius: 10px;
}

.skip-link:focus { top: 1rem; }

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

.site-header {
  position: relative;
  z-index: 2;
  background: rgba(247, 250, 252, .88);
  border-bottom: 1px solid rgba(220, 229, 238, .8);
  backdrop-filter: blur(14px);
}

.nav,
.section,
.footer-inner {
  width: min(calc(100% - 3rem), var(--max));
  margin: 0 auto;
}

.nav {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 850;
  letter-spacing: -.03em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--cyan);
  border-radius: 10px 10px 10px 3px;
  font-size: .85rem;
}

.nav-links { display: flex; gap: 1.6rem; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .93rem; font-weight: 700; transition: color .18s ease, transform .18s ease; }
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover { transform: translateY(-1px); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 8.5rem 0 7rem;
  background: linear-gradient(135deg, var(--paper) 0%, #eef8fa 55%, #dceef3 100%);
}

.hero::after {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -210px;
  top: -250px;
  border: 1px solid rgba(27, 184, 197, .28);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(27, 184, 197, .05), 0 0 0 84px rgba(27, 184, 197, .04);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 780px; }
.eyebrow { margin: 0 0 1rem; color: var(--cyan-dark); font-size: .75rem; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 800px; margin-bottom: 1.5rem; font-size: clamp(3rem, 7vw, 6.4rem); line-height: .98; letter-spacing: -.075em; }
h2 { margin-bottom: 1rem; font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.04; letter-spacing: -.055em; }
h3 { margin-bottom: .55rem; font-size: 1.15rem; line-height: 1.2; letter-spacing: -.025em; }
.lede { max-width: 650px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.3rem; }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  border-style: solid;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.button:not(.button-disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(10, 22, 40, .1); }
.button-primary { background: var(--ink); color: var(--white); }
.button-primary:hover { background: var(--ink-soft); }
.button-secondary { border-color: var(--line); background: rgba(255,255,255,.6); color: var(--ink); }
.button-secondary:hover { border-color: var(--cyan); background: var(--white); }
.button-disabled { cursor: not-allowed; opacity: .58; pointer-events: none; }
.button-disabled:hover { transform: none; }

.section { padding: 7rem 0; }
.section-header { max-width: 720px; margin-bottom: 2.7rem; }
.section-header p { color: var(--muted); font-size: 1.05rem; }

.work-card {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.work-card-copy { padding: clamp(1.5rem, 4vw, 3.5rem); }
.work-card-copy p { color: var(--muted); }
.tag-row { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1.3rem 0 2rem; }
.tag { padding: .38rem .65rem; color: var(--cyan-dark); background: var(--teal-pale); border-radius: 99px; font-size: .78rem; font-weight: 800; }

.proof-placeholder {
  min-height: 340px;
  display: flex;
  align-items: end;
  padding: 1.5rem;
  background: linear-gradient(145deg, #122945, #0a1628 65%, #0d5260);
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.proof-frame {
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.proof-frame img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform .2s ease;
}

.proof-frame figcaption {
  padding: .85rem 1rem;
  color: var(--muted);
  background: var(--white);
  font-size: .82rem;
}

.home-proof { min-height: 0; align-self: stretch; }
.proof-frame:hover { border-color: #b9dbe0; box-shadow: 0 22px 56px rgba(10, 22, 40, .12); }
.proof-frame:hover img { transform: scale(1.015); }

.proof-placeholder::before {
  content: "";
  position: absolute;
  inset: 16% 10% 24%;
  border: 1px solid rgba(169, 240, 239, .35);
  background: linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 25% 25%;
  transform: perspective(700px) rotateY(-14deg) rotateX(7deg);
}

.proof-placeholder::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -90px;
  right: -60px;
  border: 1px solid rgba(27, 184, 197, .5);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(27, 184, 197, .08), 0 0 0 44px rgba(27, 184, 197, .05);
}

.proof-caption { position: relative; z-index: 1; max-width: 280px; }
.proof-caption strong { display: block; margin-bottom: .35rem; font-size: 1.05rem; }
.proof-caption span { color: #b6c8d9; font-size: .88rem; }

.capability-grid,
.feature-grid,
.proof-grid,
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.capability,
.feature,
.value { padding: 1.4rem; background: var(--white); border: 1px solid var(--line); border-radius: 16px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.capability:hover, .feature:hover, .value:hover { transform: translateY(-3px); border-color: #b9dbe0; box-shadow: 0 14px 30px rgba(10, 22, 40, .08); }
.capability p, .feature p, .value p { margin-bottom: 0; color: var(--muted); font-size: .93rem; }
.icon-number { display: inline-grid; width: 34px; height: 34px; place-items: center; margin-bottom: 1rem; background: var(--teal-pale); color: var(--cyan-dark); border-radius: 10px; font-weight: 850; }

.cta-band { padding: 5rem 0; background: var(--ink); color: var(--white); }
.cta-band .section { padding: 0; }
.cta-band p { max-width: 600px; color: #b8c7d7; }
.cta-band .button-secondary { color: var(--white); border-color: #42546b; background: transparent; }
.site-footer { padding: 1.7rem 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; }

.project-hero { padding: 6.5rem 0 4.5rem; background: var(--ink); color: var(--white); }
.project-hero .lede { color: #b8c7d7; }
.project-hero .eyebrow { color: #75e1e3; }
.project-meta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; color: #b8c7d7; font-size: .9rem; }
.project-meta span { padding-right: .7rem; border-right: 1px solid #40536a; }
.project-meta span:last-child { border-right: 0; }
.project-section { padding: 5.5rem 0; }
.project-section.alt { background: var(--white); }
.project-section .section { padding: 0; }
.project-intro { display: grid; grid-template-columns: .8fr 1.2fr; gap: 4rem; align-items: start; }
.project-copy { max-width: 720px; color: var(--muted); }
.project-copy strong { color: var(--ink); }
.workflow { display: grid; grid-template-columns: repeat(6, 1fr); gap: .65rem; margin-top: 2rem; }
.workflow-step { min-height: 128px; padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.workflow-step:not(:last-child)::after { content: "→"; position: absolute; right: -.58rem; top: 46%; color: var(--cyan-dark); font-weight: 900; }
.workflow-step { position: relative; }
.workflow-step strong { display: block; font-size: .92rem; }
.workflow-step span { display: block; margin-top: .35rem; color: var(--muted); font-size: .78rem; }
.large-proof { min-height: 430px; border-radius: var(--radius); }
.proof-grid { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; }
.proof-tile { min-width: 0; overflow: hidden; margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: 15px; color: var(--ink); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.proof-tile img { display: block; width: 100%; height: auto; transition: transform .2s ease; }
.proof-tile figcaption { padding: .85rem 1rem; color: var(--muted); font-size: .83rem; }
.proof-tile:hover { transform: translateY(-3px); border-color: #b9dbe0; box-shadow: 0 14px 30px rgba(10, 22, 40, .08); }
.proof-tile:hover img { transform: scale(1.015); }
.boundary { margin-top: 2rem; padding: 1.25rem 1.4rem; background: #eef8fa; border-left: 4px solid var(--cyan); color: var(--ink-soft); border-radius: 0 12px 12px 0; }
.stack-list { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.4rem; }
.stack-list span { padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: .88rem; font-weight: 700; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.stack-list span:hover { transform: translateY(-2px); border-color: #b9dbe0; box-shadow: 0 8px 18px rgba(10, 22, 40, .07); }
.role-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem 2rem; padding: 0; margin: 1.3rem 0 0; list-style: none; }
.role-list li::before { content: "↗"; margin-right: .55rem; color: var(--cyan-dark); font-weight: 900; }
.link-list { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.5rem; }
.contact-status { display: block; margin-top: .75rem; color: #91a4b8; font-size: .8rem; }

html.js-enabled [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s ease-out; }
html.js-enabled [data-reveal].is-visible { opacity: 1; transform: none; }
html.js-enabled [data-reveal][data-delay="1"] { transition-delay: 60ms; }
html.js-enabled [data-reveal][data-delay="2"] { transition-delay: 120ms; }
html.js-enabled [data-reveal][data-delay="3"] { transition-delay: 180ms; }

@media (max-width: 820px) {
  .nav, .section, .footer-inner { width: min(calc(100% - 2rem), var(--max)); }
  .hero { padding: 6rem 0 5rem; }
  .work-card, .project-intro { grid-template-columns: 1fr; }
  .capability-grid, .feature-grid, .value-grid { grid-template-columns: 1fr 1fr; }
  .workflow { grid-template-columns: repeat(3, 1fr); }
  .workflow-step:nth-child(3)::after, .workflow-step:nth-child(6)::after { display: none; }
}

@media (max-width: 560px) {
  .nav { min-height: 68px; flex-wrap: wrap; padding: .75rem 0; gap: .75rem 1rem; }
  .nav-links { gap: .8rem; }
  .nav-links a { font-size: .82rem; }
  .hero { padding: 5rem 0 4.2rem; }
  h1 { font-size: clamp(2.9rem, 15vw, 4.5rem); }
  .section, .project-section { padding: 4.5rem 0; }
  .capability-grid, .feature-grid, .value-grid, .proof-grid, .role-list { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: 1fr 1fr; }
  .workflow-step:nth-child(2)::after, .workflow-step:nth-child(4)::after { display: none; }
  .footer-inner { flex-direction: column; }
  .project-meta { gap: .45rem; }
  .project-meta span { padding-right: .45rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js-enabled [data-reveal] { opacity: 1; transform: none; transition: none; }
  .proof-frame:hover img, .proof-tile:hover img { transform: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
