/*
 * ATLAS — Canonical shared stylesheet
 *
 * Introduced with the blog system (July 2026).
 * Existing pages (index.html, booking.html, etc.) still use inline CSS and will
 * migrate to this file in a follow-up PR. Do NOT modify the tokens here without
 * also updating those inline blocks.
 *
 * Contents:
 *   1. Design tokens (CSS custom properties)
 *   2. Reset
 *   3. Base typography
 *   4. Blog shell (nav, hero, footer)
 *   5. Blog article prose
 *   6. Blog CTA block
 *   7. Blog index listing
 */

/* ─── 1. Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --black:       #111009;
  --black-soft:  #1A1A1A;
  --warm:        #F5F2EE;
  --warm-deep:   #EBE6DF;
  --gold:        #B8975A;
  --slate:       #4A4E5A;
  --slate-light: #7A7E8A;

  --line-dark:         rgba(245, 242, 238, 0.10);
  --line-dark-strong:  rgba(245, 242, 238, 0.20);
  --line-light:        rgba(13, 13, 13, 0.10);
  --line-light-strong: rgba(13, 13, 13, 0.22);

  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans:  'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --ease:  cubic-bezier(0.22, 1, 0.36, 1);
}

/* ─── 2. Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; }

/* ─── 3. Base ──────────────────────────────────────────────────────────────── */
body {
  background: var(--warm);
  color: var(--black);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--gold); color: var(--black); }

a                { color: var(--gold); text-decoration: none; }
a:hover          { text-decoration: underline; }
img              { max-width: 100%; height: auto; display: block; }

/* ─── 4. Blog shell ────────────────────────────────────────────────────────── */

/* Reading progress bar — sits just below the nav */
.reading-progress {
  position: fixed;
  top: 64px;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gold);
  z-index: 99;
  pointer-events: none;
  transition: width 0.08s linear;
}

/* Nav */
.blog-nav {
  padding: 0 clamp(1.5rem, 4vw, 3rem);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  color: var(--warm);
  transition: background 0.45s var(--ease), backdrop-filter 0.45s var(--ease), color 0.45s var(--ease), border-color 0.45s var(--ease);
  border-bottom: 0.5px solid transparent;
}
.blog-nav.scrolled {
  background: rgba(245, 242, 238, 0.90);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--line-light);
  color: var(--black);
}
.blog-nav-logo {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.28em;
  color: currentColor;
  text-decoration: none;
  transition: color 0.2s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.blog-nav-logo:hover { color: var(--gold); text-decoration: none; }
.blog-nav-logo .nav-logo-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.blog-nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}
.blog-nav-links a {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: currentColor;
  opacity: 0.65;
  text-decoration: none;
  transition: opacity 0.2s var(--ease), color 0.2s var(--ease);
}
.blog-nav-links a:hover { opacity: 1; color: var(--gold); text-decoration: none; }
.blog-nav-links .nav-cta {
  border: 0.5px solid var(--gold);
  color: var(--gold);
  opacity: 1;
  padding: 0.45em 1.1em;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
.blog-nav-links .nav-cta:hover { background: var(--gold); color: var(--black); opacity: 1; }

@media (max-width: 600px) {
  .blog-nav-links { gap: 1.1rem; }
  .blog-nav-links .nav-cta { display: none; }
  .blog-hero--photo {
    min-height: 78vh;
  }
  .blog-hero--photo .blog-hero-inner {
    padding-top: 5rem;
  }
}

/* Post hero */
.blog-hero {
  background: var(--black);
  color: var(--warm);
  position: relative;
  overflow: hidden;
}
.blog-hero-inner {
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem);
  position: relative;
  z-index: 1;
}
/* Photo variant: full-bleed cover with title overlaid */
.blog-hero--photo {
  min-height: clamp(50vh, 60vw, 68vh);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.blog-hero--photo .blog-hero-inner {
  padding-top: clamp(2rem, 3vw, 3rem);
}
.blog-hero-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.blog-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(17,16,9,0.94) 0%,
    rgba(17,16,9,0.60) 50%,
    rgba(17,16,9,0.20) 100%);
}
.blog-hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.8rem;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.blog-hero-meta .meta-sep { color: var(--slate-light); }
.blog-hero-meta time      { color: var(--slate-light); }
.blog-hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 820px;
  margin-bottom: 1.2rem;
}
.blog-hero-desc {
  font-size: 1rem;
  color: var(--slate-light);
  max-width: 600px;
  line-height: 1.65;
}

