/* Home page only: the company-first chapters (work, about, contact) and
   the adjustments that let the shared hero and fields components carry a
   headline-first composition. Loaded after cinematic.css. The shared
   base.css, style.css and app.js are unchanged and still serve /myoload/. */

/* ---------------------------------------------------------------
   HERO: the headline leads; the emblem is a supporting element.
   --------------------------------------------------------------- */
.hero-inner {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
}

.hero-stage {
  min-height: 22rem;
}

.hero-emblem {
  width: min(100%, 21rem);
}

.hero-intro {
  max-width: 42ch;
}

/* Who the site is for: one line under the intro, a step brighter. */
.hero-audience {
  max-width: 42ch;
  font-size: var(--text-base);
  color: var(--color-text);
}

/* ---------------------------------------------------------------
   LAUNCH STATUS: MyoLoad availability with a "Get notified" link.
   Used in the hero, the MyoLoad vignette and the contact block.
   --------------------------------------------------------------- */
.launch-status {
  max-width: 46ch;
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.launch-status a {
  color: var(--color-text);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--color-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
  white-space: nowrap;
}

.launch-status a:hover {
  color: var(--color-primary);
}

/* ---------------------------------------------------------------
   WORK: one product vignette and one editorial feature.
   --------------------------------------------------------------- */
.work-section {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-block: var(--section-y) clamp(4rem, 9vh, 7rem);
}

.work-heading {
  display: grid;
  gap: 1.1rem;
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.work-heading h2 {
  font-size: var(--text-2xl);
}

.work-heading > p:last-child {
  color: var(--color-muted);
  max-width: 58ch;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.25rem, 2.5vw, 2rem);
  align-items: stretch;
}

.work-product,
.work-editorial {
  border: 1px solid var(--signal-edge);
  border-radius: var(--radius-card);
  background: linear-gradient(145deg, rgb(3 118 198 / 9%), transparent 48%), var(--color-surface);
  box-shadow: inset 0 1px rgb(101 186 250 / 15%), 0 24px 65px -40px rgb(0 0 0 / 35%);
  overflow: clip;
}

.work-product {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
}

.work-phone {
  width: min(100%, 15rem);
  justify-self: center;
}

/* The second product (Helix Log) takes a full row under the first two cards. */
.work-product-wide {
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 0.3fr) minmax(0, 0.7fr);
}

.work-product-wide .work-product-copy {
  max-width: 44rem;
}

/* The phone drifts a little against the scroll, so the product sits
   in the same depth as the film still beside it. */
@supports (animation-timeline: view()) {
  @media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
    .work-phone {
      animation: phone-drift linear both;
      animation-timeline: view(block);
    }
  }
}

@keyframes phone-drift {
  from { transform: translate3d(0, 1.5rem, 0); }
  to { transform: translate3d(0, -1.5rem, 0); }
}

.work-phone figcaption {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  padding: 0.3rem 0.75rem;
  font-family: var(--signal-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #f2f8fc;
  background: rgb(6 6 34 / 78%);
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: var(--radius-pill);
}

.work-product-copy,
.work-editorial-copy {
  display: grid;
  gap: 1rem;
  justify-items: start;
}

.work-product-copy h3,
.work-editorial-copy h3 {
  font-size: clamp(1.6rem, 1.1rem + 1.7vw, 2.5rem);
  line-height: 1.03;
}

.work-product-copy > p:not(.eyebrow),
.work-editorial-copy > p:not(.eyebrow) {
  color: var(--color-muted);
}

.work-product-copy .hero-actions {
  margin-top: 0.4rem;
}

/* The editorial feature carries the still as a scene, with the copy
   sitting on a scrim so the type stays readable in both themes. */
.work-editorial {
  position: relative;
  display: grid;
  align-content: end;
  min-height: 28rem;
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  isolation: isolate;
}

.work-editorial-scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(0deg, #060622 24%, rgb(6 6 34 / 88%) 52%, rgb(6 6 34 / 18%) 82%),
    url("./assets/science-cinematic-poster.webp") 62% 35% / cover no-repeat;
  animation: cinema-camera 26s ease-in-out infinite alternate;
}

.work-editorial::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -10%;
  right: -10%;
  top: 34%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #65bafa, transparent);
  box-shadow: 0 0 16px #0376c6;
  transform: rotate(-9deg);
  opacity: 0.45;
}

