/* 01 HEADER / NAVBAR. Floating translucent panels + notched panel-grid menu (after 363sudbury.com). */
.hdr {
  --hdr-pad: 10px;
  --hdr-gap: 4px;
  --hdr-ph: calc(var(--header-h) - var(--hdr-pad) * 2);   /* panel height, 52px */
  --hdr-bg: rgba(13, 14, 16, .72);
  --hdr-bg-solid: rgba(13, 14, 16, .9);
  --hdr-bg-hover: rgba(34, 37, 42, .9);
  --hdr-hi: var(--signal-blue);
  --hdr-r: var(--radius);
  --hdr-blur: blur(12px);

  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  pointer-events: none;          /* gaps between panels let clicks through */
  color: var(--white);
  font-family: var(--font-sans);
}

/* ---------- Bar ---------- */
.hdr .hdr__bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--hdr-gap);
  height: var(--header-h);
  padding: var(--hdr-pad) var(--gutter);
  will-change: transform;
}
.hdr .hdr__bar > *, .hdr .hdr__cluster > * { pointer-events: auto; }

.hdr .hdr__panel {
  height: var(--hdr-ph);
  border-radius: var(--hdr-r);
  background: var(--hdr-bg);
  -webkit-backdrop-filter: var(--hdr-blur);
  backdrop-filter: var(--hdr-blur);
  overflow: hidden;
  transition: background-color .5s var(--ease-out), color .5s var(--ease-out);
}
.hdr.is-scrolled .hdr__panel { background: var(--hdr-bg-solid); }

/* Logo tile */
.hdr .hdr__logo { flex: 0 0 auto; }
.hdr .hdr__logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding-inline: 10px;
  overflow: hidden;
}
.hdr .hdr__logo-img {
  width: auto;
  height: calc((var(--hdr-ph) + 4px) * .62);   /* tight SVG logo */
  max-width: none;
  will-change: transform;
}
.hdr .hdr__logo-wrap { position: relative; display: block; }
.hdr .hdr__logo-img--mark { clip-path: inset(0 75% 0 0); }      /* emblem */
.hdr .hdr__logo-img--word { position: absolute; inset: 0 auto auto 0; clip-path: inset(0 0 0 25%); }  /* wordmark */
@media (hover: hover) { .hdr .hdr__logo:hover { background: var(--hdr-bg-hover); } }

/* Inline nav (desktop) */
.hdr .hdr__nav {
  display: none;
  margin-inline: auto;
  padding-inline: 6px;
}
.hdr .hdr__nav-list { display: flex; align-items: center; height: 100%; }
.hdr .hdr__link {
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1;
  transition: color .3s ease;
}
.hdr .hdr__roll {
  position: relative;
  display: block;
  height: 1.2em;
  overflow: hidden;
}
.hdr .hdr__roll-a, .hdr .hdr__roll-b {
  display: block;
  line-height: 1.2em;
  transition: transform .3s ease-in-out, opacity .3s ease-in-out;
}
.hdr .hdr__roll-b { position: absolute; inset: 0; transform: translateY(100%); opacity: 0; }
@media (hover: hover) {
  .hdr .hdr__link:hover { color: var(--hdr-hi); }
  .hdr .hdr__link:hover .hdr__roll-a { transform: translateY(-100%); opacity: 0; }
  .hdr .hdr__link:hover .hdr__roll-b { transform: translateY(0); opacity: 1; }
}

/* Right cluster */
.hdr .hdr__cluster {
  display: flex;
  align-items: center;
  gap: var(--hdr-gap);
  margin-left: auto;
  pointer-events: none;
}
.hdr .hdr__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-inline: 16px;
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}
@media (hover: hover) {
  .hdr .hdr__btn:hover { background: var(--hdr-bg-hover); color: var(--hdr-hi); }
}
.hdr .hdr__icon { flex: 0 0 auto; }
.hdr .hdr__square, .hdr .hdr__phone { width: var(--hdr-ph); padding: 0; }
.hdr .hdr__square { display: none; }
.hdr .hdr__phone-num { display: none; font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .06em; }

