/* ==========================================================================
   M2M Labs (Model to Metal) — ambient, calm, professional
   ========================================================================== */

:root {
  --bg: #f4f7fb;          /* soft cloud white with a cool tint */
  --bg-2: #ffffff;
  --surface: rgba(255, 255, 255, 0.6);
  --surface-2: rgba(16, 42, 67, 0.04);
  --line: rgba(16, 42, 67, 0.09);
  --line-2: rgba(16, 42, 67, 0.16);

  --text: #0f1e2e;        /* deep ink navy */
  --text-2: #3f5163;
  --muted: #6b7c8c;

  --accent: #0e8a7b;      /* calm teal */
  --accent-2: #3567d6;    /* clear sky blue */
  --warm: #e0a33a;        /* amber, for stars */

  --shadow: 0 1px 2px rgba(16, 42, 67, .04), 0 14px 34px -18px rgba(16, 42, 67, .22);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --container: 1160px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: rgba(14, 138, 123, .18); color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Ambient background
   -------------------------------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(120, 160, 255, .20), transparent 60%),
    radial-gradient(900px 600px at 0% 30%, rgba(110, 210, 190, .18), transparent 60%),
    var(--bg);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .6;
  will-change: transform;
}
.orb-a {
  width: 520px; height: 520px;
  left: -140px; top: -120px;
  background: radial-gradient(circle, rgba(94, 205, 185, .45), transparent 65%);
  animation: drift-a 28s var(--ease) infinite alternate;
}
.orb-b {
  width: 620px; height: 620px;
  right: -200px; top: 20vh;
  background: radial-gradient(circle, rgba(110, 150, 255, .40), transparent 65%);
  animation: drift-b 34s var(--ease) infinite alternate;
}
.orb-c {
  width: 460px; height: 460px;
  left: 30vw; bottom: -220px;
  background: radial-gradient(circle, rgba(255, 190, 140, .30), transparent 65%);
  animation: drift-c 40s var(--ease) infinite alternate;
}

@keyframes drift-a { to { transform: translate(120px, 90px) scale(1.12); } }
@keyframes drift-b { to { transform: translate(-140px, 60px) scale(.92); } }
@keyframes drift-c { to { transform: translate(90px, -110px) scale(1.08); } }

#field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .9;
}

.grain {
  position: absolute;
  inset: -50%;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Navigation
   -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: background .5s var(--ease), border-color .5s var(--ease), backdrop-filter .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(244, 247, 251, .78);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand-mark { width: 28px; height: 28px; color: var(--accent); }
.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -.01em;
}
.brand-name em { font-size: 18.5px; color: var(--text-2); }
.brand-name small {
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 14px;
  color: var(--text-2);
}
.nav-links a:not(.btn) {
  position: relative;
  transition: color .3s var(--ease);
}
.nav-links a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.nav-links a:not(.btn):hover,
.nav-links a.active { color: var(--text); }
.nav-links a:not(.btn):hover::after,
.nav-links a.active::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 1.5px;
  background: var(--text);
  transition: transform .35s var(--ease), top .35s var(--ease);
}
.nav-toggle span:first-child { top: 16px; }
.nav-toggle span:last-child { top: 24px; }
.nav-toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(135deg, #17a594, var(--accent) 55%, #0b7266);
  border: 0;
  cursor: pointer;
  box-shadow: 0 8px 26px -10px rgba(14, 138, 123, .55), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background .4s var(--ease);
  font-family: inherit;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px -12px rgba(14, 138, 123, .6), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-small { padding: 9px 18px; font-size: 13.5px; color: #fff !important; }
.btn-ghost {
  background: rgba(255, 255, 255, .6);
  color: var(--text);
  border: 1px solid var(--line-2);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--surface-2);
  border-color: rgba(16, 42, 67, .26);
  box-shadow: none;
}
.btn-block { width: 100%; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 140px 0 110px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-2);
}
.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(14, 138, 123, .6);
  animation: pulse 2.8s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(14, 138, 123, .55); }
  70% { box-shadow: 0 0 0 10px rgba(14, 138, 123, 0); }
  100% { box-shadow: 0 0 0 0 rgba(14, 138, 123, 0); }
}

