/* ============================================================
   AshiX Studio: shared stylesheet
   Pages: index, services, work, studio, contact
   No build step. Edit tokens below to retheme.
   ============================================================ */

:root {
  /* Color */
  --ink: #02101c;
  --navy: #04202f;
  --navy-2: #06293d;
  --cobalt: #0b83fd;
  --cobalt-bright: #3d9bff;
  --sky: #8fc6ff;
  --paper: #edeff7;
  --dim: rgba(237, 239, 247, 0.6);
  --faint: rgba(237, 239, 247, 0.32);
  --line: rgba(143, 198, 255, 0.14);
  --line-strong: rgba(143, 198, 255, 0.3);

  /* Type */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-mono: "Space Mono", ui-monospace, monospace;

  /* Scale */
  --step--1: clamp(0.78rem, 0.74rem + 0.2vw, 0.88rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  --step-3: clamp(2.2rem, 1.8rem + 2vw, 3.4rem);
  --step-4: clamp(2.9rem, 2rem + 4.5vw, 5.6rem);

  /* Layout */
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --max: 80rem;
  --nav-h: 4.25rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset / base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul {
  padding: 0;
  list-style: none;
}

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

::selection {
  background: var(--cobalt);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--cobalt);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--step--1);
}

.skip-link:focus-visible {
  top: 0.5rem;
}

/* ---------- Typography helpers ---------- */

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1.1rem;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.lede {
  color: var(--dim);
  max-width: 34em;
  text-wrap: pretty;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  background: color-mix(in srgb, var(--ink) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.logo {
  display: inline-flex;
  align-items: center;
}

.logo img {
  height: 2rem;
  width: auto;
}

.nav-links {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.4rem);
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.25s var(--ease);
}

.nav-links a:hover {
  color: var(--paper);
}

.nav-links a[aria-current="page"] {
  color: var(--paper);
  border-bottom: 1px solid var(--cobalt-bright);
  padding-bottom: 2px;
}

.nav-cta {
  border: 1px solid var(--line-strong);
  padding: 0.5rem 1rem;
  border-radius: 99px;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.nav-cta:hover {
  border-color: var(--cobalt-bright);
  background: rgba(11, 131, 253, 0.12);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1;
}

@media (max-width: 720px) {
  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--navy);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem var(--gutter) 1.25rem;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease),
      visibility 0.25s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    padding: 0.85rem 0;
    width: 100%;
    border-bottom: 1px solid var(--line);
  }

  .nav-links a:last-child {
    border-bottom: 0;
  }

  .nav-cta {
    border: 0;
    padding: 0.85rem 0;
    border-radius: 0;
  }
}

/* ---------- Layout primitives ---------- */

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(4.5rem, 10vw, 8.5rem);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
  max-width: 44rem;
}

.section-head h2 {
  font-size: var(--step-3);
  margin-bottom: 1rem;
}

/* ---------- Hero (index) ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding-block: calc(var(--nav-h) + 1.5rem) clamp(5.5rem, 10vw, 7.5rem);
  overflow: clip;
}

/* Site-wide light field: fixed behind all content, one per page */
.page-field {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero h1 {
  font-size: var(--step-4);
  max-width: 11em;
  margin-bottom: 1.5rem;
  /* Lit by the same light source as the dot field (see main.js).
     --lx/--ly are set per-frame relative to the h1 box. */
  color: transparent;
  background: radial-gradient(
    circle 5.5em at var(--lx, 70%) var(--ly, 30%),
    #ffffff 0%,
    var(--cobalt-bright) 38%,
    rgba(237, 239, 247, 0.22) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
}

.hero .lede {
  font-size: var(--step-1);
  margin-bottom: 2.5rem;
}

/* Scrolling brand marquee at hero bottom */
.hero-marquee {
  position: absolute;
  inset: auto 0 0 0;
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding-block: 1.1rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hero-marquee .track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.hero-marquee .group {
  display: flex;
  gap: 3rem;
  padding-right: 3rem; /* junction spacing = internal gap → seamless */
}

.hero-marquee span {
  font-family: var(--font-mono);
  font-size: var(--step-0);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
  white-space: nowrap;
}

.hero-marquee .star {
  color: var(--cobalt-bright);
}

@keyframes marquee {
  to {
    /* exactly one group width (8 identical groups) */
    transform: translateX(-12.5%);
  }
}

/* Compact discipline chips (index, single mention of the six services) */
.discipline-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block: 1.75rem 2.25rem;
}

.discipline-chips span {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 0.45rem 1rem;
}



/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.9rem 1.6rem;
  border-radius: 99px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.btn-solid {
  background: var(--cobalt);
  color: var(--ink);
  font-weight: 700;
}

.btn-solid:hover {
  background: var(--cobalt-bright);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--paper);
}

.btn-ghost:hover {
  border-color: var(--cobalt-bright);
  background: rgba(11, 131, 253, 0.12);
}

.btn .arrow {
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Service list (index + services) ---------- */

.service-list {
  border-top: 1px solid var(--line);
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: clamp(1.5rem, 3.5vw, 2.4rem);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s var(--ease), padding-inline 0.3s var(--ease);
}

.service-row:hover {
  background: linear-gradient(90deg, rgba(11, 131, 253, 0.1), transparent 60%);
  padding-inline: 1rem;
}

.service-row h3 {
  font-size: var(--step-2);
}

.service-row p {
  color: var(--dim);
  font-size: var(--step-0);
}

.service-row .arrow {
  font-family: var(--font-mono);
  color: var(--sky);
  transition: transform 0.3s var(--ease);
}

.service-row:hover .arrow {
  transform: translateX(6px);
}

@media (max-width: 720px) {
  .service-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .service-row .arrow {
    display: none;
  }
}

/* ---------- Service detail (services page) ---------- */

.service-block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3rem, 7vw, 5.5rem);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--nav-h) + 1rem);
}