/* CTA (solid accent, like the reference's yellow action button) */
.hdr .hdr__cta {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: var(--hdr-ph);
  padding-inline: 18px;
  border-radius: var(--hdr-r);
  background: var(--accent);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background-color .5s var(--ease-out);
}
@media (hover: hover) { .hdr .hdr__cta:hover { background: #1a32d9; } }

/* Menu toggle: two stacked labels that roll (Μενού / Κλείσιμο) */
.hdr .hdr__toggle { min-width: 128px; justify-content: stretch; }
.hdr .hdr__toggle-track {
  position: relative;
  display: block;
  width: 100%;
  height: 1.2em;
  overflow: hidden;
}
.hdr .hdr__toggle-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: 100%;
  line-height: 1.2em;
}
.hdr .hdr__toggle-state--close { position: absolute; inset: 0; transform: translateY(100%); opacity: 0; }

/* Diagonal arrow swap on hover (reference: data-arrow-hover-container) */
.hdr .hdr__arrow {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: .8em;
  height: .8em;
  overflow: hidden;
}
.hdr .hdr__arrow svg { position: absolute; inset: 0; width: 100%; height: 100%; transition: none; }
.hdr .hdr__arrow svg + svg { transform: translate(-100%, 100%); }
@media (hover: hover) {
  .hdr a:hover .hdr__arrow svg { transition: transform .3s ease-in-out; }
  .hdr a:hover .hdr__arrow svg:first-child { transform: translate(100%, -100%); }
  .hdr a:hover .hdr__arrow svg + svg { transform: translate(0, 0); }
}

/* ---------- Menu overlay: bento "dashboard" (after 363sudbury.com/dashboard/) ---------- */
.hdr .hdr__menu {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.hdr .hdr__menu[hidden] { display: none; }
.hdr .hdr__scrim {
  position: fixed;
  inset: 0;
  background: rgba(13, 14, 16, .5);
  -webkit-backdrop-filter: blur(24px) saturate(.9);
  backdrop-filter: blur(24px) saturate(.9);
}
.hdr .hdr__dash {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: var(--hdr-pad) var(--gutter);
}
.hdr .hdr__grid {
  display: grid;
  gap: var(--hdr-gap);
  grid-template-columns: 1fr;
  grid-auto-rows: 80px;
}
.hdr .hdr__cell { min-width: 0; min-height: 0; }
.hdr .hdr__cell--about { order: 1; grid-row: span 4; }
.hdr .hdr__cell--pair  { order: 2; grid-row: span 5; display: flex; flex-direction: column; gap: var(--hdr-gap); }
.hdr .hdr__cell--tiles { order: 3; grid-row: span 4; display: flex; flex-wrap: wrap; gap: var(--hdr-gap); }
.hdr .hdr__cell--month { order: 4; grid-row: span 4; }
.hdr .hdr__cell--top   { order: 5; grid-row: span 1; display: flex; gap: var(--hdr-gap); }

.hdr .hdr__grow { flex: 1 1 50%; min-width: 0; min-height: 0; transition: flex-basis .5s var(--ease-out); }
.hdr .hdr__grow--tile { flex: 1 1 calc(50% - var(--hdr-gap)); }
.hdr .hdr__grow--tile:first-child { flex-basis: 100%; }

.hdr .hdr__mpanel {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  border-radius: var(--hdr-r);
  overflow: hidden;
  transform: translateZ(0);
}
.hdr .hdr__minner {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .5);
  color: var(--white);
  will-change: clip-path;
}

/* Background images: masked, parallax on open, slide left on hover */
.hdr .hdr__bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.hdr .hdr__bg-move { position: absolute; inset: 0 -2.5rem -5rem 0; will-change: transform; }
.hdr .hdr__bg-move img { width: 100%; height: 100%; object-fit: cover; }
.hdr .hdr__bg--fade-l {
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,.35) 0%, #000 55%);
  mask-image: linear-gradient(to right, rgba(0,0,0,.35) 0%, #000 55%);
}
.hdr .hdr__bg--fade-t {
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, #000 40%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.25) 0%, #000 40%);
}
/* Hover slideshow: the photos are stacked and cross-fade (js/header.js) */
.hdr .hdr__bg-move[data-hdr-slides] img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s var(--ease-out);
}
.hdr .hdr__bg-move[data-hdr-slides] img.is-on { opacity: 1; }
.hdr .hdr__bg-shade--bottom { background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 60%, rgba(0,0,0,.35) 100%); }
.hdr .hdr__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, rgba(0,0,0,.5) 0%, rgba(0,0,0,0) 55%);
}
.hdr .hdr__cell--about .hdr__bg::after { background: linear-gradient(20deg, rgba(0,0,0,.65) 0%, rgba(0,0,0,0) 60%); }
.hdr .hdr__bg-shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgba(0,0,0,.7), rgba(0,0,0,0) 45%); }

