/* =========================================================================
   Vella Francalanza — Notaries & Associates
   Sleek, all-dark, black & gold. Negative space does the work.
   ========================================================================= */

:root {
  --ink:      #18181A;   /* primary background (matches the logo art) */
  --ink-900:  #0E0E0F;   /* deepest black */
  --ink-800:  #202023;   /* input / raised surface */
  --gold:     #C6A44E;
  --gold-2:   #E4CD8F;
  --gold-3:   #A6822F;
  --text:     #ECE8DF;   /* warm off-white */
  --muted:    #A8A398;   /* muted grey — lightened for WCAG AA on dark */
  --rule:     rgba(198,164,78,0.22);
  --rule-soft:rgba(236,232,223,0.10);

  --serif: "Cinzel", "Times New Roman", serif;
  --sans:  "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1140px;
  --pad: clamp(6rem, 13vw, 12rem);       /* generous vertical rhythm */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[hidden] { display: none !important; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--text);
  background: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding-block: var(--pad); }

.skip-link {
  position: absolute; left: 50%; top: 0.6rem; transform: translateX(-50%) translateY(-140%);
  z-index: 200; background: var(--gold); color: var(--ink); padding: 0.6rem 1.2rem;
  font: 500 0.8rem/1 var(--sans); letter-spacing: 0.08em; transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: translateX(-50%) translateY(0); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* ---------- Shared type ---------- */
.eyebrow {
  font: 400 0.72rem/1.4 var(--sans); letter-spacing: 0.42em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.6rem;
}
.section-title {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.2; letter-spacing: 0.02em;
  color: var(--text); text-wrap: balance;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font: 400 0.76rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase;
  padding: 1.15rem 2.4rem; border: 1px solid transparent; cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.btn--gold { background: transparent; color: var(--gold); border-color: var(--rule); }
.btn--gold:hover { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.btn--full { width: 100%; }

/* ============================ Header ============================ */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; padding-block: 1.2rem;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.site-header.scrolled {
  background: rgba(14,14,15,0.85); backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--rule-soft); padding-block: 0.7rem;
}
/* Header runs wider than the content column so the logo hugs the left and Contact the right */
.site-header .wrap { width: 100%; max-width: none; padding-inline: clamp(1.25rem, 3.2vw, 2.75rem); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.85rem; }
.brand-mark { height: 32px; width: auto; }
.brand-rule { width: 1px; height: 30px; background: var(--rule); display: inline-block; }
.brand-lockup { display: flex; align-items: baseline; gap: 0.5rem; font-family: var(--sans); }
.brand-name { font-weight: 500; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text); }
.brand-dot { color: var(--gold); font-size: 0.8rem; }
.brand-sub { font-weight: 400; font-size: 0.8rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 2.6rem; }
.nav > a {
  font: 400 0.78rem/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text); position: relative; padding-block: 0.3rem; opacity: 0.85;
  transition: opacity 0.3s var(--ease), color 0.3s var(--ease);
}
.nav > a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 100%;
  background: var(--gold); transform: scaleX(0); transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav > a:hover { opacity: 1; color: var(--gold); }
.nav > a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle { display: none; background: none; border: 0; padding: 0.5rem; cursor: pointer; }
.nav-toggle span { display: block; width: 26px; height: 1px; background: var(--text); margin: 6px 0;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(3.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-nav { display: none; flex-direction: column; background: rgba(14,14,15,0.98); }
.mobile-nav a { padding: 1.1rem 1.25rem; color: var(--text); border-top: 1px solid var(--rule-soft);
  font: 400 0.82rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; }
.mobile-nav[data-open="true"] { display: flex; }

/* ============================ Hero ============================ */
.hero {
  position: relative; min-height: 100svh; display: grid; place-items: center;
  text-align: center; padding: 8rem 1.25rem 4rem; overflow: hidden;
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 45% at 50% 42%, rgba(198,164,78,0.10), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2.8rem; }
.hero-logo { width: clamp(200px, 62vw, 460px); }
.hero-tag {
  font: 400 clamp(0.62rem, 2.4vw, 0.74rem)/1.8 var(--sans); letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--muted);
}
.hero .btn { margin-top: 0.4rem; }

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; translate: -50%; z-index: 2;
  display: block; text-decoration: none; padding: 0.5rem 1rem;
}
.scroll-hint-line {
  display: block; width: 3px; height: 96px; transform-origin: top;
  background: linear-gradient(var(--gold-2), var(--gold) 55%, rgba(198, 164, 78, 0));
  box-shadow: 0 0 14px rgba(198, 164, 78, 0.35);
  animation: pulse 2.4s var(--ease) infinite;
}
.scroll-hint:hover .scroll-hint-line { animation-duration: 1.4s; }
@keyframes pulse {
  0%, 100% { opacity: 0.55; transform: scaleY(0.6); }
  50%      { opacity: 1;    transform: scaleY(1); }
}

