/* ===== Design tokens ===== */
:root {
  --font-heading: 'Sora', sans-serif;
  --font-body: 'Inter', sans-serif;
  --primary: #4349a8;
  --primary-light: #6c72c9;
  --primary-dark: #2f3480;
  --gradient-primary: linear-gradient(135deg, #4349a8, #7b61ff);
  --gradient-primary-hover: linear-gradient(135deg, #3a3f94, #6a50e6);
  --gradient-dark: linear-gradient(135deg, #1a1a2e, #2f3480);
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e4e6f0;
  --success: #16a34a;
  --danger: #dc2626;
  --accent: #ffb020;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(20, 20, 40, .08);
  --shadow-md: 0 8px 24px rgba(20, 20, 40, .10);
  --shadow-lg: 0 20px 48px rgba(20, 20, 40, .14);
  --shadow-glow: 0 0 0 4px rgba(67, 73, 168, .15);
  --header-bg: rgba(255, 255, 255, .78);
  --header-bg-solid: #ffffff;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --transition: .3s var(--ease);
}

/* ===== Themes ===== */
:root[data-theme="dark-blue"] {
  --primary: #93a0fb;
  --primary-light: #b6c0ff;
  --primary-dark: #6a74d6;
  --bg: #0e1326;
  --surface: #161d39;
  --text: #e7e9f8;
  --muted: #a3a8cc;
  --border: #262d4f;
  --header-bg: rgba(14, 19, 38, .78);
  --header-bg-solid: #0e1326;
  --shadow-glow: 0 0 0 4px rgba(147, 160, 251, .25);
}

:root[data-theme="smoky-tan"] {
  --primary: #8a5a33;
  --primary-light: #b07f52;
  --primary-dark: #6b4323;
  --bg: #ece3d6;
  --surface: #f8f2e8;
  --text: #3a2f22;
  --muted: #7a6b57;
  --border: #ddd0bb;
  --header-bg: rgba(236, 227, 214, .82);
  --header-bg-solid: #ece3d6;
  --shadow-glow: 0 0 0 4px rgba(138, 90, 51, .22);
}

/* ===== Reset & base ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ===== Page-load progress bar ===== */
.page-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--gradient-primary); z-index: 9999;
  transition: width .4s var(--ease), opacity .3s ease;
}

/* ===== Alerts ===== */
.alert {
  margin: 16px 0; padding: 14px 18px; border-radius: var(--radius-sm);
  cursor: pointer; transition: opacity .3s ease;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ===== Header / Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.site-header.is-scrolled {
  background: var(--header-bg-solid);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--border);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 14px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand__logo { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; }
.brand__mark {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--gradient-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.2rem;
  flex-shrink: 0;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.25; white-space: nowrap; max-width: 340px; overflow: hidden; }

@media (max-width: 600px) {
  .brand__text { max-width: 150px; }
}
.brand__name { font-family: var(--font-heading); font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand__tagline { font-size: .75rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border: none; background: transparent; cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--text);
  margin: 0 auto; transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.site-nav a {
  position: relative; font-weight: 500; font-size: .92rem; color: var(--text);
  padding: 6px 2px; white-space: nowrap; line-height: 1;
  display: inline-flex; align-items: center;
}
.site-nav a::after {
  content: ''; position: absolute; left: 50%; bottom: 0; width: 0; height: 2px;
  background: var(--gradient-primary); transition: width var(--transition), left var(--transition);
  transform: translateX(-50%);
}
.site-nav a:hover::after, .site-nav a.is-active::after { width: 100%; left: 50%; }
.site-nav a.is-active { color: var(--primary); }

/* ===== Nav dropdowns (desktop: hover/click panel) ===== */
.has-dropdown { position: relative; }
.nav-parent-row { display: flex; align-items: center; gap: 2px; padding: 6px 2px; line-height: 1; }
.nav-parent-row a { padding: 0; }
.nav-parent-label {
  cursor: pointer; font-weight: 500; font-size: .92rem; color: var(--text);
  padding: 0; white-space: nowrap; line-height: 1;
}
.nav-parent-label.is-active { color: var(--primary); }
.dropdown-toggle {
  background: none; border: none; cursor: pointer; color: var(--muted); padding: 0 0 0 2px;
  display: flex; align-items: center; font-size: .65rem; line-height: 1;
}
.dropdown-toggle:hover { color: var(--text); }
.dropdown-menu {
  list-style: none; margin: 0; padding: 8px; position: absolute; top: calc(100% + 12px); left: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); min-width: 190px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
  z-index: 60;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown.is-open .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
  display: block; padding: 9px 12px; border-radius: 8px; font-size: .85rem; font-weight: 500;
  color: var(--text); white-space: nowrap;
}
.dropdown-menu a::after { display: none; }
.dropdown-menu a:hover { background: var(--bg); }
.dropdown-menu a.is-active { color: var(--primary); background: var(--bg); }

.theme-switch { position: relative; }
.theme-switch__btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  transition: box-shadow var(--transition), transform .2s var(--ease);
}
.theme-switch__btn:hover { box-shadow: var(--shadow-glow); transform: translateY(-1px); }
.theme-switch__menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 6px; min-width: 150px;
  display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.theme-switch__menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.theme-switch__menu button {
  border: none; background: transparent; color: var(--text); text-align: left;
  padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: .88rem; font-family: var(--font-body);
}
.theme-switch__menu button:hover { background: var(--bg); }

/* ===== Footer ===== */
.site-footer { position: relative; overflow: hidden; background: var(--gradient-dark); color: #e7e9f8; margin-top: 64px; }
.site-footer::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px;
  background: linear-gradient(90deg, var(--primary-light), var(--accent), var(--primary-light));
  background-size: 200% 100%; animation: footerShimmer 6s linear infinite;
}
.site-footer::after {
  content: ''; position: absolute; top: -120px; right: -80px; width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(123, 97, 255, .25), transparent 70%); pointer-events: none;
}
.site-footer__grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding: 56px 24px 32px; position: relative; z-index: 1;
}
.site-footer__col { animation: footerFadeUp .7s var(--ease) backwards; }
.site-footer__col:nth-child(1) { animation-delay: .05s; }
.site-footer__col:nth-child(2) { animation-delay: .15s; }
.site-footer__col:nth-child(3) { animation-delay: .25s; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; position: relative; display: inline-block; padding-bottom: 8px; }
.site-footer h4::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px;
  background: var(--accent); border-radius: var(--radius-pill);
}
.site-footer__brand-row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.site-footer__logo { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.site-footer__brand {
  display: block; font-size: 1.2rem; color: #fff;
  background: linear-gradient(90deg, #fff, var(--primary-light));
  background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  white-space: normal; overflow: visible; text-overflow: clip; max-width: none;
}
.site-footer__about { color: #c3c6ea; font-size: .92rem; line-height: 1.7; }
.site-footer__links, .site-footer__contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer__links a, .site-footer__contact a {
  color: #c3c6ea; font-size: .92rem; transition: color var(--transition), transform var(--transition);
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
}
.site-footer__links a::before {
  content: '›'; color: var(--accent); font-weight: 700; opacity: 0;
  transform: translateX(-6px); transition: opacity var(--transition), transform var(--transition);
}
.site-footer__links a:hover, .site-footer__contact a:hover { color: #fff; transform: translateX(4px); }
.site-footer__links a:hover::before { opacity: 1; transform: translateX(0); }
.site-footer__contact li { color: #c3c6ea; font-size: .92rem; transition: transform var(--transition); }
.site-footer__contact li:hover { transform: translateX(4px); }
.site-footer__cta { text-align: center; padding: 8px 24px 28px; position: relative; z-index: 1; }
.site-footer__cta .btn { animation: footerPulse 2.4s ease-in-out infinite; }
.site-footer__cta .btn:hover { animation-play-state: paused; }
.site-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 24px;
  text-align: center; font-size: .82rem; color: #9ba0d1; position: relative; z-index: 1;
}
.site-footer__legal { margin-top: 8px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.site-footer__legal a { color: #c3c6ea; transition: color var(--transition); }
.site-footer__legal a:hover { color: #fff; }
.site-footer__legal span { color: #6b70a0; }
@keyframes footerShimmer { to { background-position: -200% 0; } }
@keyframes footerFadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes footerPulse {
  0% { box-shadow: 0 0 0 0 rgba(123, 97, 255, .45); }
  70% { box-shadow: 0 0 0 10px rgba(123, 97, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(123, 97, 255, 0); }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px; border-radius: var(--radius-pill); border: none; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  position: relative; overflow: hidden; isolation: isolate;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn-primary { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--gradient-primary-hover); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 255, 255, .5) 0%, transparent 60%);
  opacity: 0; transform: scale(0); transition: transform .5s var(--ease), opacity .5s var(--ease);
  z-index: -1;
}
.btn:active::after { opacity: 1; transform: scale(1.6); transition: 0s; }

/* ===== Scroll reveal ===== */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ===== Section head ===== */
.section-head { margin-bottom: 28px; }
.section-head--center { text-align: center; }
.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.01em;
  position: relative; display: inline-block; padding-bottom: 12px;
}
.section-head h2::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 54px; height: 4px;
  border-radius: var(--radius-pill); background: var(--gradient-primary);
  box-shadow: var(--shadow-glow);
}
.section-head--center h2::after { left: 50%; transform: translateX(-50%); }
.section-head--center p { color: var(--muted); max-width: 580px; margin: 14px auto 0; }

/* ===== Inner page banner + title card ===== */
.page-banner {
  position: relative; height: 320px; overflow: hidden; background: var(--gradient-dark);
}
.page-banner__bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  animation: bannerParallaxZoom 20s ease-in-out infinite alternate;
}
.page-banner__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 30, .6), rgba(10, 12, 30, .8));
}
@keyframes bannerParallaxZoom { from { transform: scale(1.05); } to { transform: scale(1.15); } }

.title-card-wrap { position: relative; margin-top: -80px; z-index: 2; padding-bottom: 8px; }
.title-card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 36px 40px; display: flex; align-items: center; gap: 20px;
  position: relative; overflow: hidden;
}
.title-card::before {
  content: ''; position: absolute; inset: 0; padding: 2px; border-radius: inherit;
  background: conic-gradient(from 0deg, var(--primary), var(--accent), var(--primary));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: borderFlow 6s linear infinite; opacity: .55;
}
@keyframes borderFlow { to { filter: hue-rotate(360deg); } }
.title-card__icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--gradient-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem; flex-shrink: 0;
  animation: iconBounceIn .6s var(--ease);
}
@keyframes iconBounceIn {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}
.title-card h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.01em; margin: 0;
  position: relative; display: inline-block; padding-bottom: 12px;
}
.title-card h1::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 54px; height: 4px;
  border-radius: var(--radius-pill); background: var(--gradient-primary);
  box-shadow: var(--shadow-glow);
}
.title-card p { color: var(--muted); margin: 6px 0 0; }