[data-theme="light"] .work-editorial-scene {
  background:
    linear-gradient(0deg, #f4f8fb 24%, rgb(244 248 251 / 90%) 52%, rgb(244 248 251 / 22%) 82%),
    url("./assets/science-cinematic-poster.webp") 62% 35% / cover no-repeat;
}

[data-theme="light"] .work-editorial::before {
  opacity: 0.3;
}

[data-ambience-paused="true"] .work-editorial-scene {
  animation-play-state: paused;
}

/* ---------------------------------------------------------------
   FIELDS: three panels instead of four.
   --------------------------------------------------------------- */
.fields-heading p {
  max-width: 48ch;
}

.field-eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--color-primary);
}

/* The eyebrow names the field, so the signature's own label only
   shows on wide screens where it sits apart from the copy. */
@media (max-width: 1024px) {
  .field-signature .field-label {
    display: none;
  }
}

@media (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .pan-wrap {
      --pan-distance: calc(
        (3 * var(--panel-w)) + (2 * var(--pan-gap)) + (2 * var(--gutter)) - 100vw
      );
    }

    /* The shared stylesheet caps each panel at 80dvh and lets it scroll
       inside itself with scroll chaining off. On a laptop screen the
       panel is taller than that cap, so the wheel scrolls the panel and
       the page never moves. The panel is sized to fit instead. */
    .field-card {
      max-height: none;
      overflow: visible;
      overscroll-behavior: auto;
    }

    @media (max-height: 820px) {
      .pan-sticky {
        box-sizing: border-box;
        padding-top: var(--header-height);
      }

      .field-card {
        padding: clamp(1.25rem, 2.5vh, 2rem) clamp(1.5rem, 3vw, 2.5rem);
        gap: clamp(1.25rem, 3vw, 2.5rem);
      }

      .field-copy h3 {
        font-size: clamp(1.4rem, 2.6vh, 2rem);
      }

      .field-copy > p {
        font-size: var(--text-base);
      }

      .field-signature {
        width: min(100%, 15rem);
      }

      .field-evidence {
        gap: 0.6rem;
        padding-top: 0.75rem;
      }
    }

    @media (max-height: 680px) {
      .field-signature {
        width: min(100%, 11rem);
      }

      .field-copy > p {
        font-size: var(--text-sm);
      }
    }
  }
}

/* ---------------------------------------------------------------
   EVIDENCE: the peptide link sits under the standard.
   --------------------------------------------------------------- */
.research-copy .text-link {
  margin-top: 0.5rem;
}

/* ---------------------------------------------------------------
   ABOUT: a quiet editorial chapter with a horizon line.
   --------------------------------------------------------------- */
.about-section {
  position: relative;
  padding-block: var(--section-y);
  overflow: clip;
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.about-section::before {
  content: "";
  position: absolute;
  left: -10%;
  right: -10%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
  box-shadow: 0 0 35px rgb(3 118 198 / 40%);
  opacity: 0.25;
  transform: rotate(-6deg);
  pointer-events: none;
}

.about-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
  max-width: var(--content-wide);
  margin-inline: auto;
}

.about-inner .eyebrow {
  grid-column: 1 / -1;
}

.about-inner h2 {
  font-size: var(--text-2xl);
}

.about-copy {
  display: grid;
  gap: 1.1rem;
  padding-top: 0.5rem;
}

.about-copy p {
  font-size: var(--text-lg);
  color: var(--color-muted);
  max-width: 52ch;
}

.about-copy p:first-child {
  color: var(--color-text);
}

/* ---------------------------------------------------------------
   CONTACT: the join colour-block with the Netlify contact form.
   Inputs and the submit button come from .join-form in style.css;
   the rules here add the two-column layout, the select, the message
   box and the small print.
   --------------------------------------------------------------- */