.hero-title {
  margin-top: 28px;
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(42px, 7.2vw, 92px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.hero-title em {
  font-size: 1.08em;
  letter-spacing: -.015em;
  background: linear-gradient(100deg, var(--accent) 10%, var(--accent-2) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .06em;
}
.hero-sub {
  margin-top: 28px;
  max-width: 620px;
  font-size: clamp(16px, 1.6vw, 18.5px);
  color: var(--text-2);
  font-weight: 400;
}
.hero-cta {
  margin-top: 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trust {
  margin-top: 72px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  max-width: 860px;
}
.trust li {
  padding: 22px 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.trust strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 40px;
  line-height: 1;
  letter-spacing: -.01em;
}
.trust small { font-size: .55em; color: var(--warm); margin-left: 3px; vertical-align: .55em; }
.trust li > span { font-size: 13px; color: var(--muted); }

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 30px;
  width: 24px; height: 40px;
  margin-left: -12px;
  border: 1px solid var(--line-2);
  border-radius: 14px;
}
.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 3px; height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--text-2);
  animation: cue 2.4s var(--ease) infinite;
}
@keyframes cue {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  80% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 0; }
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */
.section { padding: 104px 0; position: relative; }
.section + .section::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: min(var(--container), calc(100% - 48px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
}

.section-head { max-width: 760px; margin-bottom: 56px; }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.section h2 {
  font-weight: 300;
  font-size: clamp(32px, 4.4vw, 54px);
  line-height: 1.08;
  letter-spacing: -.03em;
}
.section h2 em { font-size: 1.06em; }
.lede {
  margin-top: 20px;
  font-size: 17px;
  font-weight: 400;
  color: var(--text-2);
  max-width: 640px;
}

/* Glass card base */
.record-card, .service, .work, .mini, .step, .about-card, .contact, .case {
  background: linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .66));
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* --------------------------------------------------------------------------
   Track record
   -------------------------------------------------------------------------- */
.record-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.record-card {
  padding: 30px;
  display: flex;
  flex-direction: column;
  transition: transform .6s var(--ease), border-color .6s var(--ease), background .6s var(--ease);
}
.record-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-2);
}
.record-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.tag {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .03em;
  color: var(--text-2);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.stars {
  color: var(--warm);
  font-size: 13px;
  letter-spacing: 2px;
  white-space: nowrap;
}
.stars b { color: var(--text); font-weight: 500; letter-spacing: 0; margin-left: 4px; }
.stars.muted { color: var(--muted); letter-spacing: 0; font-size: 12.5px; }
.record-card h3 { font-size: 21px; font-weight: 500; letter-spacing: -.015em; margin-bottom: 10px; }
.record-card p { color: var(--text-2); font-size: 15px; }
.record-card .meta {
  margin-top: auto;
  padding-top: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}
.record-foot {
  margin-top: 30px;
  font-size: 14px;
  color: var(--muted);
}
.record-foot a { color: var(--accent); border-bottom: 1px solid rgba(14, 138, 123, .3); transition: border-color .3s; }
.record-foot a:hover { border-color: var(--accent); }

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.service {
  padding: 30px 28px;
  position: relative;
  overflow: hidden;
  transition: transform .6s var(--ease), border-color .6s var(--ease);
}
.service::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(14, 138, 123, .09), transparent 45%);
  opacity: 0;
  transition: opacity .5s var(--ease);
  pointer-events: none;
}
.service:hover { transform: translateY(-4px); border-color: var(--line-2); }
.service:hover::before { opacity: 1; }
.service-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(14, 138, 123, .08);
  border: 1px solid rgba(14, 138, 123, .18);
  margin-bottom: 22px;
}
.service-icon svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service h3 { font-size: 19px; font-weight: 500; letter-spacing: -.01em; margin-bottom: 10px; }
.service p { color: var(--text-2); font-size: 14.8px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.chips li {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(16, 42, 67, .03);
  border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Case study
   -------------------------------------------------------------------------- */
.case {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 48px;
  padding: 44px;
}
.case-copy h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 10px;
}
.case-copy h3:first-child { margin-top: 0; }
.case-copy p { color: var(--text-2); font-size: 15.5px; }
.ticks li {
  position: relative;
  padding-left: 26px;
  color: var(--text-2);
  font-size: 15px;
  margin-bottom: 10px;
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 2px; top: .6em;
  width: 10px; height: 6px;
  border-left: 1.5px solid var(--accent);
  border-bottom: 1.5px solid var(--accent);
  transform: rotate(-45deg);
}

.pipeline {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: center;
}
.pipe-band {
  position: relative;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-sm);
  padding: 34px 18px 18px;
}
.pipe-band.device {
  border-style: solid;
  border-color: rgba(14, 138, 123, .25);
  background: rgba(14, 138, 123, .03);
}
.pipe-label {
  position: absolute;
  top: 10px; left: 16px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.device .pipe-label { color: var(--accent); }
.pipe-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pipe-row + .pipe-row { margin-top: 12px; }
.pipe-row-end { justify-content: flex-end; }
.node {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 10px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  line-height: 1.3;
}
.node small {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  color: var(--muted);
}
.node.accent { border-color: rgba(14, 138, 123, .45); color: var(--accent); }
.node-stack {
  flex: 1.2 1 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.node-stack .node { padding: 7px 8px; font-size: 11.5px; }
.pipe-row-end .node { flex: 0 1 34%; }
.arrow {
  flex: 0 0 18px;
  height: 1px;
  background: var(--line-2);
  position: relative;
  overflow: hidden;
}
.arrow::after {
  content: "";
  position: absolute;
  top: -1px; left: -8px;
  width: 8px; height: 3px;
  border-radius: 2px;
  background: var(--accent);
  animation: flow 2.2s linear infinite;
}
@keyframes flow { to { transform: translateX(34px); } }
.pipeline figcaption {
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Work
   -------------------------------------------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.work {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .6s var(--ease), border-color .6s var(--ease);
}
.work:hover { transform: translateY(-5px); border-color: var(--line-2); }
.work-visual {
  height: 170px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.work-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.work-kind {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.work h3 { font-size: 24px; font-weight: 500; letter-spacing: -.02em; margin-bottom: 10px; }
.work-body > p:not(.work-kind) { color: var(--text-2); font-size: 15px; }

.metrics {
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.metrics div { background: var(--bg-2); padding: 14px 12px; }
.metrics dt {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.1;
  color: var(--text);
}
.metrics dd { margin: 2px 0 0; font-size: 12px; color: var(--muted); }

.work-links {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  gap: 18px;
  font-size: 14px;
}
.work-links a { color: var(--text-2); transition: color .3s; }
.work-links a:hover { color: var(--text); }
.work-links .link-live { color: var(--accent); }





/* Show-more toggles: detail sits one click away */
.more { margin-top: 26px; }
.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  font-size: 14px;
  color: var(--accent);
  padding: 9px 16px;
  border: 1px solid rgba(14, 138, 123, .25);
  border-radius: 999px;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::after {
  content: "";
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .35s var(--ease);
}
.more[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
.more > summary:hover { background: rgba(14, 138, 123, .06); border-color: rgba(14, 138, 123, .45); }
.more > summary span {
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(14, 138, 123, .12);
}
.more[open] > :not(summary) { animation: unfold .5s var(--ease); }
@keyframes unfold { from { opacity: 0; transform: translateY(-6px); } }
.more .ticks { margin-top: 18px; }
.ticks strong { color: var(--text); font-weight: 500; }
.more-block { margin-top: 30px; }

/* Real product imagery on project cards */
.work-photo { height: 210px; background: var(--bg-2); }
.work-photo picture, .work-photo img { display: block; width: 100%; height: 100%; }
.work-photo img {
  object-fit: cover;
  object-position: center;
  transition: transform 1.2s var(--ease), filter 1.2s var(--ease);
}
.work:hover .work-photo img { transform: scale(1.045); }
.work-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(16, 42, 67, .18));
  pointer-events: none;
}
.badge {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px -6px rgba(16, 42, 67, .35);
}
.badge::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--warm);
}
.badge.live::before { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .2); animation: pulse-live 2.4s var(--ease) infinite; }
@keyframes pulse-live { 50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); } }

