/* GoldenPharm marketing site — shared styles.
   Builds on the GoldenPharm Design System tokens (loaded via _ds styles.css).
   Adds the energetic "Medify-style" layout layer: pill buttons, floating cards,
   soft blue section tints — all expressed through brand-blue tokens. */

:root {
  /* Tweakable hooks (overridden at runtime by the Tweaks panel) */
  --accent:        var(--gp-blue-600);
  --accent-strong: var(--gp-navy-800);
  --accent-light:  var(--gp-blue-400);
  --accent-soft:   var(--gp-blue-50);
  --btn-radius:    999px;   /* pill by default */
  --rhythm:        96px;    /* vertical section rhythm */
}

html, body { margin: 0; padding: 0; }
body {
  background: #fff;
  color: var(--text-body);
  font-family: var(--gp-font-sans);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }

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

/* ---- Layout ---- */
.gp-wrap {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}
.section { padding-block: var(--rhythm); }
.section-sm { padding-block: calc(var(--rhythm) * 0.7); }

/* ---- Type helpers ---- */
.display {
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}
.h2 {
  font-size: clamp(30px, 3.4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-strong);
  margin: 0;
  text-wrap: balance;
}
.lede {
  font-size: 19px;
  line-height: 1.6;
  color: var(--text-body);
  margin: 0;
  text-wrap: pretty;
}
.two-tone-accent { color: var(--accent-light); }
[data-headline="solid"] .two-tone-accent { color: inherit; }

/* ---- Floating chip (overlay badges on hero imagery) ---- */
.float-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 8px 14px 8px 10px;
  box-shadow: var(--shadow-3);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
}

/* ---- Placeholder imagery (no real photos supplied) ---- */
.ph {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--gp-blue-50) 0%, var(--gp-blue-100) 60%, #dcebfa 100%);
  background:
    linear-gradient(135deg, #eef5fb 0%, #d7e7f4 55%, #c4def0 100%);
  border: 1px solid var(--gp-blue-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph::after {
  /* soft diagonal sheen, mimics clean clinical photography light */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 38%);
  pointer-events: none;
}
.ph__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--gp-blue-600);
  text-align: center;
  padding: 24px;
}
.ph__icon {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  color: var(--gp-blue-500);
  opacity: 0.9;
}
.ph__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gp-blue-500);
  opacity: 0.85;
}

/* dark placeholder variant on navy bands */
.ph--dark {
  background: linear-gradient(135deg, #16345a 0%, #0c2742 100%);
  border-color: var(--border-dark);
}
.ph--dark .ph__inner,
.ph--dark .ph__icon,
.ph--dark .ph__label { color: var(--gp-blue-300); }

/* ---- Avatar placeholder ---- */
.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: linear-gradient(135deg, var(--gp-blue-200), var(--gp-blue-400));
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px;
  box-shadow: var(--shadow-1);
}

/* ---- Reveal-on-scroll ---- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Nav ---- */
.nav-link {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-body);
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  transition: color var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard);
}
.nav-link:hover { color: var(--gp-blue-700); background: var(--accent-soft); }
.nav-link.active { color: var(--gp-blue-700); background: var(--accent-soft); }

/* ---- Nav bar / burger ---- */
.nav-bar { height: 76px; }

