:root {
  --ink: #0a0a0a;
  --paper: #f6f4f0;
  --paper-dark: #ebe7e0;
  --muted: #5c5852;
  --line: rgba(10, 10, 10, 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* —— Motion background layers —— */
@keyframes bg-drift-a {
  0% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  100% {
    transform: translate(-4%, 5%) rotate(-2deg) scale(1.06);
  }
}

@keyframes bg-drift-b {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.55;
  }
  100% {
    transform: translate(5%, -4%) scale(1.08);
    opacity: 0.7;
  }
}

@keyframes grain-drift {
  0% {
    transform: translate(0, 0);
  }
  33% {
    transform: translate(-1.5%, 1%);
  }
  66% {
    transform: translate(1%, -0.8%);
  }
  100% {
    transform: translate(0, 0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-down {
  from {
    opacity: 0;
    transform: translateY(-0.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes about-band {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background-color: var(--paper);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: -30%;
  z-index: -3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 48% 42% at 12% 28%, rgba(235, 231, 224, 0.92), transparent 58%),
    radial-gradient(ellipse 52% 48% at 88% 72%, rgba(255, 252, 246, 0.82), transparent 52%),
    radial-gradient(ellipse 36% 36% at 72% 18%, rgba(212, 206, 195, 0.28), transparent 50%);
  animation: bg-drift-a 26s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 60% at 50% 50%, rgba(255, 255, 255, 0.35), transparent 62%),
    radial-gradient(ellipse 120% 80% at 50% -15%, rgba(255, 255, 255, 0.65), transparent 48%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: auto, auto, 240px 240px;
  opacity: 0.85;
  animation: bg-drift-b 38s ease-in-out infinite alternate, grain-drift 18s ease-in-out infinite;
}

main {
  flex: 1;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

header {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 244, 240, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (prefers-reduced-motion: no-preference) {
  header .header-inner {
    animation: fade-down 0.75s var(--ease-out) both;
  }

  .hero > .hero-badge {
    animation: fade-up 0.85s var(--ease-out) 0.08s both;
  }

  .hero > h1 {
    animation: fade-up 0.85s var(--ease-out) 0.16s both;
  }

  .hero > .lead {
    animation: fade-up 0.85s var(--ease-out) 0.26s both;
  }

  .hero > .hero-cta {
    animation: fade-up 0.85s var(--ease-out) 0.36s both;
  }
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.brand img {
  height: 56px;
  width: auto;
  object-fit: contain;
  transition: transform 0.35s var(--ease-out);
}

.brand:hover img {
  transform: scale(1.03);
}

.brand-text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.3;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: color 0.25s ease, transform 0.25s var(--ease-out);
  display: inline-block;
}

nav a:is(:hover, :focus-visible) {
  color: var(--ink);
  transform: translateY(-1px);
}

nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.hero {
  padding: 4.5rem 0 3rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.35rem);
  letter-spacing: 0.02em;
  line-height: 1.15;
  max-width: 22ch;
  margin: 0 auto 1.25rem;
}

.hero p.lead {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 2rem;
  font-weight: 400;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  border: 2px solid var(--ink);
  transition:
    background 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease,
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
}

.btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(10, 10, 10, 0.12);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: #222;
  border-color: #222;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover {
  background: rgba(10, 10, 10, 0.06);
}

section {
  padding: 3.5rem 0;
}

.page-intro {
  padding-top: 2.5rem;
}

section h1.page-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.75rem;
}

section h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.section-intro {
  text-align: center;
  color: var(--muted);
  max-width: 32rem;
  margin: 0 auto 2.75rem;
  font-size: 1rem;
}

.home-next {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
  text-align: center;
}

.home-next h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.home-next p {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.home-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  padding: 1.75rem 1.5rem;
  border-radius: 2px;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    border-color 0.3s ease,
    background-color 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 16px 48px rgba(10, 10, 10, 0.09);
  border-color: rgba(10, 10, 10, 0.2);
  background-color: rgba(255, 255, 255, 0.72);
}

.card h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.icon-house {
  width: 40px;
  height: 40px;
  margin-bottom: 1rem;
  opacity: 0.85;
}

.about {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.15) 0%,
    var(--paper-dark) 38%,
    var(--paper-dark) 62%,
    rgba(255, 255, 255, 0.12) 100%
  );
  background-size: 200% 100%;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .about {
    animation: about-band 16s ease-in-out infinite;
  }
}

.about::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 45%,
    transparent 90%
  );
  opacity: 0.85;
}

@media (prefers-reduced-motion: no-preference) {
  .about::before {
    animation: bg-drift-b 28s ease-in-out infinite alternate-reverse;
  }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 720px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-copy h2 {
  text-align: left;
  margin-bottom: 1rem;
}

.about-page .about-copy h1.page-title {
  text-align: left;
  margin-bottom: 1rem;
}

.about-copy p {
  color: var(--muted);
  margin-bottom: 1rem;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-logo {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.about-logo img {
  max-width: min(280px, 100%);
  height: auto;
}

.contact {
  text-align: center;
  padding-bottom: 4rem;
}

.contact-box {
  display: inline-block;
  padding: 2rem 2.5rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
  margin-top: 1.5rem;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out),
    border-color 0.3s ease;
}

.contact-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(10, 10, 10, 0.08);
  border-color: rgba(10, 10, 10, 0.18);
}

.contact-box p {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.contact-box a {
  color: var(--ink);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
}

.contact-box a:hover {
  opacity: 0.75;
}

/* —— PDF viewer (embedded + full-page) —— */
.pdf-viewer-section {
  padding: 2rem 0 3.5rem;
}

.pdf-viewer-section h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.pdf-viewer-section .pdf-viewer-intro {
  text-align: center;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 auto 1.25rem;
  font-size: 0.95rem;
}

.pdf-viewer {
  max-width: 920px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 14px 48px rgba(10, 10, 10, 0.08);
}

.pdf-viewer__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: rgba(10, 10, 10, 0.04);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--muted);
}

.pdf-viewer__head strong {
  color: var(--ink);
  font-weight: 600;
}

.pdf-viewer__open {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  font-size: 0.8rem;
}

.pdf-viewer__open:hover {
  opacity: 0.75;
}

.pdf-viewer iframe,
.pdf-viewer object {
  display: block;
  width: 100%;
  height: min(68vh, 640px);
  min-height: 360px;
  border: 0;
  background: var(--paper-dark);
}

/* Standalone PDF page */
body.page-pdf-only {
  margin: 0;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #1a1a1a;
}

body.page-pdf-only main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pdf-only-exit {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  z-index: 10000;
  padding: 0.45rem 0.9rem;
  background: rgba(246, 244, 240, 0.95);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 3px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.pdf-only-exit:hover {
  background: #fff;
}

.pdf-only-frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: #2a2a2a;
}

/* —— Contact map —— */
.contact-map-section {
  padding: 1rem 0 4rem;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.contact-map-section h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 1.85rem);
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
}

