/* ==========================================================================
   Koto B&B — Shared Design System
   --------------------------------------------------------------------------
   The single source of truth for palette, type scale, spacing and the site
   CHROME (header/nav + footer) that every page reuses verbatim.

   Mobile-first: base rules target small screens; `min-width` media queries
   progressively enhance for tablet and desktop.

   Fonts: Lora (display), Raleway (body), Montserrat (labels / UI).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Montserrat:wght@500;600;700&family=Raleway:wght@300;400;500;600&display=swap');

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand palette */
  --color-primary: #6B0505;          /* bordeaux — signature Koto accent   */
  --color-primary-strong: #4A0B0B;   /* deep bordeaux, hovers & depth       */
  --color-primary-soft: #8A1A1A;
  --color-secondary: #3E5A3A;        /* garden green                        */
  --color-secondary-strong: #2E452B;
  --color-accent: #C2A24B;           /* warm gold — golden-floor motif      */
  --color-accent-soft: #E3CE8E;
  --color-pool: #2F6B6B;             /* heated-pool teal                    */

  /* Surfaces & neutrals */
  --color-bg: #FBF8F3;
  --color-surface: #F7F2EA;          /* cream                              */
  --color-surface-alt: #E7DCCB;      /* sand                               */
  --color-surface-dark: #24211F;     /* ink panel                          */
  --color-border: #E0D6C6;
  --color-border-strong: #CDBFA8;

  /* Text */
  --color-text: #24211F;
  --color-text-muted: #5A5550;
  --color-text-invert: #FBF8F3;
  --color-text-on-primary: #FFFFFF;

  /* Feedback */
  --color-success: #2F6B4F;
  --color-danger: #A32216;
  --color-focus: #C2A24B;

  /* Typography — families */
  --font-display: "Lora", Georgia, "Times New Roman", serif;
  --font-body: "Raleway", "Helvetica Neue", Arial, sans-serif;
  --font-label: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  /* Typography — scale (fluid) */
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-body: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-h4: clamp(1.125rem, 1.05rem + 0.4vw, 1.375rem);
  --fs-h3: clamp(1.375rem, 1.2rem + 0.8vw, 1.75rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.6vw, 2.75rem);
  --fs-h1: clamp(2.25rem, 1.7rem + 2.8vw, 3.75rem);
  --fs-display: clamp(2.75rem, 1.9rem + 4.4vw, 5rem);

  /* Typography — weights, line-height, tracking */
  --fw-light: 300;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-tight: 1.12;
  --lh-snug: 1.28;
  --lh-normal: 1.55;
  --lh-relaxed: 1.75;
  --ls-tight: -0.01em;
  --ls-wide: 0.08em;
  --ls-wider: 0.16em;

  /* Spacing scale (8px base) */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 8rem;

  /* Layout */
  --container-max: 72rem;
  --container-narrow: 48rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(3rem, 7vw, 6rem);
  --header-height: 4.5rem;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-xs: 0 1px 2px rgba(36, 33, 31, 0.06);
  --shadow-sm: 0 2px 6px rgba(36, 33, 31, 0.08);
  --shadow-md: 0 10px 24px -8px rgba(36, 33, 31, 0.18);
  --shadow-lg: 0 24px 48px -16px rgba(36, 33, 31, 0.26);
  --shadow-focus: 0 0 0 3px rgba(194, 162, 75, 0.55);

  /* Motion & misc */
  --border-width: 1px;
  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --z-header: 100;
  --z-overlay: 200;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

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

/* Keep anchored sections clear of the sticky header when jumped to */
[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-sm));
}

/* Keep anchored sections clear of the sticky header when jumped to */
[id] {
  scroll-margin-top: calc(var(--header-height) + var(--space-sm));
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

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

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-sm);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--color-text);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
}

small,
.text-small {
  font-size: var(--fs-sm);
  color: var(--color-text-muted);
}

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

hr {
  border: 0;
  border-top: var(--border-width) solid var(--color-border);
  margin: var(--space-xl) 0;
}

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

.container--narrow {
  max-width: var(--container-narrow);
}

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

.section--tinted { background-color: var(--color-surface); }
.section--sand { background-color: var(--color-surface-alt); }
.section--dark {
  background-color: var(--color-surface-dark);
  color: var(--color-text-invert);
}

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

.section--dark p { color: rgba(251, 248, 243, 0.78); }

.section__head {
  max-width: 42rem;
  margin: 0 auto var(--space-xl);
  text-align: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-2xs);
  font-family: var(--font-label);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-accent);
}

.lead {
  font-size: var(--fs-h4);
  line-height: var(--lh-snug);
  color: var(--color-text-muted);
}

.prose {
  max-width: 62ch;
}

.prose p + p { margin-top: var(--space-md); }

/* Grid helpers — single column on mobile, multi-column from tablet up */
.grid {
  display: grid;
  gap: var(--space-lg);
  grid-template-columns: 1fr;
}

.grid--2,
.grid--3,
.grid--4 {
  grid-template-columns: 1fr;
}

.stack > * + * { margin-top: var(--space-sm); }

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

.text-center { text-align: center; }

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

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.85em 1.6em;
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-label);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  transition: background-color var(--transition),
    border-color var(--transition), color var(--transition),
    transform var(--transition), box-shadow var(--transition);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-text-on-primary);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--color-primary-strong);
  border-color: var(--color-primary-strong);
  color: var(--color-text-on-primary);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
}

