/* =========================================================================
   Spec Media — shared header + full-screen menu
   Used by the landing page and the About / Contact pages. Variables are
   prefixed --h- so they never collide with a page's own tokens.
   ========================================================================= */
:root {
  --h-ink: #0a0909;
  --h-red: #e11d34;
  --h-pill: rgba(10, 9, 9, .9);
  --h-ease: cubic-bezier(.22, 1, .36, 1);
  --h-height: 76px;
  --h-gutter: clamp(18px, 3.4vw, 48px);
  --h-font: 'Lama Sans', 'Helvetica Neue', Arial, system-ui, sans-serif;
}
html.is-rtl { --h-font: 'Cairo', 'Lama Sans', 'Segoe UI', Tahoma, sans-serif; }

.hdr, .menu { font-family: var(--h-font); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.hdr a, .menu a { text-decoration: none; color: inherit; }
.hdr button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }

.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 500;
  display: flex; justify-content: center;
  padding: 0; pointer-events: none;
  transition: padding .6s var(--h-ease);
}
.hdr__bar {
  pointer-events: auto;
  width: 100%; max-width: 2400px;
  height: var(--h-height);
  padding-inline: var(--h-gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  border-radius: 0;
  color: var(--h-ink);
  background: rgba(10, 9, 9, 0);
  border: 1px solid rgba(255, 255, 255, 0);
  -webkit-backdrop-filter: blur(0px); backdrop-filter: blur(0px);
  transition: max-width .6s var(--h-ease), height .6s var(--h-ease), padding .6s var(--h-ease),
              border-radius .6s var(--h-ease), background-color .45s ease, color .35s ease,
              border-color .45s ease, backdrop-filter .45s ease, -webkit-backdrop-filter .45s ease;
}
.hdr__side { display: flex; align-items: center; gap: clamp(22px, 3vw, 44px); font-weight: 500; font-size: 13.5px; letter-spacing: .005em; transition: gap .6s var(--h-ease), font-size .6s var(--h-ease); }
.hdr__side--end { justify-content: flex-end; }
.hdr__side a { position: relative; opacity: .92; transition: opacity .2s ease; }
.hdr__side a:hover { opacity: 1; }
.hdr__side a::after {
  content: ''; position: absolute; inset: auto 0 -5px 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .4s var(--h-ease);
}
.hdr__side a:hover::after { transform: scaleX(1); }
.hdr__logo { display: block; line-height: 0; transition: transform .6s var(--h-ease); }
.hdr__logo img { display: block; height: 15px; width: auto; max-width: none; transition: height .6s var(--h-ease), filter .35s ease; }
/* the logo is white: invert it where the bar sits on a light picture */
.hdr:not(.hdr--auto)[data-state="top"] .hdr__logo img, .hdr--auto.is-light[data-state="top"] .hdr__logo img { filter: brightness(0); }

.hdr__menu { width: 22px; height: 16px; display: grid; align-content: center; gap: 4px; margin-inline-start: 4px; }
.hdr__menu span { display: block; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .45s var(--h-ease), opacity .25s ease; }
.hdr__menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.hdr__menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hdr__menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* Scrolled: the bar shrinks into a compact black pill */
.hdr[data-state="pill"] { padding-top: 14px; }
.hdr[data-state="pill"] .hdr__bar {
  max-width: min(800px, calc(100vw - 24px));
  height: 68px;
  border-radius: 8px;
  padding-inline: clamp(22px, 2.6vw, 38px);
  color: #fff;
  background-color: rgba(14, 12, 13, .52);
  border-color: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 12px 36px rgba(0, 0, 0, .28);
}
.hdr[data-state="pill"] .hdr__side { gap: clamp(20px, 2.4vw, 34px); font-size: 14px; }
.hdr[data-state="pill"] .hdr__logo img { height: 14px; }
.hdr[data-state="menu"] .hdr__bar { color: #fff; }
.hdr[data-state="menu"] .hdr__side a { opacity: 0; pointer-events: none; }

/* Pages that open on a dark picture start with white ink; the page script
   adds .is-light while the header sits over a light section instead. */
.hdr--auto:not(.is-light)[data-state="top"] .hdr__bar { color: #fff; }

/* Floating menu: a glass card that grows out of the header's centre, same material as the header pill */
.menu {
  position: fixed; inset: 0; z-index: 450; color: #fff; display: flex; justify-content: center; align-items: flex-start; padding: calc(var(--h-height) + 6px) 14px 14px;
  background: transparent; visibility: hidden; pointer-events: none; transition: visibility 0s linear .6s;
}
.menu.is-open { visibility: visible; pointer-events: auto; transition: visibility 0s; }
.menu__card {
  position: relative; width: min(420px, 100%); max-height: calc(100% - 6px); overflow: auto; border-radius: 10px; padding: 14px 20px 12px; transform-origin: 50% 0;
  background-color: rgba(14, 12, 13, .52); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); box-shadow: 0 12px 36px rgba(0, 0, 0, .28);
  clip-path: inset(0 34% 100% 34% round 10px); opacity: 0; transform: translateY(-14px) scale(.82);
  transition: clip-path .6s var(--h-ease), transform .7s var(--h-ease), opacity .35s ease; scrollbar-width: none;
}
.menu__card::-webkit-scrollbar { display: none; }
.menu.is-open .menu__card { clip-path: inset(0 0 0 0 round 10px); opacity: 1; transform: none; }
.menu__head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; }
.menu__head p { margin: 0 auto; font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: rgba(255, 255, 255, .55); transform: translateX(18px); }
html.is-rtl .menu__head p { letter-spacing: 0; text-transform: none; transform: translateX(-18px); }
.menu__x { width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .25s ease, transform .4s var(--h-ease); }
.menu__x:hover { background: rgba(255, 255, 255, .12); transform: rotate(90deg); }
.menu__x svg { width: 18px; height: 18px; }
.menu__links { display: grid; justify-items: center; gap: 2px; margin: clamp(6px, 1.6vh, 14px) 0 clamp(10px, 2vh, 18px); }
.menu__links a {
  display: block; padding: 8px 14px; font-size: clamp(26px, 4.2vh, 34px); font-weight: 500; letter-spacing: -.02em; line-height: 1.15; text-align: center;
  transform: translateY(18px); opacity: 0; transition: transform .7s var(--h-ease), opacity .5s ease, color .2s ease;
}
html.is-rtl .menu__links a { letter-spacing: 0; }
.menu__links a span { display: none; }
.menu__links a:hover, .menu__links a.is-current { color: #ff6b7a; }
.menu.is-open .menu__links a { transform: none; opacity: 1; }
.menu.is-open .menu__links a:nth-child(1) { transition-delay: .12s; }
.menu.is-open .menu__links a:nth-child(2) { transition-delay: .17s; }
.menu.is-open .menu__links a:nth-child(3) { transition-delay: .22s; }
.menu.is-open .menu__links a:nth-child(4) { transition-delay: .27s; }
.menu__foot { display: grid; justify-items: center; gap: 4px; margin-bottom: 16px; font-size: 14px; color: rgba(255, 255, 255, .65); }
.menu__foot a { padding: 4px 8px; }
.menu__foot a:hover { color: #fff; }
.menu__lang { color: #fff; font-weight: 600; }
.menu__shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 -8px 0; padding: 0; }
.menu__shots a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: #15111a; transition: transform .5s var(--h-ease); }
.menu__shots a:nth-child(2) { transform: translateY(-6px); }
.menu__shots a:hover { transform: translateY(-8px) scale(1.04); }
.menu__shots img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 860px) {
  :root { --h-height: 64px; }
  .hdr__bar { grid-template-columns: auto 1fr; }
  .hdr__side--start { display: none; }
  .hdr__side--end a { display: none; }
  .hdr__side--end { grid-column: 2; }
  .hdr__logo { grid-column: 1; grid-row: 1; }
  .hdr[data-state="pill"] { padding-inline: 12px; }
  .hdr[data-state="pill"] .hdr__bar { max-width: 100%; height: 56px; padding-inline: 18px; }
  .hdr__side { font-size: 13px; }
}
