/* Safi Solutions: shared site styles (landing, projects, products, websites, studio, TheTradingDesk, about, contact).
   Same cabinet as before: a dark rail, charcoal desk, hairline rules, DM Sans with IBM Plex Mono labels and the
   pale-blue accent. The two strands of the logo, brushed silver and Safi blue, carry through as the thread colours. */
:root {
  --bg: #181b1f;
  --rail: #101215;
  --surface: #1f2328;
  --surface-2: #252a30;
  --line: #383d44;
  --line-2: #2a2f35;
  --text: #eceef0;
  --muted: #a3aab3;
  --faint: #7d8691;
  --accent: #b8d8fa;
  --blue: #4f8fd6;
  --silver: #d0d6de;
  --ink: #172029;
  --font: "DM Sans", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --rail-w: 230px;
  --top-h: 59px;
  --pad: clamp(20px, 3vw, 44px);
  color-scheme: dark;
  font-family: var(--font);
  font-size: 15px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body {
  position: relative;
  isolation: isolate;
}
.particle-layer {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
  contain: layout paint;
  display: block !important;
  visibility: visible !important;
}
.particle-layer i {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c);
  opacity: var(--o);
  box-shadow: 0 0 var(--glow) var(--c);
  animation: particleFloat var(--d) linear infinite;
  animation-delay: var(--delay);
  will-change: transform;
}
@keyframes particleFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(0.72);
  }
  100% {
    transform: translate3d(var(--drift), -138vh, 0) scale(1.15);
  }
}

