/* ============================================================
   Swan Street Vineyard — stylesheet
   Palette, type and layout per BRAND.md. Mobile-first.
   ============================================================ */

:root {
  --color-bg: #F7F2E9;
  --color-bg-alt: #EFE7D8;
  --color-surface: #FFFFFF;
  --color-text: #2B211A;
  --color-text-soft: #5A4C40;
  --color-accent: #5C1F2B;
  --color-accent-dark: #431621;
  --color-vine: #5C6B4F;
  --color-brass: #B08D57;
  --color-border: #E3D9C6;

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  --container-max: 1180px;
  --radius: 4px;
  --shadow-soft: 0 12px 32px -18px rgba(43, 33, 26, 0.35);

  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-text);
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 5vw + 1rem, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3vw + 1rem, 2.5rem); }
h3 { font-size: clamp(1.25rem, 1.4vw + 1rem, 1.6rem); }
h4 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }

p { max-width: 65ch; }
p + p { margin-top: 1em; }

.lede {
  font-size: clamp(1.05rem, 0.4vw + 1rem, 1.25rem);
  color: var(--color-text-soft);
}

a.link, .prose a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a.link:hover, .prose a:hover { color: var(--color-accent-dark); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-3);
}

.section { padding-block: var(--space-5); }
.section--tight { padding-block: var(--space-4); }
.section--alt { background: var(--color-bg-alt); }
.section--dark {
  background: var(--color-accent);
  color: #F3E9E3;
}
.section--dark h2, .section--dark h3 { color: #FBF6F1; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-vine);
  margin-bottom: var(--space-1);
}

.section-head { max-width: 720px; margin-bottom: var(--space-4); }
.section-head--center { margin-inline: auto; text-align: center; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

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

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

.btn--ghost-light { background: transparent; border-color: rgba(255,255,255,0.65); color: #fff; }
.btn--ghost-light:hover { background: #fff; color: var(--color-accent); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ---------- Preview banner (dev/review deployments only) ---------- */
.preview-banner {
  background: var(--color-brass);
  color: #2B211A;
  text-align: center;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.5em 1em;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 242, 233, 0.94);
  backdrop-filter: saturate(160%) blur(6px);
  border-bottom: 1px solid var(--color-border);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.9rem;
}
.brand {
  text-decoration: none;
  line-height: 1.1;
}
.brand__name {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--color-text);
  display: block;
}
.brand__tag {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--color-vine);
  font-weight: 500;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--color-text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav {
  display: none;
  flex-direction: column;
  gap: 0.2rem;
  padding-block: var(--space-2) var(--space-3);
  border-top: 1px solid var(--color-border);
}
.main-nav.is-open { display: flex; }
.main-nav a:not(.btn) {
  display: block;
  padding: 0.65rem 0.25rem;
  text-decoration: none;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.main-nav a[aria-current="page"] { color: var(--color-accent); font-weight: 700; }
.main-nav a:not(.btn):last-child { border-bottom: none; }

.main-nav .btn { margin-top: 0.6rem; align-self: flex-start; }

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .main-nav {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 1.6rem;
    border-top: none;
    padding: 0;
  }
  .main-nav a:not(.btn) { border-bottom: none; padding: 0.25rem 0; position: relative; }
  .main-nav a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--color-accent);
  }
  .main-nav .btn { margin-top: 0; margin-left: 0.4rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  display: flex;
  align-items: flex-end;
  min-height: 62vh;
  overflow: hidden;
}
.hero--tall { min-height: 78vh; }
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(43,33,26,0.15) 0%, rgba(43,33,26,0.15) 40%, rgba(43,33,26,0.78) 100%);
}
.hero__content {
  position: relative;
  z-index: 1;
  padding-block: var(--space-5) var(--space-4);
  width: 100%;
}
.hero__eyebrow {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: #E9D9C9;
  margin-bottom: 0.6rem;
  display: block;
}
.hero__content h1 { color: #fff; }
.hero__lede {
  color: #F0E6DA;
  font-size: clamp(1.05rem, 0.5vw + 1rem, 1.3rem);
  max-width: 60ch;
  margin-top: 0.9rem;
}
.hero .btn-row { margin-top: var(--space-3); }

.page-hero {
  position: relative;
  color: #fff;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.page-hero .hero__content { padding-block: var(--space-4) var(--space-3); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: var(--space-3); }
.grid--3 { grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 860px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-3px); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: var(--space-3); display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card__body h3 { margin: 0; }
.card__cta { margin-top: auto; font-weight: 700; color: var(--color-accent); font-size: 0.92rem; }

/* ---------- Media / content blocks ---------- */
.split {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}
@media (min-width: 860px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .split--reverse .split__media { order: 2; }
}
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.split__media--panorama img { aspect-ratio: 4.5 / 1; object-fit: cover; width: 100%; }

.figure { margin: 0; }
.figure img { border-radius: var(--radius); box-shadow: var(--shadow-soft); }
.figure figcaption { margin-top: 0.6rem; font-size: 0.88rem; color: var(--color-text-soft); }

.stat-list { display: grid; gap: var(--space-2); grid-template-columns: 1fr; margin-top: var(--space-2); }
@media (min-width: 640px) { .stat-list { grid-template-columns: 1fr 1fr; } }
.stat {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-2);
  background: var(--color-surface);
}
.stat dt { font-family: var(--font-body); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--color-vine); }
.stat dd { margin-top: 0.3rem; }

