:root {
  --brand-sky: oklch(84.19% 0.0803 249.36);
  --brand-blue: oklch(54.2% 0.2142 270.64);
  --brand-blue-dark: oklch(45% 0.19 270.64);
  --ink: oklch(23.84% 0.0648 274.14);
  --canvas: oklch(98.42% 0.0034 247.86);
  --surface: oklch(100% 0 0);
  --muted: oklch(43.33% 0.0451 268.18);
  --line: oklch(86.64% 0.0307 267.18);
  --danger: oklch(51% 0.2 28);
  --success: oklch(45% 0.13 150);
  --font-display: "Familjen Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", Arial, sans-serif;
  --shell: min(1280px, calc(100% - clamp(40px, 10vw, 144px)));
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-section: clamp(5rem, 9vw, 8rem);
  --radius-control: 4px;
  --radius-search: 6px;
  --radius-media: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --page-edge: max(clamp(20px, 5vw, 72px), calc((100vw - 1280px) / 2));
  --z-header: 20;
  --z-dialog: 40;
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}

body:has(dialog[open]) {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  fill: currentColor;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: 100;
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  color: var(--ink);
  transform: translateY(-160%);
  transition: transform 180ms var(--ease-out);
}

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

:focus-visible {
  outline: 3px solid var(--brand-sky);
  outline-offset: 3px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.72rem 1.2rem;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: var(--brand-blue);
  color: white;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.button:hover {
  background: var(--brand-blue-dark);
}

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

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button--secondary {
  border-color: var(--brand-blue);
  background: transparent;
  color: var(--brand-blue-dark);
}

.button--secondary:hover {
  background: var(--brand-blue);
  color: white;
}

.text-button {
  min-height: 44px;
  padding: 0.5rem 0;
  border: 0;
  background: transparent;
  color: var(--brand-blue-dark);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: var(--z-header);
  display: flex;
  width: var(--shell);
  min-height: 96px;
  margin-inline: auto;
  align-items: center;
  justify-content: space-between;
  color: white;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.05;
  text-decoration: none;
  text-transform: uppercase;
}

.brand img {
  width: 34px;
  height: 48px;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.main-nav > a:not(.button) {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
}

.main-nav > a:not(.button):hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.button--header {
  background: var(--brand-blue);
}

.button--header .icon {
  width: 1rem;
  height: 1rem;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px 8px;
  border: 0;
  background: transparent;
  color: white;
}

.menu-button span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 6px 0;
  background: currentColor;
  transition: transform 180ms var(--ease-out);
}

.hero {
  position: relative;
  min-height: clamp(620px, 75vh, 760px);
  display: grid;
  align-items: center;
  color: white;
  isolation: isolate;
}

.hero__picture {
  position: absolute;
  inset: 0;
  z-index: -2;
  display: block;
  overflow: hidden;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: oklch(23.84% 0.0648 274.14 / 0.55);
  content: "";
  pointer-events: none;
}

.hero__content {
  padding-top: 2rem;
  padding-bottom: 8rem;
}

.hero__content h1 {
  max-width: 13.5ch;
  font-size: clamp(3.4rem, 7.4vw, 5.75rem);
  letter-spacing: -0.035em;
  text-shadow: 0 2px 8px rgb(0 0 0 / 0.35);
}

.hero__content p {
  max-width: 28ch;
  margin-top: var(--space-lg);
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  line-height: 1.45;
  text-shadow: 0 2px 6px rgb(0 0 0 / 0.4);
}

.property-search {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: -48px;
  left: 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 0.8fr auto;
  gap: var(--space-lg);
  align-items: end;
  padding: 1.25rem;
  border-radius: var(--radius-search);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 4px 8px rgb(22 27 61 / 0.16);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}

.field input,
.field select,
.admin-field input,
.admin-field select,
.admin-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
}

.field input::placeholder,
.admin-field input::placeholder,
.admin-field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search-custom-select {
  position: relative;
  min-width: 0;
}

.search-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip-path: inset(50%) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.search-custom-select__trigger {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  transition: border-color 180ms var(--ease-out), background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}