.service-block:last-child {
  border-bottom: 0;
}

.service-block h2 {
  font-size: var(--step-3);
  margin-bottom: 1rem;
}

.service-block .desc {
  color: var(--dim);
  margin-bottom: 2rem;
  max-width: 32em;
}

.deliverables {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.deliverables li {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--sky);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  padding: 0.35rem 0.9rem;
}

@media (max-width: 860px) {
  .service-block {
    grid-template-columns: 1fr;
  }
}

/* ---------- Work grid ---------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.work-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--navy);
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.work-card:hover {
  border-color: var(--cobalt-bright);
  transform: translateY(-4px);
}

.work-thumb {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.work-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(237, 239, 247, 0.14) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}

.work-card:hover .work-thumb::after {
  transform: translateX(120%);
}

/* Gradient placeholders, replace with <img> per project */
.work-thumb--a {
  background: radial-gradient(120% 120% at 20% 15%, #0b83fd 0%, #04202f 55%, #02101c 100%);
}

.work-thumb--b {
  background: linear-gradient(135deg, #06293d 0%, #0b83fd 130%);
}

.work-thumb--c {
  background: radial-gradient(90% 90% at 80% 85%, #3d9bff 0%, #04202f 60%);
}

.work-thumb--d {
  background: linear-gradient(200deg, #0b83fd -40%, #02101c 70%);
}

.work-thumb--e {
  background: radial-gradient(130% 100% at 50% 0%, #0a3a5c 0%, #02101c 75%);
}

.work-thumb--f {
  background: linear-gradient(320deg, #0b83fd -60%, #06293d 55%, #02101c 100%);
}

.work-thumb .mark {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 239, 247, 0.5);
}

.work-body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.work-body h3 {
  font-size: var(--step-1);
  margin-bottom: 0.35rem;
}

.work-body p {
  color: var(--dim);
  font-size: var(--step--1);
  margin-bottom: 0.9rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tags li {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sky);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 0.2rem 0.6rem;
}

/* ---------- Studio page ---------- */

.principles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.principle {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.75rem 1.6rem;
  background: var(--navy);
}

.principle h3 {
  font-size: var(--step-1);
  margin-bottom: 0.7rem;
}

.principle p {
  color: var(--dim);
  font-size: var(--step--1);
  line-height: 1.7;
}

.cap-list {
  columns: 2;
  column-gap: clamp(2rem, 5vw, 5rem);
}

.cap-list li {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--dim);
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}

@media (max-width: 640px) {
  .cap-list {
    columns: 1;
  }
}

/* ---------- CTA band ---------- */

.cta-band {
  text-align: center;
  padding-block: clamp(5rem, 12vw, 9rem);
  background: radial-gradient(60% 120% at 50% 120%, rgba(11, 131, 253, 0.18), transparent 70%);
}

.cta-band h2 {
  font-size: var(--step-3);
  margin-bottom: 1.2rem;
}

.cta-band p {
  color: var(--dim);
  margin-bottom: 2.2rem;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(2.5rem, 6vw, 6rem);
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-details dt {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky);
  margin-top: 1.8rem;
}

.contact-details dt:first-child {
  margin-top: 0;
}

.contact-details dd {
  margin: 0.35rem 0 0;
  color: var(--dim);
}

.contact-details a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.field {
  display: grid;
  gap: 0.45rem;
  margin-bottom: 1.4rem;
}

.field label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sky);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--navy);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: var(--step-0);
  padding: 0.85rem 1rem;
  transition: border-color 0.25s var(--ease);
}

.field textarea {
  min-height: 9rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--cobalt-bright);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238fc6ff' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.form-note {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--faint);
  margin-top: 1rem;
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding-top: clamp(3.5rem, 8vw, 5.5rem);
  background: linear-gradient(180deg, transparent, rgba(11, 131, 253, 0.05));
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 3rem);
  padding-bottom: clamp(3rem, 6vw, 4rem);
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }
}

