/* ==========================================================================
   Lumeirs — Healthcare Professional Partnerships
   Renaissance gallery on putty paper, adapted for Lumeirs (light/lumière)
   ========================================================================== */

:root {
  color-scheme: light;

  /* ---------- Colors ---------- */
  --color-putty: #e7e5e4;
  --color-ink: #000000;
  --color-bone: #e7e5e4;
  --color-chalk: #ebebeb;
  --color-vellum: #dfdcd5;
  --color-graphite: #595855;
  --color-ash: #808080;
  --color-paper: #ffffff;

  /* ---------- Type families ---------- */
  --font-display: "Fraunces", "Playfair Display", Georgia, serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ---------- Type scale ---------- */
  --text-body-sm: 0.9375rem;   /* 15px */
  --text-subheading: 1.375rem; /* 22px */
  --text-heading-sm: 1.625rem; /* 26px */
  --text-heading: 2.6875rem;   /* 43px */
  --text-heading-lg: 3.25rem;  /* 52px */

  /* ---------- Spacing (4px base) ---------- */
  --space-4: 0.25rem;
  --space-16: 1rem;
  --space-20: 1.25rem;
  --space-28: 1.75rem;
  --space-32: 2rem;
  --space-36: 2.25rem;
  --space-40: 2.5rem;
  --space-52: 3.25rem;
  --space-60: 3.75rem;
  --space-96: 6rem;
  --space-168: 10.5rem;

  /* ---------- Layout ---------- */
  --wrap: 1240px;
  --section-gap: 5rem;
  --card-padding: 1.5rem;

  /* ---------- Radius ---------- */
  --radius-cards: 9px;
  --radius-links: 2px;
  --radius-buttons: 28.8px;

  /* ---------- Motion ---------- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 160ms;
  --dur-base: 420ms;
}

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

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

body {
  margin: 0;
  background: var(--color-putty);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 0.98;
  margin: 0;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-16);
  z-index: 1000;
  padding: var(--space-16) var(--space-20);
  background: var(--color-ink);
  color: var(--color-paper);
  border-radius: var(--radius-links);
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus {
  top: var(--space-16);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-32);
}

@media (min-width: 768px) {
  .wrap {
    padding-inline: var(--space-40);
  }
}

section {
  position: relative;
}

.section-pad {
  padding-block: var(--section-gap);
}

@media (min-width: 860px) {
  .section-pad {
    padding-block: 7rem;
  }
}

/* Paired corner labels above a section heading */
.section-frame {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-16);
  margin-bottom: var(--space-52);
}

.section-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 9px 26px;
  border-radius: var(--radius-buttons);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: var(--color-ink);
  color: var(--color-paper);
  transition: opacity var(--dur-fast) var(--ease-out);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
}

.btn:hover,
.btn:focus-visible {
  opacity: 0.78;
}

.btn.btn-block {
  border-radius: var(--radius-buttons);
  clip-path: none;
}

.btn-ghost {
  background: none;
  color: var(--color-paper);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.link {
  font-size: 0.8125rem;
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.link:hover,
.link:focus-visible {
  border-color: currentColor;
}

/* ---------- Header ---------- */
.site-header {
  padding-block: var(--space-32);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-20);
}

.brand-mark {
  display: inline-flex;
  width: 34px;
  flex-shrink: 0;
}

.brand-mark img {
  width: 100%;
  height: auto;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-36);
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.nav-links a {
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  border-color: currentColor;
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  gap: 6px;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--color-ink);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out), width var(--dur-fast) var(--ease-out);
}

.nav-toggle span:nth-child(2) {
  width: 70%;
}

.nav-toggle.open span {
  width: 100%;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  flex-direction: column;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: var(--space-16) var(--space-32);
  border-top: 1px solid var(--color-vellum);
  font-size: 0.9375rem;
}

.mobile-nav a:last-child {
  border-bottom: 1px solid var(--color-vellum);
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .mobile-nav {
    display: none !important;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  padding-top: var(--space-96);
  padding-bottom: var(--space-40);
  overflow-x: hidden;
  background: var(--color-putty);
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-graphite);
}

.hero-inner {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: var(--space-16);
  max-width: 40rem;
  margin-inline: auto;
}

.hero-inner h1 {
  font-size: clamp(1.75rem, 1.3rem + 2.4vw, 2.75rem);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.hero-inner h1 em {
  font-style: italic;
  font-weight: 400;
}

.hero-subhead {
  font-family: var(--font-display);
  font-size: clamp(1.0625rem, 0.9rem + 0.8vw, 1.375rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-graphite);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-28);
  font-size: 0.875rem;
  font-weight: 500;
}

.hero-cta {
  margin-top: var(--space-4);
}

.hero-wordmark-wrap {
  position: relative;
  width: min(83vw, 1360px);
  margin-inline: auto;
  margin-top: var(--space-96);
  padding-top: var(--space-20);
  line-height: 0;
}

.hero-wordmark {
  width: 100%;
  display: block;
}

