:root {
  color-scheme: light;
  --ink: #151a18;
  --muted: #66706b;
  --subtle: #8a938f;
  --paper: #ffffff;
  --canvas: #f8f8f5;
  --wash: #eef2ee;
  --line: #dde3de;
  --line-strong: #cbd4ce;
  --sage: #557064;
  --forest: #203630;
  --blue: #263d56;
  --wine: #7b263b;
  --gold: #a98643;
  --shadow-soft: 0 16px 38px rgba(22, 31, 28, 0.08);
  --shadow-hover: 0 24px 54px rgba(22, 31, 28, 0.13);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

body::selection {
  background: #dfe9de;
  color: #14211d;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 30;
  top: 14px;
  left: 50%;
  width: min(var(--max), calc(100% - 28px));
  min-height: 58px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 10px 9px 16px;
  color: #f9fbf8;
  background: rgba(18, 27, 25, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(9, 15, 13, 0.18);
}

.brand,
.nav-links,
.hero-actions,
.summary-grid,
.workspace-bar,
.filter-bar,
.palette-meta {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 850;
  white-space: nowrap;
  letter-spacing: 0;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    linear-gradient(90deg, #2f5a4e 0 50%, #f2ece2 50% 100%),
    linear-gradient(90deg, #7b263b 0 50%, #b99a55 50% 100%);
  background-size: 100% 50%, 100% 50%;
  background-position: top, bottom;
  background-repeat: no-repeat;
}

.nav-links {
  gap: clamp(12px, 2.4vw, 28px);
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.91rem;
}

.nav-links a {
  transition: color 160ms ease;
}

.nav-links a:hover {
  color: #ffffff;
}

.header-action {
  min-width: 90px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  color: #19231f;
  background: #f8f4ec;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.9rem;
}

.hero {
  position: relative;
  min-height: 84svh;
  overflow: hidden;
  display: grid;
  align-items: end;
  padding: 116px clamp(20px, 6vw, 72px) clamp(46px, 7vw, 86px);
  color: #ffffff;
}

.hero-media,
.hero-media img,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(13, 20, 18, 0.78) 0%, rgba(13, 20, 18, 0.56) 38%, rgba(13, 20, 18, 0.12) 76%),
    linear-gradient(0deg, rgba(13, 20, 18, 0.34), rgba(13, 20, 18, 0.02) 55%);
}

.hero-content {
  width: min(680px, 100%);
}

.eyebrow,
.section-kicker,
.mockup-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 850;
}

.eyebrow {
  color: #dce9e3;
}

.hero h1 {
  max-width: 8ch;
  margin: 13px 0 16px;
  font-size: clamp(3.45rem, 8.4vw, 7.4rem);
  line-height: 0.93;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

.hero-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 850;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: #f7f1e7;
  color: #18221f;
  box-shadow: 0 14px 34px rgba(10, 14, 13, 0.18);
}

.button.secondary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.36);
}

.section-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.summary-strip {
  position: relative;
  z-index: 2;
  margin-top: -28px;
}

.summary-grid {
  align-items: stretch;
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.summary-grid article {
  flex: 1 1 0;
  min-width: 0;
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.94);
}

.summary-grid span,
.criteria-list span {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--sage);
  font-size: 0.75rem;
  font-weight: 900;
}

