/* ==========================================================================
   Ascend Specialty Rx — Design Tokens
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;

  /* Color — official brand palette (Pantone 534 C / 7465 C / 425 C / Neutral Black C) */
  --navy: #1B365D;
  --navy-dark: #142943;
  --teal: #40C1AC;
  --teal-dark: #2F9484;
  --ink: #19191A;
  --slate: #54585A;
  --paper: #F7F8FA;
  --mist: #E6F5F2;
  --white: #FFFFFF;
  --border: #DCE1E7;
  --focus: #1B6E9B;

  /* Type */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Scale */
  --step-sm: clamp(0.875rem, 0.85rem + 0.15vw, 0.95rem);
  --step-base: clamp(1rem, 0.97rem + 0.2vw, 1.0625rem);
  --step-lg: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --step-xl: clamp(1.75rem, 1.5rem + 1.2vw, 2.5rem);
  --step-2xl: clamp(2.25rem, 1.8rem + 2vw, 3.5rem);

  --radius: 6px;
  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-base);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--step-2xl); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: var(--step-xl); font-weight: 700; }
h3 { font-size: var(--step-lg); font-weight: 600; letter-spacing: -0.01em; }

p { margin: 0 0 1em; color: var(--slate); }

a { color: var(--navy); }
a:hover { color: var(--teal-dark); }

img { max-width: 100%; display: block; }

/* Visible keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

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

/* ==========================================================================
   Header / Nav
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 248, 250, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease, padding 0.3s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(20, 23, 44, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.nav__logo img { height: 52px; width: auto; display: block; }
.nav__logo { display: flex; align-items: center; }

@media (max-width: 480px) {
  .nav__logo img { height: 40px; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step-sm);
  color: var(--ink);
  position: relative;
  padding: 4px 2px;
}

.nav__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--teal);
  transition: width 0.2s ease;
}

.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after {
  width: 100%;
}

.nav__links a[aria-current="page"] { color: var(--navy); }

.nav__cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  text-decoration: none !important;
}
.nav__cta::after { display: none; }
.nav__cta:hover { background: var(--navy-dark); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  margin: 5px 0;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav__links {
    position: fixed;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav__links.is-open { max-height: 400px; }
  .nav__links li { width: 100%; }
  .nav__links a {
    display: block;
    padding: 16px 24px;
    width: 100%;
  }
  .nav__links a::after { display: none; }
  .nav__cta { margin: 12px 24px; display: inline-block; }
}

/* ==========================================================================
   Hero — diagonal motif echoing the mark
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: 88px 0 64px;
  min-height: 480px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(to right, var(--navy) 0%, rgba(27,54,93,0) 14%, rgba(27,54,93,0) 90%, var(--navy) 100%),
    linear-gradient(160deg, rgba(27, 54, 93, 0.84) 0%, rgba(27, 54, 93, 0.76) 100%),
    url('../assets/hero-facility.jpg') center 62% / cover no-repeat,
    var(--navy);
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 560px;
}

@media (max-width: 720px) {
  .hero { min-height: 0; padding: 56px 0 36px; }
}

.hero__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 16px;
  display: block;
}

.hero h1 { margin-bottom: 20px; color: var(--white); text-shadow: 0 2px 18px rgba(15, 26, 46, 0.5); }
.hero__lead { font-size: var(--step-lg); color: rgba(255,255,255,0.9); margin-bottom: 32px; max-width: 52ch; text-shadow: 0 1px 12px rgba(15, 26, 46, 0.45); }

.hero .btn--secondary { border-color: #fff; color: #fff; }
.hero .btn--secondary:hover { background: #fff; color: var(--navy); }

.hero-anim {
  opacity: 0;
  transform: translateY(18px);
  animation: heroTextIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-anim[data-d="1"] { animation-delay: 0.15s; }
.hero-anim[data-d="2"] { animation-delay: 0.28s; }
.hero-anim[data-d="3"] { animation-delay: 0.42s; }
.hero-anim[data-d="4"] { animation-delay: 0.56s; }

@keyframes heroTextIn {
  to { opacity: 1; transform: translateY(0); }
}

.btn-row { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--step-sm);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.25s ease;
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(20, 23, 44, 0.14); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-dark); color: var(--white); }

.btn--secondary { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn--secondary:hover { background: var(--navy); color: var(--white); }

@media (max-width: 720px) {
  .hero__inner { max-width: 100%; }
}

/* ==========================================================================
   Formulation strip — signature trust element styled like a compounding label
   ========================================================================== */

.formulation-strip {
  background: var(--navy);
  color: var(--white);
  padding: 18px 0;
  overflow: hidden;
}

.formulation-strip__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.formulation-strip__tag {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mist);
  opacity: 0;
  transform: translateY(10px);
  animation: tagIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.formulation-strip__tag:nth-child(1) { animation-delay: 0.7s; }
.formulation-strip__tag:nth-child(2) { animation-delay: 0.8s; }
.formulation-strip__tag:nth-child(3) { animation-delay: 0.9s; }
.formulation-strip__tag:nth-child(4) { animation-delay: 1.0s; }

@keyframes tagIn {
  to { opacity: 1; transform: translateY(0); }
}

.formulation-strip__tag::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
  flex-shrink: 0;
}

