/* Bergen Psychology — site styles
   Colours are HSL triplets so they can be used with transparency:
   hsl(var(--primary)) or hsl(var(--primary) / 0.5) */

:root {
  --font-heading: "Playfair Display", serif;
  --font-body: "Inter", sans-serif;

  --background: 36 33% 96%;
  --foreground: 25 30% 18%;
  --card: 36 30% 98%;
  --primary: 212 30% 36%;
  --primary-foreground: 36 33% 96%;
  --secondary: 34 25% 91%;
  --muted-foreground: 25 15% 48%;
  --accent: 30 30% 88%;
  --accent-foreground: 212 32% 28%;
  --border: 34 18% 86%;
  --ring: 212 30% 36%;
  --destructive: 0 84.2% 60.2%;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; border: 0 solid hsl(var(--border)); }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}
h1, h2, h3, h4, p, blockquote { margin: 0; font-size: inherit; font-weight: inherit; }
a { color: inherit; text-decoration: inherit; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; color: inherit; margin: 0; padding: 0; }
button { background: transparent; cursor: pointer; }
[hidden] { display: none !important; }

.icon { width: 1rem; height: 1rem; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Layout ---------- */
.page { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1 1 0%; }
.container { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.container--md { max-width: 56rem; }
.container--sm { max-width: 48rem; }
.inner-page { padding: 7rem 0 6rem; }
.text-center { text-align: center; }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transform: translate(var(--x, 0px), var(--y, 0px));
  transition: opacity var(--dur, 0.6s) ease-out var(--delay, 0s),
              transform var(--dur, 0.6s) ease-out var(--delay, 0s),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background-color: transparent;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav.is-scrolled {
  background-color: hsl(var(--background) / 0.9);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
.nav__inner {
  max-width: 72rem; margin: 0 auto; padding: 1rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand {
  font-family: var(--font-heading); font-size: 1.5rem; line-height: 2rem;
  font-weight: 600; letter-spacing: -0.025em;
}
.nav__links { display: none; align-items: center; gap: 2rem; }
.nav__links a, .nav__mobile a {
  font-size: 0.875rem; line-height: 1.25rem; letter-spacing: 0.025em;
  color: hsl(var(--muted-foreground));
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav__links a:hover { color: hsl(var(--primary)); }
.nav__links a.active, .nav__mobile a.active { color: hsl(var(--primary)); font-weight: 500; }
.nav__toggle { padding: 0.5rem; }
.nav__toggle .icon { width: 1.25rem; height: 1.25rem; }
.nav__toggle .icon-close { display: none; }
.nav__toggle[aria-expanded="true"] .icon-menu { display: none; }
.nav__toggle[aria-expanded="true"] .icon-close { display: block; }
.nav__mobile {
  overflow: hidden;
  background-color: hsl(var(--background) / 0.95);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top-width: 1px;
  transition: height 0.3s ease, opacity 0.3s ease;
}
.nav__mobile-inner { padding: 1rem 1.5rem; }
.nav__mobile a { display: block; }
.nav__mobile a + a { margin-top: 1rem; }
@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__toggle, .nav__mobile { display: none; }
}

/* ---------- Shared type ---------- */
.eyebrow {
  font-size: 0.75rem; line-height: 1rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: hsl(var(--primary)); font-weight: 600;
  margin-bottom: 0.75rem;
}
.heading {
  font-family: var(--font-heading); font-size: 1.875rem; line-height: 2.25rem; font-weight: 600;
}
.subheading {
  font-family: var(--font-heading); font-size: 1.5rem; line-height: 2rem; font-weight: 600;
}
.muted { color: hsl(var(--muted-foreground)); }
.prose { color: hsl(var(--muted-foreground)); line-height: 1.625; }
.section-header { margin-bottom: 3rem; text-align: center; }
.section-header__sub {
  color: hsl(var(--muted-foreground)); margin: 1rem auto 0; max-width: 42rem; line-height: 1.625;
}
@media (min-width: 768px) {
  .heading { font-size: 2.25rem; line-height: 2.5rem; }
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 2rem; border-radius: 9999px;
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; letter-spacing: 0.025em;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn--primary { background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.btn--primary:hover { background-color: hsl(var(--primary) / 0.9); }
.btn--outline { border: 1px solid hsl(var(--foreground) / 0.2); }
.btn--outline:hover { background-color: hsl(var(--foreground) / 0.05); }
.btn--light { background-color: hsl(var(--primary-foreground)); color: hsl(var(--primary)); }
.btn--light:hover { background-color: hsl(var(--primary-foreground) / 0.9); }
.link-arrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: hsl(var(--primary)); font-weight: 500; font-size: 0.875rem; line-height: 1.25rem;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.link-arrow:hover { gap: 0.75rem; }

.icon-box {
  width: 3rem; height: 3rem; border-radius: 0.75rem; flex-shrink: 0;
  background-color: hsl(var(--accent)); color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
}
.icon-box .icon { width: 1.25rem; height: 1.25rem; }
.icon-box--md { width: 2.75rem; height: 2.75rem; }
.icon-box--sm { width: 2.5rem; height: 2.5rem; }
.icon-box--sm .icon { width: 1rem; height: 1rem; }

/* ---------- Home: hero ---------- */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.hero__bg { position: absolute; inset: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(to right,
    hsl(var(--background) / 0.95), hsl(var(--background) / 0.7), hsl(var(--background) / 0.3));
}
.hero__content { position: relative; max-width: 72rem; margin: 0 auto; padding: 8rem 1.5rem; }
.hero__text { max-width: 36rem; }
.hero__eyebrow {
  font-size: 0.75rem; line-height: 1rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: hsl(var(--primary)); font-weight: 600; margin-bottom: 1.5rem;
}
.hero__title {
  /* Shrinks on narrow phones so "Bergen Psychology" stays on one line */
  font-family: var(--font-heading); font-size: min(3rem, 10.5vw); line-height: 1.25; font-weight: 600;
}
.hero__title em { color: hsl(var(--primary)); font-style: italic; white-space: nowrap; }
.hero__lead {
  font-size: 1.125rem; line-height: 1.625; color: hsl(var(--muted-foreground));
  margin-top: 1.5rem; max-width: 28rem;
}
.hero__actions { display: flex; flex-direction: column; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .hero__actions { flex-direction: row; } }
@media (min-width: 768px) { .hero__title { font-size: 3.75rem; line-height: 1; } }
@media (min-width: 1024px) { .hero__title { font-size: 4.5rem; line-height: 1; } }

/* ---------- Home: sections ---------- */
.section { padding: 6rem 0; }
.section--tinted { background-color: hsl(var(--secondary) / 0.5); }
.section--primary { padding: 5rem 0; background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
@media (min-width: 768px) { .section--lg { padding: 8rem 0; } }

.split { display: grid; gap: 4rem; align-items: center; }
.split img { width: 100%; border-radius: 1rem; box-shadow: var(--shadow-lg); }
.split .eyebrow { margin-bottom: 1rem; }
.split .heading { line-height: 1.375; }
.split .prose { margin-top: 1rem; }
.split .heading + .prose { margin-top: 1.5rem; }
.split .link-arrow { margin-top: 2rem; }
@media (min-width: 768px) {
  .split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split .heading { line-height: 2.5rem; }
}

.cards { display: grid; gap: 1.5rem; }
.card {
  background-color: hsl(var(--card)); border-radius: 1rem; padding: 2rem;
  transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card .icon-box { margin-bottom: 1.25rem; }
.card h3 {
  font-family: var(--font-heading); font-size: 1.125rem; line-height: 1.75rem; font-weight: 600;
  margin-bottom: 0.5rem;
}
.card p { font-size: 0.875rem; line-height: 1.625; color: hsl(var(--muted-foreground)); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.quote img {
  width: 8rem; height: 10rem; object-fit: cover; border-radius: 0.75rem;
  margin: 0 auto 2.5rem; opacity: 0.8;
}
.quote blockquote {
  font-family: var(--font-heading); font-size: 1.5rem; line-height: 1.625; font-style: italic;
}
.quote cite {
  display: block; font-style: normal; font-size: 0.875rem; line-height: 1.25rem;
  color: hsl(var(--muted-foreground)); margin-top: 1.5rem; letter-spacing: 0.025em;
}
@media (min-width: 768px) { .quote blockquote { font-size: 1.875rem; line-height: 2.25rem; } }

.cta p { color: hsl(var(--primary-foreground) / 0.7); margin: 1rem auto 0; max-width: 32rem; }
.cta .btn { margin-top: 2rem; }

/* ---------- Team ---------- */
.team { margin-top: 4rem; }
.member { display: grid; gap: 3rem; align-items: start; }
.member + .member { margin-top: 6rem; }
.member__photo { position: relative; isolation: isolate; }
.member__photo::before {
  content: ""; position: absolute; inset: -0.75rem; z-index: -1;
  background-color: hsl(var(--accent)); border-radius: 1rem;
}
.member__photo img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 1rem; box-shadow: var(--shadow-md);
}
.member .eyebrow { margin-bottom: 0.5rem; }
.member h3 {
  font-family: var(--font-heading); font-size: 1.5rem; line-height: 2rem; font-weight: 600;
  margin-bottom: 1.5rem;
}
.member .prose { margin-bottom: 1rem; }
.member .link-arrow { margin-top: 1rem; }
@media (min-width: 768px) {
  .member { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .member__media { grid-column: span 2 / span 2; }
  .member__body { grid-column: span 3 / span 3; }
  .member--reverse .member__media { order: 2; }
  .member--reverse .member__body { order: 1; }
  .member h3 { font-size: 1.875rem; line-height: 2.25rem; }
}

/* ---------- Services ---------- */
.offerings { display: grid; gap: 1.25rem; margin-top: 3rem; }
.offering {
  display: flex; align-items: center; gap: 1rem;
  background-color: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.5);
  border-radius: 1rem; padding: 1.5rem;
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
  transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.offering:hover { box-shadow: var(--shadow-md); }
.block { margin-top: 5rem; }
.block > .subheading { text-align: center; margin-bottom: 1.5rem; }
.block--wide > .subheading { margin-bottom: 2rem; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.chip {
  background-color: hsl(var(--accent)); color: hsl(var(--accent-foreground));
  padding: 0.625rem 1.25rem; border-radius: 9999px;
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500;
}
.specialties { display: grid; gap: 1rem; max-width: 56rem; margin: 0 auto; }
.specialty {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem;
  border-radius: 0.75rem; background-color: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.5);
  font-size: 0.875rem; line-height: 1.625;
}
.specialty__num {
  font-family: var(--font-heading); font-size: 1.5rem; line-height: 1; font-weight: 700;
  color: hsl(var(--primary) / 0.3); margin-top: 0.125rem;
}
@media (min-width: 640px) {
  .offerings, .specialties { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- FAQ ---------- */
.faq { margin-top: 3rem; }
.faq__row + .faq__row { margin-top: 0.75rem; }
.faq__item {
  background-color: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.5);
  border-radius: 0.75rem; padding: 0 1.5rem;
  transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq__item.is-open { box-shadow: var(--shadow-md); }
.faq__item h3 { display: flex; }
.faq__trigger {
  flex: 1 1 0%; display: flex; align-items: center; justify-content: space-between;
  text-align: left; padding: 1.25rem 0;
  font-family: var(--font-heading); font-size: 1rem; line-height: 1.5rem; font-weight: 500;
}
.faq__trigger .icon {
  color: hsl(var(--muted-foreground)); transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq__trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.faq__panel { overflow: hidden; transition: height 0.2s ease-out; }
.faq__panel p {
  font-size: 0.875rem; line-height: 1.625; color: hsl(var(--muted-foreground)); padding-bottom: 1.25rem;
}
.after-note { margin-top: 4rem; }
.after-note p { color: hsl(var(--muted-foreground)); margin-bottom: 1rem; }
@media (min-width: 768px) { .faq__trigger { font-size: 1.125rem; line-height: 1.75rem; } }

/* ---------- Contact ---------- */
.contact { display: grid; gap: 3rem; margin-top: 3rem; }
/* On phones the form comes first and the contact details follow; side by side from tablet up. */
.contact__form { order: -1; }
.contact__info > * + * { margin-top: 1.5rem; }
.contact__info a { display: block; border-radius: 0.75rem; transition: box-shadow 0.15s cubic-bezier(0.4, 0, 0.2, 1); }
.contact__info a:hover { box-shadow: var(--shadow-md); }
.info-card {
  display: flex; align-items: flex-start; gap: 1rem; padding: 1.25rem;
  border-radius: 0.75rem; background-color: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.5);
}
.info-card__label {
  font-size: 0.75rem; line-height: 1rem; color: hsl(var(--muted-foreground));
  letter-spacing: 0.025em; text-transform: uppercase;
}
.info-card__value { font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; margin-top: 0.25rem; }
.form {
  background-color: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.5);
  border-radius: 1rem; padding: 2rem;
}
.form > * + * { margin-top: 1.25rem; }
.form__row { display: grid; gap: 1.25rem; }
.field > * + * { margin-top: 0.5rem; }
.field label {
  font-size: 0.75rem; line-height: 1rem; font-weight: 500;
  letter-spacing: 0.025em; color: hsl(var(--muted-foreground)); text-transform: uppercase;
}
.field input, .field textarea {
  display: flex; width: 100%; border-radius: calc(0.75rem - 2px);
  border: 1px solid hsl(var(--border)); background-color: hsl(var(--background));
  font-size: 1rem; line-height: 1.5rem; box-shadow: var(--shadow-sm); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input { height: 2.25rem; padding: 0.25rem 0.75rem; }
.field textarea { min-height: 60px; padding: 0.5rem 0.75rem; resize: none; }
.field input:focus-visible, .field textarea:focus-visible { box-shadow: 0 0 0 1px hsl(var(--ring)); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: hsl(var(--destructive)); box-shadow: 0 0 0 1px hsl(var(--destructive));
}
.field__error { font-size: 0.75rem; line-height: 1rem; color: hsl(0 72% 42%); }
.field input.is-shaking { animation: shake 0.35s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.form-success {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background-color: hsl(var(--card)); border: 1px solid hsl(var(--border) / 0.5);
  border-radius: 1rem; padding: 2rem; outline: none;
  animation: success-in 0.4s ease-out;
}
.form-success__icon {
  width: 4.5rem; height: 4.5rem; border-radius: 9999px; margin-bottom: 1.5rem;
  background-color: hsl(var(--accent)); color: hsl(var(--primary));
  display: flex; align-items: center; justify-content: center;
}
.form-success__icon .icon { width: 2.25rem; height: 2.25rem; }
.form-success p { color: hsl(var(--muted-foreground)); font-size: 1.125rem; line-height: 1.75rem; margin-top: 0.75rem; }
.form-success .link-arrow { margin-top: 2rem; }
@keyframes success-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}
.form__submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; height: 2.25rem; padding: 0 1rem; border-radius: 9999px; white-space: nowrap;
  background-color: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 500; letter-spacing: 0.025em;
  box-shadow: var(--shadow); transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.form__submit:hover { background-color: hsl(var(--primary) / 0.9); }
.form__submit:disabled { pointer-events: none; opacity: 0.5; }
.form__submit .icon { margin-left: 0.5rem; }
@media (min-width: 640px) { .form__row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 768px) {
  .contact { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .contact__info { grid-column: span 2 / span 2; }
  .contact__form { grid-column: span 3 / span 3; order: 0; }
  .field input, .field textarea { font-size: 0.875rem; line-height: 1.25rem; }
}

/* ---------- Toast ---------- */
.toaster {
  position: fixed; z-index: 100; bottom: 1.5rem; right: 1.5rem; left: 1.5rem;
  display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 0.5rem; width: 356px; max-width: 100%;
  padding: 1rem; border-radius: 8px; border: 1px solid hsl(0 0% 93%);
  background: #fff; color: hsl(0 0% 9%); font-size: 13px; line-height: 1.5; font-weight: 500;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.1);
  opacity: 0; transform: translateY(1rem); transition: opacity 0.4s ease, transform 0.4s ease;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast--error { color: hsl(0 72% 42%); }

/* ---------- Footer ---------- */
.footer { background-color: hsl(var(--foreground)); color: hsl(var(--primary-foreground)); }
.footer__inner { max-width: 72rem; margin: 0 auto; padding: 4rem 1.5rem; }
.footer__grid { display: grid; gap: 3rem; }
.footer h3 {
  font-family: var(--font-heading); font-size: 1.5rem; line-height: 2rem; font-weight: 600; margin-bottom: 1rem;
}
.footer h4 {
  font-size: 0.875rem; line-height: 1.25rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 1rem; opacity: 0.5;
}
.footer p, .footer__list > * { font-size: 0.875rem; line-height: 1.25rem; opacity: 0.7; }
.footer p { line-height: 1.625; }
.footer__list > * { display: flex; align-items: center; gap: 0.75rem; transition: opacity 0.15s; }
.footer__list > * + * { margin-top: 0.75rem; }
.footer__list a:hover { opacity: 1; }
.footer__bottom {
  border-top: 1px solid hsl(var(--primary-foreground) / 0.1);
  margin-top: 3rem; padding-top: 2rem; text-align: center;
}
.footer__bottom p { font-size: 0.75rem; line-height: 1rem; opacity: 0.4; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- 404 ---------- */
.not-found { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8rem 1.5rem 6rem; }
.not-found .btn { margin-top: 2rem; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .faq__panel, .nav__mobile, .toast { transition: none; }
  .field input.is-shaking, .form-success { animation: none; }
}