.hero-corner-art {
  position: absolute;
  top: -35%;
  z-index: 2;
  width: clamp(60px, 18vw, 242px);
  pointer-events: none;
}

.hero-corner-art img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  display: block;
}

.hero-corner-left {
  left: -6%;
}

.hero-corner-right {
  right: -6%;
}

/* ---------- Scroll story (pinned, 3-stage) ---------- */
.story-wrapper {
  position: relative;
  z-index: 2;
  height: 340vh;
  background: var(--color-putty);
}

.story-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.story-video {
  position: absolute;
  inset: 0;
  background: var(--color-putty);
}

.story-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  background: var(--color-putty);
}

.notched-card {
  clip-path: polygon(
    22px 0, calc(100% - 22px) 0, 100% 22px,
    100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%,
    0 calc(100% - 22px), 0 22px
  );
  background: var(--color-ink);
  color: var(--color-paper);
}

.story-card {
  position: relative;
  z-index: 2;
  width: min(400px, 84vw);
  padding: var(--card-padding);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
}

.story-card-inner {
  position: relative;
  flex: 1;
}

.story-text {
  position: absolute;
  inset: var(--card-padding) var(--card-padding) 56px var(--card-padding);
  opacity: 0;
  transform: translateY(16px);
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

.story-text h3 {
  font-size: 1.375rem;
  line-height: 1.25;
  font-weight: 400;
}

.story-text p {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-bone);
}

.story-progress {
  position: absolute;
  left: var(--card-padding);
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  color: var(--color-vellum);
}

.story-dashes {
  display: flex;
  gap: 4px;
}

.story-dashes span {
  width: 10px;
  height: 2px;
  background: var(--color-graphite);
  transition: background var(--dur-base) var(--ease-out), width var(--dur-base) var(--ease-out);
}

.story-dashes span.active {
  background: var(--color-paper);
  width: 20px;
}

/* ---------- Dark statement ---------- */
.transition-dark {
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-168) var(--space-32);
  text-align: center;
}

.transition-dark h2 {
  font-size: clamp(1.875rem, 1.2rem + 3.4vw, 3.25rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.transition-dark h2 em {
  font-style: italic;
  font-weight: 400;
}

.transition-dark p {
  max-width: 32rem;
  margin: var(--space-20) auto 0;
  font-size: 0.9375rem;
  color: var(--color-vellum);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.99s var(--ease-out), transform 0.99s var(--ease-out);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- One team / audience strip ---------- */
.strategies {
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-96) var(--space-32) var(--space-60);
}

.strategies-grid {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  gap: var(--space-40);
  max-width: 700px;
  margin-inline: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: var(--space-40);
}

.strategies-grid h2 {
  font-size: clamp(1.5rem, 1rem + 2.2vw, 2.125rem);
  font-weight: 400;
  line-height: 1.25;
}

.strategies-grid p {
  font-size: 0.875rem;
  color: var(--color-vellum);
  max-width: 480px;
}

.audience-strip {
  margin-top: var(--space-96);
  text-align: center;
}

.audience-strip .section-label {
  display: block;
  margin-bottom: var(--space-28);
  color: var(--color-vellum);
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-60);
  max-width: 1100px;
  margin-inline: auto;
  text-align: left;
}

.audience-col h3 {
  font-weight: 400;
  font-size: 1.625rem;
  color: var(--color-paper);
  margin-bottom: var(--space-16);
  min-height: 3.25rem;
}

.audience-tagline {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--color-paper);
  margin-bottom: var(--space-16);
}

.audience-col {
  display: flex;
  flex-direction: column;
}

.audience-col > p {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-vellum);
  margin-bottom: var(--space-20);
}

.audience-col .btn {
  margin-top: auto;
  align-self: flex-start;
}

@media (max-width: 760px) {
  .audience-grid {
    grid-template-columns: 1fr;
    gap: var(--space-40);
    text-align: center;
  }

  .audience-col h3 {
    min-height: 0;
  }

  .audience-col .btn {
    margin-top: var(--space-20);
    align-self: center;
  }
}

/* ---------- Services explained ---------- */
.explained {
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-60) var(--space-32);
}

.explained-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-16);
  margin-bottom: var(--space-60);
  color: var(--color-vellum);
}

.explained-header h2 {
  font-size: clamp(1.875rem, 1rem + 4.4vw, 3.75rem);
  text-align: center;
  flex: 1;
  line-height: 1.1;
  color: var(--color-paper);
}

.explained-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-32);
  max-width: 1100px;
  margin-inline: auto;
}

.explained-col {
  text-align: center;
}

.explained-eyebrow {
  display: block;
  margin-bottom: var(--space-16);
  color: var(--color-vellum);
}

.explained-col h3 {
  font-weight: 400;
  font-size: 1.25rem;
  margin-bottom: var(--space-20);
}

.vignette {
  width: 168px;
  height: 168px;
  border-radius: 50%;
  margin-inline: auto;
  overflow: hidden;
  flex-shrink: 0;
}

.vignette img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explained-toggle-wrap {
  margin-top: var(--space-20);
  display: flex;
  justify-content: center;
}

