/* Source Sans 3, Adobe — SIL Open Font License; served locally. */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/source-sans-3/source-sans-3-roman-v3.052.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Sans 3';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('../fonts/source-sans-3/source-sans-3-italic-v3.052.woff2') format('woff2');
}

:root {
  --font-sans:
    'Source Sans 3', 'Segoe UI', arial, sans-serif;
  --font-heading:
    var(--font-sans);
  --color-bg: #f6f1e8;
  --color-surface: rgba(255, 253, 249, 0.92);
  --color-surface-soft: #efe7da;
  --color-surface-deep: #e6dccd;
  --color-text: #1f1915;
  --color-text-soft: #54483f;
  --color-text-muted: #7a6b5f;
  --color-brand: #5b0f19;
  --color-brand-strong: #7a1823;
  --color-brand-soft: #9f7364;
  --color-gold: #b99759;
  --color-gold-soft: rgba(185, 151, 89, 0.16);
  --color-border: rgba(47, 36, 28, 0.11);
  --color-border-strong: rgba(47, 36, 28, 0.18);
  --color-success: #2f6f4f;
  --color-warning: #9a6b13;
  --color-danger: #9c2f2f;
  --focus-ring:
    0 0 0 3px rgba(91, 15, 25, 0.1),
    0 0 0 7px rgba(255, 250, 243, 0.88);
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.125rem;
  --text-md: 1.125rem;
  --text-lg: 1.3125rem;
  --text-xl: clamp(1.45rem, 2vw, 1.72rem);
  --text-2xl: clamp(2rem, 3.2vw, 2.95rem);
  --text-3xl: clamp(2.8rem, 5vw, 5.15rem);
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.65;
  --leading-relaxed: 1.75;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 64px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --shadow-soft: 0 18px 44px rgba(44, 30, 18, 0.08);
  --shadow-medium: 0 24px 58px rgba(30, 20, 12, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  letter-spacing: 0;
  color: var(--color-text);
  background:
    radial-gradient(circle at top left, rgba(185, 151, 89, 0.09), transparent 24%),
    radial-gradient(circle at 82% 12%, rgba(91, 15, 25, 0.05), transparent 22%),
    linear-gradient(180deg, #fffcf8 0%, #f8f3eb 28%, var(--color-bg) 100%);
  text-rendering: optimizelegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-weight:
    400;
}

/* ===== Premium Loader ===== */

#site-loader {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 247, 228, 0.76) 0%, rgba(255, 247, 228, 0.28) 24%, rgba(255, 247, 228, 0) 52%),
    linear-gradient(180deg, #f8f4ec 0%, #efe7db 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

#site-loader.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-inner {
  position: relative;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  animation: loader-fade 1.6s ease forwards;
  isolation: isolate;
}

.loader-inner::before,
.loader-inner::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 38%;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.loader-inner::before {
  width: 560px;
  height: 560px;
  background:
    radial-gradient(circle, rgba(255, 248, 232, 0.76) 0%, rgba(255, 248, 232, 0.34) 22%, rgba(255, 248, 232, 0.12) 42%, rgba(255, 248, 232, 0) 74%);
  filter: blur(18px);
  opacity: 1;
  z-index: -2;
  animation: loader-halo 4.6s ease-in-out infinite;
}

.loader-inner::after {
  width: 520px;
  height: 520px;
  background:
    conic-gradient(
      from 0deg,
      rgba(255, 245, 222, 0) 0deg 12deg,
      rgba(243, 229, 203, 0.28) 18deg 34deg,
      rgba(255, 245, 222, 0) 42deg 80deg,
      rgba(243, 229, 203, 0.24) 88deg 102deg,
      rgba(255, 245, 222, 0) 112deg 164deg,
      rgba(243, 229, 203, 0.22) 174deg 190deg,
      rgba(255, 245, 222, 0) 200deg 254deg,
      rgba(243, 229, 203, 0.2) 264deg 278deg,
      rgba(255, 245, 222, 0) 286deg 330deg,
      rgba(243, 229, 203, 0.18) 338deg 350deg,
      rgba(255, 245, 222, 0) 332deg 360deg
    );
  filter: blur(22px);
  opacity: 0.94;
  z-index: -1;
  animation: loader-rays 7.2s linear infinite;
}

.loader-cross {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  opacity: 0.9;
  background-image: url('/assets/icons/cross.svg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter:
    drop-shadow(0 0 18px rgba(255, 241, 213, 0.42))
    drop-shadow(0 0 34px rgba(231, 214, 181, 0.34))
    drop-shadow(0 0 64px rgba(255, 248, 231, 0.24));
}

.loader-cross::before,
.loader-cross::after {
  content: '';
  position: absolute;
  inset: 50%;
  border-radius: 999px;
  pointer-events: none;
}

.loader-cross::before {
  width: 196px;
  height: 196px;
  background:
    radial-gradient(circle, rgba(255, 243, 214, 0.52) 0%, rgba(240, 225, 192, 0.28) 32%, rgba(240, 225, 192, 0.08) 54%, rgba(240, 225, 192, 0) 76%);
  transform: translate(-50%, -50%);
  filter: blur(10px);
  animation: loader-glow 3.4s ease-in-out infinite;
}

.loader-cross::after {
  width: 300px;
  height: 300px;
  background:
    radial-gradient(circle, rgba(255, 250, 236, 0.52) 0%, rgba(255, 248, 232, 0.2) 30%, rgba(255, 248, 232, 0.08) 46%, rgba(255, 248, 232, 0) 76%);
  transform: translate(-50%, -50%);
  opacity: 1;
  filter: blur(18px);
  animation: loader-aura 4.2s ease-in-out infinite;
}

.loader-line {
  width: 148px;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, #b9a88f, transparent);
  animation: loader-line 2.6s ease-in-out infinite;
}

@keyframes loader-fade {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes loader-line {
  0% {
    transform: scaleX(0.4);
    opacity: 0.4;
  }

  50% {
    transform: scaleX(1);
    opacity: 1;
  }

  100% {
    transform: scaleX(0.4);
    opacity: 0.4;
  }
}

@keyframes loader-glow {
  0% {
    opacity: 0.82;
    transform: translate(-50%, -50%) scale(0.92);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }

  100% {
    opacity: 0.88;
    transform: translate(-50%, -50%) scale(0.96);
  }
}

@keyframes loader-aura {
  0% {
    opacity: 0.62;
    transform: translate(-50%, -50%) scale(0.94);
  }

  50% {
    opacity: 0.92;
    transform: translate(-50%, -50%) scale(1.08);
  }

  100% {
    opacity: 0.68;
    transform: translate(-50%, -50%) scale(0.98);
  }
}

@keyframes loader-halo {
  0% {
    opacity: 0.86;
    transform: translate(-50%, -50%) scale(0.96);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.12);
  }

  100% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes loader-rays {
  0% {
    opacity: 0.62;
    transform: translate(-50%, -50%) rotate(0deg) scale(0.98);
  }

  50% {
    opacity: 0.94;
    transform: translate(-50%, -50%) rotate(8deg) scale(1.06);
  }

  100% {
    opacity: 0.68;
    transform: translate(-50%, -50%) rotate(16deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  #site-loader,
  .loader-inner,
  .loader-inner::before,
  .loader-inner::after,
  .loader-line,
  .loader-cross::before,
  .loader-cross::after {
    transition: none !important;
    animation: none !important;
  }
}

main {
  display: block;
}

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

img {
  height: auto;
}

iframe {
  max-width: 100%;
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
  transition:
    color 0.24s ease,
    opacity 0.24s ease,
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    background-color 0.24s ease;
}

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

button {
  border: 0;
  background: none;
}

button,
[type='button'],
[type='submit'],
[type='reset'] {
  cursor: pointer;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

ul,
ol {
  padding-left: 1.3em;
}

ul[class],
ol[class] {
  padding-left: 0;
  list-style: none;
}

table {
  width: 100%;
  border-collapse: collapse;
}

hr {
  height: 1px;
  margin: var(--space-8) 0;
  border: 0;
  background: var(--color-border);
}

::selection {
  color: #fff;
  background: rgba(91, 15, 25, 0.85);
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 8px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 var(--space-4);
  font-family: var(--font-heading);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: 0;
  color: var(--color-text);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-3xl);
  letter-spacing: 0;
  text-shadow: none;
}

h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-6);
}

h3 {
  font-size: var(--text-xl);
}

h4 {
  font-size: var(--text-lg);
}

h5,
h6 {
  font-size: var(--text-md);
}

p {
  margin: 0 0 var(--space-6);
  color: var(--color-text-soft);
  text-wrap: pretty;
}

strong,
b {
  font-weight: 600;
  color: var(--color-text);
}

small {
  font-size: var(--text-sm);
}

blockquote {
  margin: var(--space-7) 0;
  padding: var(--space-5) var(--space-6);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: rgba(255, 255, 255, 0.78);
  color: var(--color-text-soft);
}

blockquote > *:last-child {
  margin-bottom: 0;
}

code,
pre,
kbd {
  font-family:
    ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono',
    'Courier New', monospace;
  font-size: 0.95em;
}

code {
  padding: 0.12em 0.35em;
  border-radius: 8px;
  background: rgba(32, 26, 23, 0.06);
}

pre {
  overflow: auto;
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: #181514;
  color: #f4ede7;
}

pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

label {
  display: inline-block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  color: var(--color-text);
}

input,
textarea,
select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-muted);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(91, 15, 25, 0.28);
  box-shadow: var(--focus-ring);
}

details {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
}

summary {
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

details > *:not(summary) {
  padding-inline: var(--space-5);
}

details > *:last-child {
  padding-bottom: var(--space-5);
}

.flow > * + * {
  margin-top: 1em;
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
}

.serif {
  font-family: var(--font-heading);
}

.surface {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1.0625rem;
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    letter-spacing: 0;
  }

  blockquote {
    padding: var(--space-4) var(--space-5);
  }
}
