:root {
  color-scheme: dark;
  --background: #101815;
  --text: #f3f6ed;
  --muted: #b0bdb3;
  --line: #35433b;
  --accent: #d3f998;
  --display: "Avenir Next", system-ui, sans-serif;
  font-family: system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { color: var(--background); background: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }

.shell { width: min(100% - 6rem, 72rem); margin-inline: auto; }
.site-header {
  min-height: 5.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.brand, .header-actions { display: flex; align-items: center; }
.brand {
  gap: .75rem;
  font: 700 1.25rem/1 var(--display);
  letter-spacing: -.035em;
  text-decoration: none;
}
.brand-mark {
  width: 1.35rem;
  aspect-ratio: 1;
  display: grid;
  grid-template: repeat(2, 1fr) / repeat(2, 1fr);
  gap: 2px;
  transform: rotate(12deg);
}
.brand-mark i { background: var(--accent); border-radius: 65% 65% 20% 65%; }
.brand-mark i:nth-child(2) { transform: rotate(90deg); }
.brand-mark i:nth-child(3) { transform: rotate(-90deg); }
.brand-mark i:nth-child(4) { transform: rotate(180deg); }
.header-actions { gap: clamp(1.25rem, 4vw, 3rem); }
.header-projects, .site-footer a, .back-link {
  font-size: .9375rem;
  text-decoration: none;
  color: var(--muted);
}
.header-projects:hover, .site-footer a:hover, .back-link:hover { color: var(--text); }
.languages {
  display: flex;
  gap: .125rem;
  padding: .1875rem;
  border: 1px solid var(--line);
  border-radius: 100vw;
}
.languages a {
  min-width: 2.45rem;
  padding: .47rem .5rem;
  border-radius: 100vw;
  text-align: center;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1;
  color: var(--muted);
}
.languages a:hover { color: var(--text); }
.languages a[aria-current] { color: #172114; background: var(--accent); }
.skip-link {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 3;
  transform: translateY(calc(-100% - 1rem));
  background: var(--accent);
  color: var(--background);
  padding: .65rem .9rem;
}
.skip-link:focus { transform: none; }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(13rem, 1fr);
  align-items: end;
  gap: 1.65rem 2.5rem;
  padding-block: clamp(4.5rem, 9.5vw, 8rem) clamp(4rem, 8vw, 6.5rem);
}
.eyebrow, .section-label {
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .075em;
  line-height: 1.4;
  text-transform: uppercase;
}
.eyebrow { color: var(--accent); }
.intro .eyebrow { grid-column: 1 / -1; }
.intro h1, .case-intro h1 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .96;
}
.intro h1 { font-size: clamp(3.1rem, 7.35vw, 6.5rem); max-width: 12ch; }
.intro-description {
  color: var(--muted);
  max-width: 24rem;
  line-height: 1.55;
  font-size: clamp(1.05rem, 1.65vw, 1.25rem);
}
.section-label { color: var(--muted); }
.projects { padding-bottom: clamp(4rem, 8vw, 7rem); scroll-margin-top: 1.25rem; }
.projects .section-label { margin-bottom: 1.25rem; }
.featured {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  min-height: 25rem;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #477362;
  border-radius: 1.5rem;
  background: #193c30;
  text-decoration: none;
}
.featured-copy {
  padding: clamp(1.75rem, 4.25vw, 3.75rem);
  position: relative;
  z-index: 1;
  align-self: center;
}
.project-identity { display: flex; align-items: center; gap: .9rem; margin-bottom: 1.45rem; }
.project-identity .eyebrow { color: #d2e7d8; }
.app-icon { border-radius: .9rem; flex: none; box-shadow: 0 4px 14px #06120d3b; }
.featured h3 {
  font: 700 clamp(3rem, 6.65vw, 5.7rem)/.95 var(--display);
  letter-spacing: -.055em;
}
.featured-description {
  color: #d9e8dd;
  max-width: 25rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.5;
  margin-top: 1.1rem;
}
.featured-action, .button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 2.85rem;
  padding: .65rem 1rem;
  border: 1px solid #749686;
  border-radius: 999px;
  font-size: .9375rem;
  font-weight: 650;
  line-height: 1.25;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.featured-action { margin-top: 1.6rem; }
.featured:hover .featured-action, .featured:focus-visible .featured-action {
  color: #172114;
  border-color: var(--accent);
  background: var(--accent);
}
.featured-art {
  position: relative;
  min-height: 22rem;
  background:
    radial-gradient(ellipse at 60% 75%, #abd791 0%, #50866c 44%, #244e3e 74%, #193c30 100%);
}
.featured-art::before {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  top: 4%;
  aspect-ratio: 1;
  border: 1px solid #d5f7c246;
  border-radius: 50%;
  box-shadow: 0 0 0 1.65rem #d5f7c218, 0 0 0 3.5rem #d5f7c211;
}
.cover-shot {
  width: 46%;
  height: auto;
  position: absolute;
  border-radius: 1.15rem;
  border: 1px solid #f5ffe481;
  box-shadow: 0 1.25rem 3rem #05241966;
  transition: transform .24s ease;
}
.cover-shot-discover { top: 12%; left: 8%; transform: rotate(-9deg); }
.cover-shot-match { top: 22%; left: 49%; transform: rotate(10deg); }
.featured:hover .cover-shot-discover { transform: translateY(-.35rem) rotate(-8deg); }
.featured:hover .cover-shot-match { transform: translateY(-.35rem) rotate(9deg); }

.case-hero { padding-block: 2rem clamp(2.5rem, 5.5vw, 4.5rem); }
.back-link { text-decoration: underline; text-underline-offset: .3em; }
.case-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 1.5rem 3rem;
  padding-top: clamp(3.5rem, 7vw, 6rem);
}
.case-intro h1 { font-size: clamp(4.5rem, 12vw, 10.2rem); margin-top: .75rem; }
.case-summary > p { line-height: 1.55; color: var(--muted); font-size: clamp(1.05rem, 1.8vw, 1.25rem); }
.case-actions { display: flex; flex-wrap: wrap; gap: .625rem; margin-top: 1.25rem; }
.button { text-decoration: none; }
.button.primary { color: #172114; border-color: var(--accent); background: var(--accent); }
.button.primary:hover { color: var(--text); border-color: #749686; background: #224437; }
.button.quiet:hover { border-color: var(--accent); color: var(--accent); }
.product-gallery {
  padding: clamp(1.25rem, 3.8vw, 3rem);
  border-radius: 1.5rem;
  background: #193c30;
  border: 1px solid #477362;
}
.product-gallery .section-label { color: #d2e7d8; margin-bottom: 1.25rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 3vw, 2.5rem); }
.gallery-grid figure { min-width: 0; }
.gallery-grid img {
  width: 100%;
  height: clamp(15rem, 39vw, 32rem);
  object-fit: contain;
  object-position: center;
  background: #285543;
  border-radius: 1rem;
}
.gallery-grid figcaption { margin-top: .8rem; color: #ecf4ee; font-size: .9375rem; line-height: 1.35; }
.role, .build, .stack {
  display: grid;
  grid-template-columns: minmax(10rem, .7fr) minmax(0, 2fr);
  gap: 1.25rem 2.5rem;
  padding-block: clamp(2.25rem, 6vw, 4.75rem);
  border-bottom: 1px solid var(--line);
}
.role { margin-top: clamp(1rem, 3vw, 2.75rem); }
.role > p {
  font: 650 clamp(1.65rem, 3.5vw, 2.65rem)/1.2 var(--display);
  letter-spacing: -.035em;
  max-width: 31ch;
}
.stories { display: grid; gap: 2rem; }
.case-story h3 { font: 650 clamp(1.3rem, 2.15vw, 1.7rem)/1.2 var(--display); margin-bottom: .45rem; }
.case-story p, .stack dd { color: var(--muted); font-size: 1.05rem; line-height: 1.65; }
.case-story p { max-width: 65ch; }
.stack dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: -.25rem 0 0; gap: 1.35rem 2rem; }
.stack dt { font-weight: 650; margin-bottom: .25rem; }
.stack { border-bottom: 0; }
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-block: 1.65rem 2.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .9375rem;
}

@media (max-width: 58rem) {
  .shell { width: calc(100% - 3rem); }
  .intro { grid-template-columns: 1fr; }
  .intro h1 { max-width: 15ch; font-size: clamp(3.1rem, 9vw, 6rem); }
}
@media (max-width: 42rem) {
  .shell { width: calc(100% - 2rem); }
  .site-header { min-height: 4.5rem; }
  .header-actions { gap: 1rem; }
  .intro { padding-block: 3.5rem; gap: 1.25rem; }
  .intro h1 { font-size: clamp(2.3rem, 9.8vw, 4.15rem); }
  .featured { grid-template-columns: 1fr; min-height: 0; }
  .featured-copy { padding: 1.5rem; }
  .featured-art { min-height: clamp(15rem, 58vw, 22rem); }
  .cover-shot { width: 42%; }
  .cover-shot-discover { left: 12%; }
  .featured-art::before { top: 2%; }
  .case-intro, .role, .build, .stack { grid-template-columns: 1fr; }
  .case-intro h1 { font-size: clamp(3.55rem, 13vw, 6rem); }
  .gallery-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .gallery-grid img { height: min(27rem, 112vw); }
}
@media (max-width: 21rem) {
  .header-projects { display: none; }
  .stack dl { grid-template-columns: 1fr; }
  .project-identity .eyebrow { letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
