:root {
  color-scheme: only light;
  --color: #151922;
  --h1-color: #151922;
  --h2-color: #151922;
  --h3-color: #151922;
  --h4-color: #151922;
  --h5-color: #151922;
  --h6-color: #151922;
  --font-size: 15px;
  font-size: 15px;
  --bg: #f7f4ed;
  --ink: #151922;
  --muted: #5f6672;
  --line: #ddd6c8;
  --blue: #7f9dff;
  --cream: #fffdf8;
  --black: #101014;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 15px;
}

/* Keep native reading order, comfortable leading and short-word pairs in both languages. */
h1, h2, h3 {
  color: var(--ink);
  text-wrap: balance;
  overflow-wrap: anywhere;
}
p, li, dd, figcaption {
  text-wrap: pretty;
}
html[lang='ru'] h1, html[lang='ru'] h2, html[lang='ru'] h3 { letter-spacing: -.035em; }
section[id] { scroll-margin-top: 7rem; }
:where(a, button):focus-visible {
  outline: 3px solid #405bb9;
  outline-offset: 4px;
}

body {
  isolation: isolate;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background:
    linear-gradient(90deg, rgba(18,18,18,.04) 1px, transparent 1px),
    linear-gradient(0deg, rgba(18,18,18,.035) 1px, transparent 1px);
  background-size: 72px 72px;
}

.grid {
  display: block !important;
}

h1,
h2,
h3,
p {
  letter-spacing: -0.035em;
}

p {
  color: var(--muted);
  line-height: 1.55;
  letter-spacing: -.01em;
}

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

.container {
  max-width: 1180px;
}

nav.container-fluid {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247,244,237,.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(18,18,18,.1);
  padding: .75rem 1.8rem;
}

nav strong {
  font-family: Georgia, serif;
  font-size: .96rem;
  letter-spacing: -0.03em;
}

nav a {
  color: var(--ink);
  font-weight: 700;
  font-size: .84rem;
}

nav a.nav-active {
  background: var(--ink);
  border-color: var(--ink);
  border-radius: 999px;
  color: #fff;
  padding: .62rem 1rem;
}

nav [data-section-nav] a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .62rem 1rem;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

nav [data-section-nav] a:hover {
  background: rgba(18, 18, 18, .07);
}

nav a.nav-active:hover {
  background: var(--ink);
}

[id] {
  scroll-margin-top: 92px;
}

main.container {
  padding: 2.4rem 1rem 1rem;
}

.eyebrow {
  font-size: .74rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--blue);
  font-weight: 900;
}

.hero {
  padding: 3.5rem 0 3.4rem;
  border-bottom: 1px solid var(--line);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 3rem;
  align-items: center;
}

.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 5.8vw, 5.5rem);
  line-height: 1.06;
  margin: .3rem 0 1.1rem;
  letter-spacing: -0.075em;
}

.hero-copy {
  max-width: 650px;
  font-size: .98rem;
  color: #303744;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.25rem;
}

.pill {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.62);
  border-radius: 999px;
  padding: .45rem .75rem;
  font-size: .82rem;
  font-weight: 750;
}

.hero-photo {
  width: min(100%, 420px);
  margin-left: auto;
  transform: rotate(1.2deg);
}

.hero-photo img {
  width: 100%;
  height: auto;
  border-radius: 24px;
  border: 1px solid rgba(18,18,18,.24);
  box-shadow: 0 26px 72px rgba(37,33,25,.14);
  background: transparent;
}

.about {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 3rem;
  padding: 4rem 0;
}

.about h2,
.section-heading h2 {
  font-family: Georgia, serif;
  font-size: clamp(1.9rem, 3.3vw, 3.5rem);
  line-height: 1.1;
  margin: .25rem 0 .9rem;
  letter-spacing: -0.07em;
}

.about p {
  font-size: .96rem;
}

.about-list {
  display: grid;
  gap: .85rem;
  margin-top: 1.2rem;
}

.about-list div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: .85rem;
}

.about-list b {
  text-transform: uppercase;
  font-size: .74rem;
  letter-spacing: .12em;
  color: var(--ink);
}

.section-heading {
  display: grid;
  grid-template-columns: .34fr 1fr;
  gap: 2rem;
  align-items: end;
  margin: 4rem 0 1.5rem;
}

.section-heading.compact {
  margin-bottom: 1rem;
}

.chapter {
  margin: 3.2rem 0 1rem;
  padding: .85rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.chapter h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.65rem, 3vw, 2.9rem);
  letter-spacing: -0.06em;
  line-height: 1.12;
}

