/* Pharma by Elliot — Apple-inspired design system, pastel */

:root {
  --ink: #1d2b26;
  --ink-soft: #3c4a44;
  --muted: #64746e;
  --accent: #0f766e;
  --accent-bright: #0c5f59;
  --bg: #e8f1ec;
  --bg-soft: #f0f6f2;
  --card: #ffffff;
  --line: rgba(23, 45, 38, 0.12);
  --shadow-sm: 0 1px 2px rgba(29, 43, 38, 0.05), 0 4px 12px rgba(29, 43, 38, 0.06);
  --shadow-md: 0 2px 4px rgba(29, 43, 38, 0.05), 0 20px 48px rgba(29, 43, 38, 0.12);
  --radius: 20px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

section[id] { scroll-margin-top: 88px; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.62;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* {
    letter-spacing: -0.05cap;
}

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

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-weight: 700; line-height: 1.15; color: var(--ink);  }

h1 { font-size: clamp(2.25rem, 5.5vw, 3.8rem); line-height: 1.1; margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); line-height: 1.16; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; color: var(--ink-soft); }
ul { margin: 0 0 1rem 1.2rem; }
li { margin-bottom: 0.4rem; color: var(--ink-soft); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.1rem;
}
.muted { color: var(--muted); }
.lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.8rem 1.7rem;
  border-radius: 980px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), border-color 0.2s var(--ease);
}
.btn:hover { background: var(--accent-bright); border-color: var(--accent-bright); transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: rgba(15, 118, 110, 0.4);
}
.btn-outline:hover { background: rgba(15, 118, 110, 0.08); border-color: var(--accent); }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem clamp(16px, 4vw, 48px);
  background: rgba(232, 241, 236, 0.8);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { text-decoration: none; display: flex; align-items: center; gap: 0.3rem; }
.nav-mark { width: 30px; height: 30px; flex-shrink: 0; }

.wordmark {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}
.wordmark em { font-style: normal; color: var(--accent); font-weight: 600; }

.nav-toggle { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  margin-left: auto;
}
.hamburger span {
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}

.nav-links { display: flex; align-items: center; gap: 1.7rem; }
.nav-links > a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.nav-links > a:not(.btn):hover { color: var(--ink); }
.nav-links .btn { padding: 0.55rem 1.35rem; font-size: 0.9rem; }

.dropdown { position: relative; }
.dropdown > a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s var(--ease);
}
.dropdown > a:hover { color: var(--ink); }
.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 1rem;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 1rem);
  left: 0;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  padding: 0.5rem;
  min-width: 320px;
}
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }
.dropdown-menu a {
  display: block;
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.dropdown-menu a:hover { background: var(--bg); color: var(--ink); }
.dropdown-menu a.active { color: var(--accent); font-weight: 600; }

/* Subpage header + CTA */
.page-head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.page-head h1 { max-width: 780px; }

.page-cta {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  max-width: 940px;
  margin: clamp(2rem, 4vw, 3rem) auto;
  padding: clamp(2.5rem, 6vw, 5rem) clamp(20px, 4vw, 48px);
}
.page-cta .container { max-width: none; padding: 0; }
.page-cta h2 { margin-bottom: 0.75rem; }
.page-cta p { max-width: 56ch; margin: 0 auto 1.5rem; }
.page-cta .btn { margin-top: 0.25rem; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(16px, 4vw, 48px);
}
.hero-sub { font-size: 1.15rem; color: var(--ink-soft); max-width: 48ch; }
.hero .btn { margin-top: 0.75rem; }
.hero-img img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-text { text-align: center; }
  .hero-text .eyebrow, .hero-sub { margin-left: auto; margin-right: auto; }
}