/* Article body wrapper */
.blog-body {
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}
.blog-body-lion {
  position: absolute;
  right: clamp(-60px, -4vw, -30px);
  bottom: clamp(-40px, -3vw, -20px);
  width: clamp(280px, 42vw, 520px);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.blog-body .prose,
.blog-body .blog-cta {
  position: relative;
  z-index: 1;
}

/* Footer */
.blog-footer {
  background: var(--black);
  color: var(--slate-light);
  text-align: center;
  padding: 2.5rem clamp(1.5rem, 4vw, 3rem);
  font-size: 12px;
  letter-spacing: 0.05em;
}
.blog-footer a { color: var(--gold); }
.blog-footer a:hover { text-decoration: underline; }

/* ─── 5. Prose (rendered Markdown) ────────────────────────────────────────── */
.prose {
  max-width: 700px;
  margin: 0 auto;
}
.prose h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-top: 3rem;
  margin-bottom: 0.8rem;
  color: var(--black);
}
.prose h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin-top: 2.5rem;
  margin-bottom: 0.6rem;
}
.prose h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  margin-top: 1.8rem;
  margin-bottom: 0.4rem;
}
.prose p   { margin-bottom: 1.4em; color: var(--black); }
.prose > p:first-child {
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--slate);
}
.prose ul, .prose ol {
  padding-left: 1.6em;
  margin-bottom: 1.4em;
}
.prose li { margin-bottom: 0.45em; }
.prose blockquote {
  border-left: 2px solid var(--gold);
  padding: 0.2em 0 0.2em 1.4em;
  margin: 2rem 0;
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 300;
  font-style: italic;
  line-height: 1.55;
  color: var(--slate);
}
.prose blockquote p { margin-bottom: 0; color: inherit; }
.prose code {
  font-family: var(--mono);
  font-size: 0.84em;
  background: var(--warm-deep);
  color: var(--black);
  padding: 0.15em 0.45em;
  border-radius: 3px;
}
.prose pre {
  background: var(--warm-deep);
  padding: 1.2em 1.5em;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1.6em;
}
.prose pre code { background: none; padding: 0; font-size: 0.88em; }
.prose strong    { font-weight: 500; color: var(--gold); }
.prose em        { font-style: italic; }
.prose hr {
  border: none;
  border-top: 1px solid var(--line-light-strong);
  margin: 3rem 0;
}
.prose img {
  border-radius: 4px;
  margin: 2rem 0;
}
.prose a { color: var(--gold); }
.prose a:hover { text-decoration: underline; }

/* ─── 6. Blog CTA block ────────────────────────────────────────────────────── */
.blog-cta {
  border-top: 1px solid var(--line-light-strong);
  margin-top: 4rem;
  padding-top: 3.5rem;
}
.blog-cta-inner {
  max-width: 700px;
  margin: 0 auto;
}
.blog-cta-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}
.blog-cta-headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.3;
  color: var(--black);
  margin-bottom: 1.8rem;
}
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--black);
  color: var(--warm);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 1rem 2rem;
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.btn-cta::after {
  content: '→';
  font-size: 0.9em;
  transition: transform 0.2s var(--ease);
}
.btn-cta:hover {
  background: var(--gold);
  color: var(--black);
  text-decoration: none;
}
.btn-cta:hover::after { transform: translateX(3px); }

/* ─── 7. Blog index — hero + tile grid ────────────────────────────────────── */