.summary-grid strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.summary-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.palettes-section,
.applications-section,
.criteria-section,
.closing-section {
  padding: clamp(62px, 8vw, 112px) 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(250px, 0.38fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: end;
  margin-bottom: 24px;
}

.section-heading.compact {
  grid-template-columns: minmax(0, 840px);
}

.section-kicker {
  color: var(--sage);
}

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

h2 {
  margin: 9px 0 0;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-heading p,
.criteria-list p,
.mockup p,
.palette-card p,
.closing-content p {
  margin: 0;
  color: var(--muted);
}

.workspace-bar {
  position: sticky;
  top: 86px;
  z-index: 20;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
  padding: 8px;
  background: rgba(248, 248, 245, 0.82);
  border: 1px solid rgba(221, 227, 222, 0.82);
  border-radius: 8px;
  backdrop-filter: blur(18px);
}

.filter-bar {
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
  display: none;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 8px 13px;
  color: #47524d;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 820;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.filter-button:hover {
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.filter-button.is-active {
  color: #ffffff;
  background: var(--forest);
  border-color: var(--forest);
}

.result-count {
  flex: 0 0 auto;
  margin: 0;
  padding: 0 8px;
  color: var(--subtle);
  font-size: 0.86rem;
  font-weight: 800;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.palette-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(22, 31, 28, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.palette-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-hover);
}

.palette-preview {
  height: 124px;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr 0.75fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 1px;
  background: rgba(18, 24, 22, 0.08);
}

.palette-preview span {
  min-width: 0;
}

.palette-preview span:first-child {
  grid-row: span 2;
}

.palette-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 16px;
}

.palette-meta {
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  color: #40504a;
  background: #f0f3ef;
  border: 1px solid #dfe6df;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 840;
}

.tag.mood {
  color: #ffffff;
  background: #33433e;
  border-color: #33433e;
}

.palette-card h3 {
  font-size: 1.08rem;
}

.palette-card p {
  margin-top: 8px;
  font-size: 0.92rem;
}

.swatch-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: auto;
  padding-top: 18px;
}

.swatch-button {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(22, 31, 28, 0.1);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: border-color 150ms ease, transform 150ms ease, background 150ms ease;
}

.swatch-button:hover {
  transform: translateX(2px);
  border-color: rgba(22, 31, 28, 0.28);
  background: #fbfcfa;
}

.swatch-chip {
  display: block;
  min-height: 42px;
}

.swatch-text {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
}

.swatch-text span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.swatch-text strong {
  color: #202a26;
  font-size: 0.76rem;
  font-weight: 880;
  white-space: nowrap;
}

.applications-section {
  background: #ffffff;
}

.mockup-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.mockup {
  position: relative;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 11px;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mockup::before {
  content: "";
  position: absolute;
  inset: 18px 18px auto auto;
  width: 132px;
  height: 92px;
  border: 1px solid currentColor;
  opacity: 0.16;
}

.mockup::after {
  content: "";
  position: absolute;
  inset: 38px 38px auto auto;
  width: 148px;
  height: 7px;
  background: currentColor;
  opacity: 0.16;
  box-shadow: 0 18px 0 currentColor, 0 36px 0 currentColor;
}

.mockup h3 {
  max-width: 330px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
}

.mockup p {
  max-width: 390px;
}

.mockup-label {
  color: currentColor;
  opacity: 0.72;
}

.mini-ui {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.mini-ui span {
  width: 42px;
  height: 6px;
  background: currentColor;
  opacity: 0.22;
}

.mockup-therapy {
  color: #2e5147;
  background: #f8fbf7;
}

.mockup-law {
  color: #273442;
  background: #f5f2eb;
}

.mockup-clinic {
  color: #2b5a57;
  background: #f7fbfa;
}

.criteria-section {
  background: var(--wash);
}

.criteria-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.2fr);
  gap: clamp(30px, 5vw, 70px);
}

.criteria-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.criteria-list article {
  min-height: 190px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.criteria-list h3 {
  margin-bottom: 8px;
}

.closing-section {
  color: #ffffff;
  background: #172220;
}

.closing-content {
  display: grid;
  grid-template-columns: minmax(0, 0.25fr) minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.closing-content .section-kicker {
  color: #b6d2c5;
}

.closing-content h2 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(1.85rem, 3.5vw, 3.1rem);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 40;
  min-width: 150px;
  padding: 12px 16px;
  color: #ffffff;
  background: #18201f;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  box-shadow: var(--shadow-hover);
  text-align: center;
  font-weight: 850;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 18px);
  transition: opacity 170ms ease, transform 170ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1100px) {
  .palette-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .section-heading,
  .criteria-layout,
  .closing-content {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    flex-direction: column;
  }

  .palette-grid,
  .mockup-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .result-count {
    padding-left: 6px;
  }
}

@media (max-width: 760px) {
  .site-header {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 54px;
  }

  .nav-links {
    display: none;
  }

  .header-action {
    min-width: 78px;
    min-height: 36px;
    padding-inline: 12px;
  }

  .hero {
    min-height: 80svh;
    padding: 96px 20px 44px;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(13, 20, 18, 0.86) 0%, rgba(13, 20, 18, 0.7) 62%, rgba(13, 20, 18, 0.28) 100%),
      linear-gradient(0deg, rgba(13, 20, 18, 0.38), rgba(13, 20, 18, 0.04));
  }

  .hero h1 {
    font-size: clamp(3.1rem, 16vw, 5.2rem);
  }

  .hero-copy {
    font-size: 1rem;
  }

  .button {
    min-height: 46px;
  }

  .palette-grid,
  .mockup-grid,
  .criteria-list {
    grid-template-columns: 1fr;
  }

  .workspace-bar {
    top: 74px;
  }
}

@media (max-width: 560px) {
  .section-inner {
    width: min(100% - 28px, var(--max));
  }

  .brand {
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 20px;
    height: 20px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .summary-strip {
    margin-top: -18px;
  }

  .summary-grid article {
    padding: 18px;
  }

  .palette-preview {
    height: 116px;
  }

  .filter-button {
    min-height: 36px;
    padding-inline: 11px;
  }

  .swatch-text {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

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