/* Cards */
.hdr .hdr__card {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px;
}
.hdr .hdr__card--about { justify-content: flex-end; }
.hdr .hdr__badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 7px;
  border-radius: 4px;
  background: var(--accent);
  color: var(--white);
}
.hdr .hdr__badge svg { width: 100%; height: 100%; }
/* Lottie icons (assets/lottie/m-*.json, played by js/lottie-init.js); the inline svg inside is the fallback */
.hdr .hdr__lottie { display: block; width: 100%; height: 100%; }
.hdr .hdr__lottie svg { display: block; width: 100%; height: 100%; }
.hdr .hdr__lottie--tile { width: 30px; height: 30px; }
.hdr .hdr__star { display: inline-block; width: 26px; height: 26px; flex: none; }
.hdr .hdr__badge--abs { position: absolute; top: 20px; right: 20px; }
.hdr .hdr__card-body { display: flex; flex-direction: column; gap: 10px; max-width: 450px; }
.hdr .hdr__about-title { font-size: clamp(1.75rem, 1.3rem + 1.4vw, 2.3rem); font-weight: 600; letter-spacing: -.015em; line-height: 1.1; }
.hdr .hdr__about-text { font-size: 13px; line-height: 1.4; }
.hdr .hdr__arrow--lg { font-size: 22px; margin-top: 4px; transition: color .5s; }
.hdr .hdr__card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; width: 100%; }
.hdr .hdr__card-title { display: block; max-width: 10ch; font-size: clamp(1.375rem, 1.1rem + .8vw, 1.625rem); font-weight: 600; line-height: 1.05; letter-spacing: -.01em; }
.hdr .hdr__arrow--md { display: block; font-size: 22px; margin-top: 14px; transition: color .5s; }
@media (hover: hover) {
  .hdr .hdr__card:hover .hdr__arrow { color: var(--hdr-hi); }
}

/* Top row: icon squares + weather */
.hdr .hdr__sq { flex: 0 0 auto; width: auto; height: 100%; aspect-ratio: 1 / 1; }
.hdr .hdr__icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: color .5s linear;
}
@media (hover: hover) { .hdr .hdr__icon-tile:hover { color: var(--hdr-hi); } }
.hdr .hdr__wx-panel { flex: 1 1 auto; }
.hdr .hdr__wx {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding-inline: 20px;
}
.hdr .hdr__wx-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hdr .hdr__wx-loc { font-size: 12px; opacity: .8; }
.hdr .hdr__wx-cond { font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr .hdr__wx-temp { display: inline-flex; align-items: center; gap: 6px; font-size: clamp(1.125rem, 1rem + .4vw, 1.375rem); white-space: nowrap; }
.hdr .hdr__wx-icon { display: inline-flex; width: 24px; height: 24px; }
.hdr .hdr__wx-icon svg { width: 100%; height: 100%; }

/* Product of the month */
.hdr .hdr__card--month { padding: 22px 20px; }
.hdr .hdr__month-label { font-size: 14px; font-weight: 500; }
.hdr .hdr__month-name { margin-top: 20px; font-size: 18px; font-weight: 500; line-height: 1.2; }
.hdr .hdr__month-sub { margin-top: 2px; font-size: 12px; opacity: .75; }
.hdr .hdr__card--month .hdr__month-name, .hdr .hdr__card--month .hdr__month-label { transition: color .5s; }
@media (hover: hover) { .hdr .hdr__card--month:hover .hdr__month-name { color: var(--hdr-hi); } }

/* Small tiles */
.hdr .hdr__tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  padding: 20px;
  transition: color .5s;
}
.hdr .hdr__tile { position: relative; z-index: 2; }
.hdr .hdr__tile .hdr__badge { align-self: flex-end; }
.hdr .hdr__tile-foot { display: flex; flex-direction: column; gap: 8px; }
.hdr .hdr__tile-label { display: block; max-width: 9ch; font-size: 15px; font-weight: 600; line-height: 1.15; text-wrap: balance; }
.hdr .hdr__tile .hdr__arrow { font-size: 12px; }
@media (hover: hover) { .hdr .hdr__tile:hover { color: var(--hdr-hi); } }

