/* ============================================================
   Digital Library — Living Archive shell
   Stitch-derived editorial design system for all public pages.
   ============================================================ */

:root {
  --bg: #f8f9fa;
  --bg-soft: #f3f4f5;
  --surface: #f8f9fa;
  --surface-strong: #ffffff;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --surface-low: #f3f4f5;
  --surface-high: #e7e8e9;
  --border: rgba(195, 198, 209, 0.55);
  --border-strong: rgba(115, 119, 128, 0.22);
  --text: #191c1d;
  --text-inverse: #f0f1f2;
  --muted: #43474f;
  --muted-light: #6b7280;
  --blue: #001e40;
  --cyan: #14696d;
  --violet: #453000;
  --pink: #2a1c00;
  --green: #1b6d71;
  --success: #14696d;
  --warning: #5d4201;
  --danger: #ba1a1a;
  --shadow: 0 12px 32px rgba(25, 28, 29, 0.04);
  --shadow-soft: 0 6px 16px rgba(25, 28, 29, 0.03);
  --shadow-lg: 0 18px 44px rgba(25, 28, 29, 0.05);
  --glow-blue: rgba(0, 30, 64, 0.12);
  --glow-cyan: rgba(20, 105, 109, 0.14);
  --surface-premium: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 244, 245, 0.94));
  --surface-tint: rgba(255, 255, 255, 0.72);
  --radius-xl: 8px;
  --radius-lg: 6px;
  --radius-md: 4px;
  --radius-sm: 2px;
  --container: 1280px;
  /* Shared page container: every top-level surface (header, hero, sections,
     footer) aligns its content to these edges. --page-inset resolves to the
     distance from the viewport edge to the content, so full-bleed backgrounds
     keep working while content stays on one vertical line. */
  --page-max: 1440px;
  --page-pad: clamp(16px, 3vw, 40px);
  --page-inset: max(var(--page-pad), calc((100% - var(--page-max)) / 2 + var(--page-pad)));
  --shell-nav-height: 72px;
  --shell-sticky-offset: 92px;
  --shell-first-section-gap: 56px;
  --shell-footer-gap: 72px;
  --footer-bg: #f3f4f5;
  --footer-surface: rgba(255, 255, 255, 0.84);
  --footer-border: rgba(195, 198, 209, 0.55);
  --footer-text: #43474f;
  --footer-heading: #001e40;
  --footer-accent: #14696d;
  --ease-premium: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-fast: 160ms;
  --dur-medium: 280ms;
  --dur-slow: 420ms;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Manrope', 'Inter', system-ui, sans-serif;
  color: var(--text);
  background: #f8f9fa;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.site-shell {
  position: relative;
}

.site-shell::before,
.site-shell::after {
  content: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-premium), opacity var(--dur-fast) var(--ease-premium), transform var(--dur-fast) var(--ease-premium);
}

img {
  max-width: 100%;
  display: block;
}

main {
  display: block;
  flex: 1 0 auto;
  min-width: 0;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -56px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  z-index: 60;
  box-shadow: var(--shadow-soft);
}

.skip-link:focus-visible {
  top: 12px;
}

.page-main {
  position: relative;
  z-index: 1;
}

.site-shell--public-family {
  --container: 1320px;
  --shell-nav-height: 82px;
  --shell-footer-gap: 64px;
}

.public-site-frame {
  position: relative;
  z-index: 1;
}

.page-main--public {
  padding-top: 26px;
}

.site-shell--public-family .container {
  width: min(100% - 40px, var(--container));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--shell-nav-height) !important;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(195, 198, 209, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: background-color var(--dur-medium) var(--ease-premium), box-shadow var(--dur-medium) var(--ease-premium), border-color var(--dur-fast) var(--ease-premium);
}

.topbar--glass {
  box-shadow: 0 8px 24px rgba(25, 28, 29, 0.035);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--shell-nav-height) !important;
  gap: 18px;
}

.nav-shell {
  display: block;
}

.nav-shell__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--shell-nav-height);
  gap: 18px;
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-badge,
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-low);
  border: 1px solid rgba(195, 198, 209, 0.55);
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  overflow: hidden;
}

.brand-mark--logo {
  background: #fff;
  box-shadow: 0 6px 14px rgba(25, 28, 29, 0.05);
}

.logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.logo-img--brand {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.navbar-brand-logo {
  border-radius: 50%;
}

.brand-text {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--blue);
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand {
  transition: transform var(--dur-medium) var(--ease-premium);
}

.brand-mark,
.brand-badge {
  transition: transform var(--dur-medium) var(--ease-premium), background-color var(--dur-medium) var(--ease-premium), border-color var(--dur-medium) var(--ease-premium);
}

.brand:hover .brand-mark,
.brand:hover .brand-badge {
  transform: translate3d(0, -1px, 0) rotate(-3deg);
  border-color: rgba(20, 105, 109, 0.24);
  background: rgba(255, 255, 255, 0.96);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.nav-link-pill {
  position: relative;
  padding: 8px 12px;
  border-radius: 999px;
  border-bottom: 0;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow var(--dur-fast) var(--ease-premium);
}

.nav-link-pill::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 5px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(20, 105, 109, 0.25), var(--cyan), rgba(20, 105, 109, 0.25));
  opacity: 0;
  transform: scaleX(0.72);
  transition: transform var(--dur-fast) var(--ease-premium), opacity var(--dur-fast) var(--ease-premium);
}

.nav-link-pill:hover,
.nav-link-pill.active {
  color: var(--blue);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(25, 28, 29, 0.035);
}

.nav-link-pill:hover::after,
.nav-link-pill.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.locale-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(195, 198, 209, 0.55);
  background: rgba(243, 244, 245, 0.92);
}

.locale-link {
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 999px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.locale-link:hover,
.locale-link.active {
  background: #fff;
  color: var(--blue);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  font-size: 22px;
  color: var(--text);
}

.btn,
.shell-btn {
  border: 0;
  cursor: pointer;
  font: inherit;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease-premium), background var(--dur-fast) var(--ease-premium), color var(--dur-fast) var(--ease-premium), border-color var(--dur-fast) var(--ease-premium), box-shadow var(--dur-medium) var(--ease-premium);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

.btn:hover,
.shell-btn:hover {
  transform: translate3d(0, -1px, 0);
}

.btn-primary,
.shell-btn--primary {
  background: linear-gradient(135deg, var(--blue), #003366);
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn-primary::after,
.shell-btn--primary::after {
  content: '';
  position: absolute;
  inset: -30% auto -30% -20%;
  width: 45%;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 100%);
  opacity: 0;
  transform: translate3d(-12px, 0, 0);
  transition: transform var(--dur-slow) var(--ease-premium), opacity var(--dur-fast) var(--ease-premium);
  pointer-events: none;
}

.btn-primary:hover,
.shell-btn--primary:hover {
  background: linear-gradient(135deg, #001631, #002d59);
}

.btn-primary:hover::after,
.shell-btn--primary:hover::after {
  opacity: 1;
  transform: translate3d(18px, 0, 0);
}

.btn-secondary {
  background: rgba(20, 105, 109, 0.1);
  color: var(--cyan);
  border: 1px solid rgba(20, 105, 109, 0.18);
}

.btn-ghost,
.shell-btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(195, 198, 209, 0.7);
  box-shadow: none;
}

.btn-ghost:hover,
.shell-btn--ghost:hover {
  border-color: rgba(0, 30, 64, 0.3);
  color: var(--blue);
  background: rgba(243, 244, 245, 0.9);
}

.btn:disabled,
.btn[disabled],
.shell-btn:disabled,
.shell-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.card {
  background: var(--surface-strong);
  border: 1px solid rgba(195, 198, 209, 0.45);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 24px;
}

:is(.card, .feature-card, .contact-card, .info-banner) {
  position: relative;
  overflow: hidden;
  transition: transform var(--dur-medium) var(--ease-premium), box-shadow var(--dur-medium) var(--ease-premium), border-color var(--dur-fast) var(--ease-premium), background var(--dur-fast) var(--ease-premium);
}

:is(.card, .feature-card, .contact-card, .info-banner)::after {
  content: '';
  position: absolute;
  inset: -35% 45% 55% -10%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), transparent 72%);
  opacity: 0;
  transform: translate3d(-10px, 10px, 0);
  transition: transform var(--dur-medium) var(--ease-premium), opacity var(--dur-fast) var(--ease-premium);
  pointer-events: none;
}

:is(.card, .feature-card, .contact-card, .info-banner):hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 16px 34px rgba(25, 28, 29, 0.05);
  border-color: rgba(0, 30, 64, 0.12);
}