.chapter span {
  color: var(--blue);
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .74rem;
}

.product-cases-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  margin: 1rem 0 1.7rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,.74), rgba(233,238,255,.82));
}

.product-cases-entry p {
  max-width: 680px;
  margin: .35rem 0 0;
  color: #343b47;
}

.case-study-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  width: fit-content;
  margin: 0;
  padding: .78rem 1.08rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.case-study-link:hover {
  transform: translateY(-2px);
  background: var(--blue);
  border-color: var(--blue);
  color: var(--ink);
}

.brand-link {
  color: inherit;
  text-decoration: none;
}

.product-index {
  padding-top: 0 !important;
}

.product-index-hero {
  min-height: 430px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--line);
}

.back-link {
  width: fit-content;
  margin-bottom: 3.5rem;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 750;
  text-decoration: none;
}

.back-link:hover {
  color: var(--ink);
}

.product-index-hero h1 {
  max-width: 960px;
  margin: .35rem 0 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 5.6vw, 5.3rem);
  line-height: 1.08;
  letter-spacing: -.075em;
}

.product-index-hero p {
  max-width: 750px;
  margin: 0;
  color: #303744;
  font-size: .98rem;
}

.project-list {
  padding: 2.5rem 0 4rem;
}

.project-list-heading {
  display: grid;
  grid-template-columns: .34fr 1fr;
  gap: 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.project-list-heading h2,
.additional-work h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 4.4vw, 4.5rem);
  line-height: .9;
  letter-spacing: -.07em;
}

.project-preview {
  position: relative;
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 16px 50px rgba(37,33,25,.07);
}

.project-preview-featured {
  display: grid;
  grid-template-columns: .88fr 1.12fr;
  gap: 1.5rem;
  padding: 1.6rem;
}

.project-preview-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.project-number {
  margin-bottom: 2rem;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--blue);
  font-size: 2rem;
  line-height: 1;
}

.project-preview h3 {
  margin: .2rem 0 .8rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 3.4vw, 3.5rem);
  line-height: .9;
  letter-spacing: -.07em;
}

.project-summary {
  max-width: 480px;
  color: #343b47;
  font-size: 1.05rem;
}

.project-meta {
  width: 100%;
  margin: 1.4rem 0;
}

.project-meta div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: .75rem 0;
  border-top: 1px solid var(--line);
}

.project-meta dt {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.project-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: .9rem;
  font-weight: 700;
}

.project-status {
  display: inline-flex;
  margin-top: auto;
  padding: .5rem .75rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.project-status.ready {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--ink);
}

.project-preview-media {
  min-height: 450px;
  overflow: hidden;
  border: 1px solid rgba(18,18,18,.16);
  border-radius: 24px;
}

.project-preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
  margin-top: 1rem;
}

.compact-card {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.3rem;
}

.compact-card h3 {
  font-size: clamp(2.2rem, 3.4vw, 3.5rem);
}

.compact-card p {
  color: #434a56;
}

.project-row {
  min-height: 290px;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(200px, 1fr);
  align-items: center;
}

.project-illustration { padding: 1.25rem; min-width: 0; }
.project-illustration img { width: 100%; max-width: 330px; height: auto; margin: auto; mix-blend-mode: multiply; }
.project-row-copy { min-width: 0; }

.project-row-link {
  display: grid;
  grid-template-columns: 1fr .78fr;
  min-height: 290px;
  color: inherit;
  text-decoration: none;
}

.project-row-link:hover {
  color: inherit;
}

.project-row-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
}

.project-row:not(.project-row-ready) .project-row-copy {
  min-height: 290px;
}

.project-row h2 {
  max-width: 760px;
  margin: .25rem 0 .75rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.8vw, 2.65rem);
  line-height: 1.1;
  letter-spacing: -.055em;
}

.project-row p {
  max-width: 660px;
  margin-bottom: 1.25rem;
  color: #434a56;
  font-size: .94rem;
}

.project-row .project-status.ready {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--ink);
  text-decoration: none;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.project-row .project-status.ready:hover {
  background: #efb598;
  border-color: #efb598;
  color: var(--ink);
  transform: translateY(-2px);
}

.project-row-media {
  min-height: 290px;
  overflow: hidden;
  border-left: 1px solid var(--line);
}

.project-row-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.project-row-link:hover .project-row-media img {
  transform: scale(1.025);
}

.dark-card {
  background: var(--black);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}

.dark-card p,
.dark-card .project-status {
  color: #d8d9e4;
}

.dark-card h2 {
  color: #fff;
}