/* ============================ Services ============================ */
.services { position: relative; }
.services .section-title { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 30ch; }
.service-list {
  list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr);
  column-gap: clamp(2rem, 5vw, 5rem);
}
.service {
  padding: 1.9rem 0; border-top: 1px solid var(--rule-soft);
  transition: padding-inline 0.35s var(--ease);
}
.service:hover { padding-left: 0.6rem; }
.service:hover .service-name { color: var(--gold); }
.service-name {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  letter-spacing: 0.02em; color: var(--text); margin-bottom: 0.7rem;
  transition: color 0.3s var(--ease);
}
.service-copy {
  font: 400 0.92rem/1.75 var(--sans); letter-spacing: 0.01em; color: var(--muted);
  max-width: 34ch;
}

/* ============================ Firm ============================ */
.firm { border-top: 1px solid var(--rule-soft); text-align: center; }
.firm-inner { display: grid; justify-items: center; }
.firm .section-title { margin-bottom: 1rem; }
.firm-line { font-size: 0.92rem; letter-spacing: 0.06em; color: var(--muted); margin-bottom: clamp(3rem, 6vw, 5rem); }
.notaries { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); width: 100%; max-width: 780px; }
.notary { padding-top: 2rem; border-top: 1px solid var(--rule); }
.notary-name { font-family: var(--serif); font-weight: 400; font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  letter-spacing: 0.03em; color: var(--text); margin-bottom: 0.9rem; }
.notary-title { font: 400 0.68rem/1.7 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }

/* ============================ Contact ============================ */
.contact { position: relative; padding-top: clamp(2.75rem, 5vw, 4.5rem); padding-bottom: 0; }
/* Animated gold bar pinned to the section's top edge */
.section-bar {
  position: absolute; top: 0; left: 0; height: 2px; width: 0;
  background: linear-gradient(90deg, transparent, #c8955a 40%, #e8c583 60%, transparent);
  transition: width 1.4s cubic-bezier(.16,1,.3,1);
}
.section-bar.is-in { width: 100%; }
/* Staggered content reveals (delay set per element in JS, in DOM order) */
.c-reveal { opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.16,1,.3,1), transform 0.9s cubic-bezier(.16,1,.3,1); }
.c-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .section-bar { width: 100%; transition: none; }
  .c-reveal { opacity: 1; transform: none; transition: none; }
}
.contact-inner { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 7vw, 7rem);
  align-items: start; padding-bottom: clamp(3rem, 6vw, 5.5rem); }
.contact .section-title { margin-bottom: 2.5rem; }
.office { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 3rem; font-size: 1rem; color: var(--text); }
@media (max-width: 400px) { .office { grid-template-columns: 1fr; gap: 1.6rem; } }
.office-label { font: 400 0.68rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); display: inline-block; margin-bottom: 0.5rem; }

.field { margin-bottom: 1.6rem; }
.field label { display: block; font: 400 0.68rem/1 var(--sans); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 0.7rem; }
.field input, .field textarea {
  width: 100%; font: 300 1rem/1.5 var(--sans); color: var(--text);
  background: var(--ink-800); border: 1px solid var(--rule); border-radius: 0;
  padding: 0.95rem 1rem; transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.field input:hover, .field textarea:hover { border-color: rgba(198,164,78,0.45); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold); }
.field textarea { resize: vertical; }
.cf-turnstile { margin-bottom: 1.6rem; min-height: 65px; max-width: 100%; overflow: hidden; }