.formulation-strip__tag a {
  color: inherit;
  text-decoration: none;
}
.formulation-strip__tag a:hover,
.formulation-strip__tag a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
}

@media (max-width: 720px) {
  .formulation-strip__row {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
  }
  .formulation-strip__tag {
    width: 100%;
    font-size: 0.72rem;
    line-height: 1.4;
  }
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i, 0) * 90ms);
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-anim { opacity: 1; transform: none; animation: none !important; }
  .formulation-strip__tag { opacity: 1; transform: none; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Sections
   ========================================================================== */

.section { padding: 80px 0; }
.page-hero + .section { padding-top: 44px; }
@media (max-width: 640px) {
  .page-hero + .section { padding-top: 32px; }
}
.section--tint { background: var(--mist); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h2, .section--navy h3 { color: var(--white); }
.section--navy p { color: #C9D3E0; }

.section__head { max-width: 640px; margin-bottom: 48px; }
.section__eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  font-weight: 600;
  display: block;
  margin-bottom: 12px;
}
.section--navy .section__eyebrow { color: var(--teal); }

/* Services grid */
.photo-band {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  height: 360px;
  margin: 8px 0 0;
}
.photo-band img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-band__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 28px;
  background: linear-gradient(0deg, rgba(27, 54, 93, 0.88) 0%, rgba(27, 54, 93, 0) 100%);
  color: var(--white);
  font-size: var(--step-sm);
}
@media (max-width: 640px) {
  .photo-band { height: 220px; }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.services-grid--four {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 860px) {
  .services-grid--four { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .services-grid--four { grid-template-columns: 1fr; }
}

.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(20, 23, 44, 0.12);
  border-color: var(--teal);
}

.service-card__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--teal-dark);
  font-weight: 600;
  display: block;
  margin-bottom: 12px;
  transition: transform 0.35s ease;
}

.service-card:hover .service-card__num { transform: translateX(4px); }

.service-card h3 { margin-bottom: 10px; }
.service-card p { margin-bottom: 0; font-size: var(--step-sm); }

.service-card--pending {
  border: 2px solid var(--teal);
  position: relative;
  box-shadow: 0 12px 32px rgba(93, 185, 175, 0.18);
}

.service-card--pending::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  height: 6px;
  background: linear-gradient(90deg, var(--navy), var(--teal));
  border-radius: var(--radius) var(--radius) 0 0;
}

.status-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--mist);
  color: var(--teal-dark);
  padding: 4px 10px;
  border-radius: 999px;
  margin-top: 12px;
  font-weight: 600;
}

/* Two-column layout */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split--top { align-items: start; }
@media (max-width: 780px) {
  .split { grid-template-columns: 1fr; gap: 32px; }
}

.credential-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}
.credential-card:hover {
  transform: translateX(4px);
  box-shadow: 0 12px 28px rgba(20, 23, 44, 0.08);
}
.credential-card + .credential-card { margin-top: 16px; }
.credential-card__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--teal-dark);
  font-weight: 600;
  display: block;
  margin-bottom: 6px;
}

/* Disclaimer callout */
.callout {
  background: var(--white);
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  font-size: var(--step-sm);
  color: var(--slate);
}
.callout strong { color: var(--ink); }

/* Contact form */
.form-grid {
  display: grid;
  gap: 20px;
  max-width: 560px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: var(--step-sm);
  margin-bottom: 6px;
  color: var(--ink);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: var(--step-base);
  background: var(--white);
  color: var(--ink);
}

.field textarea { resize: vertical; min-height: 120px; }

.field-hint { font-size: 0.8rem; color: var(--slate); margin-top: 4px; }

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checkbox-field input { width: auto; margin-top: 4px; }
.checkbox-field label { font-weight: 400; font-size: var(--step-sm); color: var(--slate); }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--ink);
  color: #B9BFCB;
  padding: 56px 0 28px;
  font-size: var(--step-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

.footer-grid h4 {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; }
.footer-grid a { color: #B9BFCB; text-decoration: none; }
.footer-grid a:hover { color: var(--teal); }

.footer-logo img { height: 32px; margin-bottom: 16px; }

.footer-bottom {
  border-top: 1px solid #2A2D42;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8rem;
  color: #7B8195;
}

.footer-disclaimer {
  font-size: 0.78rem;
  color: #7B8195;
  line-height: 1.6;
  margin-bottom: 24px;
  max-width: 90ch;
}

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* Page hero (interior pages) */
.page-hero {
  position: relative;
  padding: 40px 0 36px;
  background: linear-gradient(135deg, var(--mist) 0%, var(--paper) 65%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -8%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(93, 185, 175, 0.16) 0%, rgba(93, 185, 175, 0) 70%);
  pointer-events: none;
}
.page-hero::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  background: var(--teal);
}
.page-hero .container { position: relative; }
.page-hero__eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 10px;
}
.page-hero h1 { margin-bottom: 10px; }
.page-hero p { max-width: 62ch; font-size: var(--step-lg); margin: 0; }

@media (max-width: 640px) {
  .page-hero { padding: 28px 0 24px; }
  .page-hero h1 { font-size: var(--step-xl); }
  .page-hero p { font-size: var(--step-base); }
}

/* Coming soon badge */
.coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--white);
  background: var(--slate);
  padding: 10px 20px;
  border-radius: var(--radius);
  cursor: not-allowed;
}
