/* style.css — The International Estate Collective LLC design system */

/* ---------- Fonts ---------- */
/* Display: Newsreader (Google) — elegant literary serif, distinctive, not overused
   Body: General Sans (Fontshare) — refined, clean, warm-neutral sans
   Accessory / labels: General Sans uppercase tracking */

:root,
[data-theme='light'] {
  --font-display: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --font-body: 'General Sans', 'Helvetica Neue', Arial, sans-serif;

  /* ---------- Type scale (fluid clamp) ---------- */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);
  --text-3xl: clamp(2.5rem, 1rem + 4vw, 5rem);
  --text-hero: clamp(2.75rem, 0.5rem + 6vw, 6.5rem);

  /* ---------- Spacing (4px system) ---------- */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ---------- Surfaces: cool steel white ---------- */
  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-surface-2: #eceef1;
  --color-surface-offset: #e3e6ea;
  --color-surface-offset-2: #d6dae0;
  --color-surface-dynamic: #c3c9d1;
  --color-divider: #dde0e5;
  --color-border: #ccd1d8;

  /* ---------- Text: ink navy family ---------- */
  --color-text: #141a26;
  --color-text-muted: #565f70;
  --color-text-faint: #97a0ac;
  --color-text-inverse: #f4f5f7;

  /* ---------- Primary accent: silver / steel gray ---------- */
  --color-primary: #6b7686;
  --color-primary-hover: #545e6d;
  --color-primary-active: #3f4753;
  --color-primary-highlight: #e2e5ea;

  /* ---------- Secondary accent: deep steel blue ---------- */
  --color-secondary: #1c3f5e;
  --color-secondary-hover: #142c42;
  --color-secondary-highlight: #d9e2ea;

  /* ---------- Ink navy (for dark sections / footer) ---------- */
  --color-ink: #0e1526;
  --color-ink-2: #141c30;
  --color-ink-border: #2a3347;
  --color-ink-text: #eceef1;
  --color-ink-text-muted: #a4acb8;

  /* Semantic (kept minimal — not heavily used on this site) */
  --color-error: #8a2f2f;
  --color-success: #3d6b3f;

  /* ---------- Radius ---------- */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.625rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* ---------- Transitions ---------- */
  --transition-interactive: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  /* ---------- Shadows (warm-toned) ---------- */
  --shadow-sm: 0 1px 2px oklch(0.2 0.02 60 / 0.08);
  --shadow-md: 0 6px 20px oklch(0.2 0.02 60 / 0.10);
  --shadow-lg: 0 16px 44px oklch(0.2 0.02 60 / 0.16);

  /* ---------- Content widths ---------- */
  --content-narrow: 640px;
  --content-default: 980px;
  --content-wide: 1240px;
  --content-full: 100%;
}

[data-theme='dark'] {
  --color-bg: #0e1526;
  --color-surface: #141c30;
  --color-surface-2: #182038;
  --color-surface-offset: #1c2540;
  --color-surface-offset-2: #222c4a;
  --color-surface-dynamic: #2a3554;
  --color-divider: #2a3347;
  --color-border: #333f5c;

  --color-text: #eceef1;
  --color-text-muted: #a4acb8;
  --color-text-faint: #6b7688;
  --color-text-inverse: #141a26;

  --color-primary: #b7c0cc;
  --color-primary-hover: #cdd4dd;
  --color-primary-active: #e2e6ea;
  --color-primary-highlight: #2c3446;

  --color-secondary: #6f93b3;
  --color-secondary-hover: #8fabc6;
  --color-secondary-highlight: #1c2c3e;

  --color-ink: #070b16;
  --color-ink-2: #0e1526;
  --color-ink-border: #2a3347;
  --color-ink-text: #eceef1;
  --color-ink-text-muted: #a4acb8;

  --color-error: #c96a6a;
  --color-success: #7fb17f;

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
  --shadow-md: 0 6px 20px oklch(0 0 0 / 0.45);
  --shadow-lg: 0 16px 44px oklch(0 0 0 / 0.55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0e1526;
    --color-surface: #141c30;
    --color-surface-2: #182038;
    --color-surface-offset: #1c2540;
    --color-surface-offset-2: #222c4a;
    --color-surface-dynamic: #2a3554;
    --color-divider: #2a3347;
    --color-border: #333f5c;
    --color-text: #eceef1;
    --color-text-muted: #a4acb8;
    --color-text-faint: #6b7688;
    --color-text-inverse: #141a26;
    --color-primary: #b7c0cc;
    --color-primary-hover: #cdd4dd;
    --color-primary-active: #e2e6ea;
    --color-primary-highlight: #2c3446;
    --color-secondary: #6f93b3;
    --color-secondary-hover: #8fabc6;
    --color-secondary-highlight: #1c2c3e;
    --color-ink: #070b16;
    --color-ink-2: #0e1526;
    --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.35);
    --shadow-md: 0 6px 20px oklch(0 0 0 / 0.45);
    --shadow-lg: 0 16px 44px oklch(0 0 0 / 0.55);
  }
}

/* ==================== Layout Primitives ==================== */

.container {
  max-width: var(--content-default);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--wide {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-6);
}
.container--narrow {
  max-width: var(--content-narrow);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.section {
  padding-block: clamp(var(--space-16), 9vw, var(--space-32));
}
.section--tight {
  padding-block: clamp(var(--space-10), 6vw, var(--space-20));
}

/* ==================== Typography ==================== */

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-primary);
}

.display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

h1 {
  font-family: var(--font-display);
  font-weight: 500;
}
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 500;
}

.prose {
  max-width: 68ch;
}
.prose p + p {
  margin-top: var(--space-5);
}
.prose p {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  line-height: 1.75;
}

