/* ========================================================================
   The Wealth Circle Advisory — shared design system
   Tokens, typography, luxury motion, reusable components.
   ======================================================================== */

:root {
  --ink:        #1a1613;
  --ink-2:      #2b2320;
  --ink-3:      #3a3128;
  --paper:      #f7f5f0;
  --paper-2:    #efeae0;
  --accent:     #985732;
  --accent-2:   #7c4626;
  --accent-soft:#c48a67;
  --line:       #e5e0d3;
  --muted:      #6a6a6a;

  --ease-out:   cubic-bezier(.2, .7, .2, 1);
  --ease-in:    cubic-bezier(.7, .0, .84, .0);
  --ease-io:    cubic-bezier(.65, .05, .36, 1);

  --nav-height: 80px;
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: #1a1a1a;
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.font-display { font-family: 'Cormorant Garamond', Georgia, serif; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal, .reveal-word, .reveal-child { opacity: 1 !important; transform: none !important; }
  .kenburns { animation: none !important; }
  .page-fade { opacity: 1 !important; }
}

/* ---------- Editorial rule ---------- */
.rule {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: currentColor;
  opacity: .6;
  vertical-align: middle;
  margin-right: 14px;
}
.rule-lg { width: 64px; }

/* ---------- Page-load fade ---------- */
.page-fade {
  opacity: 0;
  transition: opacity 600ms var(--ease-out);
}
body.is-loaded.page-fade,
body.is-loaded .page-fade { opacity: 1; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 1000ms var(--ease-out),
    transform 1100ms var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Staggered children */
.reveal-stagger > .reveal-child {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out);
}
.reveal-stagger.is-visible > .reveal-child { opacity: 1; transform: none; }
.reveal-stagger.is-visible > .reveal-child:nth-child(1) { transition-delay: 0ms;   }
.reveal-stagger.is-visible > .reveal-child:nth-child(2) { transition-delay: 80ms;  }
.reveal-stagger.is-visible > .reveal-child:nth-child(3) { transition-delay: 160ms; }
.reveal-stagger.is-visible > .reveal-child:nth-child(4) { transition-delay: 240ms; }
.reveal-stagger.is-visible > .reveal-child:nth-child(5) { transition-delay: 320ms; }
.reveal-stagger.is-visible > .reveal-child:nth-child(6) { transition-delay: 400ms; }
.reveal-stagger.is-visible > .reveal-child:nth-child(7) { transition-delay: 480ms; }
.reveal-stagger.is-visible > .reveal-child:nth-child(8) { transition-delay: 560ms; }

/* Word-by-word reveal (for editorial headlines) */
.reveal-words .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30%);
  transition:
    opacity 1000ms var(--ease-out),
    transform 1000ms var(--ease-out);
}
.reveal-words.is-visible .word { opacity: 1; transform: none; }

/* Ken Burns for hero images */
.kenburns {
  animation: kenburns 22s var(--ease-io) both;
  transform-origin: 55% 45%;
}
@keyframes kenburns {
  0%   { transform: scale(1.08); }
  100% { transform: scale(1.0);  }
}

/* Editorial image wrap */
.hero-image-wrap {
  position: relative;
  overflow: hidden;
  background: var(--ink);
}
.hero-image-wrap::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(26,22,19,.10) 0%, rgba(26,22,19,.55) 100%);
  pointer-events: none;
}

/* ---------- Nav ---------- */
.nav-scrolled {
  background: rgba(247,245,240,0.92);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-link {
  position: relative;
  padding: 4px 0;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 500ms var(--ease-out);
}
.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left center;
}
.nav-link[aria-current="page"] { color: var(--ink); }

/* Focus visibility */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition:
    transform 500ms var(--ease-out),
    background-color 400ms var(--ease-out),
    color 400ms var(--ease-out),
    border-color 400ms var(--ease-out),
    box-shadow 500ms var(--ease-out);
}
.btn-primary {
  background: var(--accent);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--accent-2);
  box-shadow: 0 12px 24px -12px rgba(152,87,50,.55);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(247,245,240,.35);
}
.btn-ghost:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}
.btn .arrow { transition: transform 500ms var(--ease-out); }
.btn:hover .arrow { transform: translateX(6px); }

/* ---------- CTA cards ---------- */
.cta-card {
  transition:
    transform 500ms var(--ease-out),
    background-color 400ms var(--ease-out),
    border-color 400ms var(--ease-out),
    box-shadow 500ms var(--ease-out);
}
.cta-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 38px -18px rgba(26,22,19,.20);
}
.cta-card:hover .cta-arrow { transform: translateX(6px); }
.cta-arrow { transition: transform 500ms var(--ease-out); }

/* ---------- Service tile with image reveal ---------- */
.svc-card {
  position: relative;
  overflow: hidden;
  transition: transform 700ms var(--ease-out);
}
.svc-card:hover { transform: translateY(-4px); }
.svc-card .svc-img {
  transition: transform 1200ms var(--ease-out);
}
.svc-card:hover .svc-img { transform: scale(1.06); }