/* Mobile home: same thread system, re-composed vertically for a phone. */
@media (max-width: 760px) {
  .page-home .hero {
    min-height: calc(100svh - 66px);
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(430px, 1fr);
    gap: 14px;
    align-items: start;
    padding: 28px 10px 30px;
    overflow: hidden;
  }

  .page-home .threads {
    display: block;
    z-index: -1;
  }

  .page-home .hero-copy {
    grid-column: 1;
    grid-row: 1;
    width: calc(100% - 16px);
    max-width: 520px;
    margin: 0 auto;
    padding: 0 8px;
  }

  .page-home .hero-copy .micro {
    font-size: 9.5px;
  }

  .page-home .hero h1 {
    margin-top: 14px;
    margin-bottom: 18px;
  }

  .page-home .hero-lede {
    max-width: 390px;
    font-size: 14.5px;
    line-height: 1.52;
  }

  .page-home .hero-cta {
    margin-top: 22px;
  }

  .page-home .doors {
    grid-column: 1;
    grid-row: 2;
    align-self: center;
    justify-self: end;
    width: min(48vw, 228px);
    max-width: none;
    margin: 8px 0 0;
    border-top: 1px solid var(--line);
    background: rgba(16, 18, 21, 0.46);
    position: relative;
    z-index: 1;
  }

  .page-home .door {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    min-height: 58px;
    padding: 9px 8px 9px 14px;
  }

  .page-home .door-body b {
    font-size: clamp(16px, 4.35vw, 19px);
    line-height: 1.12;
    white-space: nowrap;
  }

  .page-home .door-body small {
    font-size: clamp(9.5px, 2.55vw, 11.5px);
    line-height: 1.35;
    margin-top: 3px;
  }

  .page-home .door-count,
  .page-home .door .arrow {
    display: none;
  }

  .page-home .door::before {
    left: -5px;
  }

  .page-home .hero-hint {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .particle-layer i {
    animation: none !important;
    opacity: var(--o) !important;
  }
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2,
h3 {
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.micro {
  font: 500 11px/1.5 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 200;
  background: #fff;
  color: #111;
  padding: 12px 16px;
  border-radius: 3px;
}
.skip-link:focus {
  top: 16px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- buttons + links */
.button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid #64707c;
  border-radius: 3px;
  background: #d1dbe5;
  color: #1b252e;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.button::before {
  content: "";
  position: absolute;
  inset: -2px auto -2px -45%;
  width: 32%;
  z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  transform: skewX(-18deg);
  transition: left 0.6s ease;
}
.button:hover {
  background: #f1f4f7;
}
.button:hover::before {
  left: 125%;
}
.button.ghost {
  background: transparent;
  color: var(--text);
  border-color: #505963;
}
.button.ghost:hover {
  border-color: var(--accent);
  color: #fff;
  background: rgba(184, 216, 250, 0.06);
}
.button.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}
.arrow {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
}
a:hover > .arrow,
button:hover > .arrow {
  transform: translateX(3px);
}
.underlined {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
  font-size: 14px;
}
.underlined:hover {
  color: var(--accent);
}

/* ---------------------------------------------------------------- rail (desktop) + mobile header */
.cabinet-rail {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  padding: 28px 22px 18px;
  background: var(--rail);
  border-right: 1px solid var(--line);
}
.brand {
  display: block;
  width: 156px;
}
.rail-intro {
  margin: 20px 0 22px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.primary-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.primary-nav a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 -12px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 14.5px;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}
.primary-nav a:hover {
  background: #242a31;
  transform: translateX(3px);
}
.primary-nav a[aria-current] {
  background: #d0d6de;
  color: var(--ink);
}
.primary-nav a span {
  font: 500 11px var(--mono);
  color: inherit;
  opacity: 0.8;
}
.primary-nav .nav-rule {
  height: 1px;
  margin: 10px 0;
  background: var(--line);
}
.primary-nav a.nav-ttd {
  color: #d9f8f3;
}
.primary-nav a.nav-ttd span {
  color: #5dd9cc;
  font-size: 8.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
}
.primary-nav a.nav-ttd[aria-current],
.primary-nav a.nav-ttd[aria-current] span {
  color: var(--ink);
}
.rail-contact {
  margin-top: 16px;
}
.rail-contact .button {
  width: 100%;
}
.rail-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 8px;
  font: 500 10px/1.7 var(--mono);
  letter-spacing: 0.06em;
  color: #8f99a4;
}
.rail-footer b {
  font-weight: 500;
  color: var(--accent);
}
.mobile-header {
  display: none;
}
main {
  position: relative;
  z-index: 2;
  margin-left: var(--rail-w);
  min-height: 100vh;
  outline: 0;
}
.workspace-top {
  height: var(--top-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 var(--pad);
  border-bottom: 1px solid var(--line);
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.workspace-top a {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.workspace-top a:hover {
  color: var(--accent);
}
.workspace-top .clock b {
  color: var(--text);
  font-weight: 500;
}

/* ---------------------------------------------------------------- page shell + headings */
.page {
  max-width: 1480px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 56px) var(--pad);
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 26px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}
.page-head h1 {
  font-size: clamp(42px, 5.6vw, 76px);
  line-height: 0.98;
  margin-top: 10px;
}
.page-head p.lead {
  max-width: 560px;
  font-size: 16.5px;
  color: var(--muted);
}
.page-head p.lead.short {
  font-size: 15.5px;
  line-height: 1.55;
  text-align: right;
}
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.sec-head h2 {
  font-size: clamp(32px, 3.6vw, 50px);
  margin-top: 8px;
}
.rule {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

/* ---------------------------------------------------------------- landing: hero */
.hero {
  position: relative;
  min-height: min(calc(100svh - var(--top-h)), 860px);
  display: grid;
  grid-template-columns: minmax(560px, 600px) minmax(300px, 500px) minmax(340px, 390px);
  justify-content: center;
  gap: 0;
  align-items: center;
  padding: clamp(34px, 5vw, 70px) var(--pad) clamp(40px, 5vw, 64px);
  overflow: hidden;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
}
.threads {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse 48% 62% at 20% 48%, rgba(24, 27, 31, 0.85), transparent 75%);
}
.hero-copy {
  grid-column: 1;
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 600px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-copy .micro {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.hero-copy .micro::before {
  display: none;
}
.hero h1 {
  margin: 18px 0 22px;
  font-size: clamp(68px, 5.4vw, 100px);
  line-height: 0.94;
  letter-spacing: -0.055em;
  font-weight: 500;
}
.hero h1:not(.hero-title-pyramid) > span {
  display: block;
  color: transparent;
  background: linear-gradient(
    95deg,
    var(--silver) 0%,
    #f6f8fa 30%,
    var(--accent) 62%,
    var(--blue) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-title-pyramid {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: auto;
  max-width: none;
  margin: 18px auto 22px;
  line-height: 0.91;
  overflow: visible;
}
.hero-title-pyramid .hero-line {
  display: block;
  width: auto;
  max-width: none;
  white-space: nowrap;
  text-align: center;
  color: var(--text);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  overflow: visible;
}
.hero-title-pyramid .hero-line-1 {
  font-size: 0.96em;
  color: transparent;
  background: linear-gradient(
    95deg,
    var(--silver) 0%,
    #f6f8fa 30%,
    var(--accent) 62%,
    var(--blue) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-title-pyramid .hero-line-2 {
  font-size: 0.84em;
  margin-top: 0.05em;
}
.hero-title-pyramid .hero-line-3 {
  font-size: 0.74em;
  margin-top: 0.08em;
  color: transparent;
  background: linear-gradient(
    95deg,
    var(--silver) 0%,
    #f6f8fa 30%,
    var(--accent) 62%,
    var(--blue) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
}
.hero-title-pyramid .hero-made {
  display: inline !important;
  color: transparent;
  background: linear-gradient(95deg, #f6f8fa 10%, var(--accent) 62%, var(--blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  padding-right: 0.1em;
  margin-right: -0.1em;
}
.hero-lede {
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(16px, 1.3vw, 18.5px);
  line-height: 1.6;
  color: #c4cad1;
  text-align: center;
}
@media (min-width: 1181px) {
  .page-home .hero-lede {
    max-width: 560px;
  }
}
.hero-lede b {
  color: var(--text);
  font-weight: 600;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 30px;
}
.hero-hint {
  position: absolute;
  left: var(--pad);
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  pointer-events: none;
  transition: opacity 0.6s;
}
.hero-hint i {
  width: 34px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--faint));
}
.hero.touched .hero-hint {
  opacity: 0;
}

/* the four doors each lane of thread runs into */
.doors {
  grid-column: 3;
  position: relative;
  align-self: center;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: rgba(16, 18, 21, 0.55);
}
.door {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 4px 12px;
  padding: 13px 16px 13px 18px;
  border-bottom: 1px solid var(--line);
  transition:
    background 0.25s,
    padding 0.25s;
}
.door::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 9px;
  height: 9px;
  margin-top: -4.5px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 0 0 1.5px var(--lane-c, #5f6b77);
  transition:
    box-shadow 0.25s,
    background 0.25s;
}
.door:hover,
.door:focus-visible,
.door.lit {
  background: rgba(184, 216, 250, 0.06);
  padding-left: 24px;
}
.door:hover::before,
.door.lit::before {
  background: var(--accent);
  box-shadow:
    0 0 0 1.5px var(--accent),
    0 0 14px 2px rgba(184, 216, 250, 0.55);
}
.door-no {
  font: 500 11px var(--mono);
  color: var(--faint);
}
.door-body b {
  display: block;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.door-body small {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.door-count {
  font: 500 11.5px var(--mono);
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}
.door-count b {
  display: block;
  font: 500 20px var(--font);
  letter-spacing: -0.03em;
  color: var(--text);
}
.door-ttd {
  background: linear-gradient(90deg, rgba(60, 139, 130, 0.1), transparent 70%);
}
.door-ttd .door-body b {
  color: #d9f8f3;
}
.door-ttd .door-count,
.door-ttd .door-no {
  color: #5dd9cc;
}
.door-ttd::before {
  --lane-c: #4b8d84;
}
.door[href="/shorecrest/"] {
  background: linear-gradient(90deg, rgba(79, 143, 214, 0.1), transparent 70%);
}
.door[href="/shorecrest/"] .door-body b,
.door[href="/shorecrest/"] .door-count {
  color: #b8d8fa;
}
.door[href="/shorecrest/"]::before {
  --lane-c: var(--blue);
}
.door .arrow {
  color: var(--muted);
}
.door:hover .arrow,
.door.lit .arrow {
  color: var(--accent);
  transform: translateX(3px);
}

/* ---------------------------------------------------------------- about page */
.about-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: clamp(30px, 4vw, 52px);
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: clamp(28px, 5vw, 76px);
  align-items: start;
  max-width: 1100px;
}
.portrait {
  position: relative;
  padding: 10px 10px 14px;
  background: #eceae4;
  transform: rotate(-2.5deg);
  box-shadow: 4px 12px 26px rgba(0, 0, 0, 0.4);
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.portrait:hover {
  transform: rotate(0deg) translateY(-4px);
}
.portrait img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center 9%;
  filter: saturate(0.7) contrast(1.02);
  transition: filter 0.5s;
}
.portrait:hover img {
  filter: none;
}
.portrait figcaption {
  padding: 12px 4px 0;
  font: 500 10px/1.65 var(--mono);
  letter-spacing: 0.06em;
  color: #4f5b5a;
}
.about-copy h1 {
  font-size: clamp(40px, 4.4vw, 62px);
  margin: 10px 0 24px;
}
.about-copy .hero-cta {
  margin-top: 28px;
}
.about-copy > p:not(.micro) {
  max-width: 640px;
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.8;
  color: #c4cad1;
}
.about-copy > p.note {
  font-size: 14px;
  color: var(--muted);
  border-left: 2px solid var(--blue);
  padding-left: 14px;
  margin-top: 22px;
}
.about-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 26px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--line);
}
.about-facts div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.about-facts dt {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.about-facts dd {
  margin: 0;
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------------------------------------------------------- contact page */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 76px);
  padding-top: clamp(8px, 2vw, 24px);
}
.contact-head h1 {
  font-size: clamp(40px, 4.4vw, 62px);
  margin: 10px 0 18px;
}
.contact-head p {
  color: var(--muted);
  max-width: 400px;
}
.contact-head .mail {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 16px;
  border-bottom: 1px solid #75889a;
  padding-bottom: 4px;
}
.contact-head .mail:hover {
  color: var(--accent);
}
.inquiry-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 20px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.form-field.full {
  grid-column: 1 / -1;
}
.form-field label {
  font-size: 13px;
  color: #bac3cd;
}
.form-field em {
  font-style: normal;
  color: var(--accent);
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid #444d57;
  border-radius: 3px;
  background: #22282e;
  color: #eff3f6;
  padding: 12px 13px;
  font-size: 15px;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.form-field textarea {
  min-height: 130px;
  resize: vertical;
}
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #7f8b97;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(184, 216, 250, 0.15);
}
.inquiry-form .button {
  grid-column: 1 / -1;
  justify-self: start;
  min-width: 220px;
}
.form-foot {
  grid-column: 1 / -1;
  font-size: 13px;
  color: var(--faint);
}

/* ---------------------------------------------------------------- footer */
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 26px var(--pad);
  border-top: 1px solid var(--line);
  font: 500 11px var(--mono);
  letter-spacing: 0.06em;
  color: #8e98a3;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.site-footer a {
  color: #c3cbd4;
}
.site-footer a:hover {
  color: var(--accent);
}

/* ---------------------------------------------------------------- projects: logo tiles (the original layout) */
.tiles {
  display: grid;
  gap: 26px 20px;
}
.tiles.featured {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tiles.wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.tiles.wall .tile {
  flex: 0 1 calc((100% - 40px) / 3);
}
.tile {
  position: relative;
  min-width: 0;
}
.tile-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 250px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 6px;
  background: var(--identity, #232a30);
  transition:
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.45s,
    border-color 0.3s;
}
.wall .tile-cover {
  height: 170px;
  padding: 16px;
}
.tile-cover::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 3px;
  pointer-events: none;
  transition: border-color 0.3s;
}
.tile-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(255, 255, 255, 0.12),
    transparent 42%
  );
  opacity: 0;
  transition: opacity 0.3s;
}
.tile-cover img {
  position: relative;
  z-index: 1;
  width: min(80%, 500px);
  max-height: 72%;
  object-fit: contain;
  transition: transform 0.35s ease;
}
.wall .tile-cover img {
  width: min(84%, 340px);
  max-height: 76%;
}
.tile-cover.raster img {
  width: min(92%, 590px);
  max-height: 82%;
  border-radius: 3px;
}
.wall .tile-cover.raster img {
  width: min(94%, 390px);
  max-height: 84%;
}
.tile:hover .tile-cover,
.tile-cover:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42);
  border-color: rgba(255, 255, 255, 0.12);
}
.tile:hover .tile-cover::before {
  border-color: rgba(255, 255, 255, 0.14);
}
.tile:hover .tile-cover::after {
  opacity: 1;
}
.tile:hover .tile-cover img,
.tile-cover:focus-visible img {
  transform: scale(1.035);
}
.tile-badge {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 2;
  font: 500 10px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 4px 7px 3px;
  border-radius: 3px;
  background: #c9f23a;
  color: #0d1a0f;
}
.tile-cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 1px 0;
}
.tile-cap a {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.tile-cap a:hover {
  color: var(--accent);
}
.tile-cap span {
  font: 400 11.5px var(--mono);
  color: var(--muted);
  text-align: right;
}
.subhead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin: clamp(38px, 4.5vw, 58px) 0 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.subhead h2 {
  font-size: 22px;
  letter-spacing: -0.02em;
}
.subhead span {
  font: 500 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.noscript-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 20px;
}
.noscript-links a {
  border-bottom: 1px solid currentColor;
}

/* the detail view (/projects/#motoratlas) */
.detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: clamp(26px, 3.4vw, 40px);
  font: 500 13px var(--mono);
  color: var(--muted);
}
.detail-toolbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s;
}
.detail-toolbar a:hover {
  color: var(--accent);
}
.detail-toolbar div {
  display: flex;
  gap: 24px;
}
a:hover > .arrow.back {
  transform: translateX(-3px);
}
.detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px 40px;
  flex-wrap: wrap;
  margin-bottom: clamp(24px, 3vw, 34px);
}
.detail-head h1 {
  font-size: clamp(40px, 4.6vw, 64px);
  margin: 10px 0 14px;
}
.detail-head .copy {
  max-width: 660px;
  font-size: 16.5px;
  line-height: 1.7;
  color: #c4cad1;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.detail-actions .button svg:not(.arrow) {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.detail-screen {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #0e1013;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.screen-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line-2);
  background: #14171a;
}
.screen-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2f353c;
}
.screen-url {
  margin-left: 12px;
  flex: 1;
  max-width: 420px;
  height: 24px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border-radius: 12px;
  background: #1d2126;
  font: 500 12px var(--mono);
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
}
.screen-url svg {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}
.detail-view {
  position: relative;
  display: block;
  overflow: hidden;
}
.detail-view img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.detail-view::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at var(--mx, 50%) var(--my, 50%),
    rgba(205, 230, 255, 0.12),
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.3s;
}
.detail-view:hover::after {
  opacity: 1;
}
.detail-view:hover img {
  transform: scale(1.01);
}
.detail-foot {
  margin-top: 14px;
  font: 500 12px var(--mono);
  color: var(--faint);
}
.sheet-dialog .sd-copy {
  font-size: 15px;
  color: #c4cad1;
}