.contact-layout {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-intro {
  display: grid;
  gap: 1.1rem;
  justify-items: start;
}

.contact-lead {
  font-size: var(--text-lg);
  color: rgb(255 255 255 / 96%);
  max-width: 34ch;
}

.contact-reply {
  font-weight: 700;
  color: #fff;
}

.contact-note a,
.contact-fallback a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.contact-note a {
  white-space: nowrap;
}

.contact-form {
  gap: 1rem;
  margin-top: 0;
  justify-self: stretch;
  width: 100%;
  max-width: 36rem;
}

.contact-field {
  display: grid;
  gap: 0.45rem;
}

.field-optional {
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  color: #fff;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  min-height: 3.1rem;
  font: inherit;
  color: #fff;
  background: rgb(4 34 56 / 46%);
  border: 1px solid rgb(255 255 255 / 42%);
  transition: border-color var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out);
}

.contact-form select {
  padding: 0.9rem 3rem 0.9rem 1.3rem;
  border-radius: var(--radius-pill);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #fff 50%),
    linear-gradient(135deg, #fff 50%, transparent 50%);
  background-position: calc(100% - 1.45rem) 52%, calc(100% - 1.1rem) 52%;
  background-size: 0.36rem 0.36rem;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Native option lists render on the system surface, so keep them dark-on-light. */
.contact-form option {
  color: #0b1a2b;
  background: #fff;
}

.contact-form textarea {
  padding: 0.9rem 1.3rem;
  border-radius: 1.25rem;
  resize: vertical;
}

.contact-form select:hover,
.contact-form textarea:hover {
  border-color: rgb(255 255 255 / 72%);
}

.contact-form select:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  background-color: rgb(4 34 56 / 62%);
}

.contact-form select[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-width: 2px;
  border-color: #fff;
  background-color: rgb(3 26 43 / 66%);
}

.field-hint {
  font-size: var(--text-xs);
  color: #fff;
}

.contact-form button {
  justify-self: start;
  min-height: 3.1rem;
  margin-top: 0.25rem;
}

.contact-form button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.contact-privacy,
.contact-fallback {
  font-size: var(--text-xs);
  color: #fff;
  max-width: 60ch;
}

/* Honeypot for bots: off-screen for people, ignored by assistive tech. */
.form-trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-form {
    max-width: none;
  }
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  min-height: 3.1rem;
  padding: 0.85rem 1.6rem;
  font-weight: 700;
  color: var(--brand-navy);
  background: #fff;
  border: 1px solid #fff;
  border-radius: var(--radius-pill);
  transition: transform var(--t-fast) var(--ease-out), background var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out);
}

.contact-button:hover,
.contact-button:focus-visible {
  background: var(--color-primary-bright);
  border-color: var(--color-primary-bright);
}

.contact-button:active {
  transform: scale(0.97);
}

.contact-button.is-ghost {
  color: #fff;
  background: transparent;
  border-color: rgb(255 255 255 / 55%);
}

.contact-button.is-ghost:hover,
.contact-button.is-ghost:focus-visible {
  color: var(--brand-navy);
  background: #fff;
  border-color: #fff;
}

.join-section .contact-button:focus-visible {
  outline-color: #fff;
}

.contact-note {
  max-width: 40ch;
  font-size: var(--text-sm);
  color: #fff;
}

/* ---------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 1100px) and (min-width: 901px) {
  .hero-stage {
    min-height: 18rem;
  }

  .hero-emblem {
    width: min(100%, 17rem);
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-editorial {
    min-height: 24rem;
  }
}

@media (max-width: 900px) {
  /* Poster first on narrow screens: the film scene and headline carry
     the hero, and the emblem is not repeated above the copy. */
  .hero-stage {
    display: none;
  }

  .hero-inner {
    min-height: max(34rem, 78svh);
    align-content: end;
  }

  .work-grid {
    grid-template-columns: 1fr;
  }

  .work-product {
    grid-template-columns: 1fr;
  }

  .work-phone {
    width: min(100%, 13rem);
  }

  .work-editorial {
    min-height: 30rem;
  }

  .work-editorial-scene,
  [data-theme="light"] .work-editorial-scene {
    background-size: auto, 150% auto;
    background-position: 0 0, 60% 0;
  }

  .about-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .work-editorial {
    min-height: 30rem;
  }

  .contact-button {
    flex: 1 1 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .work-editorial-scene {
    animation: none;
  }
}

/* Without app.js (blocked, failed, or disabled) nothing is hidden. */
html:not([data-enhanced]) .reveal,
html:not([data-enhanced]) [data-hero-part] {
  opacity: 1;
  transform: none;
}
