/* Zoya's Threading — original layout */
:root {
  --bg: #f7f3ee;
  --bg-warm: #efe8df;
  --surface: #fffcf9;
  --text: #3a3632;
  --text-muted: #6b6560;
  --accent: #b87a6b;
  --accent-deep: #9a6256;
  --accent-soft: rgba(184, 122, 107, 0.12);
  --border: rgba(58, 54, 50, 0.1);
  --shadow: 0 12px 40px rgba(58, 54, 50, 0.08);
  --radius: 14px;
  --font-display: "Cormorant Garamond", "Georgia", serif;
  --font-sans: "DM Sans", system-ui, sans-serif;
  --header-bar-h: 4.5rem;
  /* Total sticky header height from viewport top (bar + notch inset). */
  --header-h: calc(var(--header-bar-h) + env(safe-area-inset-top, 0px));
}

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

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--accent-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Typography */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: 1.25rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

p {
  margin: 0 0 1em;
  color: var(--text-muted);
}

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

/* Layout */
.container {
  width: min(1100px, 100% - 2rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 5000;
  isolation: isolate;
  overflow: visible;
  padding-top: env(safe-area-inset-top, 0px);
  /* Solid bar — avoids backdrop-filter creating a containing block for fixed
     descendants (breaks slide-out nav / hamburger stacking on mobile Safari). */
  background: rgba(247, 243, 238, 0.97);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-bar-h);
  padding-block: 0.65rem;
  padding-inline: max(0px, env(safe-area-inset-left)) max(0px, env(safe-area-inset-right));
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
  min-width: 0;
}

.brand:hover {
  text-decoration: none;
  opacity: 0.92;
}

.brand-mark {
  width: 48px;
  height: auto;
}

.brand-text {
  display: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.1;
}

.brand-text small {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-top: 0.2rem;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  margin-inline-start: auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
  position: relative;
  z-index: 5002;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  position: relative;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle span::before {
  top: -6px;
}

.nav-toggle span::after {
  top: 6px;
}

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

.nav-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  z-index: 5001;
  background: var(--bg);
  padding: 1.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  border-top: 1px solid var(--border);
  pointer-events: none;
}

.site-nav.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.site-nav a {
  display: block;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}

.site-nav a:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

/* Services landing (replaces hero) */
.services-top {
  margin-bottom: clamp(1.25rem, 3vw, 1.75rem);
  padding-bottom: clamp(1rem, 2.5vw, 1.5rem);
  border-bottom: 1px solid var(--border);
}

.services-top .badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
}

.services-top .badge svg {
  flex-shrink: 0;
  opacity: 0.9;
}

.services-top__lead {
  font-size: 1rem;
  max-width: 36ch;
  color: var(--text-muted);
  margin: 0 0 0.25em;
}

.services-top__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.section-intro--compact {
  margin-bottom: 1.25rem;
}

.section-intro--compact p {
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
  text-decoration: none;
}

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

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
  text-decoration: none;
}

/* Sections */
#services {
  padding: clamp(2rem, 5vw, 3.25rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}

section {
  padding: clamp(3rem, 6vw, 5rem) 0;
}

section:nth-child(even) {
  background: var(--surface);
}

.section-intro {
  max-width: 52ch;
  margin-bottom: 2rem;
}

.section-intro h2 {
  margin-bottom: 0.5rem;
}

/* Services grid — compact */
.services-grid {
  display: grid;
  gap: 0.85rem;
}

.service-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.service-card p {
  font-size: 0.88rem;
  line-height: 1.45;
}

.service-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}

.service-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
  color: var(--text);
}

section:nth-child(even) .service-card {
  background: var(--surface);
  box-shadow: 0 4px 24px rgba(58, 54, 50, 0.04);
}

.service-card:hover {
  border-color: rgba(184, 122, 107, 0.35);
  box-shadow: var(--shadow);
}

/* About */
.about-block {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.about-highlight {
  background: linear-gradient(135deg, var(--accent-soft) 0%, rgba(239, 232, 223, 0.6) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.about-highlight h3 {
  color: var(--accent-deep);
  margin-bottom: 0.5rem;
}

/* Booking */
.booking-block {
  display: grid;
  gap: 2rem;
  align-items: start;
}

.booking-intro {
  margin-bottom: 0;
}

.booking-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 4px 24px rgba(58, 54, 50, 0.04);
}

.booking-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row {
  display: grid;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.form-field .form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.form-field abbr[title] {
  text-decoration: none;
  color: var(--accent-deep);
}

.form-optional {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.booking-form input[type="text"],
.booking-form input[type="email"],
.booking-form input[type="tel"],
.booking-form input[type="date"],
.booking-form input[type="time"],
.booking-form select,
.booking-form textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.booking-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6560' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.25rem;
}

.booking-form textarea {
  resize: vertical;
  min-height: 6rem;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-footnote {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

.btn-submit {
  width: 100%;
  margin-top: 0.25rem;
  border: none;
}

/* Location */
.location-card {
  background: var(--text);
  color: #f0ebe5;
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  display: grid;
  gap: 1.25rem;
}

.location-card h2 {
  color: #fff;
}

.location-card p {
  color: rgba(240, 235, 229, 0.85);
}

.location-card address {
  font-style: normal;
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.5rem;
}

.location-card .map-link {
  color: #e8c4bc;
  font-weight: 600;
}

.location-card .map-link:hover {
  color: #fff;
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-logo {
  width: 56px;
  margin: 0 auto 0.75rem;
  opacity: 0.9;
}

.site-footer p {
  font-size: 0.9rem;
}

/* Thank-you page */
.thank-you-main {
  padding: clamp(3rem, 8vw, 5rem) 0;
  min-height: 50vh;
}

.thank-you-inner {
  text-align: center;
  max-width: 36rem;
  margin-inline: auto;
}

.thank-you-logo {
  width: min(240px, 70vw);
  margin: 0 auto 1.5rem;
}

.thank-you-lead {
  font-size: 1.1rem;
  margin-bottom: 1.75rem;
}

/* Desktop */
@media (min-width: 768px) {
  .brand-text {
    display: block;
  }

  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    transform: none;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    background: transparent;
    border: none;
    overflow: visible;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 0.5rem 0.9rem;
  }

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

  .about-block {
    grid-template-columns: 1.2fr 1fr;
  }

  .booking-block {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 4vw, 3.5rem);
  }

  .btn-submit {
    width: auto;
    align-self: flex-start;
    min-width: 14rem;
  }

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

@media (min-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .site-nav,
  .nav-toggle span,
  .nav-toggle span::before,
  .nav-toggle span::after {
    transition: none;
  }
}
