/* Northwick Park Neuromodulation Service */

:root {
  --color-primary: #94BDCE;
  --color-primary-dark: #7aa8bc;
  --color-primary-deep: #5f8fa3;
  --color-accent: #94BDCE;
  --color-accent-soft: rgba(148, 189, 206, 0.18);
  --color-text: #333333;
  --color-text-muted: #5c6670;
  --color-bg: #ffffff;
  --color-bg-alt: #f8f9fa;
  --color-white: #ffffff;
  --color-border: rgba(51, 51, 51, 0.1);
  --font-sans: "Open Sans", system-ui, sans-serif;
  --shadow-sm: 0 2px 8px rgba(51, 51, 51, 0.05);
  --shadow-md: 0 8px 32px rgba(51, 51, 51, 0.08);
  --shadow-lg: 0 16px 48px rgba(51, 51, 51, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --max-width: 1140px;
  --header-height: 80px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

html:not(.auth-granted) body > :not(#auth-gate) {
  display: none !important;
}

html.auth-granted #auth-gate {
  display: none !important;
}

.auth-gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(148, 189, 206, 0.2), transparent),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.auth-gate-panel {
  width: min(100%, 420px);
  padding: 2.5rem 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.auth-gate-logo {
  height: 48px;
  width: auto;
  margin: 0 auto 1.5rem;
}

.auth-gate-title {
  font-size: 1.375rem;
  margin: 0 0 0.75rem;
}

.auth-gate-lead {
  margin: 0 0 1.5rem;
  color: var(--color-text-muted);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-input {
  width: 100%;
  padding: 0.875rem 1rem;
  font: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.auth-input:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-color: var(--color-primary);
}

.auth-submit {
  width: 100%;
}

.auth-error {
  margin: 0;
  font-size: 0.875rem;
  color: #b42318;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-primary-deep);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-dark);
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--color-primary-deep);
  color: var(--color-white);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Typography */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-deep);
  margin: 0 0 0.75rem;
}

.eyebrow-light {
  color: rgba(51, 51, 51, 0.75);
}

h1, h2, h3 {
  line-height: 1.2;
  font-weight: 600;
}

h1 {
  font-family: var(--font-sans);
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.section-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-text);
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  color: var(--color-text);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-ghost:hover {
  background: var(--color-bg-alt);
  border-color: var(--color-primary);
  color: var(--color-text);
}

.btn-light {
  background: var(--color-white);
  color: var(--color-text);
}

.btn-light:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.site-header.is-scrolled {
  box-shadow: 0 2px 16px rgba(51, 51, 51, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: var(--header-height);
}

.header-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  min-width: 0;
}

.logo {
  display: flex;
  align-items: center;
  color: inherit;
  flex-shrink: 0;
}

.logo:hover {
  color: inherit;
  opacity: 0.92;
}

.logo-divider {
  width: 1px;
  height: 40px;
  background: var(--color-border);
  flex-shrink: 0;
}

.logo-img {
  width: auto;
  display: block;
}

.logo-img-trust {
  height: 48px;
  max-width: min(150px, 28vw);
}

.logo-img-service {
  height: 52px;
  max-width: min(180px, 34vw);
}

.nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.nav-list a:hover {
  color: var(--color-primary-deep);
}

.header-cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav a {
  padding: 0.75rem 0;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

.mobile-nav[hidden] {
  display: none !important;
}

.mobile-nav.is-open {
  display: flex;
}

/* Hero */
.hero {
  position: relative;
  padding: calc(var(--header-height) + 4rem) 0 6rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(148, 189, 206, 0.2), transparent),
    radial-gradient(ellipse 60% 50% at 10% 80%, rgba(148, 189, 206, 0.1), transparent),
    linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 189, 206, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 189, 206, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, black 30%, transparent 90%);
}

.hero-wave {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  color: var(--color-bg-alt);
  line-height: 0;
}

.hero-wave svg {
  width: 100%;
  height: 80px;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-lead {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0 0 2rem;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 0;
}

.hero-stats dt {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary-deep);
  margin-bottom: 0.25rem;
}

.hero-stats dd {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  width: min(100%, 480px);
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  filter: saturate(0.75) brightness(1.12) contrast(0.92);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

/* Mission grid */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.mission-card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.mission-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.mission-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  border-radius: 10px;
  color: var(--color-primary-deep);
  margin-bottom: 1rem;
}

.mission-icon svg {
  width: 22px;
  height: 22px;
}

.mission-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* Treatments */
.treatments-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.treatment-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 0;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.treatment-media {
  position: relative;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #eef5f8 0%, #f8fbfc 100%);
}

.treatment-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(148, 189, 206, 0.18) 100%);
  pointer-events: none;
}

.treatment-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.82) brightness(1.08) contrast(0.96);
}

.treatment-media.is-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.treatment-media.is-placeholder::before {
  content: "Image coming soon";
  position: relative;
  z-index: 1;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary-deep);
}

.treatment-media.is-placeholder img {
  display: none;
}

.treatment-body {
  padding: 2rem 2.5rem 2.25rem;
}

.treatment-featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}

