/* shared.css — base styles for all glp1.app pages */

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

:root {
  --bg: #000000;
  --text: #ffffff;
  --dim: #999;
  --accent: #bb86fc;
  --glow: rgba(187, 134, 252, 0.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M40 0H0v1h40zM0 0v40h1V0z' fill='rgba(255,255,255,0.08)'/%3E%3C/svg%3E");
  transform: translateZ(0);
  mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, black 0%, transparent 80%);
  pointer-events: none;
  z-index: -1;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

/* --- Nav --- */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 2rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 24px;
  height: 24px;
}

.nav-link {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.6;
  transition: opacity 0.4s;
}

.nav-link:hover { opacity: 1; }

/* --- Subpage shared --- */

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 8rem 2.5rem 4rem;
}

.reveal {
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cta-bottom {
  text-align: center;
  margin: 4rem 0 2rem;
}

.back-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 500;
  color: var(--text);
  padding: 1rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: rgba(255, 255, 255, 0.03);
}

.back-home:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(187, 134, 252, 0.2);
  transform: translateY(-2px);
  background: rgba(187, 134, 252, 0.08);
}

.back-home svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

/* --- Content links (inline cross-references) --- */

.content-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.3s ease;
}

.content-link:hover {
  opacity: 0.8;
}

.content-link-dim {
  color: var(--dim);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s ease;
}

.content-link-dim:hover {
  color: var(--accent);
}

/* --- Subpage content (about, privacy, faq) --- */

.medical-warning {
  background: rgba(255, 255, 255, 0.03);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.medical-warning-icon svg,
.medical-warning-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
  flex-shrink: 0;
}

.medical-warning strong {
  color: var(--accent);
  font-weight: 600;
}

.container h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.subtitle {
  color: var(--dim);
  font-size: 1rem;
  margin-bottom: 2.5rem;
  letter-spacing: 0.01em;
}

.content-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.section-num {
  color: var(--accent);
  font-weight: 900;
  font-size: 1.3rem;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-section p {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1rem;
  line-height: 1.7;
}

.content-section ul {
  list-style: none;
  padding-left: 0.5rem;
  margin-bottom: 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.content-section li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.5rem;
}

.content-section li::before {
  content: "\2022";
  color: var(--accent);
  position: absolute;
  left: 0;
  top: 0;
  font-size: 1.2rem;
  line-height: 1.4;
}

/* --- Calculator SEO pages --- */

.calculator-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin: 2.5rem 0;
}

.calculator-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 1.5rem;
}

.calculator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
}

.field-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
  margin-bottom: 0.5rem;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
}

.calculator-input,
.calculator-select {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font: inherit;
  padding: 0.8rem 0.9rem;
  outline: none;
}

.calculator-select {
  min-width: 96px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.72) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.35rem;
}

.calculator-select option {
  background: #000000;
  color: #ffffff;
}

.calculator-input:focus,
.calculator-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(187, 134, 252, 0.14);
}

.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.mode-button,
.calculator-button {
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.mode-button {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
}

.mode-button.is-active,
.calculator-button {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.calculator-button {
  width: 100%;
  margin-top: 1rem;
}

.calculator-result {
  display: none;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.calculator-result.is-visible {
  display: block;
}

.syringe-visual {
  margin-bottom: 1rem;
  padding: 0.8rem 0.25rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.syringe-visual svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.syringe-fill {
  transition: width 0.35s ease;
}

.syringe-note {
  margin-top: 0.5rem;
  color: #ffffff;
  font-size: 0.78rem;
  line-height: 1.4;
  text-align: center;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.result-metric {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.25);
}

.result-label {
  display: block;
  color: var(--dim);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}

.result-value {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  font-size: clamp(1.8rem, 5vw, 2.7rem);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.result-unit {
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}

.formula-box {
  margin-top: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(187, 134, 252, 0.18);
  background: rgba(187, 134, 252, 0.07);
  padding: 1rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
  line-height: 1.6;
}

.calculator-error {
  display: none;
  margin-top: 1rem;
  color: #ffb4b4;
  font-size: 0.9rem;
}

.calculator-error.is-visible {
  display: block;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.quick-links a {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
}

.quick-links a:hover {
  border-color: var(--accent);
  color: var(--text);
}

/* --- CTA --- */

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  font-weight: 500;
  color: var(--text);
  padding: 1rem 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 100px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}

.cta-link::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: skewX(-20deg);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

.cta-link:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px rgba(187, 134, 252, 0.2);
  transform: translateY(-2px);
  background: rgba(187, 134, 252, 0.08);
}

.cta-link svg { width: 18px; height: 18px; }

.cta-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.06em;
}

/* --- Footer --- */

footer {
  padding: 2rem 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.03em;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer p {
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 1.5rem;
}

.footer-links a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
  pointer-events: none;
}

.footer-disclaimer {
  max-width: 800px;
  width: 100%;
  font-size: 0.75rem;
  line-height: 1.5;
  opacity: 0.7;
  padding: 1.25rem 0;
  margin-bottom: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.65)
}

footer a {
  color: rgba(255, 255, 255, 0.65);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s;
}

footer a:hover {
  color: rgba(255, 255, 255, 0.85);
}

.copyright {
  opacity: 0.6;
  font-size: 0.75rem;
}

/* --- Mobile --- */

@media (max-width: 768px) {
  nav { padding: 1.5rem 1.5rem; }
  .container { padding: 7rem 1.5rem 2rem; }
  .container h1 { font-size: 2.2rem; }
  .content-section h2 { font-size: 1.2rem; }
  .section-num { font-size: 1.2rem; }
  .input-row,
  .result-grid,
  .mode-switch {
    grid-template-columns: 1fr;
  }
  .calculator-select {
    min-width: 100%;
  }
}
