/* Purcas AI 5.2 Aurora Core — Unified Design System
   Glass / Holographic / Aurora Aesthetic
   Mobile-first, accessible, no horizontal overflow
*/
:root {
  --bg: #030508;
  --bg-soft: #070d1c;
  --bg-deep: #02060a;
  --panel: rgba(255,255,255,.07);
  --panel-strong: rgba(255,255,255,.10);
  --panel-glass: rgba(7, 14, 30, 0.72);
  --line: rgba(255,255,255,.12);
  --line-cyan: rgba(103,232,249,.22);
  --text: #f0f6ff;
  --muted: #a0b1c7;
  --muted-2: #6a7f9a;
  --cyan: #7de8ff;
  --cyan-deep: #3ab7d6;
  --blue: #5a9df5;
  --violet: #a68ff7;
  --pink: #ff8ab8;
  --success: #6ff7a3;
  --warning: #ffdb4d;
  --error: #ff6b8a;
  --shadow: 0 24px 80px rgba(0,0,0,.38);
  --shadow-cyan: 0 0 30px rgba(125,232,255,.18);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --font-body: Inter, 'SF Pro Display', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --space-xs: 6px;
  --space-sm: 12px;
  --space-md: 18px;
  --space-lg: 28px;
  --space-xl: 44px;
  color-scheme: dark;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
* { min-width: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 12% 8%, rgba(96,165,250,.22), transparent 28%),
    radial-gradient(ellipse at 88% 6%, rgba(167,139,250,.18), transparent 30%),
    radial-gradient(ellipse at 50% 92%, rgba(125,232,255,.10), transparent 32%),
    radial-gradient(ellipse at 30% 50%, rgba(255,138,184,.06), transparent 30%),
    linear-gradient(180deg, #030508 0%, #060d1e 45%, #030508 100%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 20%, transparent 70%);
  z-index: 0;
}
::selection { background: rgba(125,232,255,.22); color: white; }

/* Typography scale */
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h1 { font-size: clamp(2.8rem, 7vw, 6rem); letter-spacing: -0.06em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); letter-spacing: -0.04em; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }
p { margin: 0; color: var(--muted); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--cyan); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }

/* Focus & accessibility */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }
.skip-link { position: absolute; left: -999px; top: 10px; z-index: 100; padding: 10px 14px; border-radius: var(--radius-sm); background: #0f172a; color: #fff; }
.skip-link:focus { left: 12px; }

/* Layout */
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; position: relative; z-index: 1; }
@media (max-width: 640px) { .container { width: min(100% - 20px, 1180px); } }

/* Header — glass */
.site-header {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  background: rgba(3,5,12,.72);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner {
  min-height: 68px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 800; letter-spacing: .03em; font-size: 1.1rem;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 14px; object-fit: cover;
  box-shadow: 0 0 24px rgba(125,232,255,.28), inset 0 1px 0 rgba(255,255,255,.15);
}
.nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.nav a {
  padding: 8px 14px; color: var(--muted); border-radius: var(--radius-pill);
  font-size: 0.9rem; font-weight: 600;
  transition: all .2s ease;
  border: 1px solid transparent;
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--text); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

/* Hero — Aurora Core identity */
.hero { position: relative; padding: 84px 0 56px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); gap: 36px; align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; margin-bottom: 18px;
  border: 1px solid var(--line-cyan); border-radius: var(--radius-pill);
  color: #d9fbff; background: rgba(125,232,255,.08);
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: var(--shadow-cyan);
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); animation: pulse 2s ease-in-out infinite; }
.gradient-text {
  background: linear-gradient(90deg, #fff 0%, #9cf6ff 38%, #c4b5fd 75%, #ff9ecf 100%);
  -webkit-background-clip: text; color: transparent;
}
.hero-subtitle { max-width: 680px; margin: 20px 0 0; font-size: clamp(1.1rem, 2.2vw, 1.45rem); color: #dbeafe; line-height: 1.3; font-weight: 600; }
.hero-copy { max-width: 620px; color: var(--muted); font-size: 1.02rem; margin-top: 14px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* Buttons — holographic */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 12px 20px; border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,.14); font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.01em; cursor: pointer;
  transition: transform .2s cubic-bezier(0.34,1.56,0.64,1), box-shadow .25s ease, border-color .2s ease, background .2s ease, color .2s ease;
  position: relative; overflow: hidden;
  user-select: none; -webkit-user-select: none;
}
.btn::before {
  content: ""; position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.18), transparent 60%);
  transition: opacity .25s ease;
}
.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-2px) scale(1.01); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn-primary {
  color: #00121a; background: linear-gradient(135deg, var(--cyan), var(--blue) 55%, var(--violet));
  box-shadow: 0 12px 36px rgba(96,165,250,.28), inset 0 1px 0 rgba(255,255,255,.3);
  border-color: rgba(125,232,255,.3);
}
.btn-primary:hover { box-shadow: 0 18px 48px rgba(96,165,250,.38), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-secondary { background: rgba(255,255,255,.08); color: var(--text); backdrop-filter: blur(10px); }
.btn-secondary:hover { background: rgba(255,255,255,.12); border-color: var(--line-cyan); }
.btn-ghost { color: var(--muted); background: transparent; border-color: rgba(255,255,255,.08); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.06); }

