/* ==========================================================================
   Local Hero — prototype site styles
   Tokens are imported from the design system, then extended with site
   patterns: top nav (sticky/responsive), grids, forms, modals, toasts,
   skeletons, and a mobile breakpoint at 860px.
   ========================================================================== */

/* --- TOKENS ------------------------------------------------------------ */
:root {
  --primary: #1f7a5c;
  --primary-active: #0d4d3a;
  --primary-pale: #d4e9e2;
  --ink: #141413;
  --body-strong: #252523;
  --body: #3d3d3a;
  --muted: #6c6a64;
  --muted-soft: #8e8b82;
  --hairline: #e6dfd8;
  --hairline-soft: #ebe6df;
  --canvas: #faf9f5;
  --surface-soft: #f5f0e8;
  --surface-card: #efe9de;
  --surface-cream-strong: #e8e0d2;
  --surface-dark: #1E3932;
  --surface-dark-soft: #2b5148;
  --on-primary: #ffffff;
  --on-dark: #faf9f5;
  --on-dark-soft: #a09d96;
  --gold-ltd: #c89b3c;
  --gold-ltd-pale: #faf6ee;
  --gold-ltd-ink: #8a6a1f;
  --success: #27a644;
  --warning: #d4a017;
  --error: #c64545;

  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-2xl: 32px; --r-pill: 9999px;

  --shadow-sm: 0 1px 2px rgba(20, 20, 19, 0.05);
  --shadow-md: 0 4px 16px rgba(20, 20, 19, 0.08);
  --shadow-lg: 0 12px 40px rgba(20, 20, 19, 0.10);
  --shadow-gold: 0 4px 20px rgba(200, 155, 60, 0.25);

  --serif: 'Fraunces', 'Cormorant Garamond', 'Iowan Old Style', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --maxw: 1280px;
  --gutter: 32px;
  --section-y: 96px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--canvas);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }

/* page transition: fade-in on load */
body { opacity: 0; transition: opacity .24s ease; }
body.ready { opacity: 1; }

/* a11y utility — visually hide while keeping accessible to screen readers */
.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;
}

/* --- TYPE LADDER ------------------------------------------------------- */
.h-display-xl { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 72px); line-height: 1.04; letter-spacing: -1.6px; color: var(--primary-active); margin: 0; }
.h-display-lg { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4.8vw, 56px); line-height: 1.08; letter-spacing: -1.2px; color: var(--ink); margin: 0; }
.h-display-md { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.12; letter-spacing: -0.6px; color: var(--ink); margin: 0; }
.h-display-sm { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.18; letter-spacing: -0.3px; color: var(--ink); margin: 0; }

.t-title-lg { font-family: var(--sans); font-weight: 500; font-size: 22px; line-height: 1.3; color: var(--ink); }
.t-title-md { font-family: var(--sans); font-weight: 500; font-size: 19px; line-height: 1.4; color: var(--ink); }
.t-title-sm { font-family: var(--sans); font-weight: 500; font-size: 16px; line-height: 1.4; color: var(--ink); }
.t-body-lg { font-family: var(--sans); font-weight: 400; font-size: 19px; line-height: 1.6; color: var(--body); }
.t-body-md { font-family: var(--sans); font-weight: 400; font-size: 17px; line-height: 1.6; color: var(--body); }
.t-body-sm { font-family: var(--sans); font-weight: 400; font-size: 14px; line-height: 1.55; color: var(--body); }
.t-caption { font-family: var(--sans); font-weight: 500; font-size: 13px; line-height: 1.4; color: var(--muted); }
.t-caption-up { font-family: var(--sans); font-weight: 500; font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.t-italic { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 21px; line-height: 1.55; color: var(--body-strong); }
.t-mono { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--muted); letter-spacing: 0.02em; }
.tnum { font-variant-numeric: tabular-nums; }

/* --- LAYOUT ------------------------------------------------------------ */
.container {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
}
section { padding: var(--section-y) 0; }
section.tight { padding: 64px 0; }
section.dark { background: var(--surface-dark); color: var(--on-dark); }
section.cream { background: var(--surface-soft); }
section.cream-strong { background: var(--surface-card); }

.dark .h-display-xl, .dark .h-display-lg, .dark .h-display-md, .dark .h-display-sm,
.dark .t-title-lg, .dark .t-title-md, .dark .t-title-sm { color: var(--on-dark); }
.dark .t-body-lg, .dark .t-body-md, .dark .t-body-sm { color: var(--on-dark-soft); }
.dark .t-caption-up, .dark .t-caption { color: var(--on-dark-soft); }