/* Inline field validation */
.field-error { display: block; margin-top: 0.5rem; font-size: 0.76rem; letter-spacing: 0.02em;
  color: #dcb463; min-height: 1em; }
.field input.is-invalid, .field textarea.is-invalid {
  border-color: #b9564c; box-shadow: 0 0 0 1px rgba(185,86,76,0.45);
}
/* Non-blocking submit error, shown above Send */
.form-error { color: #dd8f86; font-size: 0.9rem; min-height: 1em; margin-bottom: 1rem; }
.form-error:empty { margin-bottom: 0; }
.form-consent { margin-top: 1rem; font-size: 0.76rem; line-height: 1.6; color: var(--muted); }
.form-consent a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }

/* Success confirmation (reveal-style) */
.form-done { opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(.16,1,.3,1), transform 0.9s cubic-bezier(.16,1,.3,1); }
.form-done.is-in { opacity: 1; transform: none; }
.form-done .done-rule { display: block; width: 56px; height: 2px; margin-bottom: 1.4rem;
  background: linear-gradient(90deg, var(--gold), transparent); }
.form-done h3 { font-family: var(--serif); font-weight: 500; color: var(--gold);
  font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: 0.02em; margin-bottom: 0.7rem; }
.form-done p { color: var(--text); font-size: 1.05rem; }

.map-wrap { position: relative; }
.map { height: clamp(300px, 42vw, 460px); border-top: 1px solid var(--rule); background: var(--ink-900); }
.map-link {
  position: absolute; right: 1.1rem; bottom: 1.9rem; z-index: 500;
  font: 400 0.66rem/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); text-decoration: none;
  padding: 0.7rem 1.05rem; border: 1px solid rgba(198, 164, 78, 0.42);
  background: rgba(14, 14, 15, 0.82); backdrop-filter: blur(4px);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.map-link:hover, .map-link:focus-visible {
  background: rgba(198, 164, 78, 0.14); border-color: var(--gold);
}
/* Leaflet dark theme */
.leaflet-container { background: var(--ink-900); font-family: var(--sans); }
.leaflet-control-attribution { background: rgba(14,14,15,0.72) !important; color: var(--muted) !important; font-size: 10px; }
.leaflet-control-attribution a { color: var(--gold) !important; }
.leaflet-bar a { background: var(--ink-800); color: var(--text); border-bottom-color: var(--rule-soft); }
.leaflet-bar a:hover { background: var(--ink); color: var(--gold); }
.vf-pin { filter: drop-shadow(0 4px 6px rgba(0,0,0,0.55)); }
/* Permanent office label beside the pin */
.leaflet-tooltip.vf-tip {
  background: rgba(14, 14, 15, 0.86); border: 1px solid rgba(198, 164, 78, 0.38);
  border-radius: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
  padding: 0.55rem 0.8rem; backdrop-filter: blur(4px); white-space: nowrap;
}
.leaflet-tooltip.vf-tip::before { display: none; }
.vf-tip-name {
  display: block; font-family: var(--serif); font-weight: 400; font-size: 0.9rem;
  letter-spacing: 0.03em; color: var(--text); line-height: 1.25;
}
.vf-tip-sub {
  display: block; font: 400 0.58rem/1.4 var(--sans); letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--gold); margin-top: 0.15rem;
}

/* ============================ Footer ============================ */
.site-footer { background: var(--ink-900); padding-block: clamp(3rem, 6vw, 4.5rem); text-align: center; }
.footer-inner { display: grid; justify-items: center; gap: 1.4rem; }
.footer-mark { height: 44px; width: auto; opacity: 0.9; }
.footer-copy { font-size: 0.8rem; letter-spacing: 0.04em; color: var(--muted); }
.footer-note { font-size: 0.72rem; letter-spacing: 0.04em; color: #918C82; }

/* ============================ Reveal ============================ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero-inner .reveal:nth-child(2) { transition-delay: 0.12s; }
.hero-inner .reveal:nth-child(3) { transition-delay: 0.24s; }
.service.reveal:nth-child(even) { transition-delay: 0.08s; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .c-reveal, .form-done { opacity: 1 !important; transform: none !important; transition: none !important; }
  .section-bar { width: 100% !important; transition: none !important; }
  .hero-rule { width: 320px !important; transition: none !important; }
  .scroll-hint-line { animation: none !important; opacity: 1; transform: none; }
}

/* ============================ Responsive ============================ */
@media (max-width: 900px) {
  .section { padding-block: 64px; }
  .contact { padding-top: 40px; }
  .service-list { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 3rem; }
}
@media (max-width: 620px) {
  .brand-dot, .brand-sub { display: none; }
  .hero { padding-inline: 1.5rem; }
}
@media (max-width: 430px) {
  .brand-rule, .brand-lockup { display: none; }
}

/* ============================ Content pages (privacy, 404) ============================ */
.subhead { border-bottom: 1px solid var(--rule-soft); }
.subhead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.subhead .brand-mark { height: 30px; width: auto; }
.subhead .back { font: 400 0.78rem/1 var(--sans); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text); opacity: 0.85; }
.subhead .back:hover { color: var(--gold); opacity: 1; }

