:root {
  --ground:       #FAFAFA;
  --card:         #FFFFFF;
  --tint:         #F4F4F5;

  --text:         #09090B;
  --text-2:       #475569;

  --action:       #FA9B01;
  --action-top:   #FDB23A;
  --action-press: #E28A00;
  --on-action:    #09090B;
  --action-ink:   #B45309;

  --accent:       #2563EB;
  --accent-deep:  #1D4ED8;
  --accent-soft:  #EFF4FF;

  --edge:         #8A8A93;
  --hairline:     #E4E4E7;

  --focus:        #2563EB;

  --font-heading: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body:    "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fs-caption: .75rem;
  --fs-small:   .875rem;
  --fs-body:    1rem;
  --fs-lede:    1.125rem;

  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem;
  --s-5: 1.5rem; --s-6: 2rem;  --s-7: 3rem;

  --r-control: 999px;
  --r-press:   16px;
  --r-art:     24px;
  --r-card:    2px;
  --r-box:     8px;

  --depth-fill:
    inset 0 1px 0 rgba(255, 255, 255, .45),
    inset 0 -2px 0 rgba(120, 60, 0, .22),
    0 1px 2px rgba(9, 9, 11, .14),
    0 8px 18px -8px rgba(250, 155, 1, .7);
  --depth-fill-hover:
    inset 0 1px 0 rgba(255, 255, 255, .5),
    inset 0 -2px 0 rgba(120, 60, 0, .22),
    0 2px 4px rgba(9, 9, 11, .14),
    0 12px 24px -10px rgba(250, 155, 1, .8);
  --depth-fill-press:
    inset 0 2px 5px rgba(120, 60, 0, .35),
    0 1px 1px rgba(9, 9, 11, .1);
  --depth-white:
    inset 0 1px 0 #FFFFFF,
    inset 0 -2px 0 rgba(9, 9, 11, .05),
    0 1px 2px rgba(9, 9, 11, .08),
    0 6px 16px -8px rgba(9, 9, 11, .22);
  --depth-white-hover:
    inset 0 1px 0 #FFFFFF,
    inset 0 -2px 0 rgba(9, 9, 11, .05),
    0 2px 4px rgba(9, 9, 11, .08),
    0 12px 24px -10px rgba(250, 155, 1, .45);
  --depth-white-press:
    inset 0 2px 5px rgba(9, 9, 11, .12);

  --hit: 44px;
  --bar-h: 54px;

  --dur: .18s;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  padding: var(--s-5);
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
ul[role="list"], ol { list-style: none; padding: 0; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
}

a, button, .tab, .btn, .filter, .link, .contact {
  cursor: pointer;
  touch-action: manipulation;
}

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
[tabindex="-1"]:focus { outline: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; top: var(--s-3); left: var(--s-3); z-index: 10;
  padding: var(--s-3) var(--s-5);
  border-radius: var(--r-control);
  background: var(--action); color: var(--on-action);
  font-weight: 600; text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus-visible { transform: none; }

.icon { width: 1.125rem; height: 1.125rem; flex: none; }

.box {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  width: min(100%, 62rem);
  margin-inline: auto;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-box);
  overflow: hidden;
}
@media (min-height: 36rem) and (min-width: 48rem) {
  .box { height: calc(100dvh - var(--s-5) * 2); }
}

.box__bar {
  position: absolute;
  inset: var(--s-3) 0 auto;
  z-index: 2;
  display: flex;
  justify-content: center;
  padding: 0 var(--s-4);
  pointer-events: none;
}

.box__bar::before {
  content: "";
  position: absolute;
  inset: calc(var(--s-3) * -1) 0 auto;
  height: calc(var(--bar-h) + var(--s-3) + var(--s-4));
  background: linear-gradient(rgba(255, 255, 255, .9) 40%, rgba(255, 255, 255, 0));
  pointer-events: none;
}

.tabs {
  position: relative;
  pointer-events: auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-1);
  width: min(100%, 30rem);
  padding: var(--s-1);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(9, 9, 11, .14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 12px 32px -14px rgba(9, 9, 11, .22);
}

.tab {
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  min-height: var(--hit);
  padding-inline: var(--s-2);
  border-radius: 999px;
  color: var(--text);
  font-size: var(--fs-body);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
@media (hover: hover) {
  .tab:not([aria-current]):hover { background: rgba(9, 9, 11, .06); }
}
.tab[aria-current="page"] {
  background: linear-gradient(var(--action-top), var(--action));
  color: var(--on-action);
  font-weight: 600;
  box-shadow: var(--depth-fill);
}
.tabs.has-pill .tab[aria-current="page"] { background: none; box-shadow: none; }

.tabs__pill {
  position: absolute;
  top: var(--s-1);
  bottom: var(--s-1);
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(var(--action-top), var(--action));
  box-shadow: var(--depth-fill);
  opacity: 0;
  pointer-events: none;
  transition:
    transform .5s cubic-bezier(.34, 1.36, .64, 1),
    width .5s cubic-bezier(.34, 1.36, .64, 1);
}

.box__body {
  overflow-x: hidden;
  overflow-y: auto;
  padding: clamp(var(--s-5), 4vw, var(--s-7));
  padding-top: calc(var(--s-3) + var(--bar-h) + var(--s-6));
}

.view[hidden] { display: none; }

#view-about:not([hidden]),
#view-contact:not([hidden]) { display: grid; align-items: center; min-height: 100%; }

.eyebrow {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin-bottom: var(--s-3);
}

.title {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.025em;
  margin-bottom: var(--s-4);
}
.title--sm {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  letter-spacing: -.02em;
  margin-bottom: 0;
}
.split .title--sm { margin-bottom: var(--s-2); }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 40ch;
  margin-bottom: var(--s-6);
  text-wrap: pretty;
}

.view__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3) var(--s-5);
  margin-bottom: var(--s-6);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--hairline);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--hit);
  padding: 0 var(--s-5);
  border: 1px solid var(--action-ink);
  border-radius: var(--r-control);
  background: var(--card);
  color: var(--action-ink);
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 600;
  letter-spacing: -.005em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--depth-white);
  transition:
    box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    transform .12s var(--ease);
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); box-shadow: var(--depth-white-hover); }
}
.btn:active { transform: translateY(1px); box-shadow: var(--depth-white-press); }