/* Red close tile (top row, right of the weather) */
.hdr .hdr__sq--close { aspect-ratio: 1 / 1; }
.hdr .hdr__sq--close .hdr__minner { background: var(--accent); }
.hdr .hdr__close-tile { color: var(--white); transition: background-color .3s var(--ease-out); }
@media (hover: hover) { .hdr .hdr__close-tile:hover { color: var(--white); background: var(--accent-deep); } }
.hdr .hdr__close-tile svg { transition: transform .4s var(--ease-out); }
@media (hover: hover) { .hdr .hdr__close-tile:hover svg { transform: rotate(90deg); } }

/* ---------- Breakpoints ---------- */
@media (min-width: 600px) {
  .hdr .hdr__square { display: inline-flex; }
  .hdr .hdr__cta { display: inline-flex; }
}
@media (min-width: 768px) {
  .hdr .hdr__cell--about { grid-row: span 5; }
  .hdr .hdr__cell--pair { grid-row: span 4; flex-direction: row; }
  .hdr .hdr__cell--tiles { grid-row: span 2; flex-wrap: nowrap; }
  .hdr .hdr__grow--tile, .hdr .hdr__grow--tile:first-child { flex: 1 1 33.333%; }
  .hdr .hdr__cell--month { grid-row: span 5; }
}
@media (min-width: 1100px) {
  .hdr .hdr__menu { overflow: hidden; }
  .hdr .hdr__dash { height: 100svh; min-height: 0; }
  .hdr .hdr__grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-columns: repeat(16, minmax(0, 1fr));
    grid-template-rows: 64px repeat(15, minmax(0, 1fr));
    grid-auto-rows: auto;
  }
  .hdr .hdr__cell { order: 0; }
  .hdr .hdr__cell--about { grid-column: 1 / 12; grid-row: 1 / 10; }
  .hdr .hdr__cell--pair  { grid-column: 1 / 12; grid-row: 10 / 17; }
  .hdr .hdr__cell--top   { grid-column: 12 / 17; grid-row: 1 / 2; }
  .hdr .hdr__cell--month { grid-column: 12 / 17; grid-row: 2 / 12; }
  .hdr .hdr__cell--tiles { grid-column: 12 / 17; grid-row: 12 / 17; }
  .hdr .hdr__grow { flex: 0 1 50%; }
  .hdr .hdr__grow:hover { flex-basis: calc(50% + 4rem); }
  .hdr .hdr__grow--tile, .hdr .hdr__grow--tile:first-child { flex: 0 1 33.333%; }
  .hdr .hdr__grow--tile:hover { flex-basis: calc(33.333% + 2.75rem); }
  .hdr .hdr__card { padding: 25px; }
  .hdr .hdr__card--about { padding: 20px; }
}
@media (min-width: 1200px) {
  .hdr .hdr__nav { display: block; }
  .hdr .hdr__cluster { margin-left: 0; }
}
@media (min-width: 1360px) {
  .hdr .hdr__phone { width: auto; padding-inline: 16px; }
  .hdr .hdr__phone-num { display: inline; }
}
@media (max-width: 420px) {
  .hdr .hdr__toggle { min-width: 112px; padding-inline: 14px; }
  .hdr .hdr__logo-link { padding-inline: 6px; }
  .hdr .hdr__logo-img { height: calc(var(--hdr-ph) * .62); }
  .hdr .hdr__wx { padding-inline: 14px; }
}
@media (max-height: 700px) and (min-width: 1100px) {
  .hdr .hdr__about-text { display: none; }
  .hdr .hdr__tile { padding: 14px; }
}