.blue-card {
  background: var(--blue);
  border-color: rgba(18,18,18,.16);
}

.blue-card .eyebrow,
.blue-card .project-number {
  color: var(--ink);
}

.blue-card .project-status {
  color: var(--ink);
}

.blue-card p {
  color: #283141;
}

.additional-work {
  display: grid;
  grid-template-columns: .4fr 1fr;
  gap: 2rem;
  padding: 4rem 0;
  border-top: 1px solid var(--line);
}

.additional-work p {
  grid-column: 2;
  max-width: 720px;
  margin: .4rem 0 0;
  font-size: 1.05rem;
}

.product-index-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 4rem;
  padding: 1.5rem;
  border-radius: 26px;
  background: var(--black);
}

.product-index-cta p {
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 3vw, 2.7rem);
}

.case-study-link.light {
  border-color: #fff;
  background: #fff;
  color: var(--ink);
}

.case {
  background: rgba(255,255,255,.72);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 1.6rem;
  margin: 1rem 0 1.7rem;
  box-shadow: 0 16px 50px rgba(37,33,25,.07);
}

.case.dark {
  background: var(--black);
  color: #fff;
  border-color: rgba(255,255,255,.14);
}

.case.dark p,
.case.dark li {
  color: #d8d9e4;
}

.case.dark .note {
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.14);
}

.case.dark .note b,
.case.dark h3 {
  color: #fff;
}

.case.dark .note p {
  color: #d8d9e4;
}

.case-layout {
  display: grid;
  grid-template-columns: .94fr 1.06fr;
  gap: 1.6rem;
  align-items: start;
}

.case h3 {
  font-size: clamp(1.5rem, 2.5vw, 2.5rem);
  line-height: 1.13;
  margin: .2rem 0 .85rem;
  letter-spacing: -0.06em;
}

.case-lead {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
  margin-top: 1rem;
}

.note {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: .95rem;
}

.note b {
  display: block;
  margin-bottom: .35rem;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .13em;
  color: var(--ink);
}

.note p {
  margin: 0;
  font-size: .9rem;
  color: #4d535c;
}

.carousel,
.single-image {
  position: relative;
  width: 100%;
}

.carousel-frame,
.single-image {
  width: 100%;
  aspect-ratio: var(--carousel-ratio, 4 / 3);
  max-height: 560px;
  min-height: 300px;
  border-radius: 24px;
  border: 1px solid rgba(18,18,18,.24);
  background: transparent;
  box-shadow: 0 18px 48px rgba(37,33,25,.1);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.case.dark .carousel-frame,
.case.dark .single-image {
  border-color: rgba(255,255,255,.3);
  box-shadow: 0 18px 58px rgba(0,0,0,.32);
}

.carousel-frame img {
  display: none;
}

.carousel-frame img.active,
.single-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}

.carousel-frame img.soft-fit,
.single-image img {
  object-fit: contain;
}

/* Full-image carousels: badges and event package */
.free-carousel .carousel-frame {
  aspect-ratio: auto;
  min-height: 0;
  max-height: none;
  height: auto;
  overflow: visible;
  display: block;
  background: transparent;
  border: 1px solid rgba(18,18,18,.24);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(37,33,25,.1);
}

.case.dark .free-carousel .carousel-frame {
  border-color: rgba(255,255,255,.3);
  box-shadow: 0 18px 58px rgba(0,0,0,.32);
}

.free-carousel .carousel-frame img {
  display: none;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 24px;
  background: transparent;
}

.free-carousel .carousel-frame img.active {
  display: block;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: .8rem;
  min-height: 42px;
}

.carousel-controls button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  padding: 0;
  display: grid;
  place-items: center;
  background: var(--ink);
  border: 1px solid var(--ink);
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}

.carousel-controls button:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.carousel-controls span {
  font-size: .78rem;
  font-weight: 800;
  color: var(--muted);
  min-width: 52px;
  text-align: center;
}

.case.dark .carousel-controls span {
  color: #d8d9e4;
}

.case.dark .carousel-controls button {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}

.skills-intro {
  max-width: 720px;
  font-size: 1.04rem;
  color: #3f4652;
}

.skills {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .85rem;
  margin: 1.5rem 0 4rem;
}

.skill {
  background: rgba(255,255,255,.62);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.1rem;
}

.skill span {
  font-family: Georgia, serif;
  font-size: 1.65rem;
  color: var(--blue);
}

.skill h3 {
  margin-top: .35rem;
}

.skill p {
  font-size: .92rem;
}