/* --- BUTTONS ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans); font-weight: 500; font-size: 15px; line-height: 1;
  height: 44px; padding: 0 22px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  cursor: pointer; text-decoration: none;
  transition: background .15s ease, border-color .15s ease, transform .08s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: #1a6c52; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-secondary:hover { border-color: var(--muted-soft); }
.btn-cream { background: var(--canvas); color: var(--ink); }
.btn-cream:hover { background: #fff; }
.btn-gold {
  background: var(--gold-ltd); color: white;
  border-radius: var(--r-md); height: 44px; padding: 0 22px;
}
.btn-gold:hover { background: #b3872f; }
.btn-lg { height: 52px; padding: 0 28px; font-size: 16px; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-soft); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.text-link {
  color: var(--primary-active); font-weight: 500;
  text-decoration: underline; text-underline-offset: 4px;
  text-decoration-color: rgba(13,77,58,0.3);
}
.text-link:hover { text-decoration-color: var(--primary-active); }
.dark .text-link { color: var(--on-dark); text-decoration-color: rgba(250,249,245,.4); }

/* --- TOP NAV ----------------------------------------------------------- */
.lh-nav {
  position: sticky; top: 0; left: 0; right: 0;
  height: 68px;
  background: rgba(250,249,245,0.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--hairline);
  z-index: 50;
}
.lh-nav-inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
}
.lh-nav-left { display: flex; align-items: center; gap: 40px; }
.lh-wordmark {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 400; font-size: 22px;
  color: var(--primary-active); letter-spacing: -0.4px;
  text-decoration: none;
}
.lh-glyph { width: 22px; height: 22px; flex-shrink: 0; }
.lh-nav-menu {
  display: flex; gap: 28px; align-items: center;
  font-size: 14px; font-weight: 500; color: var(--body-strong);
}
.lh-nav-menu a { text-decoration: none; padding: 6px 0; position: relative; }
.lh-nav-menu a[aria-current="page"] { color: var(--primary-active); }
.lh-nav-menu a[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--primary);
}
.lh-nav-right { display: flex; gap: 12px; align-items: center; }

/* dark variant */
.dark-nav .lh-nav { background: rgba(30,57,50,0.92); border-bottom-color: rgba(255,255,255,0.08); }
.dark-nav .lh-wordmark { color: var(--on-dark); }
.dark-nav .lh-nav-menu { color: var(--on-dark); }
.dark-nav .lh-nav-menu a[aria-current="page"]::after { background: var(--on-dark); }

/* hamburger (mobile) */
.lh-burger {
  display: none;
  width: 40px; height: 40px; border-radius: var(--r-md);
  border: 1px solid var(--hairline); background: transparent;
  align-items: center; justify-content: center; cursor: pointer;
  padding: 0;
}
.lh-burger svg { width: 18px; height: 18px; color: var(--ink); }

/* --- HERO BLOCK -------------------------------------------------------- */
.hero {
  padding: 64px 0 88px;
}
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 64px; align-items: center;
}
.hero p.lead {
  font-size: 19px; color: var(--body); margin: 24px 0 32px; max-width: 560px;
}
.hero .hero-cta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.hero .town-strip {
  margin-top: 40px;
  font-family: var(--sans); font-size: 14px; color: var(--muted); letter-spacing: 0.2px;
}
.town-strip span { margin: 0 12px; color: var(--hairline); }

/* --- IMG PLACEHOLDER --------------------------------------------------- */
.img-placeholder {
  background: var(--surface-soft);
  background-image: repeating-linear-gradient(135deg, transparent 0 22px, rgba(13,77,58,0.04) 22px 24px);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
  letter-spacing: 0.04em; text-align: center;
  padding: 24px;
  min-height: 320px;
}
.img-placeholder.on-dark {
  background: var(--surface-dark-soft);
  background-image: repeating-linear-gradient(135deg, transparent 0 22px, rgba(250,249,245,0.04) 22px 24px);
  border-color: rgba(250,249,245,0.1); color: var(--on-dark-soft);
}

