/* ═══════════════════════════════════════════════════════════
   ALPHA HOSPITAL — GLOBAL STYLES
   Reset, Typography, Layout Utilities, Aurora Background
   ═══════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-teal) var(--bg-void);
}

html::-webkit-scrollbar {
  width: 6px;
}
html::-webkit-scrollbar-track {
  background: var(--bg-void);
}
html::-webkit-scrollbar-thumb {
  background: var(--accent-teal);
  border-radius: var(--radius-pill);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-void);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

/* ─── Aurora Background Effect ─── */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, var(--gradient-aurora-1) 0%, transparent 70%),
    radial-gradient(ellipse 60% 80% at 80% 70%, var(--gradient-aurora-2) 0%, transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 50%, var(--gradient-aurora-3) 0%, transparent 70%);
  animation: auroraShift 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: var(--z-behind);
}

/* ─── Noise Texture Overlay ─── */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  opacity: 0.03;
  pointer-events: none;
  z-index: var(--z-base);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

@keyframes auroraShift {
  0%   { transform: translate(0, 0) rotate(0deg) scale(1); }
  33%  { transform: translate(5%, -3%) rotate(2deg) scale(1.05); }
  66%  { transform: translate(-3%, 5%) rotate(-1deg) scale(0.98); }
  100% { transform: translate(2%, -2%) rotate(1deg) scale(1.02); }
}

/* ─── Selection ─── */
::selection {
  background: var(--accent-teal);
  color: var(--bg-void);
}

/* ─── Links ─── */
a {
  color: var(--accent-teal);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-smooth);
}
a:hover {
  color: var(--text-white);
}

/* ─── Images ─── */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ─── Lists ─── */
ul, ol { list-style: none; }

/* ─── Tables ─── */
table {
  border-collapse: collapse;
  width: 100%;
}

/* ─── Focus Visible ─── */
:focus-visible {
  outline: 2px solid var(--accent-teal);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--text-white);
  letter-spacing: var(--ls-tight);
}

h1 {
  font-size: var(--fs-hero);
  font-weight: var(--fw-extrabold);
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.75rem, 4vw, var(--fs-4xl));
  font-weight: var(--fw-bold);
}

h3 {
  font-size: clamp(1.25rem, 3vw, var(--fs-2xl));
  font-weight: var(--fw-semibold);
}

h4 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
}

h5 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-medium);
}

h6 {
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: var(--text-secondary);
}

p {
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 65ch;
}

.lead {
  font-size: var(--fs-lg);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
}

small, .text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }

/* ─── Font Utility ─── */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

.fw-light     { font-weight: var(--fw-light); }
.fw-regular   { font-weight: var(--fw-regular); }
.fw-medium    { font-weight: var(--fw-medium); }
.fw-semibold  { font-weight: var(--fw-semibold); }
.fw-bold      { font-weight: var(--fw-bold); }
.fw-extrabold { font-weight: var(--fw-extrabold); }

/* ─── Text Color ─── */
.text-primary   { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted     { color: var(--text-muted); }
.text-white     { color: var(--text-white); }
.text-teal      { color: var(--accent-teal); }
.text-red       { color: var(--red-pulse); }

.text-center    { text-align: center; }
.text-left      { text-align: left; }
.text-right     { text-align: right; }
.text-uppercase { text-transform: uppercase; letter-spacing: var(--ls-wider); }

/* ─── Section Title Pattern ─── */
.section-label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--accent-teal);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.section-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--accent-teal);
}

.section-title {
  font-size: clamp(1.75rem, 4vw, var(--fs-4xl));
  margin-bottom: var(--sp-4);
}

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--text-muted);
  max-width: 55ch;
  line-height: var(--lh-relaxed);
}

.section-header {
  margin-bottom: var(--sp-16);
}

.section-header.center {
  text-align: center;
}
.section-header.center .section-subtitle {
  margin-left: auto;
  margin-right: auto;
}
.section-header.center .section-label {
  justify-content: center;
}
.section-header.center .section-label::before {
  display: none;
}

/* ═══════════════════════════════════════════════════════════
   LAYOUT UTILITIES
   ═══════════════════════════════════════════════════════════ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.container-wide {
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-px);
  padding-right: var(--container-px);
}

.section {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
  position: relative;
}

.section-lg {
  padding-top: var(--section-py-lg);
  padding-bottom: var(--section-py-lg);
}

/* ─── Flexbox ─── */
.flex        { display: flex; }
.flex-col    { flex-direction: column; }
.flex-wrap   { flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-start  { align-items: flex-start; }
.flex-end    { align-items: flex-end; }
.items-center{ align-items: center; }
.gap-1  { gap: var(--sp-1); }
.gap-2  { gap: var(--sp-2); }
.gap-3  { gap: var(--sp-3); }
.gap-4  { gap: var(--sp-4); }
.gap-6  { gap: var(--sp-6); }
.gap-8  { gap: var(--sp-8); }
.gap-10 { gap: var(--sp-10); }
.gap-12 { gap: var(--sp-12); }

/* ─── CSS Grid ─── */
.grid      { display: grid; }
.grid-2    { grid-template-columns: repeat(2, 1fr); }
.grid-3    { grid-template-columns: repeat(3, 1fr); }
.grid-4    { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ─── Spacing Helpers ─── */
.mt-4  { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); }
.mt-8  { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-6  { margin-bottom: var(--sp-6); }
.mb-8  { margin-bottom: var(--sp-8); }
.mb-12 { margin-bottom: var(--sp-12); }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ─── Display ─── */
.hidden    { display: none !important; }
.block     { display: block; }
.inline    { display: inline; }
.relative  { position: relative; }
.absolute  { position: absolute; }
.fixed     { position: fixed; }
.sticky    { position: sticky; }
.overflow-hidden { overflow: hidden; }
.w-full    { width: 100%; }

/* ─── Responsive Visibility ─── */
@media (max-width: 768px) {
  .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

/* Custom cursor CSS removed — using native cursor */

/* ═══════════════════════════════════════════════════════════
   PAGE LOADER
   ═══════════════════════════════════════════════════════════ */

.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-void);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: var(--z-loader);
  transition: opacity 0.5s var(--ease-smooth), visibility 0.5s;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.page-loader__logo {
  width: 80px;
  height: 80px;
  margin-bottom: var(--sp-8);
  animation: pulse 1.5s ease-in-out infinite;
}

.page-loader__bar {
  width: 200px;
  height: 2px;
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.page-loader__bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: var(--accent-teal);
  border-radius: var(--radius-pill);
  animation: loaderSlide 1.2s ease-in-out infinite;
}

@keyframes loaderSlide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(600%); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.05); opacity: 0.8; }
}

/* ═══════════════════════════════════════════════════════════
   PAGE HERO (Inner Pages)
   ═══════════════════════════════════════════════════════════ */

.page-hero {
  min-height: 40vh;
  display: flex;
  align-items: flex-end;
  padding-top: calc(var(--nav-height) + var(--sp-16));
  padding-bottom: var(--sp-16);
  position: relative;
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: blur(2px);
}

.page-hero__overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, var(--bg-void) 0%, transparent 30%, var(--bg-void) 100%);
}

.page-hero__content {
  position: relative;
  z-index: 2;
}

.page-hero__breadcrumb {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.page-hero__breadcrumb a {
  color: var(--text-muted);
  transition: color var(--duration-fast);
}
.page-hero__breadcrumb a:hover {
  color: var(--accent-teal);
}

.page-hero__breadcrumb span {
  color: var(--accent-teal);
}
