:root {
  color-scheme: light;
  --ink: #11182f;
  --muted: #66717d;
  --paper: #f7f3eb;
  --surface: #ffffff;
  --surface-soft: #ece7dc;
  --line: #ddd4c5;
  --navy: #00346f;
  --teal: #007f87;
  --plum: #8a2f6a;
  --gold: #a36d13;
  --clay: #ad4c2f;
  --violet: #5d24b8;
  --cyan: #1daec2;
  --shadow-sm: 0 10px 30px rgba(17, 24, 47, 0.08);
  --shadow-lg: 0 24px 70px rgba(17, 24, 47, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(180deg, #fbf8f2 0, var(--paper) 380px, #f9f7f2 100%);
  color: var(--ink);
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 248, 242, 0.88);
  border-bottom: 1px solid rgba(221, 212, 197, 0.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 30px rgba(17, 24, 47, 0.04);
}

.top-grid {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  width: fit-content;
  min-width: 150px;
  text-decoration: none;
}

.brand img {
  width: 152px;
  height: auto;
  display: block;
}

.header-logo {
  justify-self: end;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: #10141b;
  box-shadow: 0 12px 28px rgba(17, 24, 47, 0.16);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.header-logo:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(17, 24, 47, 0.2);
}

.header-logo img {
  width: 48px;
  height: 48px;
  display: block;
  object-fit: cover;
}

.filters {
  justify-self: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  min-width: 0;
  gap: 5px;
  padding: 5px;
  border: 1px solid rgba(221, 212, 197, 0.86);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.filter {
  min-height: 34px;
  border: 1px solid transparent;
  background: transparent;
  color: #5d6471;
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.filter:hover {
  background: rgba(17, 24, 47, 0.06);
  color: var(--ink);
}

.filter[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--navy), var(--violet));
  color: #fff;
  box-shadow: 0 8px 18px rgba(17, 24, 47, 0.16);
}

.intro {
  position: relative;
  overflow: hidden;
  padding: 66px 0 44px;
  background:
    linear-gradient(118deg, rgba(0, 52, 111, 0.11) 0%, rgba(29, 174, 194, 0.08) 46%, rgba(138, 47, 106, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0));
  border-bottom: 1px solid rgba(221, 212, 197, 0.74);
}

.intro::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 8px;
  background: linear-gradient(90deg, var(--navy), var(--cyan), var(--plum));
  opacity: 0.9;
}

.intro-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 36px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--teal);
}

h1,
h2 {
  margin: 0;
  font-family: Manrope, Inter, sans-serif;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  font-size: clamp(2.6rem, 5.6vw, 5.7rem);
  line-height: 0.94;
}

h2 {
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.intro-copy {
  max-width: 640px;
  margin: 18px 0 0;
  color: #4f5968;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  line-height: 1.55;
}

.intro-panel {
  position: relative;
  padding: 24px;
  border: 1px solid rgba(221, 212, 197, 0.84);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.64));
  box-shadow: var(--shadow-sm);
}

.intro-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--navy), var(--cyan), var(--plum));
  border-radius: 8px 0 0 8px;
}

.intro-panel span {
  display: block;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.intro-panel strong {
  display: block;
  margin-top: 9px;
  font-size: 1.32rem;
  line-height: 1.15;
}

.intro-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.metric {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid rgba(221, 212, 197, 0.84);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 30px rgba(17, 24, 47, 0.05);
}

.metric strong {
  display: block;
  min-width: 44px;
  font-size: 2rem;
  line-height: 1;
  color: var(--navy);
}

.metric span {
  color: var(--muted);
  font-size: 0.9rem;
}

main {
  padding: 44px 0 72px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin: 0 0 20px;
}

.review-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.toggle-hidden {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
}

.toggle-hidden input {
  accent-color: var(--ink);
}

.tool-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 13px;
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 850;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tool-button:hover,
.toggle-hidden:hover {
  border-color: rgba(17, 24, 47, 0.26);
  box-shadow: 0 8px 22px rgba(17, 24, 47, 0.08);
}

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

.hidden-note {
  margin: -8px 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 22px;
  align-items: start;
}

.card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(221, 212, 197, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  animation: card-enter 520ms cubic-bezier(0.2, 0.75, 0.2, 1) both;
  animation-delay: var(--delay, 0ms);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(29, 174, 194, 0.16), transparent 32%, rgba(138, 47, 106, 0.12));
  opacity: 0;
  transition: opacity 180ms ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(0, 52, 111, 0.28);
  box-shadow: var(--shadow-lg);
}

