/* ===========================================================
   Weray Healthcare — shared styles
   Third-party pharmaceutical manufacturing
   Tokens drawn from the logo: signal red, ink black, orange→pink ring
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root{
  --paper: #FBFBFA;
  --paper-2: #F1F2F2;
  --ink: #17171A;
  --ink-soft: #55585C;
  --red: #E4241B;
  --red-deep: #B81913;
  --grad: linear-gradient(120deg, #F7941D, #EC008C);
  --hairline: #E1E3E3;
  --hairline-strong: #C7CACC;

  --display: 'Sora', sans-serif;
  --body: 'IBM Plex Sans', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', monospace;

  --max: 1180px;
  --pad: clamp(20px, 4vw, 64px);
}

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

body{
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

.wrap{
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* ---------- Header / Nav ---------- */

.site-header{
  position: relative;
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
  z-index: 40;
}

.site-header .wrap{
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
}

.brand img{
  height: 44px;
  width: 44px;
  object-fit: contain;
}

.brand .brand-text{
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand .brand-text .name{
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.brand .brand-text .name .we{ color: var(--red); }

.brand .brand-text .tag{
  font-size: 0.68rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.nav{
  display: flex;
  gap: clamp(16px, 2.2vw, 34px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a{
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}

.nav a:hover,
.nav a[aria-current="page"]{
  color: var(--ink);
  border-bottom-color: var(--red);
}

.nav a[aria-current="page"]{ color: var(--red-deep); }

.nav-toggle{
  display: none;
  background: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 2px;
  padding: 8px 10px;
  font-family: var(--body);
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 860px){
  .nav-toggle{ display: inline-block; }
  .nav{
    position: absolute;
    top: 84px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
    flex-direction: column;
    gap: 0;
    padding: 8px var(--pad) 20px;
    display: none;
  }
  .nav.open{ display: flex; }
  .nav li{ border-bottom: 1px solid var(--hairline); }
  .nav li:last-child{ border-bottom: none; }
  .nav a{ display: block; padding: 14px 0; border-bottom: none; }
}

/* ---------- Structural motif: spec-sheet rules ---------- */

.grid-frame{
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  position: relative;
}

.accent-bar{
  height: 3px;
  width: 56px;
  background: var(--grad);
  border-radius: 2px;
  margin-bottom: 18px;
}

/* ---------- Hero ---------- */

.hero{
  padding: clamp(52px, 8vw, 108px) 0 clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--hairline);
}

.hero-grid{
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: end;
}

@media (max-width: 860px){
  .hero-grid{ grid-template-columns: 1fr; }
}

.hero h1{
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.8vw, 3.8rem);
  line-height: 1.08;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

.hero h1 .accent{ color: var(--red); }

.hero-lede{
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 46ch;
}

.hero-meta{
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 6px;
}

.hero-meta .row{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--hairline);
  padding-top: 10px;
  font-size: 0.9rem;
}

.hero-meta .row span:first-child{ color: var(--ink-soft); }
.hero-meta .row span:last-child{ text-align: right; }

/* ---------- Sections ---------- */

section{ padding: clamp(44px, 6vw, 84px) 0; }

.section-head{
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 24px;
  margin-bottom: clamp(26px, 4vw, 48px);
  align-items: baseline;
  border-top: 1px solid var(--hairline);
  padding-top: 18px;
}

@media (max-width: 700px){
  .section-head{ grid-template-columns: 1fr; }
}

.section-head .num{
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--red-deep);
}

.section-head h2{
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 2.8vw, 2.3rem);
  margin: 0;
  letter-spacing: -0.005em;
  max-width: 20ch;
}

.section-head p{
  color: var(--ink-soft);
  max-width: 54ch;
  margin: 10px 0 0;
}

/* ---------- Cards / grids ---------- */

.split{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(24px, 4vw, 56px);
}

.tri{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 36px);
}

.quad{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.4vw, 28px);
}

@media (max-width: 900px){
  .split, .tri{ grid-template-columns: 1fr; }
  .quad{ grid-template-columns: repeat(2, 1fr); }
}

.plate{
  border-top: 1px solid var(--hairline-strong);
  padding-top: 20px;
}

.plate .index{
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--red-deep);
  display: block;
  margin-bottom: 10px;
}

.plate h3{
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.plate p{ color: var(--ink-soft); margin: 0; }

.swatch{
  aspect-ratio: 4/3;
  background: var(--paper-2);
  border: 1px solid var(--hairline);
  margin-bottom: 18px;
  position: relative;
  overflow: hidden;
}

.swatch::after{
  content: attr(data-tag);
  position: absolute;
  bottom: 10px;
  left: 12px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--ink-soft);
}

/* ---------- Buttons / links ---------- */

.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  padding: 12px 22px;
  font-size: 0.92rem;
  background: transparent;
  cursor: pointer;
  font-family: var(--body);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.btn:hover{ background: var(--ink); color: var(--paper); }

.btn.primary{
  background: var(--red);
  border-color: var(--red);
  color: #FFFFFF;
}

.btn.primary:hover{ background: var(--red-deep); border-color: var(--red-deep); }

.text-link{
  text-decoration: underline;
  text-decoration-color: var(--hairline-strong);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* ---------- Quote ---------- */

.quote{
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.45;
  max-width: 36ch;
  margin: 0 0 20px;
  letter-spacing: -0.005em;
}

.quote-attr{ font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Certifications strip ---------- */

.cert{
  border: 1px solid var(--hairline-strong);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cert .cert-name{
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
}

.cert .cert-note{ font-size: 0.82rem; color: var(--ink-soft); }

/* ---------- Footer ---------- */

.site-footer{
  border-top: 1px solid var(--hairline);
  padding: 40px 0;
  margin-top: 40px;
}

.footer-grid{
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.footer-brand{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 280px;
}

.footer-brand img{ height: 36px; width: 36px; object-fit: contain; }

.footer-cols{
  display: flex;
  gap: clamp(28px, 5vw, 72px);
  flex-wrap: wrap;
}

.footer-cols h4{
  font-family: var(--body);
  font-size: 0.78rem;
  color: var(--ink);
  margin: 0 0 10px;
  font-weight: 600;
}

.footer-cols ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-cols a{ text-decoration: none; }
.footer-cols a:hover{ color: var(--ink); }

/* ---------- Forms ---------- */

.field{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}

.field label{ font-size: 0.82rem; color: var(--ink-soft); }

.field input,
.field textarea,
.field select{
  font-family: var(--body);
  font-size: 1rem;
  padding: 12px 4px;
  border: none;
  border-bottom: 1px solid var(--hairline-strong);
  background: transparent;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus{ border-bottom-color: var(--red); }

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* ---------- Page-load reveal (single, deliberate) ---------- */

.reveal{
  opacity: 0;
  transform: translateY(10px);
  animation: rise .7s ease forwards;
}
.reveal.d1{ animation-delay: .08s; }
.reveal.d2{ animation-delay: .16s; }

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

/* ---------- Utility ---------- */

.mono-tag{
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  border: 1px solid var(--hairline-strong);
  padding: 3px 9px;
  display: inline-block;
}

.stat{ display: flex; flex-direction: column; gap: 4px; }
.stat .n{
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.6vw, 2.7rem);
  font-weight: 700;
}
.stat .l{ color: var(--ink-soft); font-size: 0.88rem; }