/* Alternating rows */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(16px, 4vw, 48px);
}
.row.alt {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  margin-top: clamp(2rem, 4vw, 3rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.row-img img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}
.row-text ul { margin-top: 0.25rem; }
.row-text li strong { color: var(--ink); }
@media (max-width: 900px) {
  .row { grid-template-columns: 1fr; }
  .row.alt .row-img { order: -1; }
}

/* 4Ms */
.mms { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.mms .container { max-width: 880px; }
.mms .lede { margin-bottom: 1rem; }
.ms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.75rem;
}
.ms-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.ms-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ms-chip {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
}
.ms-card h3 { margin-bottom: 0.35rem; }
.ms-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
@media (max-width: 700px) { .ms-grid { grid-template-columns: 1fr; } }

/* Settings cards */
.settings {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(20px, 4vw, 48px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  max-width: 1140px;
  margin: clamp(2rem, 4vw, 3rem) auto;
}
.settings .container { max-width: none; padding: 0; }
.settings .lede { margin-bottom: 1rem; }
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
.card {
  display: block;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.9rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: var(--shadow-md);
}
.card h3 { color: var(--accent); font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.card-arrow { display: inline-block; margin-top: 0.9rem; font-size: 1rem; color: var(--accent); font-weight: 600; }
@media (max-width: 700px) { .cards { grid-template-columns: 1fr; } }

/* Founder */
.founder { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.founder .container { max-width: 1080px; }
.founder-wrap {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
  margin-top: 1.5rem;
}
.portrait {
  width: 340px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.founder-role {
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}
blockquote {
  margin-top: 2.5rem;
  padding: 1.75rem 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: 1.15rem;
  color: var(--ink);
}
blockquote p { color: var(--ink); }
blockquote cite { display: block; margin-top: 0.7rem; font-style: normal; font-size: 0.9rem; color: var(--muted); }
@media (max-width: 800px) {
  .founder-wrap { grid-template-columns: 1fr; }
  .portrait { width: 100%; }
}

/* Contact / FAQ */
.contact {
  padding: clamp(2.5rem, 6vw, 5rem) clamp(20px, 4vw, 48px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow-sm);
  max-width: 940px;
  margin: clamp(2rem, 4vw, 3rem) auto;
}
.contact > .container { max-width: none; padding: 0; }
.contact-list { list-style: none; margin: 0 0 1.5rem; }
.contact-list li { margin-bottom: 0.45rem; font-size: 1.05rem; color: var(--ink-soft); }
.contact-list a { color: var(--accent); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.faq { margin-top: 2.75rem; }
.faq > h3 { font-size: 1.5rem; margin-bottom: 1.1rem; }
details {
  border-top: 1px solid var(--line);
  padding: 0.95rem 0;
}
details:last-of-type { border-bottom: 1px solid var(--line); }
summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.2s var(--ease);
}
summary:hover { color: var(--accent); }
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
  transition: transform 0.25s var(--ease);
}
details[open] summary::after { content: '\2212'; }
details p { margin: 0.8rem 0 0.4rem; color: var(--muted); }

/* Blog */
.blog-index { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.blog-index .container { max-width: 1000px; }
.blog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.blog-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.blog-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.blog-card-body { padding: 1.5rem 1.6rem 1.75rem; }
.blog-card h3 { margin-bottom: 0.4rem; }
.blog-card p { margin: 0; color: var(--muted); font-size: 0.98rem; }
.blog-meta {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.blog-article { max-width: 760px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 5rem) clamp(20px, 4vw, 48px); }
.blog-article .container { max-width: none; padding: 0; }
.blog-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-md); margin-bottom: 2rem; }
.blog-article .lede { font-size: 1.25rem; }
.blog-article h2 { margin-top: 2.5rem; }
.blog-article p, .blog-article li { color: var(--ink-soft); }
.blog-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.blog-nav a { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.blog-nav a:hover { text-decoration: underline; }
@media (max-width: 700px) {
  .blog-grid { grid-template-columns: 1fr; }
  .blog-nav { flex-direction: column; }
}

/* Footer */
.footer { background: #163128; color: rgba(255, 255, 255, 0.78); text-align: center; padding: 3.25rem 1.5rem; }
.footer-mark { width: 40px; height: 40px; margin: 0 auto 0.75rem; }
.footer-name { font-size: 1.3rem; color: #fff; font-weight: 800; margin-bottom: 0.35rem; }
.footer p { margin-bottom: 0.45rem; font-size: 0.95rem; color: rgba(255, 255, 255, 0.78); }
.footer a { color: #7fd1c8; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .btn {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.6rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 980px;
  background: transparent;
  color: #fff;
  font-weight: 500;
  font-size: 0.92rem;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer .btn:hover { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.65); text-decoration: none; }

/* Mobile nav */
@media (max-width: 1024px) {
  .nav { flex-wrap: wrap; }
  .hamburger { display: flex; }
  .nav-links {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    background: rgba(232, 241, 236, 0.96);
    border-top: 1px solid var(--line);
    padding: 0.5rem 0 0.75rem;
  }
  .nav-toggle:checked ~ .nav-links { display: flex; }
  .nav-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-links > a, .dropdown > a { display: block; padding: 0.85rem clamp(16px, 4vw, 48px); font-size: 1rem; color: var(--ink-soft); }
  .nav-links .btn { margin: 0.5rem clamp(16px, 4vw, 48px); text-align: center; }
  .dropdown::after { display: none; }
  .dropdown-menu {
    position: static;
    display: block;
    border: none;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    padding: 0 0 0 1.5rem;
    min-width: 0;
  }
  .dropdown-menu a { padding: 0.7rem clamp(16px, 4vw, 48px); font-size: 0.95rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .card:hover, .ms-card:hover { transform: none; }
  .btn:hover { transform: none; }
}