.treatment-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary-deep);
  background: var(--color-accent-soft);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.treatment-full {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0 0 1rem;
  font-style: italic;
}

.treatment-body > p:not(.treatment-full) {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
}

.treatment-card > p:not(.treatment-full) {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
}

.treatment-points {
  margin: 0;
  padding: 0;
  list-style: none;
}

.treatment-points li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.treatment-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--color-accent);
  border-radius: 50%;
}

/* Team profiles */
.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 1.5rem;
}

.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 0 1 calc(25% - 1.125rem);
  max-width: calc(25% - 1.125rem);
  padding: 1.75rem 1.25rem;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.section-alt + .section .profile-card,
.section + .section-alt .profile-card {
  background: var(--color-white);
}

.profile-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.profile-photo-wrap {
  margin-bottom: 1.25rem;
}

.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--color-white);
  box-shadow:
    0 0 0 2px var(--color-primary),
    var(--shadow-md);
  filter: saturate(0.9) brightness(1.03);
  background: var(--color-bg-alt);
}

.profile-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.0625rem;
  color: var(--color-text);
}

.profile-role {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary-deep);
}

.profile-card > p:last-child {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.profile-photo-wrap.is-placeholder .profile-photo {
  display: none;
}

.profile-photo-wrap.is-placeholder::before {
  content: "";
  display: block;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d8e8ef 0%, #b8d4e0 100%);
  box-shadow:
    0 0 0 2px var(--color-primary),
    var(--shadow-md);
}

/* Why join */
.join-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: start;
}

.join-content > p {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.join-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.join-list li {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.join-list li:first-child {
  border-top: 1px solid var(--color-border);
}

.join-list strong {
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.join-list span {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.join-aside blockquote {
  margin: 0 0 1.5rem;
  padding: 1.75rem;
  background: var(--color-white);
  border-radius: var(--radius);
  border-left: 4px solid var(--color-accent);
  box-shadow: var(--shadow-sm);
}

.join-aside blockquote p {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-style: italic;
  color: var(--color-text);
  line-height: 1.5;
}

.join-aside footer {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.join-aside-card {
  background: var(--color-primary-deep);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.join-aside-card h3 {
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.join-aside-card p {
  margin: 0;
  font-size: 0.9375rem;
  opacity: 0.9;
  line-height: 1.6;
}

/* CTA section */
.section-cta {
  padding-bottom: 5rem;
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-deep) 100%);
  color: var(--color-text);
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 3rem;
}

.cta-content h2 {
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.cta-content p {
  margin: 0;
  opacity: 0.9;
  max-width: 480px;
}

.cta-actions {
  text-align: center;
  flex-shrink: 0;
}

.cta-note {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  opacity: 0.7;
}

.apply-steps {
  max-width: 720px;
  margin: 0 auto;
}

.steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.steps-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  color: var(--color-primary-deep);
  font-weight: 700;
  border-radius: 50%;
  font-size: 0.9375rem;
}

.steps-list strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.steps-list p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Footer */
.site-footer {
  background: var(--color-text);
  color: rgba(255, 255, 255, 0.78);
  padding: 3rem 0 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .footer-logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-brand .footer-logo {
  display: block;
  width: auto;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 6px;
}

.footer-brand .footer-logo-trust {
  height: 44px;
  max-width: 140px;
}

.footer-brand .footer-logo-service {
  height: 52px;
  max-width: 200px;
}

.footer-brand p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: var(--color-white);
}

.footer-bottom {
  padding: 1.25rem 0;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.8125rem;
  opacity: 0.6;
}

/* Responsive */
@media (max-width: 1024px) {
  .mission-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-lead,
  .hero-actions {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-stats {
    max-width: 480px;
    margin-inline: auto;
  }

  .hero-visual {
    order: -1;
  }

  .hero-image {
    max-width: 360px;
    margin-inline: auto;
  }

  .treatments-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }

  .team-grid {
    max-width: 640px;
    margin-inline: auto;
  }

  .profile-card {
    flex: 0 1 calc(50% - 0.75rem);
    max-width: calc(50% - 0.75rem);
  }

  .treatment-featured {
    transform: none;
  }

  .join-layout {
    grid-template-columns: 1fr;
  }

  .cta-panel {
    flex-direction: column;
    text-align: center;
  }

  .steps-list {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .nav,
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .logo-img-trust {
    height: 36px;
    max-width: min(110px, 26vw);
  }

  .logo-img-service {
    height: 40px;
    max-width: min(130px, 32vw);
  }

  .logo-divider {
    height: 32px;
  }

  .header-branding {
    gap: 0.625rem;
  }

  .mission-grid {
    grid-template-columns: 1fr;
  }

  .team-grid {
    max-width: 320px;
    margin-inline: auto;
  }

  .profile-card {
    flex: 0 1 100%;
    max-width: 320px;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
  }

  .treatment-body {
    padding: 1.75rem 2rem 2rem;
  }

  .hero-stats {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-nav {
    flex-wrap: wrap;
  }

  .cta-panel {
    padding: 2rem 1.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .pulse-node,
  .signal-path,
  .mission-card,
  .btn {
    animation: none;
    transition: none;
  }
}