/* Wide featured project: visual left, details right */
.work-wide { grid-column: 1 / -1; flex-direction: row; }
.work-wide .work-visual { flex: 0 0 46%; height: auto; min-height: 300px; border-bottom: 0; border-right: 1px solid var(--line); }
.work-wide .work-photo img { object-position: center 70%; }
.work-photo.top img { object-position: center top; }
.link-private { font-size: 13.5px; color: var(--muted); }
.link-private::before { content: "🔒 "; font-size: 12px; }


.more-work {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.mini {
  padding: 24px;
  transition: transform .6s var(--ease), border-color .6s var(--ease);
}
.mini:hover { transform: translateY(-3px); border-color: var(--line-2); }
.mini h3 { font-size: 17.5px; font-weight: 500; letter-spacing: -.01em; margin-bottom: 8px; }
.mini p { color: var(--text-2); font-size: 14px; }
.mini .work-kind { font-size: 10.5px; color: var(--muted); }
.mini-link { display: inline-block; margin-top: 14px; font-size: 13.5px; color: var(--accent); }

/* --------------------------------------------------------------------------
   Process
   -------------------------------------------------------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}
.step { padding: 28px 24px 30px; position: relative; }
.step-n {
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(14, 138, 123, .6);
  display: block;
  margin-bottom: 26px;
}
.step h3 { font-size: 18.5px; font-weight: 500; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 14.5px; }

/* --------------------------------------------------------------------------
   About
   -------------------------------------------------------------------------- */
.about {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 56px;
  align-items: start;
}
.about-card { padding: 32px; position: sticky; top: 100px; }

/* Team: a single founder card sits beside the copy. Two or more members
   switch to a full-width grid placed under the studio text. */
.team { display: grid; gap: 18px; }
.about:has(.member + .member) { grid-template-columns: 1fr; }
.about:has(.member + .member) .about-copy { order: -1; }
.about:has(.member + .member) .team {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.about:has(.member + .member) .about-card { position: static; max-width: none; }
.portrait {
  position: relative;
  margin: -14px -14px 24px;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* soften the lavender backdrop so it sits inside the dark palette */
  filter: saturate(.92) contrast(1.02);
  transition: transform 1.4s var(--ease), filter 1.4s var(--ease);
}
.portrait::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 70%, rgba(16, 42, 67, .14) 100%),
    linear-gradient(160deg, rgba(14, 138, 123, .10), transparent 45%);
  pointer-events: none;
}
.about-card:hover .portrait img { transform: scale(1.025); filter: saturate(1) contrast(1.02); }