.btn-accent {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-surface-dark);
}

.btn-accent:hover {
  background-color: var(--color-accent-soft);
  border-color: var(--color-accent-soft);
  color: var(--color-surface-dark);
}

.btn-ghost {
  background-color: transparent;
  border-color: var(--color-border-strong);
  color: var(--color-text);
}

.btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn-light {
  background-color: var(--color-bg);
  border-color: var(--color-bg);
  color: var(--color-primary);
}

.btn-light:hover {
  background-color: #FFFFFF;
  border-color: #FFFFFF;
  color: var(--color-primary-strong);
}

.btn-lg { padding: 1em 2em; font-size: var(--fs-body); }
.btn-block { display: flex; width: 100%; }

/* --------------------------------------------------------------------------
   5. Cards & media
   -------------------------------------------------------------------------- */
.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background-color: var(--color-bg);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--color-surface-alt);
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
}

.card__title { margin-bottom: 0; font-size: var(--fs-h4); }
.card__text { margin-bottom: 0; font-size: var(--fs-sm); }
.card__footer { margin-top: auto; padding-top: var(--space-sm); }

/* Small amenity / spec chips */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3em 0.8em;
  border-radius: var(--radius-pill);
  background-color: var(--color-surface);
  border: var(--border-width) solid var(--color-border);
  font-family: var(--font-label);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 0.4em 0.9em;
  border-radius: var(--radius-sm);
  background-color: var(--color-accent);
  color: var(--color-surface-dark);
  font-family: var(--font-label);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
}

/* --------------------------------------------------------------------------
   6. CHROME — header / nav (reused verbatim on every page)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background-color: rgba(251, 248, 243, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: var(--border-width) solid var(--color-border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: var(--header-height);
}

/* Brand / logo lockup */
.site-brand {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "logo name"
    "logo tag";
  align-items: center;
  column-gap: var(--space-2xs);
  color: var(--color-text);
  text-decoration: none;
  flex-shrink: 0;
}

.site-brand:hover { color: var(--color-primary); }

.site-brand__logo {
  grid-area: logo;
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--color-primary);
  color: var(--color-text-on-primary);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--fw-semibold);
  line-height: 1;
  object-fit: cover;
}

.site-brand__name {
  grid-area: name;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.site-brand__tag {
  grid-area: tag;
  display: block;
  font-family: var(--font-label);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Primary navigation */
.site-nav {
  display: block;
}

.site-nav__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: var(--space-2xs) var(--space-xs);
  border-radius: var(--radius-sm);
  font-family: var(--font-label);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-text);
}

.site-nav__link:hover {
  color: var(--color-primary);
  background-color: var(--color-surface);
}

.site-nav__link--active,
.site-nav__link[aria-current="page"] {
  color: var(--color-primary);
  font-weight: var(--fw-semibold);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
}

/* Mobile toggle — visible only below the nav breakpoint */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: var(--border-width) solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background-color: transparent;
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background-color: var(--color-text);
  transition: transform var(--transition), opacity var(--transition);
}

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

/* Mobile-first: collapse the nav behind the toggle */
.site-nav {
  display: none;
  width: 100%;
  padding-bottom: var(--space-sm);
}

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

/* --------------------------------------------------------------------------
   7. CHROME — footer (reused verbatim on every page)
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--color-surface-dark);
  color: var(--color-text-invert);
  padding-block: var(--space-2xl) var(--space-md);
}

.site-footer a { color: rgba(251, 248, 243, 0.82); }
.site-footer a:hover { color: var(--color-accent); }

.footer-grid {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-xl);
  border-bottom: var(--border-width) solid rgba(251, 248, 243, 0.14);
}

.footer-col { min-width: 0; }

.footer-col__title {
  margin-bottom: var(--space-sm);
  font-family: var(--font-label);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-accent);
}

.footer-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.footer-list__link {
  font-size: var(--fs-sm);
  color: rgba(251, 248, 243, 0.82);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  font-size: var(--fs-sm);
  font-style: normal;
  color: rgba(251, 248, 243, 0.82);
}

.footer-tagline {
  max-width: 34ch;
  color: rgba(251, 248, 243, 0.7);
  font-size: var(--fs-sm);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  color: var(--color-text-invert);
  margin-bottom: var(--space-2xs);
}

.footer-social {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}

.footer-social a {
  font-family: var(--font-label);
  font-size: var(--fs-xs);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: rgba(251, 248, 243, 0.82);
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  padding-top: var(--space-md);
  font-size: var(--fs-xs);
  color: rgba(251, 248, 243, 0.6);
}

.footer-bottom__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-bottom__legal a {
  color: rgba(251, 248, 243, 0.7);
}

/* --------------------------------------------------------------------------
   8. Responsive — tablet and up
   -------------------------------------------------------------------------- */
@media (min-width: 48em) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }

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

  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (min-width: 64em) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }

  /* Desktop: inline nav, hide the hamburger */
  .nav-toggle { display: none; }

  .site-nav {
    display: block;
    width: auto;
    padding-bottom: 0;
  }

  .site-nav__list { flex-direction: row; align-items: center; gap: var(--space-3xs); }
}

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