/* Aurora visual */
.hero-visual { position: relative; min-height: 440px; display: grid; place-items: center; }
.logo-orb {
  position: relative; margin: 0 auto; width: min(100%, 480px); padding: 22px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(125,232,255,.18), rgba(167,139,250,.08) 50%, rgba(255,255,255,.04));
  box-shadow: var(--shadow), inset 0 0 80px rgba(125,232,255,.08), var(--shadow-cyan);
  animation: float 6.5s ease-in-out infinite;
}
.logo-orb img { border-radius: 50%; }
.logo-orb::after {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 1px dashed rgba(125,232,255,.15); animation: spin 24s linear infinite;
}
.aurora-card {
  position: absolute; right: 2%; bottom: 8%; width: min(38%, 200px);
  border: 1px solid rgba(255,255,255,.15); border-radius: 22px;
  background: rgba(7,16,33,.78); box-shadow: var(--shadow); backdrop-filter: blur(18px);
  overflow: hidden; animation: float 7.5s ease-in-out infinite reverse;
}
.aurora-card img { width: 100%; }
.pulse-ring { position: absolute; inset: 10%; border-radius: 50%; border: 1px solid rgba(125,232,255,.18); animation: pulseRing 4.2s ease-in-out infinite; }

/* Sections */
.section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.section-header { max-width: 760px; margin-bottom: 32px; }
.kicker {
  display: inline-flex; margin-bottom: 10px; color: var(--cyan); font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; font-size: .75rem;
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(125,232,255,.08); border: 1px solid rgba(125,232,255,.18);
}
.section h2, .page-title { line-height: 0.98; }
.section-lead, .page-lead { color: var(--muted); font-size: 1.06rem; margin-top: 12px; }

/* Grid — glass cards */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.card {
  position: relative; overflow: hidden;
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-md);
  padding: 20px; min-height: 180px;
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .28s cubic-bezier(0.34,1.56,0.64,1), border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(125,232,255,.16), transparent 40%), radial-gradient(circle at 90% 80%, rgba(167,139,250,.12), transparent 36%);
  opacity: 0; transition: opacity .28s ease; pointer-events: none;
}
.card:hover { transform: translateY(-6px) scale(1.01); border-color: rgba(125,232,255,.32); box-shadow: 0 20px 60px rgba(0,0,0,.28), 0 0 30px rgba(125,232,255,.12); background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06)); }
.card:hover::before { opacity: 1; }
.card-icon { font-size: 1.8rem; position: relative; filter: drop-shadow(0 0 12px rgba(125,232,255,.3)); }
.card h3 { position: relative; margin: 14px 0 8px; font-size: 1.05rem; }
.card p { position: relative; margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* Security / glass highlight */
.security {
  border: 1px solid rgba(125,232,255,.18); border-radius: var(--radius-lg);
  padding: clamp(22px, 4.5vw, 42px);
  background:
    radial-gradient(circle at 15% 15%, rgba(125,232,255,.14), transparent 32%),
    radial-gradient(circle at 85% 85%, rgba(167,139,250,.10), transparent 30%),
    linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
}
.check-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 0; margin: 22px 0 0; list-style: none; }
.check-list li {
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  color: #dbeafe; font-size: 0.9rem;
  transition: transform .2s ease, border-color .2s ease;
}
.check-list li:hover { transform: translateY(-1px); border-color: rgba(125,232,255,.22); }
.check-list li::before { content: "✓"; color: var(--cyan); font-weight: 900; margin-right: 8px; }

/* Page hero & layout */
.page-hero { padding: 68px 0 36px; }
.layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 28px; align-items: start; }
.toc {
  position: sticky; top: 92px;
  border: 1px solid rgba(255,255,255,.12); border-radius: 20px;
  background: rgba(255,255,255,.05); backdrop-filter: blur(16px);
  padding: 16px; box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.toc strong { display: block; margin-bottom: 10px; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); }