.footer-brand .logo img {
  height: 1.9rem;
}

.footer-brand p {
  color: var(--dim);
  font-size: var(--step--1);
  max-width: 24em;
  margin: 1.1rem 0 1.5rem;
  line-height: 1.7;
}

.footer-cta {
  padding: 0.7rem 1.3rem;
  font-size: 0.68rem;
}

.footer-heading {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 1.1rem;
}

.footer-col nav,
.footer-col .footer-social {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-col nav a,
.footer-social a {
  color: var(--dim);
  font-size: var(--step--1);
  width: fit-content;
  transition: color 0.25s var(--ease);
}

.footer-col nav a:hover,
.footer-social a:hover {
  color: var(--paper);
}

.footer-contact dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 1rem;
}

.footer-contact dt:first-child {
  margin-top: 0;
}

.footer-contact dd {
  margin: 0.3rem 0 0;
  color: var(--dim);
  font-size: var(--step--1);
}

.footer-contact dd a {
  transition: color 0.25s var(--ease);
}

.footer-contact dd a:hover {
  color: var(--paper);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-social {
  margin-top: 1.5rem;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--faint);
}

.footer-fine {
  max-width: 34em;
  text-align: right;
}

@media (max-width: 640px) {
  .footer-fine {
    text-align: left;
  }
}

/* ---------- Reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero h1 {
    background: none;
    color: var(--paper);
  }

  .hero-marquee .track {
    animation: none;
  }
}


/* ---------- Case study pages ---------- */

.case-head {
  padding-top: calc(var(--nav-h) + clamp(3rem, 8vw, 5rem));
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.case-head h1 {
  font-size: var(--step-4);
  max-width: 13em;
  margin-bottom: 1.25rem;
}

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-block: 1.25rem;
  border-block: 1px solid var(--line);
}

.case-meta div {
  display: grid;
  gap: 0.2rem;
}

.case-meta dt {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
}

.case-meta dd {
  margin: 0;
  font-size: var(--step--1);
  color: var(--dim);
}

.case-figure {
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-block: clamp(2rem, 5vw, 3.5rem);
}

.case-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-figure .mark {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 239, 247, 0.45);
}

.case-prose {
  max-width: 42em;
}

.case-prose h2 {
  font-size: var(--step-2);
  margin: clamp(2.5rem, 6vw, 4rem) 0 1rem;
}

.case-prose p {
  color: var(--dim);
  margin-bottom: 1.1rem;
  text-wrap: pretty;
}

.case-next {
  display: block;
  padding-block: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
}

.case-next .eyebrow {
  margin-bottom: 0.6rem;
}

.case-next h2 {
  font-size: var(--step-3);
  transition: color 0.25s var(--ease);
}

.case-next:hover h2 {
  color: var(--cobalt-bright);
}


/* ---------- Team (studio page) ---------- */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(13rem, 100%), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.team-photo {
  aspect-ratio: 3 / 4;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 30% 20%, #0a3a5c 0%, #04202f 60%, #02101c 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-photo .mark {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 239, 247, 0.4);
}

.team-card h3 {
  font-size: var(--step-1);
  margin-top: 0.9rem;
}

.team-card .role {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky);
  margin-top: 0.25rem;
}
/* ============================================================
   CMS additions
   Append to the end of styles.css.
   ============================================================ */

/* THE FIX. styles.css styles .work-thumb but never .work-thumb img,
   so a real photo rendered at its intrinsic size, centred, and got
   clipped by overflow:hidden. Fill the 4:3 box instead. */
.work-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cards in a row end level regardless of title or blurb length. */
.work-card {
  display: flex;
  flex-direction: column;
}

.work-body {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Full title, however many lines it takes. Balanced so the last line
   is not a single orphaned word. */
.work-body h3 {
  text-wrap: balance;
  margin-bottom: 0.5rem;
}

/* The blurb still truncates: it is a teaser, and the project page has
   the whole thing. Raise the clamp if you want more. */
.work-body p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

/* Footer row, pinned to the bottom of the card. */
.work-foot {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* One word. Set per project in WordPress: Project details > Card label. */
.work-label {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
}

/* The card is already a link, so this is a span, not a nested anchor. */
.work-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  color: var(--paper);
  transition: color 0.3s var(--ease);
}

.work-cta .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease);
}

.work-card:hover .work-cta {
  color: var(--cobalt-bright);
}

.work-card:hover .work-cta .arrow {
  transform: translateX(4px);
}

/* Scope and Collaborators, stacked one per line in the project meta row. */
.meta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
}

/* .case-meta is a flex row whose columns stretch to the tallest item.
   Each column is itself a dt/dd grid, so its rows stretched too and the
   dd drifted to the middle. Anchor both to the top. */
.case-meta {
  align-items: start;
}

.case-meta div {
  align-content: start;
}