@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-regular.woff2') format('woff2'),
       url('assets/fonts/poppins-v24-latin-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-600.woff2') format('woff2'),
       url('assets/fonts/poppins-v24-latin-600.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Poppins';
  src: url('assets/fonts/poppins-v24-latin-700.woff2') format('woff2'),
       url('assets/fonts/poppins-v24-latin-700.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --teal:       #00AFAD;
  --teal-dark:  #1A3251;
  --orange:     #E8703A;
  --blue:       #2AACE2;
  --footer-bg:  #e6f3f3;
  --text-dark:  #1A3251;
  --max-width:  1200px;
}

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

body {
  font-family: 'Poppins', sans-serif;
  background: #fff;
  color: var(--text-dark);
  font-size: 20px;
}

/* ── WRAPPER ── */
.inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── LOGO ── */
header {
  padding: 56px 0;
  text-align: center;
  perspective: 800px;
}

.logo svg {
  display: inline-block;
  width: clamp(180px, 30vw, 340px);
  height: auto;
}
.logo svg #healthin { fill: var(--teal); }
.logo svg #media    { fill: var(--teal-dark); }

/* ── LOGO LETTER REVEAL ── */
#h, #e, #a, #l, #th, #i, #n, #m, #e1, #d, #i1, #a1 {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: letter-in 0.15s ease-out forwards;
}

#h  { animation-delay: 0.00s; }
#e  { animation-delay: 0.06s; }
#a  { animation-delay: 0.12s; }
#l  { animation-delay: 0.18s; }
#th { animation-delay: 0.24s; }
#i  { animation-delay: 0.30s; }
#n  { animation-delay: 0.36s; }
#m  { animation-delay: 0.42s; }
#e1 { animation-delay: 0.48s; }
#d  { animation-delay: 0.54s; }
#i1 { animation-delay: 0.60s; }
#a1 { animation-delay: 0.66s; }

@keyframes letter-in {
  from { opacity: 0; transform: rotateY(90deg); }
  to   { opacity: 1; transform: rotateY(0deg); }
}

/* ── HERO ── */
.hero {
  max-width: var(--max-width);
  margin: 0 auto;
  overflow: hidden;
  background: linear-gradient(135deg, #c3cfe2 0%, #f5f7fa 50%, #c3cfe2 100%);
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
  animation: hero-reveal 1.2s ease-out 0.9s both;
}

@keyframes hero-reveal {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── PRODUCTS ── */
.products > .inner {
  padding-top: 48px;
  padding-bottom: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}
.product-card:hover { opacity: 0.85; }

.product-card svg {
  width: 48px;
  height: auto;
  display: block;
  margin: 0 auto 20px;
  transform-origin: center bottom;
}

.product-card:hover svg {
  animation: pen-bounce 0.7s ease-in-out infinite;
}

@keyframes pen-bounce {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-10px); }
  100% { transform: translateY(0); }
}

/* Tip colour per product */
a[href="#newsletter"] svg #tip-newsletter  { fill: var(--orange); }
a[href="#newsletter"] svg #body-newsletter { fill: #000; }
a[href="#medical"]    svg #tip-medical     { fill: var(--blue); }
a[href="#medical"]    svg #body-medical    { fill: #000; }

.product-card img {
  width: 100%;
  max-width: 280px;
  height: auto;
  transform: scale(0.96);
  transition: transform 0.8s linear(0, 0.029 1.3%, 0.119 2.8%, 0.659 8.7%, 0.871 11.6%, 1.009 14.6%, 1.052 16.2%, 1.078 17.9%, 1.088 19.7%, 1.085 21.7%, 1.014 31.4%, 0.993 38%, 1.001 57.6%, 1);
  will-change: transform;
}
.product-card:hover img {
  transform: scale(1);
}

/* ── PUBLICATIONS ── */
.publications {
  background: #f7fafa;
  padding: 64px 0;
}

.publications-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--teal-dark);
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 0.02em;
}

.pub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.pub-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1.5px solid #d4ecea;
  border-radius: 12px;
  padding: 24px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}
.pub-card:hover {
  box-shadow: 0 6px 24px rgba(0, 175, 173, 0.15);
  transform: translateY(-3px);
  border-color: var(--teal);
}

.pub-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.pub-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--teal-dark);
  line-height: 1.4;
  margin-bottom: 10px;
}

.pub-desc {
  font-size: 0.8rem;
  color: #4a6070;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 16px;
}

.pub-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--teal);
  align-self: flex-start;
}

.pub-loading {
  color: var(--teal-dark);
  opacity: 0.5;
  font-size: 0.9rem;
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 0;
}

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

/* ── FOOTER ── */
footer {
  background: var(--footer-bg);
  padding: 40px 0;
  text-align: center;
}

.footer-name {
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.footer-address {
  color: var(--teal-dark);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-email {
  display: inline-block;
  border: 1.5px solid var(--teal);
  border-radius: 40px;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  padding: 8px 26px;
  color: var(--teal);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  margin-bottom: 28px;
}
.footer-email:hover {
  background: var(--teal);
  color: #fff;
}

.footer-links {
  font-size: 16px;
}
.footer-links a {
  color: var(--teal-dark);
  text-decoration: none;
  margin: 0 8px;
}
.footer-links a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  body { font-size: 16px; }
  .footer-links { font-size: 13px; }
}

@media (max-width: 640px) {
  .hero img {
    /* Crop to left half on mobile */
    width: 200%;
    max-width: 200%;
    margin-left: 0;
    object-fit: cover;
  }

  .products > .inner {
    grid-template-columns: 1fr;
    padding-top: 36px;
    padding-bottom: 44px;
    gap: 40px;
  }
}