.card:hover::after,
.card:focus-within::after {
  opacity: 1;
}

.option-number {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(23, 32, 42, 0.88);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.18);
}

.hide-card {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  padding: 5px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.14);
  transition: transform 160ms ease, background 160ms ease;
}

.hide-card:hover {
  transform: translateY(-1px);
  background: #fff;
}

.is-hidden-option {
  opacity: 0.46;
}

.preview {
  aspect-ratio: 4 / 3;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(0, 52, 111, 0.08), rgba(29, 174, 194, 0.08), rgba(138, 47, 106, 0.08)),
    linear-gradient(45deg, rgba(23, 32, 42, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(23, 32, 42, 0.035) 25%, transparent 25%),
    var(--surface-soft);
  background-size: 18px 18px;
  text-decoration: none;
}

.thumb {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 12px 38px rgba(23, 32, 42, 0.14);
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.card:hover .thumb,
.card:focus-within .thumb {
  transform: scale(1.025);
  box-shadow: 0 18px 46px rgba(17, 24, 47, 0.2);
  filter: saturate(1.04) contrast(1.02);
}

.card-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 17px 17px 18px;
}

.tag {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  min-height: 24px;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf5f5;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 900;
  margin-bottom: 10px;
}

.tag.landing-pages { background: #e8eff8; color: var(--navy); }
.tag.search-results { background: #f5e8f1; color: var(--plum); }
.tag.property-details { background: #f6ecd9; color: var(--gold); }
.tag.valuation-flows { background: #e7f2ed; color: #277245; }
.tag.experimental-3d { background: #f7e7df; color: var(--clay); }
.tag.brand-logo { background: #ececf2; color: #414463; }

.card h3 {
  margin: 0 0 7px;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.card p {
  min-height: 40px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.42;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: auto;
}

.actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 11px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--navy), var(--violet));
  color: #fff;
  text-decoration: none;
  font-weight: 850;
  font-size: 0.86rem;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.actions a:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(17, 24, 47, 0.16);
}

.actions a.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.directions-section {
  margin-top: 52px;
}

.directions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.direction {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.direction h3 {
  margin: 0 0 8px;
}

.direction p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.site-footer {
  padding: 30px 0 36px;
  border-top: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(0, 52, 111, 0.08), rgba(29, 174, 194, 0.06), rgba(138, 47, 106, 0.07)),
    rgba(255, 255, 255, 0.58);
  color: var(--muted);
}

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.footer-credit img {
  width: 42px;
  height: 42px;
  display: block;
  object-fit: cover;
  border-radius: 8px;
}

.footer-credit span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.footer-credit strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.88rem;
}

@keyframes card-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1120px) {
  .grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 900px) {
  .top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 16px;
    padding: 12px 0;
  }

  .brand {
    min-width: 0;
  }

  .intro-grid {
    display: block;
  }

  .filters {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .header-logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
  }

  .header-logo img {
    width: 54px;
    height: 54px;
  }

  .summary,
  .directions {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 28px, 1240px);
  }

  .summary,
  .directions {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 8ch;
    font-size: clamp(2.15rem, 13vw, 3.1rem);
    line-height: 1;
  }

  .intro-copy,
  .intro-panel p {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  .intro-copy {
    max-width: 30ch;
  }

  .intro {
    padding-top: 48px;
  }

  .intro-panel {
    width: min(100%, calc(100vw - 28px));
    max-width: 340px;
    margin-top: 24px;
  }

  .intro-panel p {
    max-width: 28ch;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-tools {
    justify-content: flex-start;
  }

  .preview {
    aspect-ratio: 4 / 3;
  }
}

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