/* =============================================================================
   NWPharmaTech — Psychosis Prevention · Public preview (thin coming-soon)
   W04 restyle: light institutional family aligned with nwpharmatech.com
   (navy ink · cool neutrals · clinical blue) while remaining programme-distinct
   British English · WCAG AA intent · offline-first (no external CDNs)
   ============================================================================= */

:root {
  /* Corporate-aligned neutrals (from nwpharmatech.com CSS) */
  --canvas: #f8f8f7;
  --canvas-soft: #f4f5f2;
  --canvas-mute: #eef1f0;
  --line: #e0e4e6;
  --line-strong: #cdd3da;

  --ink-950: #07111f;
  --ink-900: #0a1728;
  --ink-800: #10233c;
  --ink-700: #334158;
  --ink-600: #536177;
  --ink-500: #657187;
  --ink-400: #788497;
  --ink-300: #aeb8c3;

  /* Clinical blue — corporate accent */
  --blue-600: #1767e8;
  --blue-500: #2f7af0;
  --blue-400: #6da4ff;
  --blue-soft: rgba(23, 103, 232, 0.10);
  --blue-glow: rgba(23, 103, 232, 0.14);

  /* Programme-distinct hope (quiet secondary — not the dark-sage of W03) */
  --hope-600: #2a7a6e;
  --hope-500: #3d9a8b;
  --hope-soft: rgba(61, 154, 139, 0.10);

  --amber: #9a7b4f;
  --focus: #1767e8;
  --white: #ffffff;

  /* Type — approximate Sora + Source Serif 4 without CDN */
  --font-display: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body: "Sora", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;

  --measure: 36rem;
  --measure-wide: 56rem;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 4rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-soft: 0 1px 2px rgba(7, 17, 31, 0.04), 0 12px 32px rgba(7, 17, 31, 0.06);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@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;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--blue-600);
  text-underline-offset: 0.18em;
}
a:hover { color: var(--ink-900); }
a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1rem;
  background: var(--ink-950);
  color: var(--white);
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ----- Public preview badge ----- */
.preview-badge {
  position: fixed;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  max-width: calc(100vw - 1.7rem);
  padding: 0.4rem 0.85rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-800);
  background: rgba(248, 248, 247, 0.92);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  pointer-events: none;
}
.preview-badge::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-600);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

/* ----- Layout ----- */
.wrap {
  width: min(100% - 2.5rem, var(--measure-wide));
  margin-inline: auto;
}
.wrap-narrow {
  width: min(100% - 2.5rem, var(--measure));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue-600);
}
.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1.5px;
  background: var(--blue-600);
  border-radius: 1px;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.18;
  color: var(--ink-950);
  letter-spacing: -0.025em;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 0 0 1.25rem;
  font-weight: 500;
}
h1 em {
  font-style: italic;
  color: var(--blue-600);
  font-weight: 500;
}
h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.85rem);
  margin: 0 0 0.9rem;
}

.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  line-height: 1.6;
  color: var(--ink-600);
  max-width: 34rem;
  margin: 0;
  font-weight: 400;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  height: var(--nav-h);
  background: rgba(248, 248, 247, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(1.1);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  gap: 1rem;
  padding-right: 8.5rem;
}
@media (min-width: 640px) {
  .nav-inner { padding-right: 11rem; }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--ink-950);
  min-width: 0;
}
.brand:hover { color: var(--ink-950); }
.brand-mark {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}
.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}
.brand-name {
  font-size: 0.875rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-tag {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--ink-500);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-link {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-700);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.header-link:hover {
  color: var(--blue-600);
  background: var(--blue-soft);
}

/* ----- Main ----- */
main {
  flex: 1;
}

/* ----- Hero ----- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3.75rem, 11vw, 7rem) 0 clamp(3rem, 7vw, 4.5rem);
  background: linear-gradient(180deg, var(--white) 0%, var(--canvas) 100%);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 65% 50% at 88% 12%, var(--blue-glow), transparent 55%),
    radial-gradient(ellipse 45% 40% at 8% 85%, var(--hope-soft), transparent 50%);
  pointer-events: none;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(7, 17, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 17, 31, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 65% at 55% 25%, black 15%, transparent 72%);
  pointer-events: none;
  opacity: 0.85;
}
.hero-ornament {
  position: absolute;
  right: -2%;
  top: 6%;
  width: min(400px, 52vw);
  height: auto;
  opacity: 1;
  pointer-events: none;
}
@media (max-width: 640px) {
  .hero-ornament {
    opacity: 0.4;
    right: -22%;
    top: -4%;
    width: min(320px, 70vw);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 38rem;
}
.hero-note {
  margin: 1.75rem 0 0;
  max-width: 32rem;
  padding: 0.95rem 1.1rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-600);
  background: var(--canvas-soft);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue-600);
  border-radius: var(--radius-sm);
}
.hero-note strong { color: var(--ink-900); font-weight: 650; }

/* ----- Sections ----- */
.section {
  padding: clamp(2.75rem, 5.5vw, 4rem) 0;
}
.section-alt {
  background: var(--canvas-soft);
  border-block: 1px solid var(--line);
}
.section p {
  margin: 0;
  color: var(--ink-600);
  max-width: 36rem;
}
.section .lede-tight {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-600);
}

.unmet {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.4rem 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  max-width: 40rem;
}
.unmet-mark {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue-600);
}
.unmet p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.58;
  color: var(--ink-800);
}

/* Coming — three quiet pillars (speech-safe; no diligence dump) */
.coming-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.75rem;
  max-width: 40rem;
}
@media (min-width: 640px) {
  .coming-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}
.coming-card {
  padding: 1.15rem 1.2rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(7, 17, 31, 0.03);
}
.coming-card h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-950);
}
.coming-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink-600);
  max-width: none;
}

/* ----- Contact ----- */
.contact-block {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 28rem;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  padding: 0.95rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  background: var(--ink-950);
  border: 1px solid var(--ink-950);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.contact-email:hover {
  color: var(--white);
  background: var(--blue-600);
  border-color: var(--blue-600);
}
.contact-email svg {
  flex-shrink: 0;
  color: var(--blue-400);
}
.contact-email:hover svg { color: var(--white); }
.contact-hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-500);
}

/* ----- Footer ----- */
.site-footer {
  margin-top: auto;
  padding: 2.5rem 0 2.75rem;
  background: var(--ink-950);
  color: var(--ink-300);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}
.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.1rem;
}
.footer-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--white);
  letter-spacing: -0.02em;
}
.footer-corp {
  font-size: 0.8125rem;
  color: var(--ink-400);
}
.footer-corp a {
  color: var(--blue-400);
  text-decoration: none;
  border-bottom: 1px solid rgba(109, 164, 255, 0.35);
}
.footer-corp a:hover {
  color: var(--white);
  border-bottom-color: var(--white);
}
.footer-legal {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ink-400);
  max-width: 42rem;
}
.footer-legal strong {
  color: #c8cfd4;
  font-weight: 600;
}
.footer-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--ink-500);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ----- Print ----- */
@media print {
  .preview-badge { position: static; margin: 0.5rem; box-shadow: none; }
  .site-header { position: static; }
  .hero-bg, .hero-grid, .hero-ornament { display: none; }
  body { background: #fff; color: #111; }
  h1, h2, .brand, .footer-name { color: #111; }
  .site-footer { background: #f5f5f5; color: #333; }
  a { color: #064; }
}
