/* ============================================
   LIVING FLORENCE — main.css
   Foundations: variables, reset, typography, layout
   ============================================ */

/* ---------- 1. CSS Variables ---------- */
:root {
  /* Colors — Florentine palette */
  --color-primary: #A24A2C;          /* deep Florentine terracotta */
  --color-primary-dark: #7A3520;     /* darker terracotta for hover */
  --color-primary-light: #C26A4A;    /* lighter terracotta */
  --color-cream: #FAF5EC;            /* warm off-white background */
  --color-cream-warm: #F2EBDD;       /* secondary cream */
  --color-cream-deep: #E8DFCE;       /* deeper cream / borders */
  --color-gold: #B8924E;             /* muted accent gold */
  --color-sage: #7A8B6C;             /* alternative sage accent */
  --color-text: #1F1A14;             /* warm near-black */
  --color-text-soft: #5A5048;        /* secondary text */
  --color-text-muted: #8A7F73;       /* tertiary text */
  --color-white: #FFFFFF;
  --color-black: #0A0805;
  --color-error: #B23A2A;
  --color-success: #5C7A4F;

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale */
  --fs-xs: 0.75rem;     /* 12px */
  --fs-sm: 0.875rem;    /* 14px */
  --fs-base: 1rem;      /* 16px */
  --fs-md: 1.125rem;    /* 18px */
  --fs-lg: 1.25rem;     /* 20px */
  --fs-xl: 1.5rem;      /* 24px */
  --fs-2xl: 2rem;       /* 32px */
  --fs-3xl: 2.75rem;    /* 44px */
  --fs-4xl: 3.75rem;    /* 60px */
  --fs-5xl: 5rem;       /* 80px */

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 5rem;
  --space-10: 6rem;
  --space-12: 8rem;

  /* Layout */
  --container-max: 1320px;
  --container-narrow: 880px;
  --container-text: 680px;
  --gutter: 1.5rem;

  /* Borders */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 8px;
  --radius-xl: 16px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(31, 26, 20, 0.06), 0 1px 2px rgba(31, 26, 20, 0.04);
  --shadow-md: 0 4px 12px rgba(31, 26, 20, 0.08), 0 2px 4px rgba(31, 26, 20, 0.04);
  --shadow-lg: 0 12px 32px rgba(31, 26, 20, 0.12), 0 4px 8px rgba(31, 26, 20, 0.06);
  --shadow-xl: 0 24px 64px rgba(31, 26, 20, 0.16);

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 180ms;
  --duration-base: 280ms;
  --duration-slow: 480ms;

  /* Z-index */
  --z-base: 1;
  --z-sticky: 100;
  --z-header: 200;
  --z-overlay: 800;
  --z-modal: 900;
  --z-toast: 1000;
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-cream);
  min-height: 100vh;
  overflow-x: hidden;
}

img,
picture,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}

ul,
ol {
  list-style: none;
}

/* ---------- 3. Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.15;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 5vw, var(--fs-5xl));
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 3.5vw, var(--fs-3xl));
  font-weight: 400;
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, var(--fs-2xl));
}

h4 {
  font-size: var(--fs-xl);
}

h5 {
  font-size: var(--fs-lg);
}

h6 {
  font-size: var(--fs-md);
  font-family: var(--font-sans);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

p {
  margin-bottom: var(--space-4);
  color: var(--color-text-soft);
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: var(--fs-lg);
  line-height: 1.6;
  color: var(--color-text-soft);
  font-weight: 300;
}

.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-primary);
  display: inline-block;
  margin-bottom: var(--space-4);
}

.eyebrow--light {
  color: var(--color-cream);
}

.eyebrow--gold {
  color: var(--color-gold);
}

a:hover {
  color: var(--color-primary);
}

strong {
  font-weight: 600;
  color: var(--color-text);
}

/* ---------- 4. Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-text {
  max-width: var(--container-text);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--space-10);
}

.section-sm {
  padding-block: var(--space-7);
}

.section-lg {
  padding-block: var(--space-12);
}

.section--cream {
  background-color: var(--color-cream-warm);
}

.section--dark {
  background-color: var(--color-text);
  color: var(--color-cream);
}

.section--dark p {
  color: rgba(250, 245, 236, 0.8);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-cream);
}

@media (max-width: 768px) {
  .section {
    padding-block: var(--space-8);
  }
  .section-lg {
    padding-block: var(--space-9);
  }
}

/* ---------- 5. Section Headings ---------- */
.section-head {
  text-align: center;
  margin-bottom: var(--space-8);
}

.section-head--left {
  text-align: left;
  max-width: 720px;
}

.section-head h2 {
  margin-bottom: var(--space-4);
}

.section-head p {
  font-size: var(--fs-md);
  max-width: 620px;
  margin-inline: auto;
}

.section-head--left p {
  margin-inline: 0;
}

/* ---------- 6. Grid utilities ---------- */
.grid {
  display: grid;
  gap: var(--space-6);
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 992px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ---------- 7. Utilities ---------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-serif { font-family: var(--font-serif); }
.text-primary { color: var(--color-primary); }
.text-soft { color: var(--color-text-soft); }
.text-muted { color: var(--color-text-muted); }

.bg-cream { background-color: var(--color-cream); }
.bg-cream-warm { background-color: var(--color-cream-warm); }
.bg-primary { background-color: var(--color-primary); color: var(--color-cream); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.divider {
  width: 60px;
  height: 1px;
  background-color: var(--color-primary);
  margin: var(--space-5) 0;
}

.divider--center {
  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;
}

/* ---------- 8. Page hero (smaller, used on inner pages) ---------- */
.page-hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: flex-end;
  padding-block: var(--space-9);
  background-size: cover;
  background-position: center;
  color: var(--color-cream);
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 5, 0.2) 0%, rgba(10, 8, 5, 0.7) 100%);
}

.page-hero__content {
  position: relative;
  z-index: 2;
}

.page-hero h1 {
  color: var(--color-cream);
  max-width: 900px;
}

.page-hero p {
  color: rgba(250, 245, 236, 0.9);
  max-width: 600px;
  margin-top: var(--space-4);
  font-size: var(--fs-md);
}

/* ---------- 9. Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
  padding-block: var(--space-4);
  font-family: var(--font-sans);
}

.breadcrumbs a {
  color: var(--color-text-muted);
  transition: color var(--duration-fast) var(--ease);
}

.breadcrumbs a:hover {
  color: var(--color-primary);
}

.breadcrumbs span {
  color: var(--color-cream-deep);
}

.breadcrumbs__current {
  color: var(--color-text) !important;
}

/* ---------- 10. Forms ---------- */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background-color: var(--color-white);
  border: 1px solid var(--color-cream-deep);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  color: var(--color-text);
  transition: all var(--duration-fast) var(--ease);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(162, 74, 44, 0.1);
}

.form-textarea {
  min-height: 140px;
  resize: vertical;
}

/* ---------- 11. Animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.8s var(--ease) both;
}

.fade-in-up {
  animation: fadeInUp 0.8s var(--ease) both;
}

/* ---------- 12. Print ---------- */
@media print {
  .site-header,
  .site-footer,
  .booking-widget,
  .sticky-cta {
    display: none !important;
  }
}