/* ---------- Ticker ---------- */
@keyframes ticker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: ticker 60s linear infinite;
}

/* ---------- Number counter placeholder ---------- */
.counter { font-variant-numeric: tabular-nums; }

/* ---------- Subtle grain (optional editorial texture) ---------- */
.grain::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.10 0 0 0 0 0.09 0 0 0 0 0.08 0 0 0 0.08 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: .35;
  pointer-events: none;
  mix-blend-mode: multiply;
}

/* ---------- Long-form article typography ---------- */
.prose-editorial p {
  font-size: 16.5px;
  line-height: 1.85;
  color: rgba(26,22,19,.78);
  margin-bottom: 1.25rem;
}
.prose-editorial p:last-child { margin-bottom: 0; }
.prose-editorial p:first-of-type::first-line {
  font-variant: small-caps;
  letter-spacing: .06em;
}

/* Editorial pull-quote */
.pull-quote {
  border-left: 2px solid var(--accent);
  padding-left: 24px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  line-height: 1.4;
  color: var(--ink);
  font-style: italic;
}

/* ---------- Marquee section rule ---------- */
.section-rule {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--line), transparent);
}


/* ---------- Team initials avatar ---------- */
.team-avatar {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.team-avatar::before {
  /* subtle radial glow so the initials don't feel flat */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 50% 45%, rgba(152, 87, 50, 0.22) 0%, transparent 70%),
    linear-gradient(180deg, #221a15 0%, #14100e 100%);
  pointer-events: none;
}
.team-initials {
  position: relative;
  z-index: 1;
  color: var(--paper);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(72px, 12vw, 128px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.team-rule {
  position: relative;
  z-index: 1;
  display: block;
  width: 44px;
  height: 1px;
  background: var(--accent);
}


/* =====================================================================
   INVEST MODAL — pre-fills a WhatsApp message to the advisory line
   ===================================================================== */

.invest-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}
.invest-modal.is-open { display: block; }

.invest-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 22, 19, 0.65);
  opacity: 0;
  transition: opacity 350ms var(--ease-out);
  cursor: pointer;
}
.invest-modal.is-open .invest-modal-backdrop { opacity: 1; }

.invest-modal-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 24px));
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--paper);
  padding: 40px 32px 32px;
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -20px rgba(26, 22, 19, 0.45);
  opacity: 0;
  transition:
    transform 500ms var(--ease-out),
    opacity 400ms var(--ease-out);
  transition-delay: 100ms;
}
.invest-modal.is-open .invest-modal-panel {
  transform: translate(-50%, -50%);
  opacity: 1;
}

.invest-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink);
  border: 1px solid transparent;
  transition: background-color 200ms ease, border-color 200ms ease;
  cursor: pointer;
}
.invest-modal-close:hover {
  background: var(--paper-2);
  border-color: var(--line);
}

.invest-modal-kicker {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(26, 22, 19, 0.6);
  margin-bottom: 14px;
}
.invest-modal-title {
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
}
@media (min-width: 640px) {
  .invest-modal-title { font-size: 36px; }
}
.invest-modal-sub {
  color: rgba(26, 22, 19, 0.7);
  font-size: 14.5px;
  line-height: 1.6;
  margin-bottom: 24px;
}
.invest-modal-note {
  color: rgba(26, 22, 19, 0.55);
  font-size: 12px;
  line-height: 1.6;
  margin-top: 14px;
}

.invest-form { display: flex; flex-direction: column; gap: 16px; }

.invest-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border: 0;
  padding: 0;
  margin: 0;
}
.invest-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(26, 22, 19, 0.55);
}
.invest-field input[type="text"],
.invest-field input[type="tel"] {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 2px 8px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 300ms var(--ease-out);
}
.invest-field input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.invest-field input::placeholder {
  color: rgba(26, 22, 19, 0.35);
}

.invest-tiers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.invest-tier {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  transition:
    border-color 300ms var(--ease-out),
    background-color 300ms var(--ease-out),
    transform 300ms var(--ease-out);
}
.invest-tier:hover {
  border-color: rgba(152, 87, 50, 0.5);
}
.invest-tier input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid rgba(26, 22, 19, 0.35);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 200ms var(--ease-out);
  flex-shrink: 0;
}
.invest-tier input[type="radio"]:checked {
  border-color: var(--accent);
}
.invest-tier input[type="radio"]:checked::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.invest-tier:has(input:checked) {
  border-color: var(--accent);
  background: #fff8f2;
}
.invest-tier-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.25;
}
.invest-tier-name {
  font-size: 14.5px;
  color: var(--ink);
  font-weight: 500;
}
.invest-tier-range {
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(26, 22, 19, 0.6);
}

.invest-submit {
  margin-top: 8px;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .invest-modal-backdrop,
  .invest-modal-panel { transition: none !important; }
}