:is(.card, .feature-card, .contact-card, .info-banner):hover::after {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 30px;
}

.section-head>div {
  max-width: 760px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.section-head-centered {
  justify-content: center;
  text-align: center;
  flex-direction: column;
  align-items: center;
}

.section-head-centered>div {
  max-width: 760px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 12px;
}

.eyebrow--violet {
  color: var(--violet);
}

.eyebrow--cyan {
  color: var(--cyan);
}

.eyebrow--pink {
  color: var(--pink);
}

.eyebrow--green {
  color: var(--green);
}

.eyebrow--blue {
  color: var(--blue);
}

.page-section {
  position: relative;
  padding: clamp(56px, 7vw, 82px) 0;
  animation: fadeInUp 0.45s var(--ease-premium) both;
}

.page-section>.container {
  position: relative;
}

.page-section+.page-section>.container::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(195, 198, 209, 0.7), transparent);
  opacity: 0.7;
}

.page-hero {
  padding: 56px 0 28px;
  text-align: center;
}

.page-hero .container {
  position: relative;
  padding: clamp(30px, 4vw, 52px);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(195, 198, 209, 0.45);
  background:
    radial-gradient(circle at top right, rgba(20, 105, 109, 0.08), transparent 24%),
    radial-gradient(circle at bottom left, rgba(0, 30, 64, 0.05), transparent 20%),
    linear-gradient(180deg, #ffffff 0%, #f3f4f5 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform var(--dur-medium) var(--ease-premium), box-shadow var(--dur-medium) var(--ease-premium), border-color var(--dur-fast) var(--ease-premium);
}

.page-hero .container::before {
  content: '';
  position: absolute;
  inset: -10% -10% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 105, 109, 0.10), transparent 72%);
  opacity: 0.8;
  transition: transform var(--dur-slow) var(--ease-premium), opacity var(--dur-fast) var(--ease-premium);
}

.page-hero .container::after {
  content: '';
  position: absolute;
  left: -36px;
  bottom: -46px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 30, 64, 0.08), transparent 72%);
  opacity: 0.55;
  transition: transform var(--dur-slow) var(--ease-premium), opacity var(--dur-fast) var(--ease-premium);
}

.page-hero .container:hover {
  transform: translate3d(0, -3px, 0);
  box-shadow: 0 22px 44px rgba(25, 28, 29, 0.07);
}

.page-hero .container:hover::before {
  transform: translate3d(-10px, 8px, 0);
  opacity: 0.95;
}

.page-hero .container:hover::after {
  transform: translate3d(12px, -8px, 0);
  opacity: 0.7;
}

.page-hero h1 {
  position: relative;
  margin: 0 0 14px;
  font-size: clamp(34px, 5vw, 56px);
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.02;
  color: var(--blue);
}

.page-hero p {
  position: relative;
  margin: 0 auto;
  max-width: 760px;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.75;
}

.page-hero .eyebrow {
  position: relative;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cyan);
  margin-bottom: 16px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.feature-card {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translate3d(0, -3px, 0);
  box-shadow: 0 16px 34px rgba(25, 28, 29, 0.05);
  border-color: rgba(23, 53, 77, 0.18);
}

.feature-card .icon {
  font-size: 28px;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  line-height: 1.7;
}

.info-list li:last-child {
  border-bottom: none;
}

.info-list .icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.contact-card {
  background: var(--surface-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: left;
  box-shadow: var(--shadow-soft);
}

.contact-card .icon {
  font-size: 28px;
  margin-bottom: 10px;
}

.contact-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.contact-card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.contact-card a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.info-banner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.98), rgba(244, 239, 230, 0.94));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.info-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(23, 53, 77, 0.08);
  flex-shrink: 0;
}

.info-banner-text h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.info-banner-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  background:
    radial-gradient(circle at top right, rgba(20, 105, 109, 0.05), transparent 18%),
    linear-gradient(180deg, #f4f5f6 0%, #eff1f2 100%);
  color: var(--footer-text);
  margin-top: var(--shell-footer-gap);
  position: relative;
  flex-shrink: 0;
  border-top: 1px solid var(--footer-border);
}

.site-footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(20, 105, 109, 0.35), transparent);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-brand .logo-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}

.footer-brand-name {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--footer-heading);
  line-height: 1.1;
}