.check-list li {
  position: relative;
  padding-left: 1.6em;
  margin-bottom: 0.55em;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 8px; height: 8px;
  background: var(--color-brass);
  border-radius: 50%;
}

.callout {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-brass);
  border-radius: var(--radius);
  padding: var(--space-3);
}

.placeholder-photo {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3);
  background: repeating-linear-gradient(135deg, #EDE3D3, #EDE3D3 10px, #E4D8C3 10px, #E4D8C3 20px);
  border: 1.5px dashed var(--color-brass);
  border-radius: var(--radius);
  color: var(--color-text-soft);
  font-size: 0.85rem;
  min-height: 180px;
  aspect-ratio: 4 / 3;
}

/* ---------- Gallery ---------- */
.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-3);
}
.gallery-filters button {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 0.5em 1.1em;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--color-text-soft);
}
.gallery-filters button.is-active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
}
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }

.gallery-item {
  border: 0;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  position: relative;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 15, 11, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
}
.lightbox.is-open { display: flex; }
.lightbox__figure { max-width: min(92vw, 1200px); max-height: 88vh; margin: 0; }
.lightbox__figure img { max-width: 100%; max-height: 78vh; margin-inline: auto; border-radius: var(--radius); }
.lightbox__figure figcaption { color: #F0E6DA; text-align: center; margin-top: 0.8rem; font-size: 0.92rem; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__close { top: var(--space-2); right: var(--space-2); }
.lightbox__prev { left: var(--space-2); top: 50%; transform: translateY(-50%); }
.lightbox__next { right: var(--space-2); top: 50%; transform: translateY(-50%); }
.lightbox__prev:hover, .lightbox__next:hover, .lightbox__close:hover { background: rgba(255,255,255,0.2); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--space-4); }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}
.contact-card__icon {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-accent);
}
.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); border: 1px solid var(--color-border); }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ---------- Enquiry form ---------- */
.enquiry-form {
  display: grid;
  gap: 1.1rem;
  margin-top: var(--space-3);
}
.form-row { display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label { font-weight: 600; font-size: 0.92rem; }
.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 0.75em 0.9em;
  background: var(--color-surface);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
}
.form-row textarea { resize: vertical; }
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-banner {
  padding: 0.9em 1.2em;
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  font-weight: 600;
  font-size: 0.95rem;
}
.form-banner--success { background: #E4EFE1; color: #33502B; border: 1px solid #B9D6AE; }
.form-banner--error { background: #F6E2E0; color: #7A2A22; border: 1px solid #E7B7B0; }

/* ---------- Terms page ---------- */
.legal ol { list-style: none; padding: 0; }
.legal > ol { counter-reset: section; }
.legal > ol > li { counter-increment: section; margin-bottom: var(--space-3); }
.legal h2 { font-size: 1.25rem; font-family: var(--font-body); font-weight: 700; margin-bottom: 0.5rem; }
.legal ul { list-style: disc; padding-left: 1.3em; margin-top: 0.5em; }
.legal ul li { margin-bottom: 0.3em; }
.legal p { max-width: none; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-accent-dark);
  color: #E9DCD2;
  padding-block: var(--space-5) var(--space-3);
}
.site-footer a { color: #F3E9E3; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-brand__name { font-family: var(--font-head); font-size: 1.4rem; color: #fff; }
.footer-brand__tag { color: #CBB9AC; margin-top: 0.3rem; }
.footer-heading { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: #CBB9AC; margin-bottom: 0.8rem; }
.footer-list li { margin-bottom: 0.55em; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: var(--space-3);
  font-size: 0.85rem;
  color: #CBB9AC;
}

/* ---------- Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-accent);
  color: #fff;
  padding: 0.7em 1.2em;
  z-index: 200;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }
