/* Fonts */

@font-face {
  font-family: "Incognito Pro";
  src: url("/static/fonts/IncognitoPro/IncognitoPro.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/EB_Garamond/EBGaramond-VariableFont_wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("/static/fonts/EB_Garamond/EBGaramond-Italic-VariableFont_wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/static/fonts/Nunito/Nunito-VariableFont_wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("/static/fonts/Nunito/Nunito-Italic-VariableFont_wght.ttf")
    format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

.church-name {
  font-family: var(--font-family-brand);
}

/* Design System Variables & Reset */

:root {
  /* Colors */
  --color-primary: #89191c;
  --color-primary-light: #a82428;
  --color-primary-dark: #6b1315;
  --color-secondary: #b8860b;
  --color-secondary-light: #d4a017;
  --color-secondary-dark: #8a6400;
  --color-white-85: rgba(255, 255, 255, 0.85);
  --color-white-60: rgba(255, 255, 255, 0.625);
  --color-white-15: rgba(255, 255, 255, 0.15);
  --color-overlay: rgba(0, 0, 0, 0.5);
  --color-primary-glow: color-mix(
    in srgb,
    var(--color-primary) 12%,
    transparent
  );
  --color-primary-tint: color-mix(
    in srgb,
    var(--color-primary) 20%,
    transparent
  );

  /* Neutrals (warm-tinted) */
  --color-white: #ffffff;
  --color-gray-50: #faf9f7;
  --color-gray-100: #f3f1ee;
  --color-gray-200: #e0ddd8;
  --color-gray-300: #b8b4ad;
  --color-gray-400: #8f8a82;
  --color-gray-500: #716b63;
  --color-gray-600: #55504a;
  --color-gray-700: #3d3935;
  --color-gray-800: #272420;
  --color-gray-900: #151311;
  --color-black: #000000;

  /* Semantic */
  --color-success: #16a34a;
  --color-success-bg: #f0fdf4;
  --color-success-border: #bbf7d0;
  --color-warning: #ca8a04;
  --color-warning-light: #fef3c7;
  --color-warning-dark: #78350f;
  --color-warning-border: #fde68a;
  --color-error: #dc2626;
  --color-error-bg: #fef2f2;
  --color-error-border: #fecaca;
  --color-error-dark: #b91c1c;
  --color-error-darker: #991b1b;
  --color-info: #2563eb;
  --color-info-dark: #1d4ed8;
  --color-info-light: #dbeafe;
  --color-info-border: #93c5fd;

  /* Text */
  --color-text: var(--color-gray-800);
  --color-text-muted: var(--color-gray-500);

  /* Typography */
  --font-family: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-family-sans:
    "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Line heights */
  --line-height-relaxed: 1.7;

  /* Spacing */
  --space-2xs: 0.125rem;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --container-max: 1200px;
  --container-wide: 1040px;
  --container-padding: 1rem;
  --container-content: 800px;
  --container-narrow: 760px;
  --container-form: 480px;
  --header-height: 4rem; /* sticky .site-header clearance (nav collapse, sticky sidebars) */

  /* Borders */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.18);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;

  /* Letter spacing */
  --letter-spacing-normal: 0;
  --letter-spacing-loose: 0.025em;
  --letter-spacing-looser: 0.05em;
  --letter-spacing-display: 0.08em;
  --letter-spacing-brand: 0.12em;

  /* Brand/display font */
  --font-family-brand: "Incognito Pro", var(--font-family);

  /* Font weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Refresh additions — mahogany/gold editorial direction (DECISIONS #46) */
  --color-gold-soft: #d8b24a; /* hairline rules / dividers */
  --color-gold-pale: #e6c66a; /* eyebrow text on dark */
  --overlay-mahogany: linear-gradient(
    180deg,
    rgba(45, 8, 9, 0.84) 0%,
    rgba(45, 8, 9, 0.72) 100%
  );
  --overlay-mahogany-strong: linear-gradient(
    180deg,
    rgba(45, 8, 9, 0.92) 0%,
    rgba(45, 8, 9, 0.82) 100%
  );
  /* Arch motif as a tintable mask (sized box + currentColor/background tint).
     The %23b8860b fill is the URL-encoded gold — data-URI SVGs cannot read CSS
     vars, so keep it in sync with --color-secondary if that token ever changes
     (mask consumers re-tint via background and are unaffected). */
  --arch-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 100"><path fill="%23b8860b" fill-rule="evenodd" d="M 0 0 H 50 V 100 H 0 Z M 5 40 V 95 H 45 V 40 A 50 50 0 0 0 25 5 A 50 50 0 0 0 5 40 Z"/></svg>');

  /* Quatrefoil motif. The %23f3f1ee stroke is URL-encoded --color-gray-100 —
     data-URI SVGs cannot read CSS vars, so keep it in sync if that token changes. */
  --quatrefoil-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Cg fill='none' stroke='%23f3f1ee44'%3E%3Cpath stroke-width='16' d='M60.72 60.72A60 60 0 0 0 60.72 179.28A60 60 0 0 0 179.28 179.28A60 60 0 0 0 179.28 60.72A60 60 0 0 0 60.72 60.72Z'/%3E%3Cpath stroke-width='9' d='M160 160A40 40 0 0 0 160 80A40 40 0 0 0 80 80A40 40 0 0 0 80 160A40 40 0 0 0 160 160Z'/%3E%3C/g%3E%3C/svg%3E");

  /* Warm shadows — tokenized recurring rgba(45, 20, 8, …) lift shadows */
  --shadow-warm-sm: 0 10px 30px rgba(45, 20, 8, 0.07);
  --shadow-warm-md: 0 10px 30px rgba(45, 20, 8, 0.12);
  --shadow-warm-lg: 0 16px 34px rgba(45, 20, 8, 0.13);
  --shadow-warm-figure: 0 10px 30px rgba(45, 20, 8, 0.16);

  /* Gold inset frame — used on hero/page-header overlays */
  --frame-gold: rgba(184, 134, 11, 0.45);
  --frame-gold-soft: rgba(184, 134, 11, 0.4);

  /* Photo placeholder wash — crimson diagonal shown behind portrait photos until
     the img/initials paint (staff + directory cards and detail pages). */
  --gradient-photo-wash: linear-gradient(
    140deg,
    var(--color-primary-dark),
    var(--color-primary)
  );
}

/* Section eyebrow / kicker — gold small-caps label above a section title */
.section-kicker {
  display: inline-block;
  font-family: var(--font-family-sans);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-secondary);
  margin-bottom: var(--space-sm);
}