/* Full-page brand hero */
.blog-index-hero {
  position: relative;
  height: 52vh;
  min-height: 360px;
  max-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
}
.blog-index-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}
.blog-index-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(17,16,9,0.25) 0%,
    rgba(17,16,9,0.55) 55%,
    rgba(17,16,9,0.88) 100%
  );
}
.blog-index-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem;
}
.blog-index-hero-logo {
  width: 76px;
  height: auto;
  margin-bottom: 1.6rem;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}
.blog-index-hero-eyebrow {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
}
.blog-index-hero-title {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  color: var(--warm);
  margin-bottom: 1.8rem;
}
.blog-index-hero-sub {
  font-size: clamp(15px, 1.6vw, 18px);
  color: rgba(245,242,238,0.75);
  letter-spacing: 0.06em;
}
.blog-index-hero-lion {
  position: absolute;
  right: -5%;
  bottom: -8%;
  width: clamp(340px, 52vw, 720px);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
.blog-index-hero-content { z-index: 2; }
.blog-index-hero-scroll {
  position: absolute;
  bottom: 2.8rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: rgba(245,242,238,0.3);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  animation: scrollPulse 2.2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
  50%       { opacity: 0.65; transform: translateX(-50%) translateY(5px); }
}

/* Article tile grid */
.blog-tile-section {
  padding: clamp(3rem, 5vw, 5rem) clamp(1.5rem, 4vw, 3rem);
  background: var(--warm);
}
.blog-tile-header {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-light-strong);
  padding-bottom: 1rem;
}
.blog-tile-label {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--slate-light);
}
.blog-tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 900px) { .blog-tile-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .blog-tile-grid { grid-template-columns: 1fr; } }

.blog-card {
  display: block;
  text-decoration: none;
  background: white;
  overflow: hidden;
  border: 1px solid var(--line-light-strong);
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(17,16,9,0.12);
  text-decoration: none;
}
.blog-card-photo-wrap {
  overflow: hidden;
  height: 190px;
}
.blog-card-photo {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  transition: transform 0.45s var(--ease);
}
.blog-card:hover .blog-card-photo { transform: scale(1.05); }

/* Pillar-tinted placeholder when no photo */
.blog-card-photo-placeholder {
  width: 100%;
  height: 190px;
  background: var(--black);
}
.blog-card-photo-placeholder[data-pillar="insurance"]  { background: linear-gradient(135deg, #1c2a45 0%, #0d1520 100%); }
.blog-card-photo-placeholder[data-pillar="wealth"]     { background: linear-gradient(135deg, #1a1810 0%, #111009 100%); }
.blog-card-photo-placeholder[data-pillar="investments"]{ background: linear-gradient(135deg, #162018 0%, #0c1410 100%); }
.blog-card-photo-placeholder[data-pillar="real-estate"]{ background: linear-gradient(135deg, #201a12 0%, #130f09 100%); }

.blog-card-content {
  padding: 1.2rem 1.4rem 1.5rem;
}
.blog-card-pillar {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.45rem;
}
.blog-card-title {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  line-height: 1.22;
  color: var(--black);
  margin-bottom: 0.55rem;
}
.blog-card-date {
  font-size: 11px;
  color: var(--slate-light);
  letter-spacing: 0.08em;
}

.blog-empty {
  color: var(--slate-light);
  font-size: 14px;
  padding: 4rem clamp(1.5rem, 4vw, 3rem);
}

/* ─── 8. Inline charts ─────────────────────────────────────────────────────── */
.chart-figure {
  margin: 2.5rem 0;
  border: 1px solid var(--line-light-strong);
  border-radius: 3px;
  overflow: hidden;
}
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
}
.chart-caption {
  font-size: 11px;
  color: var(--slate-light);
  padding: 0.65rem 1.1rem;
  border-top: 1px solid var(--line-light);
  letter-spacing: 0.02em;
  background: var(--warm-deep);
  line-height: 1.5;
}