.btn--primary {
  border-color: var(--action-press);
  background: linear-gradient(var(--action-top), var(--action));
  color: var(--on-action);
  box-shadow: var(--depth-fill);
}
@media (hover: hover) { .btn--primary:hover { box-shadow: var(--depth-fill-hover); } }
.btn--primary:active {
  background: var(--action-press);
  box-shadow: var(--depth-fill-press);
}

.btn--small { padding: 0 var(--s-4); }

.group { margin-bottom: var(--s-6); }
.group__title {
  font-family: var(--font-body);
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: var(--s-4);
}

.split {
  display: grid;
  gap: var(--s-6);
  align-items: center;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: minmax(0, 1fr) 17rem; gap: var(--s-7); }
}

.art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: var(--s-5);
  border-radius: var(--r-art);
  background: var(--tint);
  border: 1px solid var(--hairline);
  overflow: hidden;
}
.art__img { width: 100%; height: 100%; object-fit: contain; }
.art__fallback { font-family: var(--font-heading); font-size: 3rem; font-weight: 700; color: var(--action-ink); }

.facts {
  display: grid;
  margin-bottom: var(--s-6);
  max-width: 38rem;
  border-top: 1px solid var(--hairline);
}
.fact {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-4);
  align-items: start;
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--hairline);
}
.fact__logo { width: 1.75rem; height: 1.75rem; margin-top: 2px; }
.fact__title { font-size: var(--fs-body); margin-bottom: 2px; }
.fact__text { color: var(--text-2); font-size: var(--fs-small); }

.actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }


.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}
.filter {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--hit);
  padding: 0 var(--s-4);
  border: 1px solid var(--action-ink);
  border-radius: var(--r-control);
  background: var(--card);
  color: var(--action-ink);
  font: inherit;
  font-size: var(--fs-body);
  font-weight: 500;
  box-shadow: var(--depth-white);
  transition:
    box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease),
    transform .12s var(--ease);
}
.filter__count {
  font-size: var(--fs-caption);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
@media (hover: hover) {
  .filter:not([aria-pressed="true"]):hover { transform: translateY(-1px); box-shadow: var(--depth-white-hover); }
}
.filter:active { transform: translateY(1px); box-shadow: var(--depth-white-press); }
.filter[aria-pressed="true"] {
  border-color: var(--action-press);
  background: var(--action);
  color: var(--on-action);
  font-weight: 600;
  box-shadow: var(--depth-fill-press);
}
.filter[aria-pressed="true"] .filter__count { color: var(--on-action); }

.projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: var(--s-4);
  margin: 0;
}
.project {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--card);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease);
}
@media (hover: hover) { .project:hover { border-color: var(--edge); } }

.project__shot {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--tint), #FFF4E0);
  border-bottom: 1px solid var(--hairline);
  overflow: hidden;
}
.project__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--s-3);
  font-family: var(--font-heading);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
  overflow-wrap: anywhere;
}
.project__shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity .3s var(--ease), transform .45s var(--ease);
}
.project__shot img.is-loaded { opacity: 1; }
@media (hover: hover) {
  .project:hover .project__shot img.is-loaded { transform: scale(1.04); }
}

img.icon, img.fact__logo, img.gauge__logo, img.tile__logo, img.contact__icon { object-fit: contain; }

.project__body {
  display: grid;
  align-content: start;
  gap: var(--s-1);
  flex: 1;
  padding: var(--s-4);
}
.project__tag {
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.project__name { font-size: var(--fs-body); }
.project__desc { font-size: var(--fs-small); color: var(--text-2); }
.project__links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: auto; padding-top: var(--s-3); }

.link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--hit);
  padding: 0 var(--s-4);
  border: 1px solid var(--action-ink);
  border-radius: var(--r-control);
  background: var(--card);
  color: var(--action-ink);
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--depth-white);
  transition:
    box-shadow var(--dur) var(--ease),
    transform .12s var(--ease);
}
.link .icon { width: 1rem; height: 1rem; }
@media (hover: hover) { .link:hover { transform: translateY(-1px); box-shadow: var(--depth-white-hover); } }
.link:active { transform: translateY(1px); box-shadow: var(--depth-white-press); }

.scale {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2) var(--s-4);
  font-size: var(--fs-small);
  color: var(--text-2);
}
.scale li { display: inline-flex; align-items: center; gap: var(--s-2); }
.scale__mark {
  width: 1.5rem; height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent) var(--fill), var(--hairline) 0);
}
.scale__mark--1 { --fill: 33%; }
.scale__mark--2 { --fill: 66%; }
.scale__mark--3 { --fill: 100%; }

.gauges {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-5) var(--s-4);
  margin: 0;
}
.gauge { display: grid; justify-items: center; text-align: center; }

.gauge__dial {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.5rem;
  aspect-ratio: 1;
  margin-bottom: var(--s-2);
}
.gauge__arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(135deg);
}
.gauge__track,
.gauge__value {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}
.gauge__track { stroke: var(--hairline); stroke-dasharray: 75 100; }
.gauge__value {
  stroke: var(--accent);
  animation: gauge-fill .6s var(--ease) both;
}
@keyframes gauge-fill { from { stroke-dasharray: 0 100; } }

.gauge__logo { width: 1.75rem; height: 1.75rem; }
.gauge__name { font-family: var(--font-heading); font-size: var(--fs-body); font-weight: 600; }
.gauge__level { font-size: var(--fs-caption); color: var(--text-2); }

.group-row { display: grid; gap: var(--s-5); }
@media (min-width: 40rem) { .group-row { grid-template-columns: 1fr 1fr; } }
.group-row .group { margin-bottom: 0; }