.hex-toggle {
  position: relative;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(231, 229, 228, 0.85);
  clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
  transition: transform var(--dur-base) var(--ease-out), background var(--dur-fast) var(--ease-out);
}

.hex-toggle::before,
.hex-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--color-ink);
}

.hex-toggle::before {
  width: 12.6px;
  height: 2px;
  transform: translate(-50%, -50%);
}

.hex-toggle::after {
  width: 2px;
  height: 12.6px;
  transform: translate(-50%, -50%);
  transition: opacity var(--dur-fast) var(--ease-out);
}

.hex-toggle:hover,
.hex-toggle:focus-visible {
  background: #ffffff;
}

.hex-toggle.open::after {
  opacity: 0;
}

.explained-detail {
  max-height: 0;
  opacity: 0;
  transform: translateY(10px);
  overflow: hidden;
  transition: max-height var(--dur-base) var(--ease-out), opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--color-vellum);
  margin-top: var(--space-16);
}

.explained-col.open .explained-detail {
  max-height: 160px;
  opacity: 1;
  transform: translateY(0);
}

/* ---------- How it works (zigzag cards) ---------- */
.use-cases {
  background: var(--color-ink);
  color: var(--color-paper);
  padding: var(--space-96) var(--space-32) var(--space-168);
}

.use-cases > .section-label {
  display: block;
  text-align: left;
  max-width: 1100px;
  margin: 0 auto var(--space-40);
  color: var(--color-vellum);
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-20);
  max-width: 1100px;
  margin-inline: auto;
}

.zigzag-card {
  background: var(--color-ink);
  color: var(--color-paper);
  clip-path: polygon(
    0% 10%, 10% 0%, 22% 10%, 34% 0%, 46% 10%, 50% 4%, 54% 10%,
    66% 0%, 78% 10%, 90% 0%, 100% 10%,
    100% 100%, 0% 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-top: none;
}

.use-case-card {
  padding: 52px var(--space-20) var(--space-28);
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-4);
}

.use-case-number {
  display: block;
  margin-bottom: var(--space-16);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-vellum);
}

.use-case-card h3 {
  font-weight: 400;
  font-size: 1.1875rem;
  line-height: 1.3;
  margin-bottom: var(--space-4);
}

.use-case-card p {
  font-size: 0.8125rem;
  color: var(--color-vellum);
  line-height: 1.5;
}

/* ---------- Closing CTA ---------- */
.closing {
  background: var(--color-chalk);
  padding: var(--space-168) var(--space-32);
  text-align: center;
}

.closing h2 {
  font-size: clamp(2rem, 1.2rem + 4.6vw, 3.625rem);
  line-height: 1.1;
}

.closing h2 em {
  font-style: italic;
  font-weight: 400;
}

.closing-lede {
  max-width: 34rem;
  margin: var(--space-20) auto 0;
  font-size: 1rem;
  color: var(--color-graphite);
}

.closing-footer {
  margin-top: var(--space-96);
  display: flex;
  justify-content: center;
}

@media (max-width: 760px) {
  .strategies-grid,
  .explained-grid,
  .use-cases-grid {
    grid-template-columns: 1fr;
  }

  .story-card {
    width: 88vw;
  }

  .explained-header {
    flex-direction: column;
    align-items: center;
    gap: var(--space-16);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- Contact ---------- */
.contact-section {
  background: var(--color-chalk);
}

.contact-grid {
  display: grid;
  gap: var(--space-52);
  max-width: 1080px;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-96);
  }
}

.contact-copy h2 {
  font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem);
  margin-bottom: var(--space-20);
}

.contact-copy p {
  font-size: 1.0625rem;
  color: var(--color-graphite);
  max-width: 42ch;
  margin-bottom: var(--space-32);
}

.contact-direct {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-28);
}

.contact-email {
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 1px solid var(--color-ink);
  padding-bottom: 2px;
}

.contact-form {
  display: grid;
  gap: var(--space-20);
}

.form-row-2 {
  display: grid;
  gap: var(--space-20);
}

@media (min-width: 520px) {
  .form-row-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-graphite);
}

.required-mark {
  color: var(--color-ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-vellum);
  border-radius: 0;
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: border-color var(--dur-fast) var(--ease-out);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23595855' stroke-width='1.5'%3E%3Cpath d='M5 7l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right center;
  background-size: 14px;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: none;
  border-color: var(--color-ink);
}

.field-error {
  font-size: 0.75rem;
  color: var(--color-graphite);
  min-height: 1em;
}

.form-status {
  font-size: 0.8125rem;
  min-height: 1.4em;
  color: var(--color-graphite);
}

.btn-block {
  width: 100%;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--space-32);
  border-top: 1px solid var(--color-vellum);
  background: var(--color-chalk);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
  align-items: flex-start;
  font-size: 0.8125rem;
  color: var(--color-graphite);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.footer-brand {
  width: 96px;
}

.footer-links a {
  border-bottom: 1px solid transparent;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  border-color: currentColor;
}