.about-name { font-size: 21px; font-weight: 500; letter-spacing: -.01em; }
.about-role { font-size: 14px; color: var(--accent); margin-top: 2px; }
.about-facts { margin-top: 24px; border-top: 1px solid var(--line); }
.about-facts li {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-2);
}
.about-facts span {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2px;
}
.about-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 20px; font-size: 14px; }
.about-links a { white-space: nowrap; }
.about-links a { color: var(--accent); }

.about-copy h2 { margin-bottom: 26px; }
.about-copy > p:not(.kicker) {
  color: var(--text-2);
  font-size: 17px;
  font-weight: 400;
  margin-bottom: 18px;
  max-width: 640px;
}
.about-copy > p em { font-family: var(--sans); font-style: normal; font-weight: 500; }
.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.stack span {
  font-family: var(--mono);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--text-2);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .7);
  transition: border-color .3s, color .3s;
}
.stack span:hover { border-color: rgba(14, 138, 123, .4); color: var(--text); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 52px;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  width: 500px; height: 500px;
  right: -180px; top: -200px;
  background: radial-gradient(circle, rgba(14, 138, 123, .12), transparent 65%);
  pointer-events: none;
}
.contact-points { margin-top: 28px; }
.contact-points li {
  padding: 10px 0 10px 24px;
  position: relative;
  color: var(--text-2);
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.contact-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 8px; height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
}

