/* ============================================================
   SLANGKOP HOUSE — style.css
   Mobile-first. Breakpoints: 768px (tablet), 1280px (desktop)
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --bg: #FBF9F4;
  --ink: #1F2421;
  --accent: #3A5A40;
  --accent-dark: #2d4530;
  --sand: #E8E1D1;
  --muted: #4a5450;
  --label: #7a8880;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --max-w: 1200px;
  --sp-xs: 0.5rem;
  --sp-s: 1rem;
  --sp-m: 1.5rem;
  --sp-l: 2.5rem;
  --sp-xl: 4rem;
  --sp-2xl: 6rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-serif);
  line-height: 1.2;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.125rem, 2vw, 1.5rem); }

ul { list-style: none; }

/* --- Skip to content --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--sp-s);
  z-index: 200;
  background: var(--accent);
  color: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 0 0 4px 4px;
  font-size: 0.875rem;
  text-decoration: none;
  font-family: var(--font-sans);
}

.skip-link:focus {
  top: 0;
}

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

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

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

/* --- HEADER / NAV --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--sand);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.875rem;
  gap: var(--sp-m);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  padding: 0.55rem 0.9rem 0.45rem;
  background: linear-gradient(180deg, #fffdfa 0%, #f3ede1 100%);
  border: 1px solid rgba(58,90,64,0.14);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(31,36,33,0.06);
}

.logo img {
  height: 38px;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--sp-m);
}

.site-nav a.nav-link {
  font-size: 0.9375rem;
  text-decoration: none;
  color: var(--ink);
  transition: color 0.15s;
}

.site-nav a.nav-link:hover,
.site-nav a.nav-link[aria-current="page"] {
  color: var(--accent);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.625rem 1.375rem;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid var(--accent);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1.3;
  white-space: nowrap;
  background: none;
}

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

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

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

.btn--outline {
  background: transparent;
  color: var(--accent);
}

.btn--outline:hover {
  background: var(--accent);
  color: var(--bg);
}

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

.btn--outline-light:hover {
  background: var(--bg);
  color: var(--accent);
}

/* --- Hamburger toggle --- */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--ink);
}

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

.hamburger-icon {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  position: relative;
  transition: background 0.2s;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s;
}

.hamburger-icon::before { top: -7px; }
.hamburger-icon::after  { top: 7px; }

.nav-toggle[aria-expanded="true"] .hamburger-icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger-icon::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] .hamburger-icon::after {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile nav --- */
@media (max-width: 767px) {
  .nav-toggle {
    display: block;
  }

  #site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--sand);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--sp-m);
    gap: var(--sp-s);
    display: none;
    box-shadow: 0 8px 24px rgba(31,36,33,0.08);
  }

  .site-header.nav-open #site-nav {
    display: flex;
  }

  .site-nav .btn {
    align-self: flex-start;
  }
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 85svh;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(31,36,33,0.72) 0%,
    rgba(31,36,33,0.3) 40%,
    rgba(31,36,33,0.05) 75%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  padding: var(--sp-xl) var(--sp-m);
  width: 100%;
  max-width: calc(var(--max-w) + 2 * var(--sp-m));
  margin-inline: auto;
}

.hero__title {
  color: var(--bg);
  margin-bottom: var(--sp-s);
  max-width: 18ch;
}

.hero__sub {
  color: rgba(251,249,244,0.85);
  font-size: 1.125rem;
  margin-bottom: var(--sp-l);
  max-width: 38ch;
}

.hero__ctas {
  display: flex;
  gap: var(--sp-s);
  flex-wrap: wrap;
}

/* --- INTRO --- */
.intro p {
  font-size: 1.125rem;
  line-height: 1.75;
  max-width: 58ch;
  color: var(--muted);
}

/* --- SECTION HEADER --- */
.section-header {
  margin-bottom: var(--sp-l);
}

.section-header h2 {
  margin-bottom: var(--sp-xs);
}

.section-header p {
  color: var(--muted);
  font-size: 1rem;
  max-width: 55ch;
}

/* --- ROOM TEASERS (home) --- */
.room-grid {
  display: grid;
  gap: var(--sp-m);
}

.room-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sand);
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.2s;
}

.room-card:hover {
  box-shadow: 0 4px 20px rgba(31,36,33,0.1);
}

.room-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.room-card__img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.room-card__body {
  padding: var(--sp-m);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.room-card__name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}