@media (max-width: 760px) {
  .page-banner { height: 220px; }
  .title-card { flex-direction: column; text-align: center; padding: 28px 24px; }
  .title-card h1::after { left: 50%; transform: translateX(-50%); }
}

/* ===== Information documents ===== */
.info-section { padding: 48px 0 64px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.info-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); text-align: center;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.info-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.info-card__preview { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.info-card__pdf {
  display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 4 / 3;
  background: var(--bg); font-size: 2.6rem;
}
.info-card__body { padding: 18px 20px; }
.info-card h3 { font-size: 1rem; margin-bottom: 14px; }
.info-card .btn { width: 100%; padding: 10px 18px; font-size: .88rem; }

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

.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); grid-column: 1 / -1; }
.empty-state__icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }

/* ===== Responsive nav ===== */
@media (max-width: 1100px) {
  .nav-toggle { display: flex; }
  .nav-overlay {
    position: fixed; inset: 0; background: rgba(10, 12, 24, .45);
    z-index: 150; opacity: 0; visibility: hidden; transition: opacity var(--transition), visibility var(--transition);
  }
  .nav-overlay.is-open { opacity: 1; visibility: visible; }
  .site-nav {
    position: fixed; top: 0; right: 0; height: 100vh; width: min(78vw, 320px); z-index: 200;
    background: var(--surface); flex-direction: column; align-items: flex-start;
    padding: 90px 28px 28px; gap: 28px; box-shadow: var(--shadow-lg);
    transform: translateX(100%); transition: transform var(--transition);
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav ul { flex-direction: column; gap: 18px; width: 100%; }
  .site-nav a { display: block; font-size: 1rem; }
  .has-dropdown { width: 100%; }
  .nav-parent-row { width: 100%; justify-content: space-between; }
  .nav-parent-label { font-size: 1rem; padding: 0; }
  .dropdown-toggle { font-size: 1.1rem; padding: 4px 10px; }
  .dropdown-toggle span { display: inline-block; transition: transform .25s var(--ease); }
  .has-dropdown.is-open .dropdown-toggle span { transform: rotate(180deg); }
  .dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent; padding: 0 0 0 14px;
    max-height: 0; overflow: hidden; transition: max-height .3s var(--ease), margin-top .3s var(--ease);
    margin-top: 0;
  }
  .has-dropdown.is-open .dropdown-menu { max-height: 240px; margin-top: 14px; }
  .dropdown-menu a { padding: 8px 0; font-size: .92rem; color: var(--muted); }
  .theme-switch__menu { right: auto; left: 0; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 760px) {
  .site-footer__grid { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px 24px; }
}