.founder-note {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .7);
}
.founder-note img {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px rgba(14, 138, 123, .45);
  filter: saturate(.85);
}
.founder-note p { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.founder-note strong { display: block; color: var(--text); font-weight: 500; font-size: 14.5px; }

.contact-direct { margin-top: 26px; font-size: 14.5px; color: var(--muted); overflow-wrap: anywhere; }
.contact-direct a { color: var(--accent); border-bottom: 1px solid rgba(14, 138, 123, .3); transition: border-color .3s; }
.contact-direct a:hover { border-color: var(--accent); }
.contact-social { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 14px; font-size: 14px; }
.contact-social a { color: var(--text-2); transition: color .3s; }
.contact-social a:hover { color: var(--accent); }

.contact-form { position: relative; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 13px; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237d8a95' stroke-width='1.5'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  padding-right: 40px;
}
.field select option { background: var(--bg-2); color: var(--text); }
.field select optgroup { background: var(--bg); color: var(--accent); font-style: normal; }
.field select:invalid { color: var(--muted); }
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(14, 138, 123, .6);
  box-shadow: 0 0 0 4px rgba(14, 138, 123, .1);
}
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: rgba(194, 65, 12, .6); }
.form-note { font-size: 13.5px; color: var(--text-2); min-height: 1.4em; }
.form-note.ok { color: var(--accent); }
.form-note.err { color: #c2410c; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-links { display: flex; gap: 22px; }
.footer-links a:hover { color: var(--text); }

/* --------------------------------------------------------------------------
   Reveal on scroll
   -------------------------------------------------------------------------- */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  filter: blur(4px);
  transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; filter: none; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1020px) {
  .services { grid-template-columns: repeat(2, 1fr); }
  .more-work { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .case { grid-template-columns: 1fr; gap: 40px; }
  .about { grid-template-columns: 1fr; gap: 40px; }
  .about-card { position: static; max-width: 460px; }
  .contact { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: 72px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 28px;
    background: rgba(244, 247, 251, .97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity .4s var(--ease), transform .4s var(--ease);
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav-links a:not(.btn)::after { display: none; }
  .nav-links .btn { margin-top: 18px; padding: 14px; }
  .nav.menu-open { background: rgba(244, 247, 251, .97); }

  .record-grid, .work-grid { grid-template-columns: 1fr; }
  .work-wide { flex-direction: column; }
  .work-wide .work-visual { flex: none; height: 230px; min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .trust { grid-template-columns: repeat(2, 1fr); row-gap: 8px; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 84px 0; }
  .hero { padding: 120px 0 90px; }
  .trust { margin-top: 52px; }
  .trust strong { font-size: 34px; }
  .services, .more-work, .steps { grid-template-columns: 1fr; }
  .record-card, .service, .work-body { padding: 24px; }
  .case, .contact { padding: 26px 20px; }
  .metrics dt { font-size: 22px; }
  .pipe-row { flex-wrap: wrap; }
  .pipe-row .arrow { flex-basis: 100%; height: 14px; width: 1px; flex-grow: 0; background: none; }
  .pipe-row .arrow::after { display: none; }
  .pipe-row .arrow::before {
    content: "";
    display: block;
    width: 1px; height: 100%;
    margin: 0 auto;
    background: var(--line-2);
  }
  .node, .pipe-row-end .node { flex: 1 1 100%; }
  .pipe-row-end { justify-content: stretch; }
  .scroll-cue { display: none; }
  .footer-inner { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .js .reveal { opacity: 1; transform: none; filter: none; }
}