.legal { padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }
.legal .wrap { max-width: 760px; }
.legal h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: 0.02em; color: var(--text); margin-bottom: 0.5rem; }
.legal .updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 2.6rem; }
.legal h2 { font-family: var(--serif); font-weight: 500; font-size: 1.22rem; color: var(--gold);
  margin: 2.4rem 0 0.7rem; letter-spacing: 0.02em; }
.legal p, .legal li { color: #D2CDC3; font-size: 1rem; line-height: 1.8; }
.legal ul { padding-left: 1.2rem; margin: 0.4rem 0 1rem; }
.legal li { margin-bottom: 0.4rem; }
.legal a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.legal .note { border-left: 2px solid var(--rule); padding-left: 1rem; margin: 1.2rem 0;
  color: var(--muted); font-size: 0.9rem; }

.notfound { min-height: 68vh; display: grid; place-items: center; text-align: center; padding: 4rem 1.5rem; }
.notfound .inner { display: grid; justify-items: center; gap: 1.2rem; }
.notfound h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 6vw, 3rem); color: var(--gold); }
.notfound p { color: var(--muted); max-width: 34rem; }

.footer-links { display: flex; gap: 1.4rem; margin-top: -0.8rem; }
.footer-links a { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--muted); }
.footer-links a:hover { color: var(--gold); }

/* ============================ Services page ============================ */
.svc { padding: clamp(3.5rem, 8vw, 6rem) 0 clamp(4rem, 8vw, 7rem); }
.svc .wrap { max-width: 820px; }
.svc-head { margin-bottom: clamp(2.6rem, 6vw, 4.4rem); }
.svc-lead { color: var(--muted); max-width: 58ch; margin-top: 1.4rem; line-height: 1.85; }
.svc-lead + .svc-lead { margin-top: 0.9rem; }
.svc a:not(.btn) { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.svc a:not(.btn):hover { color: var(--gold-2); }
.svc-area { padding: clamp(2rem, 4vw, 2.8rem) 0; border-top: 1px solid var(--rule-soft); }
.svc-area h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  letter-spacing: 0.02em; color: var(--gold); margin-bottom: 0.7rem;
}
.svc-intro { color: var(--muted); font-size: 0.95rem; max-width: 56ch; margin-bottom: 1.5rem; }
.svc-copy { color: #D2CDC3; font-size: 1rem; line-height: 1.85; max-width: 64ch;
  text-align: justify; hyphens: auto; }
.svc-lead { text-align: justify; hyphens: auto; }
.svc-acts { list-style: none; padding: 0; display: grid; gap: 1rem; }
.svc-acts li { color: #D2CDC3; font-size: 0.95rem; line-height: 1.75; max-width: 68ch;
  padding-left: 1.1rem; border-left: 1px solid var(--rule); }
.svc-acts strong { font-weight: 500; color: var(--text); }
.svc-cta { border-top: 1px solid var(--rule-soft); padding-top: clamp(2.4rem, 5vw, 3.6rem);
  display: grid; justify-items: start; gap: 1.6rem; }
.svc-cta-line { font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.4rem);
  letter-spacing: 0.02em; color: var(--text); }

/* ============================ Testimonials ============================ */
.testimonials { position: relative; }
.testimonials .section-title { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.quote-list {
  list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
}
.quote { border-top: 1px solid var(--rule); padding-top: 1.8rem; }
.quote blockquote { margin: 0; }
.quote blockquote p { font: 400 0.95rem/1.8 var(--sans); color: #D2CDC3; }
.quote blockquote p::before { content: "\201C"; display: block;
  font: 500 2.4rem/0.5 var(--serif); color: var(--gold); margin-bottom: 0.9rem; }
.quote-name { margin-top: 1.1rem; font: 400 0.7rem/1 var(--sans);
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.quote-more {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: clamp(2.4rem, 4vw, 3.4rem);
  font: 400 0.76rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}
.quote-more:hover { gap: 1rem; color: var(--gold-2); }
@media (max-width: 900px) { .quote-list { grid-template-columns: 1fr; } }

/* "All services" link on the home page */
.services-more {
  display: inline-flex; align-items: center; gap: 0.6rem; margin-top: clamp(2rem, 4vw, 3rem);
  font: 400 0.76rem/1 var(--sans); letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--gold); transition: gap 0.3s var(--ease), color 0.3s var(--ease);
}
.services-more:hover { gap: 1rem; color: var(--gold-2); }
