/* =============================================================
   shared.css — Arclify design system
   Linked by every page. Page-specific overrides go in each
   file's own <style> block, which loads after this file.
   ============================================================= */

/* ── Design tokens ─────────────────────────────────────── */
:root {
  --shell-bg: #05070B;
  --shell-bg-soft: #0B0F16;
  --shell-card: #101522;
  --shell-border: #1F2933;
  --shell-text: #F9FAFB;
  --shell-text-muted: #9CA3AF;
  --bg: var(--shell-bg);
  --surface: var(--shell-bg-soft);
  --card: var(--shell-card);
  --border: var(--shell-border);
  --text: var(--shell-text);
  --muted: var(--shell-text-muted);
  --primary: #FBBF24;
  --primary-fg: #0B0B0B;
  --primary-soft: #241A0B;
  --primary-border: #FBBF24;
  --radius: 18px;
  --shadow-strong: 0 22px 80px rgba(0, 0, 0, .75);
  --shadow-soft: 0 12px 40px rgba(0, 0, 0, .5);
  --safe-l: env(safe-area-inset-left);
  --safe-r: env(safe-area-inset-right);
}

/* ── Base reset ─────────────────────────────────────────── */
* { box-sizing: border-box }

html, body {
  height: 100%;
  min-height: 100%;
  overflow-x: hidden;
}

html { background-color: var(--bg) }

body {
  margin: 0;
  color: var(--text);
  font: 16px/1.75 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background-color: transparent;
}

/* ── Background gradient ────────────────────────────────── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(1200px 650px at 50% 0, rgba(251, 191, 36, .22), transparent) no-repeat,
              radial-gradient(1200px 900px at 50% 140%, rgba(11, 15, 22, .98), transparent) no-repeat,
              var(--bg);
  background-attachment: fixed;
}

header, main, footer { position: relative; z-index: 1 }

a { color: inherit; text-decoration: none }

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px;
  padding-left: calc(22px + var(--safe-l));
  padding-right: calc(22px + var(--safe-r));
}

main { flex: 1; display: flex; flex-direction: column; }

/* ── Topbar ─────────────────────────────────────────────── */
.topbar {
  width: 100%;
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(31, 41, 51, .6);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(5, 7, 11, .65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: -1;
}

.topbar.scrolled { border-bottom-color: rgba(251, 191, 36, .45); }

.topbarInner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ── Brand / logo ───────────────────────────────────────── */
.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }

.brand:focus-visible {
  outline: 2px solid rgba(251, 191, 36, .75);
  outline-offset: 6px;
  border-radius: 12px;
}

.brandName {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin: 0;
  color: var(--text);
}

.brandMark {
  width: 54px;
  height: 54px;
  aspect-ratio: 1;
  background: #FBBF24;
  -webkit-mask-image: url("./logo.svg");
  mask-image: url("./logo.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  filter: drop-shadow(-6px 8px 6px rgba(36, 26, 11, .35));
}

@supports not ((-webkit-mask-image:url("")) or (mask-image:url(""))) {
  .brandMark {
    background: transparent;
    background-image: url("./logo.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  height: 50px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--primary-border);
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 15px 35px rgba(251, 191, 36, .4);
}

.btn[disabled] { opacity: .6; cursor: not-allowed; box-shadow: none }

.btn--secondary {
  background: rgba(11, 15, 22, .96);
  color: var(--text);
  border: 1px solid rgba(31, 41, 51, .85);
  box-shadow: none;
}

.btn--secondary:hover { border-color: rgba(251, 191, 36, .55) }

@keyframes btnGlowPulse {
  0%, 100% { box-shadow: 0 15px 35px rgba(251, 191, 36, .40); }
  50%       { box-shadow: 0 15px 45px rgba(251, 191, 36, .68), 0 0 22px rgba(251, 191, 36, .22); }
}

.btn:not(.btn--secondary) {
  animation: btnGlowPulse 3s ease-in-out infinite;
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}

.btn:not(.btn--secondary):hover {
  animation: none;
  transform: scale(1.03);
  box-shadow: 0 18px 55px rgba(251, 191, 36, .78), 0 0 32px rgba(251, 191, 36, .35);
}

/* ── Page hero ───────────────────────────────────────────── */
.pageHero {
  position: relative;
  overflow: hidden;
  padding: 70px 24px 160px;
  text-align: center;
  background: radial-gradient(circle at top center, rgba(251, 191, 36, .07), transparent 60%);
}

.pageHeroInner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.pageHeroTitle {
  font-size: 40px;
  line-height: 1.08;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: .01em;
}

.pageHeroSub {
  color: var(--muted);
  font-size: 16px;
  margin: 0 auto;
  max-width: 52ch;
}

.heroMountain {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 180px;
  z-index: 0;
  pointer-events: none;
}

.heroMountain svg { width: 100%; height: 100%; }

/* ── Hero glow ───────────────────────────────────────────── */
.hero-glow {
  position: absolute;
  width: 700px;
  height: 460px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, .05) 0%, transparent 68%);
  pointer-events: none;
  animation: heroGlowPulse 8s ease-in-out infinite;
  z-index: 0;
}

@keyframes heroGlowPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1);    opacity: 0.8; }
  50%       { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
}

/* ── Page body ───────────────────────────────────────────── */
.pageBody { flex: 1; }

/* ── Section divider ─────────────────────────────────────── */
/* max-width and width are set per-page since they vary */
.section-divider {
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 1px;
  margin: 0 auto;
  transition: transform 0.8s ease-out;
  will-change: transform;
  opacity: 0.55;
}

.section-divider.visible { transform: scaleX(1); }

/* ── Scroll reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: transform, opacity;
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Load-triggered page fade (no observer needed) ───────── */
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-fade { animation: pageFadeIn 0.4s ease-out both; }

/* ── Footer ──────────────────────────────────────────────── */
.footer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
  padding-top: 26px;
  padding-bottom: 16px;
  border-top: 1px solid #111827;
  margin-top: 44px;
  text-align: center;
}

.footer p { margin: 0 }

.footerCopy { font-size: 15px; color: var(--muted); margin-top: 4px }
.footerCopy a { color: var(--primary); text-decoration: none }
.footerCopy a:hover { text-decoration: underline }

.footerSocial {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.footerSocialLabel {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.6;
}

.footerSocialLink {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footerSocialLink:hover { color: var(--primary); }

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .page-fade { animation: none !important; }
  .hero-glow { animation: none !important; }
  .btn:not(.btn--secondary) { animation: none !important; }
  .section-divider { transform: scaleX(1) !important; }
}

/* ── Mobile base ─────────────────────────────────────────── */
/* Page-specific mobile overrides (.pageHero padding, .section sizing)
   go in each page's own <style> block */
@media (max-width: 879px) {
  .container {
    padding: 16px;
    padding-left: calc(16px + var(--safe-l));
    padding-right: calc(16px + var(--safe-r));
  }

  .topbarInner { padding-top: 8px; padding-bottom: 8px; }

  .brandMark { width: 40px; height: 40px; filter: drop-shadow(-4px 6px 5px rgba(36, 26, 11, .32)); }
  .brandName { font-size: 16px; letter-spacing: .03em; }

  .pageHeroTitle { font-size: 28px; line-height: 1.12; }
  .pageHeroSub { font-size: 14px; line-height: 1.7; }

  .footer { margin-top: 28px; padding-top: 18px; }
}