.nav-burger {
  display: none;
  width: 46px; height: 46px;
  margin-left: auto;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  background: #fff;
  color: var(--text-strong);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-fast) var(--ease-standard), background var(--dur-fast) var(--ease-standard);
}
.nav-burger:hover { border-color: var(--accent-light); }
.nav-burger__lines {
  position: relative;
  width: 20px; height: 14px;
  display: block;
}
.nav-burger__lines i {
  position: absolute; left: 0;
  width: 100%; height: 2px; border-radius: 2px;
  background: currentColor;
  transition: transform .34s var(--ease-standard), opacity .2s var(--ease-standard), top .34s var(--ease-standard);
}
.nav-burger__lines i:nth-child(1) { top: 0; }
.nav-burger__lines i:nth-child(2) { top: 6px; }
.nav-burger__lines i:nth-child(3) { top: 12px; }
.nav-burger.is-open { background: var(--gp-navy-900); border-color: var(--gp-navy-900); color: #fff; }
.nav-burger.is-open .nav-burger__lines i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.nav-burger.is-open .nav-burger__lines i:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-burger.is-open .nav-burger__lines i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ---- Mobile menu (full-screen, animated, premium) ---- */
.gp-mmenu {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  padding: 18px clamp(20px, 6vw, 40px) calc(28px + env(safe-area-inset-bottom));
  color: #fff;
  background:
    radial-gradient(820px 540px at 82% -8%, rgba(65,138,193,0.30), transparent 58%),
    radial-gradient(680px 520px at 8% 112%, rgba(27,92,155,0.34), transparent 60%),
    linear-gradient(165deg, #16345a 0%, #0c2742 52%, #07182a 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease-standard);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* slow drifting aurora for depth */
.gp-mmenu::before {
  content: "";
  position: absolute;
  width: 460px; height: 460px;
  top: -120px; right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(65,138,193,0.34), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  animation: gpAuroraA 18s ease-in-out infinite;
}
.gp-mmenu__top, .gp-mmenu__links, .gp-mmenu__foot { position: relative; z-index: 1; }
.gp-mmenu.in {
  pointer-events: auto;
  opacity: 1;
  clip-path: inset(0 0 0 0);
  animation: gpMenuIn .52s var(--ease-out);
}
@keyframes gpMenuIn {
  from { opacity: 0; clip-path: inset(0 0 100% 0); }
  to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

.gp-mmenu__top {
  display: flex; align-items: center; justify-content: space-between;
  flex: 0 0 auto;
  height: 58px;
}
.gp-mmenu__close {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--dur-fast) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
}
.gp-mmenu__close:hover { background: rgba(255,255,255,0.14); transform: rotate(90deg); }

.gp-mmenu__links {
  flex: 1 1 auto;
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 24px 0;
}
.gp-mmenu__link {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 16px 20px 14px;
  margin: 0 -10px;
  border-radius: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  color: #fff;
  opacity: 0;
  transform: translateY(26px);
  transition: background var(--dur-base) var(--ease-standard), padding-left var(--dur-base) var(--ease-standard);
}
.gp-mmenu__link:hover,
.gp-mmenu__link:active { background: rgba(255,255,255,0.06); padding-left: 22px; }
.gp-mmenu.in .gp-mmenu__link { opacity: 1; transform: none; animation: gpItemIn .55s var(--ease-out) backwards; }
@keyframes gpItemIn {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
.gp-mmenu__num {
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--gp-blue-300);
  width: 26px; flex: 0 0 auto;
}
.gp-mmenu__label {
  flex: 1 1 auto;
  font-size: clamp(32px, 9.5vw, 46px);
  font-weight: 800; letter-spacing: -0.025em; line-height: 1.04;
}
.gp-mmenu__arrow {
  width: 22px; height: 22px; flex: 0 0 auto;
  color: rgba(255,255,255,0.4);
  transition: transform var(--dur-base) var(--ease-standard), color var(--dur-base);
}
.gp-mmenu__link:hover .gp-mmenu__arrow,
.gp-mmenu__link.active .gp-mmenu__arrow { color: var(--gp-blue-300); transform: translate(3px, -3px); }
.gp-mmenu__link.active .gp-mmenu__label { color: var(--gp-blue-300); }

.gp-mmenu__foot {
  flex: 0 0 auto;
  opacity: 0;
  transform: translateY(20px);
}
.gp-mmenu.in .gp-mmenu__foot { opacity: 1; transform: none; animation: gpItemIn .55s var(--ease-out) backwards; }
.gp-mmenu__cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 58px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff; font-size: 16px; font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 14px 34px -12px rgba(65,138,193,0.7);
  transition: background var(--dur-base) var(--ease-standard);
}
.gp-mmenu__cta:hover { background: var(--gp-blue-700); }
.gp-mmenu__meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 18px;
  font-size: 13px; font-weight: 600;
  color: var(--text-on-dark-muted);
}
@media (prefers-reduced-motion: reduce) {
  .gp-mmenu, .gp-mmenu.in,
  .gp-mmenu.in .gp-mmenu__link, .gp-mmenu.in .gp-mmenu__foot { animation: none !important; }
  .gp-mmenu.in { opacity: 1; clip-path: none; }
  .gp-mmenu.in .gp-mmenu__link, .gp-mmenu.in .gp-mmenu__foot { opacity: 1; transform: none; }
}

/* ---- Misc ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent);
}
.divider-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-light); }

/* ============================================================
   Page FX — premium preloader + page transitions
   ============================================================ */
.gp-fx, .gp-fx-cover {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 620px at 78% -12%, rgba(65,138,193,0.30), transparent 60%),
    radial-gradient(700px 520px at 12% 118%, rgba(27,92,155,0.34), transparent 62%),
    linear-gradient(165deg, #16345a 0%, #0c2742 55%, #07182a 100%);
  will-change: transform;
}
.gp-fx { transition: transform 0.82s cubic-bezier(0.76, 0, 0.24, 1); }
.gp-fx--out { transform: translateY(-100%); pointer-events: none; }

.gp-fx-cover {
  transform: translateY(100%);
  transition: transform 0.56s cubic-bezier(0.76, 0, 0.24, 1);
}
.gp-fx-cover--in { transform: translateY(0); }

.gp-fx__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.gp-fx__logo {
  height: 42px;
  width: auto;
  opacity: 0;
  animation: gpFxLogo 0.7s var(--ease-out) forwards;
}
.gp-fx--nav .gp-fx__logo { animation-duration: 0.4s; }
.gp-fx-cover .gp-fx__logo { animation-duration: 0.45s; height: 38px; }
@keyframes gpFxLogo {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}
.gp-fx__bar {
  width: 132px;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.gp-fx__bar > span {
  display: block;
  height: 100%;
  width: 38%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gp-blue-300), #ffffff);
  animation: gpFxBar 1.05s ease-in-out infinite;
}
.gp-fx--nav .gp-fx__bar,
.gp-fx-cover .gp-fx__bar { display: none; }
@keyframes gpFxBar {
  0%   { transform: translateX(-130%); }
  100% { transform: translateX(380%); }
}

/* gentle page-enter handled by the curtain reveal (no content-hiding animation,
   so content is always visible even if the animation engine is paused offscreen) */

@media (prefers-reduced-motion: reduce) {
  .gp-fx, .gp-fx-cover { transition: opacity 0.3s ease; }
  .gp-fx--out { opacity: 0; }
  .gp-fx__logo, .gp-fx__bar > span { animation: none !important; opacity: 1; }
}

/* ============================================================
   Hero — immersive aurora + soft float
   ============================================================ */
.hero-aurora {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
}
.hero-aurora .a1 {
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(65,138,193,0.40), transparent 70%);
  top: -160px; right: -90px;
  animation: gpAuroraA 17s ease-in-out infinite;
}
.hero-aurora .a2 {
  width: 440px; height: 440px;
  background: radial-gradient(circle, rgba(27,92,155,0.26), transparent 70%);
  bottom: -180px; left: -80px;
  animation: gpAuroraB 21s ease-in-out infinite;
}
.hero-aurora .a3 {
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(121,173,219,0.30), transparent 70%);
  top: 30%; left: 42%;
  animation: gpAuroraC 24s ease-in-out infinite;
}
@keyframes gpAuroraA {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(-40px, 36px) scale(1.08); }
}
@keyframes gpAuroraB {
  0%,100% { transform: translate(0,0) scale(1); }
  50%     { transform: translate(46px, -32px) scale(1.1); }
}
@keyframes gpAuroraC {
  0%,100% { transform: translate(0,0) scale(1); opacity: 0.7; }
  50%     { transform: translate(30px, 24px) scale(1.12); opacity: 1; }
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(27,92,155,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(27,92,155,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(700px 460px at 30% 28%, #000 0%, transparent 78%);
          mask-image: radial-gradient(700px 460px at 30% 28%, #000 0%, transparent 78%);
}

.float-soft { animation: gpFloatSoft 7s ease-in-out infinite; }
.float-soft--b { animation: gpFloatSoft 8.5s ease-in-out infinite; animation-delay: -2s; }
.float-soft--c { animation: gpFloatSoft 9.5s ease-in-out infinite; animation-delay: -4s; }
@keyframes gpFloatSoft {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-12px); }
}

/* staggered hero entrance — transition-based (set via .in), safe if paused */
.hero-in > * {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-aurora span, .float-soft, .float-soft--b, .float-soft--c { animation: none !important; }
}

/* responsive */
@media (max-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .cat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .prod-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 900px) {
  .stack-sm { grid-template-columns: 1fr !important; }
  .display { font-size: clamp(40px, 11vw, 60px) !important; }
  .nav-desktop { display: none !important; }
  .nav-actions { display: none !important; }
  .nav-burger { display: flex !important; }
  .hero-visual { margin-top: 12px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 32px !important; }
  .brand-row { grid-template-columns: 1fr !important; }
  .brand-row > div { order: unset !important; }
  .contact-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 620px) {
  .why-grid, .cat-grid, .prod-grid { grid-template-columns: 1fr !important; }
  .hero-pills { position: static !important; max-width: none !important; margin-top: 14px; }
  .footer-cols { grid-template-columns: 1fr 1fr !important; }
  .contact-cards { grid-template-columns: 1fr !important; }
  .nav-bar { height: 66px; }
  .nav-logo { height: 32px !important; }
}