.search-custom-select__trigger:hover {
  border-color: color-mix(in oklch, var(--line), var(--brand-blue) 28%);
  background: color-mix(in srgb, var(--brand-sky) 10%, var(--surface));
}

.search-custom-select__trigger[aria-expanded="true"] {
  border-color: var(--brand-blue);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand-blue), transparent 82%);
}

.search-custom-select__trigger > .icon {
  width: 1rem;
  height: 1rem;
  transition: transform 180ms var(--ease-out);
}

.search-custom-select__trigger[aria-expanded="true"] > .icon {
  transform: rotate(180deg);
}

.search-custom-select__menu {
  position: fixed;
  inset: auto;
  display: none;
  max-height: min(280px, calc(100dvh - 24px));
  margin: 0;
  padding: 0.38rem;
  overflow-y: auto;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 4px 8px rgb(22 27 61 / 0.16);
  color: var(--ink);
  font-family: var(--font-body);
}

.search-custom-select__menu:popover-open {
  display: grid;
  gap: 0.15rem;
}

.search-custom-select__option {
  display: grid;
  min-height: 44px;
  align-items: center;
  gap: var(--space-sm);
  padding: 0.58rem 0.68rem;
  border-radius: 7px;
  grid-template-columns: minmax(0, 1fr) 18px;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.25;
}

.search-custom-select__option[data-active="true"] {
  background: color-mix(in srgb, var(--brand-sky) 16%, var(--surface));
}

.search-custom-select__option[data-selected="true"] {
  background: color-mix(in srgb, var(--brand-sky) 34%, var(--surface));
  color: var(--brand-blue-dark);
  font-weight: 600;
}

.search-custom-select__option .icon {
  width: 1rem;
  height: 1rem;
  opacity: 0;
}

.search-custom-select__option[data-selected="true"] .icon {
  opacity: 1;
}

.button--search {
  min-width: 136px;
}

.properties-section {
  padding-top: calc(var(--space-section) + 2rem);
  padding-bottom: var(--space-section);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-xl);
  margin-bottom: var(--space-xl);
}

.section-heading h2 {
  font-size: clamp(2.3rem, 4.5vw, 4.2rem);
}

.section-heading p {
  margin-top: 0.55rem;
  color: var(--muted);
}

.property-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem) clamp(1.25rem, 2.5vw, 2rem);
  align-items: stretch;
}

.property-grid[data-density="single"] {
  grid-template-columns: minmax(0, 960px);
  justify-content: center;
}

.property-grid[data-density="pair"] {
  grid-template-columns: repeat(2, minmax(0, 390px));
  justify-content: center;
}

.property-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.property-card__media {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: var(--radius-media);
  background: var(--line);
  padding: 0;
  width: 100%;
}

.property-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms var(--ease-out);
}

.property-card__media:hover img {
  transform: scale(1.025);
}

.property-card__body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-top: var(--space-md);
}

.property-card__location {
  min-height: 1.35em;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.property-card h3 {
  display: -webkit-box;
  min-height: 2.16em;
  overflow: hidden;
  margin-top: 0.25rem;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.property-card__price {
  margin-top: 0.55rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.property-card__meta {
  display: flex;
  min-height: 1.55rem;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.property-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: 1.25rem;
}

.property-card__actions .button {
  flex: 1 1 150px;
}

.property-card__actions .button--secondary {
  flex: 0 1 auto;
}

.property-card__actions .button--secondary .icon {
  width: 1rem;
  transition: transform 180ms var(--ease-out);
}

.property-card__actions .button--secondary:hover .icon {
  transform: translateX(2px);
}

.property-grid[data-density="single"] .property-card {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}

.property-grid[data-density="single"] .property-card__body {
  padding-top: 0;
}

.property-grid[data-density="single"] .property-card h3 {
  min-height: 0;
  -webkit-line-clamp: 3;
}

.empty-state {
  max-width: 760px;
  margin: 1rem auto 0;
  padding: clamp(2rem, 6vw, 4.5rem);
  border: 1px solid var(--line);
  text-align: center;
}

.empty-state h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.empty-state p {
  max-width: 50ch;
  margin: var(--space-md) auto var(--space-lg);
  color: var(--muted);
}

.load-more-row {
  display: flex;
  justify-content: center;
  margin-top: var(--space-2xl);
}

.trust-section {
  overflow: hidden;
  background: var(--ink);
  color: white;
}

.trust-grid {
  display: grid;
  min-height: clamp(530px, 68vh, 660px);
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
}

.trust-copy {
  display: flex;
  justify-content: center;
  flex-direction: column;
  padding: clamp(3rem, 5vh, 4rem) clamp(2.25rem, 6vw, 6.5rem) clamp(3rem, 5vh, 4rem) var(--page-edge);
}

.trust-copy h2 {
  max-width: 10.5ch;
  font-size: clamp(3.15rem, 5.5vw, 5rem);
  letter-spacing: -0.038em;
  line-height: 0.92;
}

.trust-title__intro,
.trust-title__focus {
  display: block;
}

.trust-title__intro {
  font-size: 0.72em;
  line-height: 1.02;
  color: var(--brand-sky);
}

.trust-title__focus {
  margin-top: 0.24em;
}

.trust-copy p {
  max-width: 47ch;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  color: color-mix(in oklch, white, var(--brand-sky) 18%);
  font-size: clamp(1.08rem, 1.45vw, 1.3rem);
  line-height: 1.55;
}

.trust-meta {
  display: flex;
  margin-top: clamp(2rem, 3.5vw, 3.25rem);
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  color: var(--brand-sky);
  font-weight: 600;
}

.trust-meta span + span {
  padding-left: 1.5rem;
  border-left: 1px solid rgb(255 255 255 / 0.28);
}

.trust-portrait {
  position: relative;
  overflow: hidden;
  margin: 0;
  min-height: 100%;
  background: var(--brand-blue-dark);
  isolation: isolate;
}

.trust-portrait__plane,
.trust-portrait__line {
  position: absolute;
  display: block;
}

.trust-portrait__plane {
  top: 0;
  right: 0;
  z-index: 0;
  width: 68%;
  height: 100%;
  background: var(--brand-sky);
}

.trust-portrait__logo {
  position: absolute;
  top: 8%;
  left: 8%;
  z-index: 1;
  width: auto;
  height: 46%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.22;
}

.trust-portrait__line {
  z-index: 2;
  background: rgb(255 255 255 / 0.48);
}

.trust-portrait__line--vertical {
  top: 0;
  bottom: 0;
  left: 32%;
  width: 1px;
}

.trust-portrait__line--horizontal {
  right: 0;
  bottom: 18%;
  left: 0;
  height: 1px;
}

.trust-portrait__people {
  position: absolute;
  bottom: -18%;
  left: 50%;
  z-index: 3;
  width: auto;
  max-width: none;
  height: 125%;
  transform: translateX(-50%);
  object-fit: contain;
  object-position: center bottom;
}

.trust-portrait figcaption {
  position: absolute;
  right: clamp(1rem, 2vw, 1.75rem);
  bottom: clamp(1rem, 2vw, 1.75rem);
  z-index: 5;
  display: grid;
  gap: 0.08rem;
  padding: 0.65rem 0.8rem;
  background: var(--ink);
  color: white;
  line-height: 1.1;
}

.trust-portrait figcaption span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
}

.trust-portrait figcaption small {
  color: var(--brand-sky);
  font-size: 0.72rem;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.sell-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xl);
  padding-block: clamp(5.5rem, 11vw, 9rem);
}

.sell-section h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.sell-section p {
  max-width: 52ch;
  margin-top: var(--space-md);
  color: var(--muted);
  font-size: 1.15rem;
}

.site-footer {
  padding: clamp(4.5rem, 8vw, 7.5rem) 0 var(--space-xl);
  background: var(--ink);
  color: white;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(180px, 0.65fr) minmax(260px, 0.9fr);
  align-items: start;
  gap: clamp(3rem, 7vw, 7rem);
}

.brand--footer img {
  width: 34px;
  height: 48px;
}

.footer-intro > p {
  max-width: 34ch;
  margin-top: var(--space-xl);
  color: color-mix(in oklch, var(--brand-sky), white 20%);
  font-size: 1.08rem;
}

.footer-socials {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.footer-socials a {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  color: white;
  transition: color 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.footer-socials a:hover {
  color: var(--brand-sky);
  transform: translateY(-2px);
}

.footer-socials .icon {
  width: 1.25rem;
  height: 1.25rem;
}

.footer-nav h2,
.footer-contact h2 {
  margin-bottom: var(--space-lg);
  color: var(--brand-sky);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.4;
}

.footer-nav {
  display: grid;
  align-content: start;
}

.footer-nav a {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  border-bottom: 1px solid rgb(255 255 255 / 0.16);
  text-decoration: none;
}

.footer-nav a .icon {
  width: 1rem;
  transition: transform 180ms var(--ease-out);
}

.footer-nav a:hover .icon {
  transform: translateX(3px);
}

.footer-contact {
  display: grid;
  align-content: start;
}

.footer-contact a {
  display: grid;
  min-height: 56px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.16);
  text-decoration: none;
}

.footer-contact a:hover span {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.footer-contact__arrow {
  width: 1rem;
  color: var(--brand-sky);
}

.footer-bottom {
  display: grid;
  margin-top: clamp(4rem, 8vw, 7rem);
  padding-top: var(--space-lg);
  grid-template-columns: 1fr auto 1fr;
  gap: var(--space-xl);
  border-top: 1px solid rgb(255 255 255 / 0.2);
  color: color-mix(in oklch, var(--brand-sky), white 8%);
  font-size: 0.9rem;
}

.footer-bottom p:nth-child(2) {
  text-align: center;
}

.footer-bottom p:last-child {
  text-align: right;
}

.icon-text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.property-dialog {
  width: min(1040px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
}

.property-dialog::backdrop {
  background: rgb(22 27 61 / 0.74);
}

.property-dialog[open] {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1fr);
}

.property-dialog > img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}

.dialog-content {
  align-self: center;
  padding: clamp(2rem, 5vw, 4rem);
}

.dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
}

.dialog-type {
  color: var(--brand-blue-dark);
  font-weight: 600;
}

.dialog-content h2 {
  margin-top: 0.35rem;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
}

.dialog-price {
  margin-top: var(--space-md);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
}

#dialog-description {
  margin-top: var(--space-lg);
  color: var(--muted);
}

.feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: var(--space-lg) 0 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-xl);
}

/* Admin */

.admin-body {
  min-height: 100dvh;
  background: oklch(96% 0.012 260);
}

.demo-note {
  padding: 0.65rem var(--space-md);
  background: var(--ink);
  color: white;
  text-align: center;
  font-size: 0.9rem;
}

.admin-login {
  min-height: calc(100dvh - 44px);
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(400px, 1.1fr);
}

.login-brand,
.login-card-wrap,
.login-card {
  min-width: 0;
}

.login-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(2rem, 6vw, 5rem);
  background: var(--brand-sky);
}

.login-brand .brand {
  color: var(--ink);
}

.login-brand h1 {
  max-width: 9ch;
  margin-top: var(--space-3xl);
  font-size: clamp(3rem, 6vw, 5.5rem);
}

.login-brand p {
  max-width: 48ch;
  margin-top: var(--space-lg);
}

.login-card-wrap {
  display: grid;
  place-items: center;
  padding: clamp(2rem, 6vw, 5rem);
}

.login-card {
  width: min(100%, 440px);
}

.login-card h2 {
  font-size: 2.4rem;
}

.login-card > p {
  margin-top: 0.6rem;
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.demo-credentials {
  margin-top: var(--space-xl);
  padding: var(--space-md);
  background: var(--brand-sky);
  font-size: 0.95rem;
}

.demo-credentials code {
  font-family: var(--font-body);
  font-weight: 600;
}

.form-message {
  min-height: 1.5em;
  color: var(--danger);
  font-weight: 600;
}

.form-message[data-state="success"] {
  color: var(--success);
}

.admin-app[hidden],
.admin-login[hidden] {
  display: none;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  padding: 0.85rem clamp(1rem, 4vw, 3rem);
  background: var(--ink);
  color: white;
}

.admin-topbar .brand img {
  width: 27px;
  height: 38px;
}

.admin-topbar__actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.admin-topbar__actions a,
.admin-topbar__actions button {
  min-height: 44px;
}

.admin-link {
  display: inline-flex;
  align-items: center;
  padding-inline: 0.75rem;
  color: white;
}

.admin-logout {
  border: 1px solid rgb(255 255 255 / 0.55);
  border-radius: var(--radius-control);
  background: transparent;
  color: white;
  padding-inline: 0.9rem;
}

.admin-main {
  width: min(1380px, calc(100% - clamp(2rem, 6vw, 6rem)));
  margin-inline: auto;
  padding-block: clamp(2rem, 5vw, 4rem);
}

.admin-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-xl);
}

.admin-heading h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.admin-heading p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.admin-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.admin-stat {
  min-width: 160px;
  padding: var(--space-md) var(--space-lg);
  background: var(--surface);
}

.admin-stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
}

.admin-stat span {
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.75fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: var(--space-2xl);
  align-items: start;
}

.admin-panel {
  background: var(--surface);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.admin-panel__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.admin-panel h2 {
  font-size: 1.8rem;
}

.admin-property-list {
  display: grid;
  gap: 0;
}

.admin-property {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: var(--space-md);
  align-items: center;
  padding-block: var(--space-md);
  border-top: 1px solid var(--line);
}

.admin-property:first-child {
  border-top: 0;
}

.admin-property img {
  width: 96px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-property h3 {
  font-size: 1.15rem;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.admin-property p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-property__actions {
  display: flex;
  gap: 0.35rem;
}

.icon-action {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
}

.icon-action:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue-dark);
}

.icon-action--danger:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.property-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.admin-field {
  display: grid;
  gap: 0.35rem;
}

.admin-field label,
.admin-field > span {
  font-size: 0.9rem;
  font-weight: 600;
}

.admin-field--wide,
.form-actions {
  grid-column: 1 / -1;
}

.admin-field textarea {
  min-height: 112px;
  resize: vertical;
}

.checkbox-field {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: var(--space-sm);
}

.checkbox-field input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand-blue);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.admin-empty {
  padding: var(--space-xl);
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: var(--space-lg);
  bottom: max(var(--space-lg), env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  max-width: min(420px, calc(100% - 2rem));
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: calc(var(--radius-media) + 4px);
  background: color-mix(in srgb, var(--ink) 84%, transparent);
  color: white;
  box-shadow: 0 6px 8px rgb(22 27 61 / 0.18);
  -webkit-backdrop-filter: blur(12px) saturate(112%);
  backdrop-filter: blur(12px) saturate(112%);
}

.toast[hidden] {
  display: none;
}

.toast button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--brand-sky);
  font-weight: 600;
  text-decoration: underline;
}