.room-card__desc {
  font-size: 0.9375rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.55;
}

.room-card__rate {
  margin-top: var(--sp-s);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
}

/* --- WHY BOOK DIRECT --- */
.why-grid {
  display: grid;
  gap: var(--sp-l);
}

.why-item__marker {
  display: block;
  width: 36px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: var(--sp-s);
}

.why-item__title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--sp-xs);
}

.why-item__text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--muted);
}

/* --- LOCATION --- */
.location-body {
  display: grid;
  gap: var(--sp-l);
}

.location-text p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: var(--sp-s);
}

.location-text p:last-child {
  margin-bottom: 0;
}

.nearby-list {
  margin-top: var(--sp-m);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nearby-list li {
  padding-left: 1.375rem;
  position: relative;
  font-size: 0.9375rem;
  color: var(--muted);
}

.nearby-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.location-map {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--sand);
}

.location-map img,
.location-map iframe {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
}

.location-map iframe {
  min-height: 500px;
  height: 100%;
}

/* --- FOOTER ENQUIRY STRIP --- */
.enquiry-strip {
  background: var(--ink);
  color: var(--bg);
  padding-block: var(--sp-xl);
}

.enquiry-strip h2 {
  color: var(--bg);
  margin-bottom: var(--sp-xs);
}

.enquiry-strip .strip-intro {
  color: rgba(251,249,244,0.7);
  margin-bottom: var(--sp-l);
  font-size: 0.9375rem;
}

/* --- FORMS --- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: var(--sp-m);
}

label {
  font-size: 0.875rem;
  font-weight: 500;
}

input,
textarea,
select {
  font-family: var(--font-sans);
  font-size: 1rem;
  min-height: 44px;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--sand);
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink);
  width: 100%;
  transition: border-color 0.15s, outline 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.55;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231F2421' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.75rem;
  cursor: pointer;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0.5;
  cursor: pointer;
}

/* Enquiry strip form overrides */
.enquiry-strip input,
.enquiry-strip textarea {
  background: rgba(251,249,244,0.08);
  border-color: rgba(251,249,244,0.22);
  color: var(--bg);
}

.enquiry-strip label {
  color: rgba(251,249,244,0.8);
}

.enquiry-strip input::placeholder,
.enquiry-strip textarea::placeholder {
  color: rgba(251,249,244,0.35);
}

.enquiry-strip input:focus,
.enquiry-strip textarea:focus {
  outline-color: rgba(251,249,244,0.7);
  border-color: rgba(251,249,244,0.5);
}

.strip-form-row {
  display: grid;
  gap: var(--sp-m);
}

.form-actions {
  margin-top: var(--sp-xs);
}

.form-success {
  padding: var(--sp-l) 0;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.5;
}

.enquiry-strip .form-success {
  color: var(--bg);
}

.form-error-msg {
  color: #c0392b;
  font-size: 0.875rem;
  margin-top: var(--sp-s);
  display: none;
}

.form-error-msg.visible {
  display: block;
}

.enquiry-strip .form-error-msg {
  color: #e88;
}

.honeypot {
  display: none !important;
}

/* --- SITE FOOTER --- */
.site-footer {
  background: var(--sand);
  padding-block: var(--sp-xl);
  font-size: 0.875rem;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--sp-m);
}

.footer-address p {
  line-height: 1.7;
}

.footer-contact a {
  color: var(--accent);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-credit {
  margin-top: var(--sp-s);
  font-size: 0.8125rem;
  opacity: 0.65;
  border-top: 1px solid rgba(31,36,33,0.12);
  padding-top: var(--sp-m);
}

.footer-credit a {
  color: var(--accent);
}

/* --- PAGE HERO (interior pages) --- */
.page-hero {
  padding-block: var(--sp-xl) var(--sp-l);
  border-bottom: 1px solid var(--sand);
}

.page-hero h1 {
  margin-bottom: var(--sp-xs);
}

.page-hero p {
  color: var(--muted);
  font-size: 1.0625rem;
  max-width: 55ch;
}

/* ============================================================
   ROOMS PAGE
   ============================================================ */

.room-article {
  padding-block: var(--sp-2xl);
  border-bottom: 1px solid var(--sand);
}

.room-article:last-child {
  border-bottom: none;
}

/* Room media */
.room-media {
  background: none;
  border: 1px solid var(--sand);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  display: block;
  overflow: hidden;
  position: relative;
  margin-bottom: var(--sp-l);
  box-shadow: 0 10px 26px rgba(31,36,33,0.06);
}

.room-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(31,36,33,0);
  transition: background 0.2s;
}