/* ---------------------------------------------------------------- website cards: client logos */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 30px);
}
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  align-items: start;
  padding: 16px 2px 0;
}
.card-body h2 {
  font-size: 22px;
  letter-spacing: -0.03em;
}
.card-body p {
  grid-column: 1 / -1;
  font-size: 15px;
  color: #bfc6cd;
  max-width: 620px;
}
.card-body .card-kind {
  grid-column: auto;
  font: 500 11px var(--mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 5px;
}
.card-links {
  display: flex;
  gap: 8px;
  align-items: center;
}
.site-cover {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 370px;
  padding: 44px;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #15191d;
  transition:
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.45s;
}
.site-cover::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 3px;
  pointer-events: none;
}
.site-cover::after {
  content: "Visit website";
  position: absolute;
  right: 26px;
  bottom: 24px;
  font: 500 11px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cover-ink, #dfe6ec);
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.3s,
    transform 0.3s;
}
.site-cover img {
  position: relative;
  z-index: 1;
  width: min(72%, 360px);
  max-height: 190px;
  object-fit: contain;
  transition: transform 0.35s ease;
}
.card:hover .site-cover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4);
}
.card:hover .site-cover img {
  transform: scale(1.04);
}
.card:hover .site-cover::after,
.site-cover:focus-visible::after {
  opacity: 0.85;
  transform: none;
}
.site-elizabeth {
  --cover-ink: #5a4636;
  border-color: rgba(79, 57, 42, 0.25);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(135deg, #eee5d8, #d9c7b1);
}
.site-elizabeth::before {
  border-color: rgba(79, 57, 42, 0.16);
}
.site-elizabeth img {
  width: min(88%, 460px);
  max-height: 245px;
  filter: drop-shadow(0 10px 20px rgba(58, 42, 31, 0.12));
}
.site-baker {
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.12), transparent 35%),
    linear-gradient(135deg, #202a33, #11171c);
}
.site-baker img {
  width: min(78%, 390px);
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35));
}
.site-wordmark {
  position: relative;
  z-index: 1;
  font:
    italic 500 clamp(26px, 3vw, 38px) / 1.15 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: 0.01em;
  text-align: center;
  color: var(--cover-ink, #eef2f5);
}

/* ---------------------------------------------------------------- product shelves */
.shelves {
  display: grid;
  gap: 22px;
}
.shelf {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(20px, 3vw, 44px);
  align-items: center;
  padding: clamp(20px, 2.6vw, 32px);
  border: 1px solid rgba(86, 96, 108, 0.72);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(29, 33, 38, 0.42), rgba(25, 28, 32, 0.28));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
  scroll-margin-top: 24px;
}
.shelf-kicker {
  display: flex;
  gap: 10px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 8px 3px;
  border-radius: 3px;
  border: 1px solid #4b5561;
  color: var(--muted);
}
.pill.free {
  border-color: rgba(123, 214, 172, 0.5);
  color: #9fe0bf;
}
.pill.paid {
  border-color: rgba(184, 216, 250, 0.55);
  color: var(--accent);
}
.shelf h2 {
  margin: 14px 0 10px;
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.shelf p.copy {
  font-size: 16px;
  color: #c4cad1;
  max-width: 440px;
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 20px;
}
.tags span {
  font: 500 11px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 8px 4px;
  border: 1px solid #3e4751;
  color: #b6c0ca;
}
.shelf-buy {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.price del {
  font-size: 16px;
  color: #7e8987;
}
.price strong {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.price small {
  font: 500 11px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.shelf-shots {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.shelf-shots figure {
  border: 1px solid rgba(86, 96, 108, 0.7);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(14, 16, 19, 0.3);
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.shelf-shots figure:nth-child(2) {
  transform: none;
}
.shelf:hover .shelf-shots figure:first-child {
  transform: translateY(-4px);
}
.shelf:hover .shelf-shots figure:nth-child(2) {
  transform: translateY(-4px);
}
.shelf-shots img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}
.shelf-shots figcaption {
  padding: 8px 10px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid rgba(70, 78, 87, 0.7);
  background: rgba(14, 16, 19, 0.22);
}
.shelf.w-kwezeen h2 {
  font-family: "Fraunces", Georgia, serif;
}
.shelf.w-doqcorp h2 {
  font-family: "Roboto Slab", Georgia, serif;
}
.shelf.w-padeff h2 {
  font-family: "Newsreader", Georgia, serif;
}
.shelf.w-piktoor h2 {
  font-family: "Syne", "DM Sans", sans-serif;
  letter-spacing: -0.045em;
}
.shelf.w-brandur h2 {
  font-family: "Unbounded", "DM Sans", sans-serif;
  letter-spacing: -0.055em;
  font-size: 38px;
}
.shelf.w-doqdesk h2 {
  font-family: "Azeret Mono", "IBM Plex Mono", monospace;
  letter-spacing: -0.06em;
  font-size: 38px;
}
.shelf.w-fileshift h2 {
  font-family: "Syne", "DM Sans", sans-serif;
  letter-spacing: -0.045em;
}
.shelf.w-inkform h2 {
  font-family: "Fraunces", Georgia, serif;
}
.shelf.w-shiftcraft h2 {
  font-family: "Azeret Mono", "IBM Plex Mono", monospace;
  font-size: 38px;
  letter-spacing: -0.06em;
}
.note-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14.5px;
  color: #c4cad1;
}
.note-bar strong {
  color: var(--text);
}
.note-bar .underlined {
  font-size: 13.5px;
}

/* ---------------------------------------------------------------- websites + studio */
.site-list {
  border-top: 1px solid var(--line);
}
.site-list a {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  transition:
    padding 0.25s,
    background 0.25s;
}
.site-list a:hover {
  padding-left: 12px;
  padding-right: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.site-list strong {
  display: block;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.site-list span {
  font-size: 14px;
  color: var(--muted);
}
.studio-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(24px, 4vw, 60px);
  align-items: center;
}
.studio-hero p {
  font-size: 16.5px;
  color: #c4cad1;
  margin-bottom: 14px;
  max-width: 560px;
}
.studio-hero .field-note {
  border-left: 2px solid var(--blue);
  padding-left: 14px;
  font-size: 15px;
  color: var(--muted);
}
.studio-stack {
  position: relative;
  aspect-ratio: 16 / 11;
}
.studio-stack figure {
  position: absolute;
  width: 78%;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.studio-stack figure:first-child {
  left: 0;
  top: 0;
}
.studio-stack figure:last-child {
  right: 0;
  bottom: 0;
}
.studio-stack:hover figure:first-child {
  transform: translate(-6px, -6px);
}
.studio-stack:hover figure:last-child {
  transform: translate(6px, 6px);
}
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.gallery figure {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: #0e1013;
}
.gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top left;
}
.gallery.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.gallery figcaption {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--line-2);
}
.page-studio .studio-real-previews figure {
  border-radius: 8px;
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.42);
  transition:
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 0.45s,
    border-color 0.3s;
}
.page-studio .studio-real-previews figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
}
.page-studio .studio-real-previews img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: top left;
}
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: clamp(40px, 5vw, 70px);
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(120deg, #1f2429, #1a1d21);
}
.cta-band h2 {
  font-size: clamp(26px, 2.6vw, 36px);
}
.cta-band p {
  color: var(--muted);
  margin-top: 6px;
}

/* ---------------------------------------------------------------- TheTradingDesk (the old "Markets Simplified" section) */
.market {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, 0.85fr);
  gap: clamp(34px, 4.5vw, 72px);
  align-items: start;
  padding: clamp(40px, 5.5vw, 76px) var(--pad);
  border-bottom: 1px solid #385f59;
  background:
    radial-gradient(circle at 20% 22%, rgba(51, 128, 118, 0.14), transparent 40%),
    rgba(14, 21, 23, 0.38);
}
.market-visuals {
  display: grid;
  gap: 18px;
  min-width: 0;
  align-content: center;
}
.market-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(640px, 100%);
  margin: 0 auto 22px;
  padding: 0;
  transition:
    transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 0.5s;
}
.market-logo img {
  width: 100%;
  height: auto;
}
.market-logo:hover {
  transform: scale(1.02);
  filter: drop-shadow(0 0 22px rgba(93, 217, 204, 0.22));
}
.market-showcase {
  position: relative;
  isolation: isolate;
  margin: 8px 0 118px;
}
.market-spy {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #243238;
  border-radius: 10px;
  background: #050607;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.34);
}
.market-corner-shots {
  position: absolute;
  right: 0;
  bottom: -104px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  width: 84%;
  pointer-events: none;
}
.market-shot {
  width: 61%;
  margin: 0;
  overflow: hidden;
  border: 1px solid #33474d;
  border-radius: 8px;
  background: #0b1116;
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.52);
}
.market-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.market-shot-fib {
  z-index: 1;
  margin-right: -24%;
  transform: rotate(5deg);
  transform-origin: bottom right;
}
.market-shot-patterns {
  z-index: 2;
  transform: rotate(-5deg);
  transform-origin: bottom left;
}
.market-open {
  justify-self: start;
  background: #bfe8e2;
  color: #10201e;
  border-color: #bfe8e2;
  font-weight: 700;
}
.market-open:hover {
  background: #dff6f2;
}
.market-open-mobile {
  display: none;
}
.market-open-desktop {
  display: inline-flex;
}
.market-copy {
  align-self: start;
  max-width: 720px;
  padding-top: 8px;
}
.market-copy .micro {
  color: #64d5c7;
}
.market-copy h1 {
  font-size: clamp(40px, 4.8vw, 68px);
  line-height: 0.98;
  margin: 4px 0 18px;
}
.market-lede {
  font-size: 17px;
  line-height: 1.75;
  color: #c4cad1;
  max-width: 640px;
}
.market-free {
  display: grid;
  gap: 4px;
  margin: 20px 0 18px;
  padding: 16px 18px;
  border: 1px solid rgba(101, 207, 193, 0.26);
  border-left: 3px solid #65cfc1;
  background: rgba(101, 207, 193, 0.06);
}
.market-free strong {
  color: #d8f5f0;
  font-size: 15px;
}
.market-free span {
  color: #aab8b6;
  font-size: 13.5px;
  line-height: 1.6;
}
.market-topics span {
  border-color: #3e4b47;
  color: #b6c4bf;
  background: rgba(255, 255, 255, 0.02);
}
.market-sessions {
  margin: 26px 0 24px;
  padding: 18px;
  border: 1px solid #36444a;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.025);
}
.market-session-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #2d393f;
}
.market-session-head .micro {
  margin: 0;
}
.market-session-head h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
}
.market-session-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}
.market-session {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  background: none;
}
.market-session + .market-session {
  border-left: 1px solid #2d393f;
}
.market-session > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.market-session-name {
  font-size: 14px;
  font-weight: 700;
  color: #e5e9eb;
}
.market-session-desc {
  font: 400 10.5px/1.45 var(--mono);
  color: #839096;
}
.market-session strong {
  flex: 0 0 auto;
  font: 700 25px/1 var(--mono);
  color: #e3bd63;
}
.market-session-link {
  display: inline-flex;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #2d393f;
  width: 100%;
}
.market-copy .underlined:hover {
  color: #9fe8de;
}
.market-note {
  margin-top: 18px;
  font: 400 11px/1.6 var(--mono);
  letter-spacing: 0.03em;
  color: #7f8e89;
  max-width: 590px;
}

