/* ── Reset ──────────────────────────────────────────────────────────── */

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

* {
  margin: 0;
}

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

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

button {
  cursor: pointer;
}

/* ── Custom properties ─────────────────────────────────────────────── */
/*
 * Two colour palettes are intentional:
 *  - stone-*  → warm neutrals used on guest-facing property pages and
 *               landing page (warm-white background, serif headings).
 *  - gray-*   → cooler neutrals used in the admin dashboard and auth
 *               screens (white background, system-font UI).
 *
 * Both palettes share the same scale (50–900) so they stay visually
 * consistent while giving each context its own temperature.
 */

:root {
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;

  --warm-white: #FAFAF8;
  --white: #FFFFFF;
  --stone-50: #FAFAF9;
  --stone-100: #F5F5F4;
  --stone-200: #E7E5E4;
  --stone-300: #D6D3D1;
  --stone-400: #A8A29E;
  --stone-500: #78716C;
  --stone-600: #57534E;
  --stone-700: #44403C;
  --stone-800: #292524;
  --stone-900: #1C1917;

  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --green-50: #F0FDF4;
  --green-100: #DCFCE7;
  --green-200: #BBF7D0;
  --green-700: #15803D;
  --green-800: #166534;

  --red-50: #FEF2F2;
  --red-200: #FECACA;
  --red-400: #F87171;
  --red-500: #EF4444;
  --red-600: #DC2626;
  --red-700: #B91C1C;

  --yellow-50: #FEFCE8;
  --yellow-100: #FEF9C3;
  --yellow-200: #FEF08A;
  --yellow-700: #A16207;
  --yellow-800: #854D0E;
  --yellow-900: #713F12;

  --blue-600: #2563EB;
  --blue-700: #1D4ED8;
  --rose-600: #E11D48;

  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
}

/* ── Body defaults ─────────────────────────────────────────────────── */

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

body {
  font-family: var(--font-sans);
  color: var(--stone-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ────────────────────────────────────────────────────── */

:where(h1, h2, h3, h4, h5, h6) {
  line-height: 1.2;
  font-weight: 600;
}

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

/* ── Focus ─────────────────────────────────────────────────────────── */

:focus-visible {
  outline: 2px solid var(--stone-900);
  outline-offset: 2px;
}

/* ── Selection ─────────────────────────────────────────────────────── */

::selection {
  background: var(--stone-200);
}

/* ── Screen reader only ────────────────────────────────────────────── */

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

/* ── View transitions ──────────────────────────────────────────────── */

::view-transition-old(root) {
  animation: fade-out 0.15s ease-in;
}
::view-transition-new(root) {
  animation: fade-in 0.15s ease-out;
}
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes fade-in  { from { opacity: 0; } to { opacity: 1; } }