.contact-map-section .map-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 32rem;
  margin: 0 auto 1rem;
}

.map-embed {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 14px 48px rgba(10, 10, 10, 0.09);
  aspect-ratio: 16 / 10;
  min-height: 260px;
  background: var(--paper-dark);
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

footer strong {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* —— WhatsApp bar + floating button (markup from site.js) —— */
html.has-wa-bar body {
  padding-bottom: calc(5.35rem + env(safe-area-inset-bottom, 0px));
}

@keyframes wa-bar-flow {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@keyframes wa-shine-sweep {
  0% {
    transform: translateX(-120%) skewX(-12deg);
  }
  100% {
    transform: translateX(220%) skewX(-12deg);
  }
}

@keyframes wa-dot-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(175, 255, 200, 0.9);
    transform: scale(1);
  }
  55% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    transform: scale(1.05);
  }
}

@keyframes wa-cta-glow {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 12px rgba(255, 255, 255, 0);
  }
}

.wa-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9990;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.wa-strip__hit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.95rem 1.35rem;
  min-height: 3.5rem;
  background: linear-gradient(
    110deg,
    #031a0f 0%,
    #064e3b 18%,
    #0d9488 38%,
    #25d366 52%,
    #0d9488 66%,
    #064e3b 82%,
    #031a0f 100%
  );
  background-size: 300% 100%;
  color: #f8fffb;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 -6px 0 rgba(37, 211, 102, 0.35),
    0 -20px 48px rgba(0, 0, 0, 0.35);
  animation: wa-bar-flow 7s linear infinite;
}

.wa-strip__hit:focus-visible {
  outline: 3px solid #fbbf24;
  outline-offset: -3px;
}

.wa-strip__shine {
  position: absolute;
  top: -50%;
  bottom: -50%;
  left: 0;
  width: 45%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.22),
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.22),
    transparent
  );
  animation: wa-shine-sweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

.wa-strip__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #bbf7d0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  animation: wa-dot-pulse 1.8s ease-out infinite;
}

.wa-strip__copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-align: left;
  flex: 1;
  min-width: min(100%, 220px);
  position: relative;
  z-index: 1;
}

.wa-strip__title {
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.wa-strip__sub {
  font-size: 0.88rem;
  line-height: 1.35;
  opacity: 0.96;
  font-weight: 500;
}

.wa-strip__cta {
  flex-shrink: 0;
  padding: 0.55rem 1.25rem;
  background: #fff;
  color: #065f46;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
  border-radius: 999px;
  position: relative;
  z-index: 1;
  animation: wa-cta-glow 2.2s ease-in-out infinite;
}

@media (max-width: 520px) {
  .wa-strip__copy {
    text-align: center;
    flex: 1 1 100%;
    order: 2;
  }

  .wa-strip__dot {
    order: 1;
  }

  .wa-strip__cta {
    order: 3;
  }
}

/* —— Scroll reveal (enabled via site.js + html.enhance-motion) —— */
html.enhance-motion .reveal {
  opacity: 0;
  transform: translateY(1.35rem);
  transition:
    opacity 0.85s var(--ease-out),
    transform 0.85s var(--ease-out);
}

html.enhance-motion .reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

html.enhance-motion .reveal--d1 {
  transition-delay: 0.08s;
}

html.enhance-motion .reveal--d2 {
  transition-delay: 0.16s;
}

html.enhance-motion .reveal--d3 {
  transition-delay: 0.24s;
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none !important;
  }

  .about {
    animation: none !important;
  }

  .about::before {
    animation: none !important;
  }

  header .header-inner,
  .hero > .hero-badge,
  .hero > h1,
  .hero > .lead,
  .hero > .hero-cta {
    animation: none !important;
  }

  html.enhance-motion .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn:hover,
  .card:hover,
  .contact-box:hover,
  nav a:hover,
  .brand:hover img {
    transform: none;
    box-shadow: none;
  }

  .wa-strip__hit,
  .wa-strip__shine,
  .wa-strip__dot,
  .wa-strip__cta {
    animation: none !important;
  }
}