.toc a { display: block; padding: 8px 0; color: var(--muted); border-bottom: 1px solid rgba(255,255,255,.06); font-size: 0.88rem; transition: color .15s ease, transform .15s ease; }
.toc a:hover { color: var(--text); transform: translateX(2px); }
.toc a:last-child { border-bottom: 0; }

.document {
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-lg);
  padding: clamp(20px, 3.8vw, 42px); background: rgba(255,255,255,.05);
  backdrop-filter: blur(16px); box-shadow: var(--shadow);
}
.document section { padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.document section:last-child { border-bottom: 0; }
.document h2 { margin: 0 0 12px; font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.document p, .document li { color: #c7d2e6; line-height: 1.65; }
.document a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.document a:hover { color: #aef2ff; }
.document ul { padding-left: 1.25rem; }

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.about-panel { border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius-md); padding: 24px; background: rgba(255,255,255,.05); backdrop-filter: blur(12px); transition: transform .2s ease, border-color .2s ease; }
.about-panel:hover { transform: translateY(-3px); border-color: rgba(125,232,255,.2); }
.about-panel h2 { margin-top: 0; }

/* Loading / empty / error states */
.loading-state {
  display: grid; place-items: center; padding: 40px 20px; gap: 14px;
  border: 1px dashed rgba(255,255,255,.12); border-radius: var(--radius-md);
  background: rgba(255,255,255,.03);
}
.loading-spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.12); border-top-color: var(--cyan);
  animation: spin .9s linear infinite;
}
.empty-state {
  text-align: center; padding: 48px 24px;
  border: 1px solid rgba(255,255,255,.10); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}
.empty-state h3 { color: var(--text); margin-bottom: 8px; }
.empty-state p { color: var(--muted); max-width: 420px; margin: 0 auto; }
.error-state {
  padding: 18px; border-radius: var(--radius-md);
  background: rgba(255,80,80,.08); border: 1px solid rgba(255,80,80,.22);
  color: #ffb0b0;
}
.error-state strong { color: #ff8a8a; }

/* Cloud integration cards */
.cloud-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--radius-md);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.10);
  transition: border-color .2s ease, transform .2s ease;
}
.cloud-card:hover { border-color: var(--line-cyan); transform: translateY(-2px); }
.cloud-icon { font-size: 1.6rem; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(125,232,255,.10); }

/* Footer */
.site-footer { margin-top: 60px; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.22); backdrop-filter: blur(10px); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; padding: 32px 0; color: var(--muted); flex-wrap: wrap; }
.footer-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); padding: 4px 8px; border-radius: var(--radius-pill); transition: all .15s ease; }
.footer-links a:hover { color: var(--cyan); background: rgba(255,255,255,.06); }

/* Aurora accent decorations */
.aurora-divider {
  height: 1px; background: linear-gradient(90deg, transparent, var(--line-cyan), transparent);
  margin: 24px 0;
}

/* Animations */
@keyframes float { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-12px);} }
@keyframes pulse { 0%,100%{opacity:.8; transform:scale(1);} 50%{opacity:1; transform:scale(1.15);} }
@keyframes pulseRing { 0%,100%{transform:scale(.96); opacity:.45;} 50%{transform:scale(1.06); opacity:.85;} }
@keyframes spin { from{transform:rotate(0deg);} to{transform:rotate(360deg);} }
@keyframes shimmer { 0%{background-position:-200% 0;} 100%{background-position:200% 0;} }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Responsive */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 360px; order: -1; }
  .layout { grid-template-columns: 1fr; }
  .toc { position: static; }
}
@media (max-width: 640px) {
  .header-inner { min-height: auto; padding: 12px 0; align-items: flex-start; flex-direction: column; gap: 10px; }
  .nav { justify-content: flex-start; gap: 4px; }
  .nav a { padding: 6px 10px; font-size: 0.85rem; }
  .hero { padding-top: 40px; padding-bottom: 32px; }
  .hero-visual { min-height: 280px; }
  .logo-orb { padding: 12px; width: min(88%, 360px); }
  .aurora-card { width: 32%; bottom: 4%; }
  .grid, .check-list, .about-grid { grid-template-columns: 1fr; }
  .card { min-height: auto; }
  .footer-inner { flex-direction: column; }
  .section { padding: 48px 0; }
  .btn { min-height: 44px; padding: 11px 16px; font-size: 0.88rem; }
}

/* No horizontal overflow guard */
html, body { max-width: 100vw; overflow-x: clip; }
img, video, iframe { max-width: 100%; }