/* Arch-glyph divider under centered section titles.
   Add <div class="section-motif"></div> after a .section-title. */
.section-motif {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: var(--space-md);
}
.section-motif::before,
.section-motif::after {
  content: "";
  width: 46px;
  height: 1px;
  background: var(--color-gold-soft);
}
.section-motif__arch {
  width: 13px;
  height: 26px;
  background: var(--color-secondary);
  -webkit-mask: var(--arch-svg) center / contain no-repeat;
  mask: var(--arch-svg) center / contain no-repeat;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-sans);
  font-size: var(--font-size-base);
  color: var(--color-gray-800);
  background-color: var(--color-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-light);
  text-decoration: underline;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-family);
  color: var(--color-gray-900);
  line-height: 1.2;
  margin-bottom: var(--space-sm);
  letter-spacing: var(--letter-spacing-loose);
}

h1 {
  font-size: var(--font-size-4xl);
  letter-spacing: var(--letter-spacing-display);
}
h2 {
  font-size: var(--font-size-2xl);
  letter-spacing: var(--letter-spacing-looser);
}
h3 {
  font-size: var(--font-size-xl);
}
h4 {
  font-size: var(--font-size-lg);
}
h5 {
  font-size: var(--font-size-base);
}
h6 {
  font-size: var(--font-size-sm);
}

p,
dl {
  margin-bottom: var(--space-md);
}

dl > dt {
  font-weight: 700;
}

dl > dt:not(:first-child) {
  margin-top: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

blockquote {
  padding: var(--space-md) var(--space-lg);
  margin-bottom: var(--space-md);
  border-left: 4px solid var(--color-secondary);
  font-style: italic;
}

ul,
ol {
  list-style: none;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  html {
    scroll-behavior: auto;
  }
}