.tiles { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tile {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: var(--hit);
  padding: 0 var(--s-4) 0 var(--s-3);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  font-size: var(--fs-body);
  font-weight: 500;
}
.tile__logo { width: 1.5rem; height: 1.5rem; }

.contacts {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-3);
  max-width: 28rem;
}
.contact {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "icon label go" "icon value go";
  column-gap: var(--s-4);
  align-items: center;
  min-height: 4.5rem;
  padding: var(--s-3) var(--s-5);
  border: 1px solid var(--action-ink);
  border-radius: var(--r-press);
  background: var(--card);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--depth-white);
  transition:
    box-shadow var(--dur) var(--ease),
    transform .12s var(--ease);
}
@media (hover: hover) {
  .contact:hover { transform: translateY(-1px); box-shadow: var(--depth-white-hover); }
  .contact:hover .contact__go { transform: translate(2px, -2px); }
}
.contact:active { transform: translateY(1px); box-shadow: var(--depth-white-press); }
.contact__icon { grid-area: icon; width: 1.5rem; height: 1.5rem; color: var(--action-ink); }
.contact__label {
  grid-area: label;
  font-size: var(--fs-caption);
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-2);
}
.contact__value { grid-area: value; font-size: var(--fs-body); font-weight: 600; overflow-wrap: anywhere; }
.contact__go {
  grid-area: go;
  width: 1.125rem;
  height: 1.125rem;
  color: var(--action-ink);
  transition: transform var(--dur) var(--ease);
}

@media (prefers-contrast: more) {
  :root {
    --text-2:       #334155;
    --action-ink:   #9A3412;
    --action-press: #C2710A;
    --accent:       #1E40AF;
    --accent-deep:  #1E3A8A;
    --edge:         #52525B;
    --hairline:     #71717A;
  }
}

@media (forced-colors: active) {
  .tab[aria-current="page"],
  .filter[aria-pressed="true"],
  .btn--primary { forced-color-adjust: none; background: Highlight; color: HighlightText; }
  .tabs__pill { forced-color-adjust: none; background: Highlight; box-shadow: none; }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tabs { background: var(--card); }
}
@media (prefers-reduced-transparency: reduce) {
  .tabs { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--edge); }
  .box__bar::before { background: linear-gradient(var(--card) 60%, rgba(255, 255, 255, 0)); }
}
@media (prefers-contrast: more) {
  .tabs { background: var(--card); -webkit-backdrop-filter: none; backdrop-filter: none; border: 2px solid var(--edge); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
  .btn:hover, .btn:active, .filter:hover, .filter:active,
  .link:hover, .link:active, .contact:hover, .contact:active,
  .project:hover .project__shot img { transform: none !important; }
}

@media (min-width: 48rem) and (max-height: 46rem) {
  .view__head { margin-bottom: var(--s-5); }
  .gauges { gap: var(--s-4); }
  .gauge__dial { width: 4.75rem; margin-bottom: var(--s-1); }
  .group { margin-bottom: var(--s-5); }
}

@media (max-width: 47.99rem) {
  body { padding: var(--s-3); }
  .box__bar {
    position: fixed;
    inset: auto 0 calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
    padding: 0 var(--s-3);
  }
  .box__bar::before {
    inset: auto 0 calc((var(--s-3) + env(safe-area-inset-bottom, 0px)) * -1);
    height: calc(var(--bar-h) + var(--s-3) * 2 + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, rgba(250, 250, 250, .92) 45%, rgba(250, 250, 250, 0));
  }
  .box__body {
    padding-top: var(--s-5);
    padding-bottom: calc(var(--bar-h) + var(--s-7) + env(safe-area-inset-bottom, 0px));
  }
  .tab { font-size: var(--fs-small); padding-inline: var(--s-1); }
  .gauges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art { max-width: 14rem; margin-inline: auto; }
  #view-about .art { order: -1; }
  .contacts { max-width: none; }
}