/* --- CARDS ------------------------------------------------------------- */
.card-cream { background: var(--surface-card); border-radius: var(--r-lg); padding: 32px; }
.card-canvas { background: var(--canvas); border: 1px solid var(--hairline); border-radius: var(--r-xl); padding: 24px; }

/* --- GRIDS ------------------------------------------------------------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

/* --- FORMS ------------------------------------------------------------- */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label {
  font-size: 13px; font-weight: 500; color: var(--body-strong); letter-spacing: 0.2px;
}
.input, .textarea, select.input {
  font-family: var(--sans); font-size: 16px;
  height: 48px; padding: 0 14px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  color: var(--ink);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.textarea { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; min-height: 96px; }
.input:focus, .textarea:focus, select.input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(31,122,92,0.18);
}
.input.error { border-color: var(--error); }
.field-error { color: var(--error); font-size: 13px; margin-top: 4px; }
.field-help { color: var(--muted); font-size: 13px; margin-top: 4px; }

.inline-form { display: flex; gap: 10px; }
.inline-form .input { flex: 1; min-width: 0; }
.inline-form .btn { flex-shrink: 0; }

/* --- BADGES / PILLS --------------------------------------------------- */
.gold-pill {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--gold-ltd-pale); color: var(--gold-ltd-ink);
  border: 1px solid var(--gold-ltd);
  border-radius: var(--r-pill);
  padding: 8px 16px;
  font-size: 13px; font-weight: 500; letter-spacing: 0.2px;
}
.gold-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold-ltd);
}
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.2px;
  padding: 4px 10px; border-radius: var(--r-pill);
  background: var(--primary-pale); color: var(--primary-active);
}

/* --- STATUS DOT ------------------------------------------------------- */
.status-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); margin-right: 8px;
  box-shadow: 0 0 0 0 rgba(39,166,68,0.6);
  animation: pulse 3s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(39,166,68,0.5); }
  60% { box-shadow: 0 0 0 10px rgba(39,166,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(39,166,68,0); }
}

/* --- FOOTER ----------------------------------------------------------- */
.lh-footer {
  background: var(--surface-dark); color: var(--on-dark-soft);
  padding: 72px 0 36px;
}
.lh-footer .container { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; }
.lh-footer h4 {
  font-family: var(--sans); font-weight: 500; font-size: 13px;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--on-dark); margin: 0 0 16px;
}
.lh-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.lh-footer a { text-decoration: none; color: var(--on-dark-soft); }
.lh-footer a:hover { color: var(--on-dark); }
.lh-footer-entity {
  font-size: 12px; line-height: 1.7; color: var(--on-dark-soft);
}
.lh-footer-entity strong { color: var(--on-dark); font-weight: 500; }
.lh-footer-entity div { white-space: nowrap; }

.lh-footer-bottom {
  max-width: var(--maxw); margin: 56px auto 0; padding: 28px var(--gutter) 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: grid; grid-template-columns: 1fr auto; align-items: center;
  gap: 32px;
  font-size: 13px;
}
.lh-footer-bottom .legal-entity { color: var(--on-dark-soft); }
.lh-footer-bottom .legal-entity a {
  color: var(--on-dark); border-bottom: 1px solid rgba(255,255,255,0.2);
  padding-bottom: 1px; transition: border-color .2s ease, color .2s ease;
}
.lh-footer-bottom .legal-entity a:hover { border-color: var(--gold-ltd); color: var(--gold-ltd); }
.lh-footer-bottom .legal-links { white-space: nowrap; text-align: right; }
@media (max-width: 860px) {
  .lh-footer-bottom { grid-template-columns: 1fr; gap: 14px; }
  .lh-footer-bottom .legal-links { white-space: normal; text-align: left; }
  .lh-footer-entity div { white-space: normal; }
}

