/* ============================================================
   The WeHa Collection — site styles
   New England residential, quiet design-magazine
   ============================================================ */

:root {
  /* Palette — overridable from Tweaks panel */
  --cream: #FAF6F0;
  --evergreen: #1F3A2E;
  --brick: #B7553A;
  --brick-hover: #9C4530;
  --charcoal: #1C1C1A;
  --taupe: #C9BFB1;
  --taupe-soft: #E8E2D8;

  /* Type */
  --font-display: "Fraunces", "Times New Roman", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Density */
  --section-y: clamp(64px, 8vw, 128px);
  --gutter: clamp(20px, 4vw, 56px);
  --container: 1240px;

  --radius-sm: 4px;
  --radius: 6px;

  --hairline: 1px solid rgba(28, 28, 26, 0.12);
  --hairline-soft: 1px solid rgba(28, 28, 26, 0.08);
}

[data-density="comfortable"] {
  --section-y: clamp(80px, 10vw, 160px);
}
[data-density="compact"] {
  --section-y: clamp(48px, 6vw, 88px);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, video { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Type scale */
.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--evergreen);
  font-weight: 500;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  letter-spacing: -0.01em;
  color: var(--charcoal);
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(40px, 6.5vw, 92px); line-height: 1.02; }
h2 { font-size: clamp(32px, 4.4vw, 60px); line-height: 1.05; }
h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; }
h4 { font-size: 18px; line-height: 1.3; }

p { margin: 0 0 1em; text-wrap: pretty; }

.lede { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; color: rgba(28,28,26,0.78); }

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

section { padding: var(--section-y) 0; }
section + section { padding-top: 0; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brick);
  color: var(--cream);
}
.btn-primary:hover { background: var(--brick-hover); }
.btn-secondary {
  background: transparent;
  color: var(--evergreen);
  border: 1px solid var(--evergreen);
}
.btn-secondary:hover { background: var(--evergreen); color: var(--cream); }
.btn-sm {
  padding: 10px 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}
.site-nav .btn,
.site-nav a.btn {
  /* Win specificity vs .site-nav a */
  padding: 10px 18px;
  font-family: var(--font-sans);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}
.site-nav a.btn-primary {
  color: var(--cream);
  background: var(--brick);
  border: 1px solid var(--brick);
}
.site-nav a.btn-primary:hover {
  color: var(--cream);
  background: var(--brick-hover);
}
.site-nav .btn-sm.is-active::after { display: none; }
.btn-ghost {
  color: var(--evergreen);
  padding: 8px 0;
}
.btn-ghost:hover { color: var(--brick); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--hairline-soft);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 72px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 400;
  white-space: nowrap;
  font-variation-settings: "opsz" 144;
  font-size: 22px;
  color: var(--evergreen);
  letter-spacing: -0.005em;
  line-height: 1;
}
.wordmark .amp { font-style: italic; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav a {
  font-size: 14px;
  color: var(--charcoal);
  position: relative;
  padding: 6px 0;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--evergreen); }
.site-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--evergreen);
}
.site-nav__cta { margin-left: 4px; }

.menu-toggle { display: none; }

@media (max-width: 820px) {
  .site-nav { display: none; }
  .menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
  }
  .menu-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--charcoal);
  }
  .site-header.is-open .site-nav {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--cream);
    border-bottom: var(--hairline);
    padding: 16px var(--gutter) 24px;
    gap: 4px;
  }
  .site-header.is-open .site-nav a {
    padding: 12px 0;
    border-bottom: var(--hairline-soft);
    font-size: 16px;
  }
  .site-header.is-open .site-nav__cta {
    margin-top: 12px;
    align-self: flex-start;
  }
}

/* Footer */
.site-footer {
  background: var(--evergreen);
  color: var(--cream);
  padding: 80px 0 32px;
  margin-top: var(--section-y);
}
.site-footer .container { color: var(--cream); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, 1fr);
  gap: 48px;
  margin-bottom: 64px;
}
.footer-brand .wordmark { color: var(--cream); font-size: 24px; }
.footer-brand p {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(250,246,240,0.7);
  max-width: 280px;
}
.footer-col h5 {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250,246,240,0.55);
  margin: 0 0 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  font-size: 14px;
  color: rgba(250,246,240,0.85);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  border-top: 1px solid rgba(250,246,240,0.15);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: rgba(250,246,240,0.6);
  letter-spacing: 0.02em;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Trust strip */
.trust-strip {
  padding: 28px 0;
  border-top: var(--hairline-soft);
  border-bottom: var(--hairline-soft);
  background: var(--cream);
}
.trust-strip .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.trust-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--charcoal);
}
.trust-item strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  color: var(--evergreen);
  letter-spacing: -0.01em;
}
.trust-item .star { color: var(--brick); }
@media (max-width: 720px) {
  .trust-strip .container { justify-content: flex-start; gap: 18px 28px; }
  .trust-item { font-size: 12px; }
  .trust-item strong { font-size: 18px; }
}

/* Cards & images */
.aspect {
  position: relative;
  width: 100%;
  background: var(--taupe-soft);
  overflow: hidden;
  border-radius: var(--radius-sm);
}
.aspect img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.aspect-3-2 { aspect-ratio: 3 / 2; }
.aspect-4-5 { aspect-ratio: 4 / 5; }
.aspect-1-1 { aspect-ratio: 1 / 1; }
.aspect-16-9 { aspect-ratio: 16 / 9; }

/* Placeholder image (when real photo missing) */
.placeholder {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      var(--taupe-soft),
      var(--taupe-soft) 14px,
      rgba(201,191,177,0.55) 14px,
      rgba(201,191,177,0.55) 28px
    );
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--evergreen);
  text-align: center;
  padding: 16px;
}
.placeholder span {
  background: var(--cream);
  padding: 6px 10px;
  border: 1px solid var(--taupe);
  text-transform: uppercase;
}

/* Section heads */
.section-head {
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 720px;
}
.section-head .eyebrow { margin: 0; }
.section-head h2 { margin: 0; }
.section-head p { margin: 4px 0 0; color: rgba(28,28,26,0.7); }

.section-head--row {
  flex-direction: row;
  align-items: flex-end;
  justify-content: space-between;
  max-width: none;
  flex-wrap: wrap;
}

/* Pages-shared utilities */
.divider {
  border: none;
  border-top: var(--hairline-soft);
  margin: 0;
}
.text-center { text-align: center; }
.muted { color: rgba(28,28,26,0.62); }

/* Form base */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--evergreen);
}
.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--charcoal);
  background: var(--cream);
  border: 1px solid var(--taupe);
  border-radius: var(--radius);
  padding: 12px 14px;
  transition: border-color 0.15s ease;
  font-size: 15px;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--evergreen);
}
.field textarea { resize: vertical; min-height: 120px; }

/* Sticky bottom CTA on mobile */
.sticky-book {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 40;
  background: var(--cream);
  border-top: var(--hairline);
  padding: 12px var(--gutter);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.sticky-book__price {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--evergreen);
}
.sticky-book__price small {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--charcoal);
  display: block;
  letter-spacing: 0.04em;
}
@media (max-width: 980px) {
  .sticky-book { display: flex; }
  body.has-sticky-book { padding-bottom: 80px; }
}

/* Selection / focus */
::selection { background: var(--evergreen); color: var(--cream); }
:focus-visible { outline: 2px solid var(--evergreen); outline-offset: 3px; }
