:root {
  --yellow: #f5b042;
  --dark: #0d1117;
  --white: #ffffff;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 10px;
  --header-h: 4rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--dark);
  background: var(--yellow);
  min-height: 100dvh;
}

.visually-hidden {
  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: absolute;
  top: 0;
  left: 0;
  z-index: 200;
  padding: 0.75rem 1rem;
  background: var(--dark);
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid rgba(13, 17, 23, 0.06);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.brand:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 4px;
  border-radius: 4px;
}

.brand-logo {
  display: block;
  flex-shrink: 0;
  height: 2.5rem;
  width: auto;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius);
  margin-left: auto;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 1.375rem;
  height: 2px;
  background: var(--dark);
  margin: 0 auto;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  white-space: nowrap;
}

.nav-list a:hover {
  text-decoration: underline;
}

.nav-list a:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 4px;
  border-radius: 2px;
}

.lang-switcher {
  position: relative;
}

.lang-flag-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
}

.lang-flag {
  font-size: 1.5rem;
  line-height: 1;
}

.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  border: 1px solid rgba(13, 17, 23, 0.12);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  min-width: 130px;
  z-index: 100;
}

.lang-option {
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.lang-option:hover {
  background: rgba(13, 17, 23, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9375rem;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--dark);
  outline-offset: 3px;
}

.btn-header-cta {
  background: var(--yellow);
  color: var(--dark);
  padding: 0.55rem 1.15rem;
  text-decoration: none;
  flex-shrink: 0;
}

.btn-header-cta:hover {
  filter: brightness(1.05);
}

/* —— Hero —— */
.hero {
  min-height: calc(100dvh - var(--header-h));
  padding: clamp(2rem, 6vw, 4rem) 1.25rem clamp(3rem, 8vw, 5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 52rem;
  margin: 0 auto;
}

.hero-title {
  margin: 0 0 clamp(1rem, 3vw, 1.5rem);
  font-size: clamp(1.75rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 28ch;
}

.hero-lead {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  font-weight: 400;
  max-width: 42ch;
}

.search-form {
  width: 100%;
  max-width: min(100%, 36rem);
  margin-top: clamp(1.25rem, 4vw, 2rem);
  text-align: left;
}

.search-label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

.search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(13, 17, 23, 0.08);
}

.search-input {
  min-width: 0;
  border: none;
  padding: 0.75rem 1rem;
  font-family: var(--font-sans);
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: var(--dark);
  background: var(--white);
}

.search-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--dark);
}

.btn-search {
  flex: 0 0 auto;
  background: var(--dark);
  color: var(--white);
  padding: 0.85rem 1.35rem;
  border-radius: 0;
  min-width: 6.5rem;
}

.btn-search:hover:not(:disabled) {
  background: #161b22;
}

.btn-search:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.search-result {
  width: 100%;
  max-width: min(100%, 36rem);
  margin-top: clamp(1rem, 3vw, 1.5rem);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  background: var(--white);
  text-align: left;
  font-size: 0.9375rem;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(13, 17, 23, 0.08);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  vertical-align: -0.15em;
  margin-right: 0.4em;
}

.search-result.is-error {
  border: 1px solid #cf222e;
  color: #a40e26;
}

.search-result.is-success {
  border: 1px solid rgba(13, 17, 23, 0.08);
  color: var(--dark);
}

.search-result-line {
  margin: 0 0 0.5rem;
}

.search-result-line:last-child {
  margin-bottom: 0;
}

.search-result-heading {
  margin: 0.75rem 0 0.35rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.search-result-muted {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  opacity: 0.85;
}

.search-result-flow {
  min-width: 0;
}

.property-map-section {
  width: 100%;
  max-width: min(100%, 36rem);
  margin-top: clamp(1rem, 3vw, 1.5rem);
  text-align: left;
}

.search-result > .property-map-section {
  max-width: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(13, 17, 23, 0.08);
}

.property-map-heading {
  margin: 0 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.property-map-section[hidden] {
  display: none !important;
}

.property-map {
  height: 240px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(13, 17, 23, 0.08);
  background: rgba(13, 17, 23, 0.04);
}

#street-view-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(13, 17, 23, 0.08);
}

#street-view-section[hidden] {
  display: none !important;
}

.street-view-heading {
  margin-bottom: 0.5rem;
}

.property-map-fallback {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  opacity: 0.85;
  line-height: 1.45;
}

.property-map-fallback a {
  color: var(--dark);
  font-weight: 600;
}


/* —— Mobile —— */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
    order: 2;
  }

  .brand {
    order: 0;
  }

  .lang-switcher {
    order: 1;
    margin-left: auto;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0 0.5rem;
    gap: 1rem;
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-list li {
    border-bottom: 1px solid rgba(13, 17, 23, 0.08);
  }

  .nav-list a {
    display: block;
    padding: 0.75rem 0;
    white-space: normal;
  }

  .btn-header-cta {
    text-align: center;
    justify-content: center;
    width: 100%;
  }

  .search-row {
    flex-direction: column;
    gap: 0;
  }

  .search-input {
    padding: 0.6rem 0.875rem;
    font-size: 1rem; /* prevents iOS Safari zoom-on-focus (triggered below 16px) */
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .btn-search {
    width: 100%;
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 0.75rem 1rem;
  }
}

@media (min-width: 769px) {
  .search-row {
    flex-wrap: nowrap;
  }

  .search-input {
    border-radius: var(--radius) 0 0 var(--radius);
  }

  .btn-search {
    border-radius: 0 var(--radius) var(--radius) 0;
  }
}
