:root {
  color-scheme: light;
  --ink: #17231f;
  --muted: #5e6d66;
  --paper: #f7f3ea;
  --surface: #fffdf8;
  --leaf: #245d49;
  --leaf-dark: #173e31;
  --line: #d8d3c8;
  --gold: #c29b55;
  --shadow: 0 20px 54px rgba(23, 35, 31, 0.11);
  font-family: var(--font-sans);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 90% 4%, rgba(194, 155, 85, 0.14), transparent 28rem),
    var(--paper);
  color: var(--ink);
}

a { color: inherit; }

button,
input,
select { font: inherit; }

button,
.studio-link,
.workspace-link,
.primary-action,
.service-action {
  min-height: 44px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 10;
  transform: translateY(-160%);
  border-radius: 999px;
  background: var(--ink);
  color: white;
  padding: 0.75rem 1rem;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.1rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 780;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--leaf);
  color: white;
  font-family: var(--font-display);
}

.studio-link,
.workspace-link,
.primary-action,
.service-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 720;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.6rem;
}

.studio-link,
.workspace-link {
  border: 1px solid var(--line);
  background: var(--surface);
  padding: 0.65rem 1rem;
}

.marketplace-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 4rem;
}

.hero {
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.75rem, 6vw, 5rem);
  max-width: 850px;
}

.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--leaf);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
p { overflow-wrap: anywhere; }

h1,
h2 {
  font-family: var(--font-display);
  font-weight: 500;
}

h1 {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 5.7rem);
  line-height: 0.96;
  letter-spacing: -0.055em;
}

h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero-copy {
  max-width: 690px;
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.preview-boundary {
  max-width: 760px;
  margin: 1.5rem 0 0;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.55;
}

.discovery-panel,
.handoff-panel {
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.discovery-panel { padding: clamp(1.1rem, 3vw, 2rem); }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.result-count {
  margin: 0;
  color: var(--muted);
  white-space: nowrap;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(16rem, 2fr) repeat(2, minmax(10rem, 1fr)) auto;
  gap: 0.85rem;
  align-items: end;
  margin: 1.6rem 0 2rem;
}

.filter-bar label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 750;
}

.filter-bar input,
.filter-bar select,
.filter-bar button,
.empty-state button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: white;
  color: var(--ink);
  padding: 0.75rem 0.85rem;
}

.filter-bar button,
.empty-state button {
  cursor: pointer;
  font-weight: 720;
}

.service-grid {
  display: grid;
  min-height: 23rem;
  align-content: start;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.service-card {
  display: flex;
  min-height: 23rem;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: white;
  padding: 1.2rem;
}

.service-card::before {
  content: "";
  width: 100%;
  height: 0.45rem;
  margin-bottom: 1.25rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--leaf), var(--gold));
}

.service-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.service-avatar {
  display: grid;
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #e5eee9;
  color: var(--leaf-dark);
  font-family: var(--font-display);
  font-weight: 700;
}

.service-profile p,
.service-summary,
.service-meta { margin: 0; }

.preview-label {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.service-name { margin-top: 0.12rem !important; font-weight: 780; }

.service-card h3 {
  margin: 1.25rem 0 0.7rem;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.1;
}

.service-summary {
  color: var(--muted);
  line-height: 1.55;
}

.service-meta {
  margin-top: 1rem;
  color: var(--leaf);
  font-size: 0.8rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.service-action {
  margin-top: auto;
  background: var(--leaf);
  color: white;
  padding: 0.7rem 1rem;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 1rem;
  padding: 2.5rem;
  text-align: center;
}

.empty-state p:not(.eyebrow) { color: var(--muted); }
.empty-state button { max-width: 18rem; }

.handoff-panel {
  margin-top: 1.5rem;
  padding: clamp(2rem, 5vw, 4rem);
  text-align: center;
}

.handoff-panel p:not(.eyebrow) {
  max-width: 650px;
  margin: 1rem auto 1.4rem;
  color: var(--muted);
  line-height: 1.6;
}

.primary-action {
  background: var(--ink);
  color: white;
  padding: 0.8rem 1.2rem;
}

.noscript {
  max-width: 760px;
  margin: 1rem auto;
  padding: 1rem;
}

:focus-visible {
  outline: 3px solid #0d6efd;
  outline-offset: 3px;
}

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-field { grid-column: 1 / -1; }
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .site-header,
  .section-heading { align-items: flex-start; }
  .site-header { flex-direction: column; }
  .header-actions { justify-content: flex-start; }
  .section-heading { flex-direction: column; }
  .filter-bar,
  .service-grid { grid-template-columns: 1fr; }
  .search-field { grid-column: auto; }
  .service-grid { min-height: 23rem; }
  .service-card { min-height: 0; }
  .service-action { margin-top: 1.5rem; }
  .result-count { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .brand-mark,
  .service-avatar,
  .service-action,
  .primary-action {
    border: 1px solid ButtonText;
  }
  .service-card::before { background: CanvasText; }
}