/* --- TOAST ------------------------------------------------------------ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(60px);
  background: var(--ink); color: var(--on-dark);
  padding: 14px 22px; border-radius: var(--r-md);
  font-size: 14px; font-weight: 500;
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  opacity: 0; pointer-events: none;
  transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .28s ease;
  z-index: 200;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .check { color: var(--success); font-weight: 600; }

/* --- MODAL ------------------------------------------------------------ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,20,19,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
  z-index: 300;
}
.modal-backdrop.show { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--canvas);
  border-radius: var(--r-xl);
  max-width: 480px; width: 100%;
  padding: 0;
  transform: translateY(8px) scale(.98);
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.24);
}
.modal-backdrop.show .modal { transform: translateY(0) scale(1); }
.modal-head {
  padding: 24px 28px 16px;
  border-bottom: 1px solid var(--hairline);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head .brand { font-size: 13px; color: var(--muted); }
.modal-head .x {
  width: 32px; height: 32px; border-radius: var(--r-sm); border: none;
  background: transparent; cursor: pointer; color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
}
.modal-head .x:hover { background: var(--surface-soft); }
.modal-body { padding: 24px 28px 28px; }
.modal h3 { margin: 4px 0 8px; font-family: var(--serif); font-size: 26px; font-weight: 400; color: var(--ink); }

/* --- SKELETON --------------------------------------------------------- */
.skeleton-overlay {
  position: fixed; inset: 0;
  background: var(--canvas);
  display: flex; align-items: center; justify-content: center;
  z-index: 400;
  opacity: 1;
  transition: opacity .24s ease;
}
.skeleton-overlay.hide { opacity: 0; pointer-events: none; }
.skel-bar {
  height: 6px; width: 240px; border-radius: 3px;
  background: linear-gradient(90deg, var(--surface-soft) 0%, var(--surface-card) 50%, var(--surface-soft) 100%);
  background-size: 200% 100%;
  animation: skel 1.4s ease-in-out infinite;
}
@keyframes skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* --- COOKIE BANNER ---------------------------------------------------- */
.cookie {
  position: fixed; left: 24px; right: 24px; bottom: 24px;
  max-width: 520px; margin: 0 auto;
  background: var(--ink); color: var(--on-dark);
  border-radius: var(--r-lg);
  padding: 18px 22px;
  display: flex; gap: 18px; align-items: center;
  box-shadow: 0 16px 40px rgba(0,0,0,0.22);
  z-index: 150;
  font-size: 13px;
  transform: translateY(140%); opacity: 0;
  transition: transform .32s cubic-bezier(.2,.8,.2,1), opacity .24s ease;
}
.cookie.show { transform: translateY(0); opacity: 1; }
.cookie p { margin: 0; flex: 1; line-height: 1.5; color: rgba(250,249,245,.86); }
.cookie a { color: var(--on-dark); text-decoration: underline; text-underline-offset: 3px; }
.cookie .actions { display: flex; gap: 8px; flex-shrink: 0; }
.cookie .btn { height: 36px; padding: 0 14px; font-size: 13px; }
.cookie .btn-primary { background: var(--canvas); color: var(--ink); }
.cookie .btn-secondary { color: var(--on-dark); border-color: rgba(255,255,255,.2); }

/* --- MOBILE NAV DRAWER ------------------------------------------------ */
.lh-drawer {
  position: fixed; inset: 0;
  background: rgba(20,20,19,0.55);
  z-index: 100;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.lh-drawer.show { opacity: 1; pointer-events: auto; }
.lh-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 86vw);
  background: var(--canvas);
  padding: 24px;
  display: flex; flex-direction: column; gap: 8px;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1);
}
.lh-drawer.show .lh-drawer-panel { transform: translateX(0); }
.lh-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lh-drawer-panel a {
  font-family: var(--sans); font-weight: 500; font-size: 17px; color: var(--ink);
  text-decoration: none; padding: 14px 0;
  border-bottom: 1px solid var(--hairline);
}
.lh-drawer-panel a[aria-current="page"] { color: var(--primary-active); }
.lh-drawer-panel .drawer-cta { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.lh-drawer-panel .drawer-cta .btn { width: 100%; height: 48px; font-size: 16px; }

/* --- 404 -------------------------------------------------------------- */
.notfound {
  min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
}
.notfound .num {
  font-family: var(--serif); font-size: 96px; font-weight: 400;
  color: var(--primary-active); letter-spacing: -3px; line-height: 1; margin-bottom: 16px;
}

/* --- RESPONSIVE ------------------------------------------------------- */
@media (max-width: 860px) {
  :root { --section-y: 64px; --gutter: 20px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .lh-nav-menu { display: none; }
  .lh-nav-right > .text-link { display: none; }
  .lh-nav-right > .btn { display: none; }
  .lh-burger { display: inline-flex; }
  .lh-footer .container { grid-template-columns: 1fr 1fr; }
  .inline-form { flex-direction: column; }
  .inline-form .btn { width: 100%; }
}
@media (max-width: 480px) {
  .lh-footer .container { grid-template-columns: 1fr; }
}