.team-note {
  margin: -2.4rem 0 4rem;
  padding: 1.35rem 1.5rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(237,241,255,.72));
}

.team-note p {
  margin: 0;
  max-width: 850px;
  color: #343b47;
  font-size: 1.02rem;
}

footer.container {
  padding: 1.7rem 1rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Product case study */
.case-study-page {
  padding-top: 0 !important;
}

.case-hero {
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--line);
}

.case-hero .back-link {
  display: block;
  margin-bottom: 3rem;
}

.case-hero h1 {
  max-width: 980px;
  margin: .4rem 0 1.2rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.8rem, 5.3vw, 5rem);
  line-height: 1.08;
  letter-spacing: -.07em;
}

.case-hero-lead {
  max-width: 760px;
  margin: 0;
  color: #303744;
  font-size: 1.02rem;
}

.case-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 2.5rem 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--line);
}

.case-facts div {
  padding: 1rem;
  background: rgba(255,255,255,.76);
}

.case-facts dt {
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.case-facts dd {
  margin: 0;
  color: var(--ink);
  font-size: .84rem;
  font-weight: 700;
  line-height: 1.45;
}

.case-cover,
.case-wide-image,
.case-gallery figure {
  margin: 2rem 0;
}

.case-cover img,
.case-wide-image img,
.case-gallery img {
  width: 100%;
  border: 1px solid rgba(18,18,18,.16);
  border-radius: 22px;
  background: #dcecf2;
}

.case-cover img {
  max-height: 690px;
  object-fit: cover;
}

.case-cover figcaption,
.case-wide-image figcaption,
.case-gallery figcaption {
  max-width: 760px;
  margin-top: .65rem;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.case-section {
  padding: 3.6rem 0;
  border-top: 1px solid var(--line);
}

.case-section > h2,
.split-section h2,
.case-outcome h2 {
  max-width: 850px;
  margin: .35rem 0 1.5rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 3.4vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: -.06em;
}

.split-section {
  display: grid;
  grid-template-columns: .82fr 1fr;
  gap: 3rem;
}

.case-prose {
  padding-top: .3rem;
}

.case-prose p {
  margin-top: 0;
  font-size: .94rem;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .7rem;
}

.role-grid article {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.66);
}

.role-grid h3,
.decision-list h3 {
  margin: 0 0 .45rem;
  font-size: 1rem;
  line-height: 1.2;
}

.role-grid p,
.decision-list p {
  margin: 0;
  font-size: .82rem;
}

.workflow-list {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  counter-reset: workflow;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 42px .55fr 1fr;
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  counter-increment: workflow;
}

.workflow-list li::before {
  content: "0" counter(workflow);
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
}

.workflow-list b {
  font-size: .92rem;
}

.workflow-list span {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.5;
}

.decision-list {
  margin-top: 1.8rem;
}

.decision-list article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 1rem;
  margin: 0 0 1rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: none;
  background: rgba(255,255,255,.72);
  align-items: start;
}

.decision-list article > span {
  color: var(--blue);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  line-height: 1.3;
}

.decision-list article div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
}

.decision-list h3 { grid-column: 1 / -1; margin: 0; line-height: 1.5; }
.decision-list p { font-size: .94rem; line-height: 1.6; }
.decision-list p b { display: block; margin-bottom: .4rem; color: var(--ink); }
.decision-list article div > * { min-width: 0; }
.decision-list article:nth-child(4n + 1) { background: #edf0fc; border-color: #d5ddf3; }
.decision-list article:nth-child(4n + 2) { background: #eef3ed; border-color: #d7e1d3; }
.decision-list article:nth-child(4n + 3) { background: #fbf2dc; border-color: #eaddb9; }
.decision-list article:nth-child(4n + 4) { background: #f1edf8; border-color: #ddd4ec; }

/* Put the team label below the introduction, with space before the skills. */
#skills .section-heading { grid-template-columns: 1fr; gap: 0; margin-top: 4rem; }
#skills .section-heading > div { grid-row: 1; max-width: 800px; }
#skills .section-heading > .eyebrow { grid-row: 2; margin-top: 2rem; margin-bottom: .5rem; }
#skills .skills { margin-top: 1.5rem; }
.skill { margin: 0; }
.skill h3 { font-size: 1.22rem; line-height: 1.35; margin-bottom: 1rem; }
.skill p { margin-bottom: 0; }
.role-grid article { margin: 0; box-shadow: none; }
.role-grid > * { min-width: 0; }
.role-grid h3 { line-height: 1.4; }

/* Language control sits with the name, separate from navigation actions. */
nav.container-fluid ul:first-child { align-items: center; }
nav.container-fluid .language-item { margin-left: .85rem; padding-left: .85rem; border-left: 1px solid var(--line); }
.language-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 84px;
  min-width: 84px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  text-decoration: none;
  font-size: 12px;
  line-height: 1;
  letter-spacing: .03em;
  vertical-align: middle;
}
.language-switch::after {
  content: '/';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: #99958c;
  line-height: 1;
}
.language-switch span {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  height: 44px;
  color: var(--muted);
  line-height: 1;
}
.language-switch span:first-child { justify-content: flex-end; padding-right: 9px; }
.language-switch span:last-child { justify-content: flex-start; padding-left: 9px; }
.language-switch[aria-checked='false'] span:first-child,
.language-switch[aria-checked='true'] span:last-child { color: var(--ink); text-decoration: underline; text-decoration-color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.language-switch:hover { background: #eeebe3; }

/* Decorative shapes stay behind content; motion only follows actual scrolling. */
main.container, footer.container { position: relative; z-index: 1; }
.ambient-decor { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; --decor-progress: 0; }
.decor { position: absolute; width: 78px; height: 78px; opacity: .18; transform: translateY(calc(var(--decor-progress) * var(--travel))) rotate(calc(var(--decor-progress) * var(--turn))); }
.decor-star { left: -20px; top: 20%; fill: #7f9dff; --travel: -35px; --turn: 25deg; }
.decor-flower { right: -22px; top: 42%; fill: none; stroke: #a0b89a; stroke-width: 9; stroke-linecap: round; --travel: 38px; --turn: -20deg; }
.decor-ring { left: -28px; top: 76%; fill: none; stroke: #d89977; stroke-width: 5; --travel: -24px; --turn: 20deg; }
.decor-spark { right: 20px; top: 87%; width: 43px; height: 43px; fill: #baa55b; --travel: -45px; --turn: -25deg; }

/* Keep labels readable on the cream background while preserving the accent palette. */
.eyebrow, .chapter > span, .project-number, .skill > span,
.decision-list article > span { color: #5268b5; }
.case.dark .eyebrow, .case-outcome .eyebrow { color: var(--blue); }

.case-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-bottom: 2rem;
}

.case-gallery figure {
  margin: 0;
}

.case-gallery .gallery-wide {
  grid-column: 1 / -1;
}

.case-outcome {
  margin: 1rem 0 3rem;
  padding: 2.2rem;
  border-radius: 26px;
  background: var(--black);
}

.case-outcome h2 {
  color: #fff;
}

.case-outcome > p {
  max-width: 800px;
  color: #d8d9e4;
  font-size: .94rem;
}

.learning-note {
  max-width: 800px;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.2);
}

.learning-note b {
  color: var(--blue);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.learning-note p {
  margin: .4rem 0 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  line-height: 1.35;
}

.next-project-link {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1050px) {
  .hero-layout,
  .about,
  .section-heading,
  .case-layout {
    grid-template-columns: 1fr;
  }

  .hero-photo {
    margin-left: 0;
    width: min(100%, 380px);
  }

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

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

  .project-preview-featured,
  .project-list-heading,
  .additional-work {
    grid-template-columns: 1fr;
  }

  .additional-work p {
    grid-column: 1;
  }

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

  .case-facts {
    grid-template-columns: 1fr 1fr;
  }

  .split-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

  .decision-list article div {
    grid-template-columns: 1fr;
    gap: .65rem;
  }

  .carousel-frame,
  .single-image {
    min-height: 280px;
  }

  .free-carousel .carousel-frame {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .project-row { grid-template-columns: minmax(0, 1fr); }
  .project-row:not(.project-row-ready) .project-row-copy { min-height: 0; }
  .project-illustration { padding: 0 1rem 1.25rem; }
  .project-illustration img { max-width: 220px; }
  .decor { width: 50px; height: 50px; opacity: .12; }
  .decor-spark { right: -12px; }
  nav.container-fluid .language-item { margin-left: .55rem; padding-left: .55rem; }
  nav.container-fluid {
    padding: .7rem 1rem;
  }

  nav.container-fluid ul:nth-child(2) li:not(:last-child) {
    display: list-item;
  }

  nav.container-fluid { gap: .35rem; flex-wrap: wrap; }
  nav.container-fluid ul { margin: 0; }
  /* Keep the name and language control on one calm first row. Navigation gets its own row. */
  nav.container-fluid ul:first-child { min-width: 0; width: 100%; flex-basis: 100%; justify-content: flex-start; gap: 0; }
  nav.container-fluid ul:last-child { width: 100%; justify-content: flex-start; gap: .35rem; flex-wrap: wrap; }
  nav.container-fluid ul:last-child li { padding: .15rem .2rem; }
  nav.container-fluid a:not(.language-switch) { font-size: .8rem; }
  nav.container-fluid strong { font-size: .86rem; }
  .language-item { padding-left: 0; padding-right: 0; }
  .decision-list article { padding: 1.1rem; grid-template-columns: 28px minmax(0, 1fr); gap: .65rem; }
  .decision-list article div { grid-template-columns: 1fr; }

  main.container {
    padding-top: 1.6rem;
  }

  .hero {
    padding: 2.4rem 0 2.8rem;
  }

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

  .about {
    padding: 3rem 0;
  }

  .case {
    padding: 1rem;
    border-radius: 24px;
  }

  .carousel-frame,
  .single-image {
    min-height: 240px;
    border-radius: 20px;
  }

  .free-carousel .carousel-frame {
    min-height: 0;
    border-radius: 20px;
  }

  .free-carousel .carousel-frame img {
    border-radius: 20px;
  }

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

  .about-list div {
    grid-template-columns: 1fr;
  }

  .chapter {
    display: block;
  }

  .team-note {
    margin-top: -2rem;
  }

  .product-cases-entry,
  .product-index-cta {
    grid-template-columns: 1fr;
    display: grid;
    align-items: start;
  }

  .case-study-link {
    white-space: normal;
  }

  .product-index-hero {
    min-height: auto;
    padding: 3rem 0;
  }

  .product-index-hero h1 {
    font-size: clamp(2.5rem, 11vw, 3.6rem);
  }

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

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

  .project-row-media {
    min-height: 230px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .case-hero {
    padding: 3rem 0 2.5rem;
  }

  .case-hero h1 {
    font-size: clamp(2.4rem, 11vw, 3.5rem);
  }

  .case-facts,
  .role-grid,
  .case-gallery {
    grid-template-columns: 1fr;
  }

  .case-gallery .gallery-wide {
    grid-column: auto;
  }

  .workflow-list li {
    grid-template-columns: 36px 1fr;
  }

  .workflow-list span {
    grid-column: 2;
  }

  .decision-list article {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .case-outcome {
    padding: 1.35rem;
  }

  .project-preview-media {
    min-height: 280px;
  }

  .compact-card {
    min-height: 300px;
  }
}

/* Darken secondary copy on pale surfaces so it remains readable on small and large screens. */
.project-preview:not(.dark-card) p,
.project-preview:not(.dark-card) .project-status:not(.ready),
.case:not(.dark) p,
.case:not(.dark) li,
.case:not(.dark) dd,
.case:not(.dark) figcaption,
.skill p,
.about-list span,
.product-cases-entry p,
.additional-work p,
.case-prose p,
.case-prose li {
  color: #3f4652;
}

/* Reset framework list spacing; mobile header is a single row without the name. */
nav.container-fluid ul { list-style: none; }
nav.container-fluid li { list-style: none; }
nav.container-fluid strong { color: var(--ink); }
@media (max-width: 720px) {
  nav.container-fluid { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: .4rem; padding: .5rem .75rem; }
  nav.container-fluid ul:first-child,
  nav.container-fluid ul:last-child { display: flex; flex-wrap: nowrap; align-items: center; width: auto; flex-basis: auto; margin: 0; padding: 0; min-width: 0; }
  nav.container-fluid ul:first-child { flex: 0 0 auto; }
  nav.container-fluid ul:first-child > li:first-child { display: none; }
  nav.container-fluid ul:last-child { flex: 1 1 auto; gap: .15rem; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; }
  nav.container-fluid ul:last-child::-webkit-scrollbar { display: none; }
  nav.container-fluid ul li,
  nav.container-fluid ul .language-item { margin: 0; padding: 0; border: 0; flex: 0 0 auto; }
  nav.container-fluid ul li a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin: 0; padding: .4rem .5rem; white-space: nowrap; font-size: .8rem; line-height: 1.2; }
  nav.container-fluid ul li .language-switch { display: inline-grid; width:72px; min-width:72px; height:44px; padding:0; font-size:12px; }
  nav.container-fluid ul li a.nav-active { padding-inline: .7rem; }
}

.decor-desktop { display: none; }
.pipe-case .pipe-screen { margin: 2rem 0 3rem; }
.pipe-case .pipe-screen a { display: block; padding: clamp(.65rem, 2vw, 1.5rem); background: #e9e6df; border: 1px solid var(--line); border-radius: 22px; }
.pipe-case .pipe-screen img { border-radius: 10px; background: #fff; width: 100%; height: auto; }
.pipe-case .capture-note { max-width: 800px; font-size: .8rem; color: #505764; margin-bottom: 2rem; }
@media (min-width: 1051px) {
  .decor-desktop { display: block; }
  .decor-star { opacity: .34; width: 102px; height: 102px; }
  .decor-flower { opacity: .32; width: 98px; height: 98px; }
  .decor-ring { opacity: .38; }
  .decor-outline-star { left: 1%; top: 49%; fill: none; stroke: #7c8ed1; stroke-width: 3; opacity: .42; --travel: 28px; --turn: -18deg; }
  .decor-small-spark { right: 2%; top: 15%; width: 45px; height: 45px; fill: #dca56e; opacity: .42; --travel: -30px; --turn: 16deg; }
  .decor-outline-diamond { right: -.5%; top: 66%; width: 66px; height: 90px; fill: none; stroke: #9aad96; stroke-width: 3; opacity: .48; --travel: 24px; --turn: 12deg; }
  .decor-dot { left: 3%; top: 91%; width: 24px; height: 24px; fill: #7f9dff; opacity: .44; --travel: -22px; --turn: 0deg; }
}

@media (prefers-reduced-motion: reduce) {
  .decor, .project-row .project-status.ready:hover { transform: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}


/* v15 UX structure and accessibility refinements */
:root { --font-size: 16px; font-size: 16px; }
html { font-size: 16px; }
body { font-size: 1rem; }
.global-nav { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.global-nav > ul { margin:0; flex-wrap:nowrap; align-items:center; }
.global-nav a { min-height:44px; display:inline-flex; align-items:center; justify-content:center; }
.global-nav .brand-link { min-height:44px; }
.hero-copy { font-size:1.03rem; max-width:680px; }
.hero-actions { display:flex; flex-wrap:wrap; gap:.75rem; margin-top:1.5rem; align-items:center; }
.secondary-link { min-height:44px; display:inline-flex; align-items:center; padding:.72rem 1rem; border:1px solid var(--line); border-radius:999px; color:var(--ink); font-weight:800; text-decoration:none; background:rgba(255,255,255,.55); }
.secondary-link:hover { background:#fff; }
.work-heading { margin-top:4rem; }
.work-directions { display:grid; grid-template-columns:repeat(4,1fr); gap:.8rem; margin:1.5rem 0; }
.work-directions > div { display:grid; gap:.18rem; min-height:130px; padding:1rem; border:1px solid var(--line); border-radius:20px; background:rgba(255,255,255,.58); }
.work-directions b { font-family:Georgia,serif; font-size:1.45rem; color:var(--blue); }
.work-directions span { font-weight:850; }
.work-directions small { color:var(--muted); align-self:end; }
.featured-work-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:1rem; margin:1.2rem 0; }
.featured-case { min-height:300px; display:flex; flex-direction:column; padding:1.4rem; border-radius:26px; border:1px solid var(--line); background:linear-gradient(145deg,rgba(255,255,255,.82),rgba(233,238,255,.8)); color:inherit; text-decoration:none; transition:transform .2s ease,box-shadow .2s ease; }
.featured-case:hover { color:inherit; transform:translateY(-3px); box-shadow:0 18px 50px rgba(37,33,25,.1); }
.featured-case h3 { margin:.55rem 0 .7rem; font-family:Georgia,serif; font-size:clamp(2rem,3vw,3.1rem); letter-spacing:-.06em; }
.featured-case p { max-width:520px; }
.text-action { margin-top:auto; padding-top:1rem; font-weight:850; }
.all-cases-link { margin:0 0 3rem; }
.contact-section { display:grid; grid-template-columns:.34fr 1fr; gap:2rem; padding:4rem 0; border-top:1px solid var(--line); }
.contact-section h2 { margin:0 0 .8rem; font-family:Georgia,serif; font-size:clamp(2.2rem,4vw,4rem); letter-spacing:-.07em; }
.contact-section p { max-width:720px; }
.contact-name { color:var(--ink); font-weight:850; }
.published-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:1rem; }
.published-card,.upcoming-card { padding:1.45rem; border:1px solid var(--line); border-radius:26px; background:rgba(255,255,255,.7); }
.published-card { display:flex; flex-direction:column; min-height:480px; }
.published-card h3,.upcoming-card h3 { margin:.35rem 0 .8rem; font-family:Georgia,serif; font-size:clamp(2rem,3.2vw,3.4rem); letter-spacing:-.065em; }
.published-card .case-study-link { margin-top:auto; }
.mini-meta { margin:1.1rem 0 1.3rem; }
.mini-meta div { padding:.65rem 0; border-top:1px solid var(--line); }
.mini-meta dt { color:var(--muted); font-size:.7rem; font-weight:900; text-transform:uppercase; letter-spacing:.1em; }
.mini-meta dd { margin:.25rem 0 0; font-size:.9rem; color:var(--ink); }
.upcoming-heading { margin-top:4rem; }
.upcoming-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:1rem; }
.upcoming-card { min-height:300px; opacity:.86; }
.upcoming-card .project-status { margin-top:1rem; }
.case-facts-five { grid-template-columns:repeat(5,1fr); }
.process-flow { display:flex; flex-wrap:wrap; gap:.7rem; align-items:center; margin-top:1.5rem; }
.process-flow span { padding:.65rem .8rem; border:1px solid var(--line); border-radius:999px; background:rgba(255,255,255,.7); font-size:.86rem; font-weight:800; }
.process-flow i { color:var(--blue); font-style:normal; font-weight:900; }
.case-stage { display:grid; grid-template-columns:.85fr 1.15fr; gap:2rem; align-items:center; padding:3rem 0; border-top:1px solid var(--line); }
.case-stage.reverse { grid-template-columns:1.15fr .85fr; }
.case-stage.reverse > div { order:2; }
.case-stage.reverse > figure { order:1; }
.case-stage h2 { margin:.35rem 0 .8rem; font-family:Georgia,serif; font-size:clamp(2rem,3.6vw,3.7rem); letter-spacing:-.065em; }
.case-stage figure { margin:0; }
.case-stage img { width:100%; border:1px solid rgba(18,18,18,.16); border-radius:22px; background:#fff; }
.case-stage figcaption { margin-top:.65rem; color:var(--muted); font-size:.82rem; line-height:1.5; }
.case-end-nav { display:flex; justify-content:space-between; gap:1rem; margin:2rem 0 4rem; padding-top:1.5rem; border-top:1px solid var(--line); }
.case-end-nav a { min-height:44px; display:inline-flex; align-items:center; font-weight:850; }
.carousel:focus-visible { outline:3px solid #405bb9; outline-offset:6px; border-radius:24px; }
@media (max-width: 900px) {
  .work-directions { grid-template-columns:repeat(2,1fr); }
  .published-grid,.featured-work-grid { grid-template-columns:1fr; }
  .case-facts-five { grid-template-columns:repeat(2,1fr); }
  .case-stage,.case-stage.reverse { grid-template-columns:1fr; }
  .case-stage.reverse > div,.case-stage.reverse > figure { order:initial; }
}
@media (max-width: 720px) {
  nav.container-fluid.global-nav { padding:.35rem .55rem; gap:0; overflow:hidden; }
  .global-nav > .brand-link { display:none; }
  .global-nav > ul { width:100%; display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.12rem; padding:0; }
  .global-nav li { margin:0; min-width:0; }
  .global-nav [data-section-nav] a { min-height:44px; width:100%; padding:.5rem .25rem; font-size:.72rem; white-space:nowrap; }
  .language-switch { min-width:72px !important; width:72px; }
  main.container { padding-left:1rem; padding-right:1rem; }
  p,li,dd,figcaption { font-size:max(1rem,16px); }
  .hero { padding:2.2rem 0 2.4rem; }
  .hero-layout { grid-template-columns:1fr; gap:1.7rem; }
  .hero-photo { width:min(78vw,340px); margin:0; }
  .hero h1 { font-size:clamp(2.5rem,12vw,4rem); }
  .section-heading,.about,.contact-section { grid-template-columns:1fr; gap:1rem; }
  .work-directions { grid-template-columns:1fr 1fr; }
  .work-directions > div { min-height:115px; }
  .featured-case { min-height:260px; }
  .chapter { align-items:flex-start; flex-direction:column; }
  .notes { grid-template-columns:1fr; }
  .case-layout { grid-template-columns:1fr; }
  .skills { grid-template-columns:1fr; }
  .case-facts-five { grid-template-columns:1fr; }
  .published-card { min-height:0; }
  .upcoming-grid { grid-template-columns:1fr; }
  .case-end-nav { flex-direction:column; }
  .process-flow { display:grid; grid-template-columns:1fr; }
  .process-flow i { transform:rotate(90deg); width:fit-content; margin:auto; }
  .carousel-controls button { min-width:44px; width:44px; height:44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition-duration:.001ms !important; }
}