.room-media:hover::after {
  background: rgba(31,36,33,0.12);
}

.room-media:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  z-index: 1;
}

.room-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
  aspect-ratio: 4 / 3;
}

.room-media:hover img {
  transform: scale(1.04);
}

/* Room info */
.room-info h2 {
  margin-bottom: var(--sp-s);
}

.room-meta {
  display: flex;
  gap: var(--sp-l);
  margin-bottom: var(--sp-m);
  flex-wrap: wrap;
}

.room-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.room-meta-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--label);
  font-weight: 500;
}

.room-meta-value {
  font-size: 0.9375rem;
  font-weight: 500;
}

.room-desc {
  margin-bottom: var(--sp-m);
  max-width: 62ch;
}

.room-desc p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
}

.room-includes {
  margin-bottom: var(--sp-l);
}

.room-includes-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--label);
  font-weight: 500;
  font-family: var(--font-sans);
  margin-bottom: var(--sp-s);
  display: block;
}

.includes-list {
  display: grid;
  gap: 0.4rem;
}

.includes-list li {
  font-size: 0.9375rem;
  padding-left: 1.375rem;
  position: relative;
  color: var(--muted);
}

.includes-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-size: 0.875rem;
  line-height: 1.6;
}

.room-rate {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: var(--sp-m);
}

.room-rate-label {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--label);
  font-weight: 400;
}

/* --- DIALOG LIGHTBOX --- */
dialog.lightbox {
  background: rgba(20,24,22,0.97);
  border: none;
  max-width: 92vw;
  max-height: 92vh;
  width: fit-content;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  margin: auto;
}

dialog.lightbox::backdrop {
  background: rgba(20,24,22,0.78);
}

.lightbox__img {
  max-width: 90vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(251,249,244,0.12);
  border: 1px solid rgba(251,249,244,0.25);
  color: var(--bg);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}

.lightbox__close:hover {
  background: rgba(251,249,244,0.22);
}

.lightbox__close:focus-visible {
  outline: 2px solid var(--bg);
  outline-offset: 2px;
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-grid {
  display: grid;
  gap: var(--sp-xl);
  align-items: start;
}

.contact-form-col h2 {
  margin-bottom: var(--sp-l);
}

.contact-detail-col h2 {
  margin-bottom: var(--sp-m);
}

.contact-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--sp-m);
}

.contact-detail-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--label);
  font-weight: 500;
}

.contact-detail-item a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
}

.contact-detail-item a:hover {
  text-decoration: underline;
}

.contact-detail-item span {
  font-size: 0.9375rem;
  color: var(--muted);
}

.response-note {
  margin-top: var(--sp-m);
  margin-bottom: var(--sp-l);
  padding: var(--sp-m);
  background: var(--bg);
  border-radius: 4px;
  font-size: 0.875rem;
  border-left: 3px solid var(--accent);
  line-height: 1.65;
  color: var(--muted);
}

.contact-map {
  margin-bottom: var(--sp-m);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--sand);
}

.contact-map img,
.contact-map iframe {
  width: 100%;
  height: auto;
  display: block;
  border: 0;
}

.contact-map iframe {
  min-height: 500px;
  height: 100%;
}

.directions h3 {
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--label);
  margin-bottom: var(--sp-s);
}

.directions p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--muted);
}

.form-row-2 {
  display: grid;
  gap: var(--sp-m);
}

.optional-label {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--label);
}

/* ============================================================
   RESPONSIVE — 768px
   ============================================================ */
@media (min-width: 768px) {
  .room-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

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

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: var(--sp-xl);
  }

  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  .includes-list {
    grid-template-columns: 1fr 1fr;
  }

  .location-body {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .room-article {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--sp-xl);
    align-items: start;
  }

  .room-media {
    margin-bottom: 0;
  }
}

/* ============================================================
   RESPONSIVE — 1280px
   ============================================================ */
@media (min-width: 1280px) {
  .hero__content {
    padding-block: var(--sp-2xl);
  }

  .contact-grid {
    grid-template-columns: 3fr 2fr;
  }

  .room-meta {
    gap: var(--sp-xl);
  }
}

/* --- Utility --- */
.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;
}