.footer-brand-name small {
  display: block;
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: var(--footer-text);
  margin-top: 4px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
  padding: 36px 0 24px;
}

.footer-title {
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--footer-heading);
}

.footer-col p {
  display: block;
  color: var(--footer-text);
  line-height: 1.75;
  font-size: 14px;
  margin: 0;
}

.footer-col a {
  display: block;
  color: var(--footer-text);
  line-height: 1.55;
  font-size: 14px;
  padding: 4px 0;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: var(--footer-accent);
}

.footer-bottom {
  padding: 16px 0 22px;
  border-top: 1px solid var(--footer-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  margin: 0;
  color: var(--muted-light);
  font-size: 13px;
  line-height: 1.6;
}

.footer-bottom-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  font-size: 13px;
  color: var(--muted-light);
}

.footer-bottom-links a:hover {
  color: var(--footer-accent);
}

.footer-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--footer-border);
  background: var(--footer-surface);
  color: var(--footer-heading);
  font-size: 11px;
  font-weight: 700;
}

.footer-note {
  margin-top: 8px !important;
  font-size: 13px !important;
  opacity: 0.88;
}

.footer-prelude {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px 28px;
  padding-top: 32px;
  padding-bottom: 6px;
}

.footer-prelude__intro {
  max-width: 640px;
}

.footer-kicker {
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--footer-accent);
}

.footer-col--brand p {
  max-width: 54ch;
}

.footer-col--support {
  justify-self: end;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes loadingSweep {
  to {
    transform: translateX(120%);
  }
}

.spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(23, 53, 77, 0.16);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.loading {
  position: relative;
  border-radius: 16px;
  border: 1px dashed rgba(195, 198, 209, 0.8);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 244, 245, 0.94));
  padding: 24px;
  text-align: center;
  color: var(--muted);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.45) 45%, transparent 100%);
  transform: translateX(-120%);
  animation: loadingSweep 2.8s linear infinite;
  pointer-events: none;
  opacity: 0.75;
}

.error {
  position: relative;
  border-radius: 16px;
  border: 1px solid rgba(186, 26, 26, 0.18);
  background: linear-gradient(180deg, rgba(255, 248, 248, 0.98), rgba(255, 240, 240, 0.96));
  padding: 22px 24px;
  color: #8a1d1d;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.error::after {
  content: '';
  position: absolute;
  inset: -20% auto auto -10%;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(186, 26, 26, 0.12), transparent 72%);
  pointer-events: none;
}

.cta-section {
  text-align: center;
  padding: 72px 0 82px;
}

.cta-section h2 {
  margin: 0 0 12px;
  font-size: clamp(24px, 4vw, 44px);
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--blue);
}

.cta-section p {
  color: var(--muted);
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto 24px;
}

.cta-section .cta-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: 0;
}

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

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

.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(23, 53, 77, 0.05);
  color: var(--blue);
  border: 1px solid rgba(23, 53, 77, 0.08);
}

.heading-xl {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.heading-lg {
  margin: 0 0 12px;
  font-size: clamp(22px, 3vw, 32px);
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.text-body {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.text-body-sm {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.max-w-prose {
  max-width: 600px;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

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

@media (max-width: 1120px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  :root {
    --shell-first-section-gap: 48px;
  }

  .nav,
  .nav-shell__row {
    position: relative;
    flex-wrap: wrap;
  }

  .nav-cluster {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .footer-prelude {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--surface-strong);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 20px;
    gap: 10px;
    box-shadow: var(--shadow);
    z-index: 39;
  }

  .nav-links.open a {
    padding: 8px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .mobile-toggle {
    display: block;
  }

  .page-hero,
  .page-section,
  .cta-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .card,
  .feature-card,
  .contact-card {
    padding: 22px;
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 20px, var(--container));
  }

  .footer-grid,
  .feature-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .nav-actions :is(.btn, .shell-btn) {
    min-height: 44px;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 20px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 16px, var(--container));
  }

  .nav {
    min-height: 68px;
    gap: 8px;
  }

  .brand-text {
    font-size: 13px;
  }

  .brand-text small {
    font-size: 10px;
  }

  .logo-img {
    width: 32px;
    height: 32px;
  }

  .page-hero h1 {
    font-size: 28px;
  }

  .card,
  .feature-card,
  .contact-card {
    padding: 16px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {

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