/* ---------------------------------------------------------------- dialog */
.sheet-dialog {
  width: min(560px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b1f24;
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}
.sheet-dialog::backdrop {
  background: rgba(6, 8, 10, 0.7);
}
.sheet-dialog .sd-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 22px 22px 8px;
}
.sheet-dialog h2 {
  font-size: 26px;
  margin-top: 6px;
}
.sheet-dialog .sd-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: none;
  font-size: 20px;
}
.sheet-dialog .sd-body {
  padding: 8px 22px 22px;
  display: grid;
  gap: 14px;
}
.sheet-dialog section {
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: #16191d;
}
.sheet-dialog section p {
  font-size: 14.5px;
  color: #c4cad1;
  margin-top: 6px;
}

/* ---------------------------------------------------------------- reveal */
.js .rv {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.8s ease,
    transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js .rv.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 760px) {
  .page-home .particle-layer i {
    filter: brightness(1.12);
  }
}

@media (max-width: 1540px) {
  .page-home .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    min-height: 0;
  }
  .page-home .hero-copy {
    max-width: 640px;
  }
  .page-home .doors {
    grid-column: 1;
    max-width: 640px;
    width: calc(100% - 30px);
    margin-left: 30px;
  }
  .page-home .hero-hint {
    display: none;
  }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    min-height: 0;
  }
  .hero-copy {
    max-width: 640px;
  }
  .doors {
    grid-column: 1;
    max-width: 640px;
    width: calc(100% - 30px);
    margin-left: 30px;
  }
  .hero-hint {
    display: none;
  }
  .tiles.wall .tile {
    flex-basis: calc((100% - 20px) / 2);
  }
  .market {
    grid-template-columns: minmax(0, 1fr);
  }
  .market-visuals {
    width: min(100%, 860px);
    margin: 0 auto;
  }
  .market-logo {
    width: min(580px, 92%);
  }
  .market-open {
    justify-self: start;
  }
  .market-copy {
    max-width: 780px;
  }
}
@media (max-width: 999px) {
  .market-open-mobile {
    display: inline-flex;
    justify-self: start;
    margin-top: 18px;
  }
  .market-open-mobile + .market-sessions {
    margin-top: 14px;
  }
  .market-open-desktop {
    display: none;
  }
  .page-products .shelf-shots {
    align-items: start;
  }
  .page-products .shelf-shots figure:nth-child(2),
  .page-products .shelf:hover .shelf-shots figure:first-child,
  .page-products .shelf:hover .shelf-shots figure:nth-child(2) {
    transform: none !important;
    align-self: start;
  }
  :root {
    --rail-w: 0px;
  }
  .cabinet-rail {
    display: none;
  }
  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    padding: 8px var(--pad);
    background: rgba(16, 18, 21, 0.97);
    border-bottom: 1px solid var(--line);
  }
  .mobile-header .brand-m img {
    width: 124px;
  }
  .mobile-header button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #4a545f;
    border-radius: 3px;
    background: none;
    font: 500 12px var(--mono);
    letter-spacing: 0.06em;
  }
  .mobile-header nav {
    display: none;
    position: absolute;
    top: 65px;
    left: 0;
    right: 0;
    padding: 10px var(--pad) 18px;
    background: #14171b;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  }
  .mobile-header nav.open {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .mobile-header nav a {
    padding: 13px 0;
    border-bottom: 1px solid var(--line-2);
    font-size: 15px;
  }
  .mobile-header nav a[aria-current] {
    color: var(--accent);
  }
  .workspace-top {
    display: none;
  }
  .hero {
    gap: 34px;
    padding-bottom: 46px;
  }
  .hero::after {
    display: none;
  }
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .site-cover {
    height: auto;
    aspect-ratio: 1.9;
  }
  .shelf {
    grid-template-columns: minmax(0, 1fr);
  }
  .studio-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .about-grid {
    grid-template-columns: 170px minmax(0, 1fr);
  }
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 640px) {
  :root {
    --pad: 18px;
  }
  .hero h1 {
    font-size: clamp(44px, 13.5vw, 64px);
  }
  .hero-title-pyramid {
    align-items: center;
    margin-left: auto;
    margin-right: auto;
  }
  .hero-title-pyramid {
    max-width: 100%;
  }
  .hero-title-pyramid .hero-line-1 {
    font-size: 0.82em;
  }
  .hero-title-pyramid .hero-line-2 {
    font-size: 0.76em;
  }
  .hero-title-pyramid .hero-line-3 {
    font-size: 0.68em;
  }
  .doors {
    width: calc(100% - 22px);
    margin-left: 22px;
  }
  .door {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 16px 12px 16px 16px;
  }
  .door .arrow {
    display: none;
  }
  .door-body b {
    font-size: 20px;
  }
  .door-count b {
    font-size: 19px;
  }
  .door {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .page-head p.lead.short {
    text-align: left;
  }
  .tiles {
    gap: 20px 12px;
  }
  .tiles.featured {
    grid-template-columns: minmax(0, 1fr);
  }
  .tile-cover {
    height: auto;
    aspect-ratio: 2.1;
    padding: 14px;
  }
  .wall .tile-cover {
    height: auto;
    aspect-ratio: 1.45;
    padding: 10px;
  }
  .tiles.wall .tile {
    flex-basis: calc((100% - 12px) / 2);
  }
  .tile-cover::before {
    inset: 7px;
  }
  .tile-cap {
    flex-direction: column;
    gap: 1px;
    padding-top: 9px;
  }
  .tile-cap a {
    font-size: 15px;
  }
  .tile-cap span {
    text-align: left;
    font-size: 10.5px;
  }
  .tile-badge {
    left: 12px;
    top: 12px;
  }
  .detail-toolbar {
    font-size: 12px;
  }
  .detail-toolbar div {
    gap: 14px;
  }
  .detail-actions {
    width: 100%;
  }
  .detail-actions .button {
    flex: 1 1 auto;
  }
  .screen-url {
    font-size: 11px;
  }
  .site-cover {
    aspect-ratio: 1.46;
    padding: 22px;
  }
  .site-cover img {
    width: min(78%, 250px);
    max-height: 120px;
  }
  .site-elizabeth img {
    width: min(90%, 290px);
    max-height: 150px;
  }
  .site-baker img {
    width: min(82%, 270px);
  }
  .about-meta {
    flex-direction: column;
    gap: 2px;
  }
  .market-visuals {
    gap: 14px;
  }
  .market-logo {
    width: min(430px, 100%);
    margin-bottom: 16px;
  }
  .market-showcase {
    margin-bottom: 76px;
  }
  .market-corner-shots {
    right: -2%;
    bottom: -64px;
    width: 98%;
  }
  .market-shot {
    width: 64%;
  }
  .market-shot-fib {
    margin-right: -24%;
    transform: rotate(4deg);
  }
  .market-shot-patterns {
    transform: rotate(-4deg);
  }
  .market-open {
    justify-self: stretch;
  }
  .market-session-head {
    display: grid;
    gap: 5px;
  }
  .market-session-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .market-session + .market-session {
    border-left: 0;
    border-top: 1px solid #2d393f;
  }
  .page-about .about-grid {
    display: block;
  }
  .page-about .portrait {
    float: right;
    width: 132px;
    margin: 0 0 16px 18px;
  }
  .page-about .portrait img {
    height: 160px;
  }
  .page-about .portrait figcaption {
    padding-top: 8px;
    font-size: 8.5px;
    line-height: 1.45;
  }
  .page-about .about-copy h1 {
    max-width: calc(100% - 150px);
    margin-top: 8px;
    font-size: clamp(36px, 10.5vw, 46px);
    line-height: 1;
  }
  .page-about .about-copy > h1 + p {
    margin-top: 0;
  }
  .inquiry-form {
    grid-template-columns: minmax(0, 1fr);
  }
  .inquiry-form .button {
    width: 100%;
  }
  .page-head h1 {
    font-size: 44px;
  }
  .shelf h2 {
    font-size: 34px;
  }
  .shelf.w-brandur h2,
  .shelf.w-doqdesk h2 {
    font-size: 30px;
  }
  .gallery,
  .gallery.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .card-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .card-links {
    order: 3;
  }
  .site-footer {
    font-size: 10.5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .js .rv {
    opacity: 1;
    transform: none;
  }
}

/* Final mobile home composition: knot on the left, navigation fixed to the right. */
@media (max-width: 760px) {
  .page-home .hero {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(414px, auto);
    gap: 6px;
    padding: 28px 10px 10px;
    overflow: hidden;
  }

  .page-home .hero-copy {
    grid-column: 1;
    grid-row: 1;
    width: calc(100% - 16px);
    max-width: 520px;
    margin: 0 auto;
  }

  .page-home .doors {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    align-self: center;
    width: 48%;
    max-width: 230px;
    margin: 0;
    margin-left: auto;
    background: transparent;
    border-top: 0;
    position: relative;
    z-index: 2;
  }

  .page-home .door {
    grid-template-columns: minmax(0, 1fr);
    min-height: 56px;
    padding: 9px 8px 9px 16px;
    margin: 2px 0;
    border-bottom: 0;
    border-radius: 0;
    background: transparent;
  }

  .page-home .door-ttd {
    background: transparent;
  }

  .page-home .door-body b {
    font-size: clamp(17px, 4.6vw, 20px);
    line-height: 1.08;
    white-space: nowrap;
  }

  .page-home .door-body small {
    font-size: clamp(9.5px, 2.6vw, 11.5px);
    line-height: 1.35;
    margin-top: 4px;
  }

  .page-home .door-count,
  .page-home .door .arrow {
    display: none;
  }

  .page-home .threads {
    display: block !important;
  }

  .page-home .site-footer {
    padding-top: 18px;
  }
}

@media (max-width: 760px) {
  .page-home .see-work-arrow,
  .page-home a:hover > .see-work-arrow {
    transform: rotate(45deg);
  }
}

@media (max-width: 999px) {
  .mobile-header nav a[href="/studio/"] {
    background: rgba(255, 255, 255, 0.035);
  }

  .mobile-header nav a[href="/tradingdesk/"] {
    background: rgba(60, 139, 130, 0.14);
    color: #d9f8f3;
  }
}

/* ---------------------------------------------------------------- page transitions (assets/transit.js)
   Pull a thread and the next page opens along it: the new page unfolds up and down from the line you clicked, a
   lit seam runs ahead of each edge, and a door's label flies up into the page title. The rail and phone header stay put. */
@view-transition {
  navigation: auto;
}
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}
.cabinet-rail {
  view-transition-name: rail;
}
.mobile-header {
  view-transition-name: mhead;
}
.page-head h1,
.door-body b {
  width: fit-content;
} /* the title morph scales the text itself, not an empty full-width box */
::view-transition-old(rail),
::view-transition-new(rail),
::view-transition-old(mhead),
::view-transition-new(mhead),
::view-transition-old(seam),
::view-transition-new(seam) {
  animation: none;
}
html.seam-vt::view-transition-old(root) {
  animation: seam-recede 0.55s cubic-bezier(0.4, 0, 0.2, 1) both;
}
html.seam-vt::view-transition-new(root) {
  animation: seam-open 0.62s cubic-bezier(0.76, 0, 0.24, 1) 0.12s both;
}
html.seam-vt::view-transition-group(page-title) {
  animation-duration: 0.74s;
  animation-timing-function: cubic-bezier(0.76, 0, 0.24, 1);
}
html.seam-in body {
  animation: seam-open 0.62s cubic-bezier(0.76, 0, 0.24, 1) 0.12s both;
}
.vt-seam {
  position: fixed;
  inset: 0 0 0 var(--rail-w);
  z-index: 90;
  pointer-events: none;
  view-transition-name: seam;
}
.vt-seam::before,
.vt-seam::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: var(--seam-y);
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(79, 143, 214, 0.85) 16%,
    #eef6ff calc(var(--seam-x) - var(--rail-w)),
    rgba(79, 143, 214, 0.85) 84%,
    transparent
  );
  box-shadow: 0 0 14px 1px rgba(184, 216, 250, 0.6);
  transform-origin: calc(var(--seam-x) - var(--rail-w)) 50%;
  animation:
    seam-draw 0.16s cubic-bezier(0.2, 0.7, 0.3, 1) both,
    seam-up 0.62s cubic-bezier(0.76, 0, 0.24, 1) 0.12s both,
    seam-fade 0.2s ease 0.6s both;
}
.vt-seam::after {
  animation-name: seam-draw, seam-down, seam-fade;
}
@keyframes seam-open {
  from {
    clip-path: inset(var(--seam-y) 0 calc(100% - var(--seam-y)) 0);
  }
  to {
    clip-path: inset(0);
  }
}
@keyframes seam-recede {
  to {
    opacity: 0.2;
    transform: scale(0.985);
  }
}
@keyframes seam-draw {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes seam-up {
  from {
    top: var(--seam-y);
  }
  to {
    top: 0;
  }
}
@keyframes seam-down {
  from {
    top: var(--seam-y);
  }
  to {
    top: calc(100% - 1px);
  }
}
@keyframes seam-fade {
  to {
    opacity: 0;
  }
}

/* the door you pick: its knob flares and a signal sweeps the row before the page turns (assets/threads.js) */
.door::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(184, 216, 250, 0.2),
    rgba(184, 216, 250, 0.05) 65%,
    transparent
  );
  mix-blend-mode: screen;
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}
.door.pulling::after {
  animation: door-pull 0.4s cubic-bezier(0.3, 0.7, 0.2, 1) forwards;
}
.door.pulling::before {
  background: #fff;
  box-shadow:
    0 0 0 1.5px var(--accent),
    0 0 22px 6px rgba(184, 216, 250, 0.75);
}
@keyframes door-pull {
  from {
    transform: scaleX(0);
    opacity: 1;
  }
  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

/* Shorecrest joins the main navigation; keep the rail reachable on short screens. */
.cabinet-rail {
  overflow-y: auto;
}
.primary-nav a.nav-shorecrest,
#mobile-nav a.nav-shorecrest {
  color: var(--text);
  background: rgba(79, 143, 214, 0.14);
}
.primary-nav a.nav-shorecrest span,
#mobile-nav a.nav-shorecrest span {
  color: inherit;
  font: 500 8.5px var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 1;
}
#mobile-nav a.nav-shorecrest {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.primary-nav a.nav-shorecrest[aria-current],
.primary-nav a.nav-shorecrest[aria-current] span {
  color: var(--ink);
}
.primary-nav a.nav-shorecrest[aria-current] {
  background: #d0d6de;
}
