/* ==========================================================================
   Site header + 01 Hero
   ========================================================================== */

/* ---- header: a band a shade deeper than the photograph, closed by one fine rule ---- */
.site-header { position: absolute; z-index: 20; top: 0; left: 0; right: 0; height: var(--header); display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 0 var(--m); background: rgba(43, 75, 90, .46); border-bottom: 1px solid rgba(246, 244, 239, .2); }
.wordmark { display: inline-flex; align-items: center; padding: 8px 0; color: var(--bone); text-decoration: none; }
/* the official horizontal logo (inline, so it takes the text colour); sized by height, width follows the artwork */
.wordmark .logo { display: block; height: 40px; width: auto; aspect-ratio: 845 / 277; overflow: visible; fill: currentColor; }
.primary { display: flex; align-items: center; gap: 44px; margin: 0; padding: 0; list-style: none; }
.primary a { font-size: 16px; font-weight: 500; text-decoration: underline 2px transparent; text-underline-offset: 8px; padding: 10px 0; transition: text-decoration-color .25s var(--ease); }
.primary a:hover { text-decoration-color: var(--sage); }
.primary a.contact { margin-left: 4px; padding: 12px 22px; background: var(--bone); color: var(--slate); border-radius: 2px; text-decoration: none; font-weight: 600; transition: background-color .2s var(--ease), color .2s var(--ease); }
.primary a.contact:hover { background: var(--slate); color: var(--bone); }
.menu-btn { display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 18px; border: 0; border-radius: 2px; background: var(--bone); color: var(--slate); font-size: 15px; font-weight: 600; cursor: pointer; }
.menu-btn svg { width: 16px; height: 16px; }
.menu-btn .close { display: none; }
.menu-panel { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .site-header .wordmark, .primary li, .menu-btn { animation: rise .7s var(--ease) both; }
  .primary li:nth-child(2) { animation-delay: .04s; } .primary li:nth-child(3) { animation-delay: .08s; } .primary li:nth-child(4) { animation-delay: .12s; }
}

/* compact navigation: a Menu button opens a full-height Slate panel */
@media (max-width: 900px) {
  .site-header nav[aria-label="Primary"] { display: none; }
  .menu-btn { display: inline-flex; }
  .wordmark .logo { height: 34px; }
  .site-header.is-open { position: fixed; bottom: 0; height: auto; align-items: flex-start; flex-wrap: wrap; align-content: flex-start; padding-top: calc((var(--header) - 44px) / 2); background: var(--slate); border-bottom: 0; overflow-y: auto; }
  .site-header.is-open .menu-btn .open { display: none; }
  .site-header.is-open .menu-btn .close { display: block; }
  .site-header.is-open .menu-panel { display: block; width: 100%; padding: 48px 0 40px; }
  .menu-panel ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(246, 244, 239, .16); }
  .menu-panel li { border-bottom: 1px solid rgba(246, 244, 239, .16); }
  .menu-panel li a { display: flex; align-items: center; justify-content: space-between; min-height: 64px; font-family: var(--display); font-stretch: 92%; font-weight: 460; font-size: 28px; letter-spacing: -0.012em; text-decoration: none; }
  .menu-panel li a svg { width: 18px; height: 18px; color: var(--sage); }
  .menu-panel .btn { margin-top: 32px; width: 100%; justify-content: space-between; min-height: 56px; }
}
html.menu-open { overflow: hidden; }

/* ---- hero ----
   Every layer sits in one grid cell. The photograph is drawn on a 1440 x 900 plate that covers the hero and is
   anchored right, so --u (one plate unit in CSS pixels) lets the copy share the plate's scale: the headline's top
   and the button's bottom line up with the focus frame at any desktop size. */
.hero { position: relative; display: grid; grid-template: 1fr / 1fr; height: 100svh; min-height: 720px; max-height: 1000px; overflow: hidden; container-type: size; background: var(--ink); }
.hero > * { grid-area: 1 / 1; min-width: 0; }
.hero__plate, .hero__copy { --u: calc(max(100cqw, 160cqh) / 1440); --m: max(20px, 5.556cqw); }
.hero__plate { position: relative; overflow: hidden; }
.hero__plate svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.hero__copy { align-self: center; justify-self: start; z-index: 2; margin-left: var(--m); width: calc(619 * var(--u)); }
.hero__copy h1 { margin: 0; font-family: var(--display); font-stretch: 92%; font-weight: 480; font-size: calc(62 * var(--u)); line-height: 1.02; letter-spacing: -0.024em; text-wrap: balance; }
.hero__copy p { margin: calc(30 * var(--u)) 0 0; max-width: 29em; font-size: max(16px, calc(19 * var(--u))); line-height: 1.5; }
.hero__copy .btn { min-height: max(52px, calc(58 * var(--u))); margin-top: calc(35 * var(--u)); }

/* arrival: the room settles, the window resolves, the frame is drawn round it */
.hero .room { transform-box: view-box; }
@media (prefers-reduced-motion: no-preference) {
  .hero .room { animation: settle 2.6s var(--ease) both; }
  .hero .focus { animation: resolve 1.2s var(--ease) .25s both; }
  .hero .edge { stroke-dasharray: 1600; animation: draw 1.5s cubic-bezier(.6, .1, .2, 1) .5s both; }
  .hero__copy p { animation: rise .8s var(--ease) .2s both; }
  .hero__copy .btn { animation: rise .8s var(--ease) .28s both; }
}
@keyframes settle { from { transform: scale(1.025); } to { transform: none; } }
@keyframes resolve { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* tablets, phones and squarish windows: the photograph above (pharmacist and the focus frame kept in view),
   the copy on Slate below, so the words never sit on the product interaction */
@media (max-width: 900px), (max-aspect-ratio: 135/100) {
  .hero { height: auto; max-height: none; min-height: 0; container-type: inline-size; grid-template: auto auto / 1fr; background: var(--slate); }
  .hero__plate { grid-area: 1 / 1; height: clamp(360px, 64vw, 640px); }
  .hero__copy { grid-area: 2 / 1; align-self: start; width: auto; margin: 0; padding: 36px var(--m) 56px; }
  .hero__copy h1 { font-size: clamp(30px, 6.2cqw, 52px); line-height: 1.05; max-width: 15em; }
  .hero__copy p { margin-top: 18px; font-size: 17px; max-width: 32em; }
  .hero__copy .btn { min-height: 54px; margin-top: 28px; }
}
@media (max-width: 520px) { .hero__copy .btn { width: 100%; justify-content: space-between; } }
@media (max-width: 900px), (max-aspect-ratio: 135/100) { .hero__copy { padding-bottom: 48px; } }