@media (max-width: 1040px) {
  .property-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button--search {
    min-width: 0;
  }

  .properties-section {
    padding-top: calc(var(--space-section) + 8rem);
  }

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

  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .site-header {
    position: fixed;
    inset: 0 0 auto;
    width: 100%;
    min-height: calc(80px + env(safe-area-inset-top));
    margin: 0;
    padding-top: env(safe-area-inset-top);
    padding-inline: var(--page-edge);
    background: transparent;
    transform: translateY(0);
    transition: background-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 220ms var(--ease-out);
  }

  .site-header.is-solid {
    background: var(--ink);
    box-shadow: 0 4px 8px rgb(22 27 61 / 0.14);
  }

  .site-header[data-hidden="true"] {
    transform: translateY(-100%);
  }

  .site-header[data-menu-open="true"] {
    transform: translateY(0);
  }

  .menu-button {
    display: block;
    border-radius: 10px;
    background: transparent;
  }

  .menu-button:active {
    background: rgb(255 255 255 / 0.12);
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: var(--page-edge);
    left: var(--page-edge);
    display: flex;
    visibility: hidden;
    width: auto;
    max-width: 340px;
    margin-left: auto;
    padding: 0.5rem;
    align-items: stretch;
    flex-direction: column;
    gap: 0.2rem;
    border-radius: 16px;
    background: var(--ink);
    box-shadow: 0 4px 8px rgb(22 27 61 / 0.18);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 180ms;
  }

  .main-nav > a:not(.button) {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
  }

  .main-nav > a:not(.button):active {
    background: rgb(255 255 255 / 0.1);
  }

  .main-nav .button--header {
    margin-top: 0.2rem;
    border-radius: 10px;
  }

  .site-header[data-menu-open="true"] .main-nav {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .site-header[data-menu-open="true"] .menu-button span:nth-child(2) {
    transform: translateY(4px) rotate(45deg);
  }

  .site-header[data-menu-open="true"] .menu-button span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
  }

  .hero {
    min-height: 820px;
    align-items: start;
  }

  .hero__content {
    padding-top: 10rem;
  }

  .hero__content h1 {
    font-size: clamp(3.2rem, 12vw, 4.5rem);
  }

  .property-search {
    bottom: -160px;
  }

  .trust-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .admin-login {
    grid-template-columns: 1fr;
  }

  .trust-copy {
    padding: clamp(2.75rem, 7vw, 3.5rem) var(--page-edge);
  }

  .trust-portrait {
    min-height: clamp(360px, 52vh, 460px);
    order: -1;
  }

  .trust-portrait__people {
    bottom: -20%;
    height: 130%;
  }

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

  .sell-section {
    display: flex;
  }

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

  .footer-intro {
    grid-column: 1 / -1;
  }

  .property-dialog[open] {
    display: block;
    overflow: auto;
  }

  .property-dialog > img {
    height: min(52vh, 460px);
    min-height: 0;
  }

  .login-brand {
    min-height: 390px;
  }
}

@media (max-width: 640px) {
  :root {
    --shell: calc(100% - 40px);
  }

  .brand {
    font-size: 0.8rem;
  }

  .brand img {
    width: 29px;
    height: 42px;
  }

  .hero {
    min-height: 700px;
  }

  .hero__image {
    object-position: center;
  }

  .hero__content h1 {
    font-size: clamp(3.1rem, 15vw, 4rem);
  }

  .property-search {
    bottom: -230px;
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .properties-section {
    padding-top: calc(var(--space-section) + 18rem);
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .property-grid,
  .property-grid[data-density="pair"],
  .property-grid[data-density="single"] {
    grid-template-columns: 1fr;
  }

  .property-grid[data-density="single"] .property-card {
    display: block;
  }

  .property-grid[data-density="single"] .property-card__body {
    padding-top: var(--space-md);
  }

  .trust-grid {
    gap: 0;
  }

  .trust-portrait {
    min-height: clamp(320px, 48vh, 390px);
  }

  .trust-portrait__people {
    bottom: -18%;
    height: 125%;
  }

  .trust-copy h2 {
    max-width: none;
    font-size: clamp(2.7rem, 12.5vw, 3.85rem);
  }

  .trust-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .trust-meta span + span {
    padding-left: 0;
    border-left: 0;
  }

  .sell-section {
    align-items: stretch;
  }

  .footer-grid,
  .footer-bottom {
    grid-template-columns: 1fr;
  }

  .footer-intro {
    grid-column: auto;
  }

  .footer-bottom {
    gap: 0.35rem;
  }

  .footer-bottom p:nth-child(2),
  .footer-bottom p:last-child {
    text-align: left;
  }

  .admin-topbar {
    align-items: flex-start;
  }

  .admin-topbar__actions .admin-link {
    display: none;
  }

  .admin-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-property {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .admin-property img {
    width: 76px;
    height: 68px;
  }

  .admin-property__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .property-form {
    grid-template-columns: 1fr;
  }

  .admin-field--wide,
  .form-actions {
    grid-column: auto;
  }

  .demo-note {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 340px) {
  .hero__content h1 {
    font-size: 2.55rem;
  }
}

@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;
  }
}