.lede {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 58ch;
}

.pull-quote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
  max-width: 42ch;
}

/* ==================== Header / Nav ==================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in oklab, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid oklch(from var(--color-text) l c h / 0.08);
  transition:
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-header--hidden {
  transform: translateY(-100%);
}
.site-header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
}
.brand svg {
  width: 34px;
  height: 34px;
  color: var(--color-primary);
  flex-shrink: 0;
}
.brand-wordmark {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.brand-wordmark small {
  display: block;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-8);
}
.nav-desktop a {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: var(--space-2) 0;
  position: relative;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current='page'] {
  color: var(--color-text);
}
.nav-desktop a[aria-current='page']::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
}
.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-offset);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  color: var(--color-text);
}
.nav-toggle:hover {
  background: var(--color-surface-offset);
}

a.header-cta {
  display: none;
}

@media (min-width: 900px) {
  .nav-desktop {
    display: flex;
  }
  .nav-toggle {
    display: none;
  }
  a.header-cta {
    display: inline-flex;
  }
}

/* Mobile nav sheet */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  padding: var(--space-6);
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.25s;
}
.nav-mobile.is-open {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}
.nav-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-mobile-links {
  margin-top: var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.nav-mobile-links a {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-text);
  text-decoration: none;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-divider);
}
.nav-mobile-cta {
  margin-top: auto;
  padding-top: var(--space-8);
}
@media (min-width: 900px) {
  .nav-mobile {
    display: none;
  }
}

/* ==================== Buttons ==================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--color-primary-hover);
}
[data-theme='dark'] .btn-primary {
  color: var(--color-ink);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid oklch(from var(--color-text) l c h / 0.22);
}
.btn-ghost:hover {
  border-color: var(--color-text);
  background: var(--color-surface-offset);
}
.btn-inverse {
  background: var(--color-text-inverse);
  color: var(--color-ink);
}
[data-theme='dark'] .btn-inverse,
.on-ink .btn-inverse {
  background: var(--color-primary);
  color: var(--color-ink);
}
.on-ink .btn-inverse:hover,
[data-theme='dark'] .btn-inverse:hover {
  background: var(--color-primary-hover);
}
.btn-inverse:hover {
  background: var(--color-surface-offset);
}
.btn-outline-ink {
  background: transparent;
  color: var(--color-ink-text);
  border: 1px solid oklch(from var(--color-ink-text) l c h / 0.3);
}
.btn-outline-ink:hover {
  border-color: var(--color-ink-text);
  background: oklch(from var(--color-ink-text) l c h / 0.06);
}

/* ==================== Cards ==================== */

.card {
  background: var(--color-surface);
  border: 1px solid oklch(from var(--color-text) l c h / 0.09);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.pillar {
  padding: var(--space-8) 0;
  border-top: 1px solid var(--color-divider);
}
.pillar-num {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--color-primary);
  letter-spacing: 0.06em;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid oklch(from var(--color-primary) l c h / 0.35);
  color: var(--color-primary);
}

/* ==================== Sections on ink background ==================== */

.on-ink {
  background: var(--color-ink);
  color: var(--color-ink-text);
}
.on-ink .eyebrow {
  color: var(--color-primary);
}
.on-ink h2,
.on-ink h3 {
  color: var(--color-ink-text);
}
.on-ink p {
  color: var(--color-ink-text-muted);
}
.on-ink .divider {
  border-color: var(--color-ink-border);
}

/* ==================== Utility ==================== */

.divider {
  border-top: 1px solid var(--color-divider);
}

.grain {
  position: relative;
}
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-2) var(--space-4);
  z-index: 100;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==================== Footer ==================== */

.site-footer {
  background: var(--color-ink);
  color: var(--color-ink-text-muted);
  padding-block: var(--space-16) var(--space-8);
}
.site-footer a {
  color: var(--color-ink-text-muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--color-ink-text);
}
.footer-grid {
  display: grid;
  gap: var(--space-10);
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-ink-text);
  margin-bottom: var(--space-4);
}
.footer-brand svg {
  width: 30px;
  height: 30px;
  color: var(--color-primary);
}
.footer-col h4 {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-text);
  margin-bottom: var(--space-4);
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-ink-border);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  font-size: var(--text-xs);
}

/* ==================== Image treatments ==================== */

.media-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-surface-offset);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==================== Responsive grid helpers ==================== */

.grid-2 {
  display: grid;
  gap: var(--space-10);
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}
.grid-2.reverse > *:first-child {
  order: 2;
}
@media (min-width: 860px) {
  .grid-2.reverse > *:first-child {
    order: 2;
  }
  .grid-2.reverse > *:last-child {
    order: 1;
  }
}

/* Compact header on narrow phones */
@media (max-width: 480px) {
  .brand-wordmark {
    font-size: 0.95rem;
  }
  .brand-wordmark small {
    display: none;
  }
  .brand svg {
    width: 28px;
    height: 28px;
  }
}

/* ==================== Photo panels (photographic imagery + readability overlays) ==================== */
.photo-panel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.photo-panel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* Full-bleed hero/background photos: gradient overlay so overlaid text stays readable */
.photo-panel--overlay::after {
  background: linear-gradient(180deg, oklch(0.08 0.02 260 / 0.35) 0%, oklch(0.08 0.02 260 / 0.72) 65%, var(--color-ink) 100%);
}
/* Framed inline photos (media-frame cards): subtle navy tint only, no heavy gradient */
.photo-panel--tint::after {
  background: linear-gradient(160deg, rgba(18, 32, 63, 0.28) 0%, rgba(18, 32, 63, 0.05) 55%, rgba(18, 32, 63, 0.12) 100%);
}
