.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  padding: clamp(10px, 2vw, 18px) clamp(14px, 4vw, 34px);
  pointer-events: none;
  background: linear-gradient(180deg, rgba(35, 25, 17, 0.28), rgba(35, 25, 17, 0));
  transition: background 220ms ease, padding 220ms ease;
}

.site-header__inner,
.site-footer__inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}

.site-header__inner {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 24px);
  padding: 8px 10px 8px 12px;
  color: var(--text-on-dark);
  pointer-events: auto;
  border: 1px solid rgba(244, 235, 221, 0.12);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(38, 25, 17, 0.24), rgba(38, 25, 17, 0.08)),
    rgba(24, 18, 14, 0.08);
  box-shadow: 0 12px 34px rgba(24, 15, 10, 0.08);
  transition:
    color 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease,
    transform 220ms ease;
}

.site-header.is-scrolled,
.site-header.is-default,
.site-header.is-menu-open {
  background: linear-gradient(180deg, rgba(251, 250, 247, 0.94), rgba(251, 250, 247, 0.66));
}

.site-header.is-scrolled .site-header__inner,
.site-header.is-default .site-header__inner,
.site-header.is-menu-open .site-header__inner {
  color: var(--text);
  border-color: rgba(117, 83, 47, 0.22);
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.94), rgba(243, 237, 224, 0.9)),
    var(--surface);
  box-shadow: 0 12px 36px rgba(70, 48, 29, 0.14);
}

.site-header__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.site-header__mark {
  width: 48px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
  transition: color 220ms ease, filter 220ms ease;
}

.site-header__mark svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.site-header.is-hero .site-header__mark {
  color: #6ef7df;
  filter:
    drop-shadow(0 0 4px rgba(94, 255, 226, 0.72))
    drop-shadow(0 0 16px rgba(82, 181, 232, 0.36));
}

.site-header__paw-body {
  transform-origin: 30px 50px;
  transition: transform 240ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.site-header__brand:hover .site-header__paw-body {
  transform: translateX(4px);
}

.site-header__brand-text {
  display: grid;
  gap: 1px;
  min-width: 0;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.site-header__brand-text small {
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
}

.site-header.is-hero .site-header__brand-text small {
  color: rgba(244, 235, 221, 0.68);
}

.site-header__nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-left: auto;
}

.site-header__nav-link,
.site-header__drawer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 12px;
  color: inherit;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.site-header__nav-link:hover,
.site-header__drawer-link:hover {
  background: rgba(102, 204, 187, 0.14);
  transform: translateY(-1px);
}

.site-header__nav-link:focus-visible,
.site-header__drawer-link:focus-visible,
.site-header__menu-button:focus-visible,
.site-header__brand:focus-visible {
  outline: 3px solid rgba(110, 247, 223, 0.62);
  outline-offset: 3px;
}

.site-header__nav-link--cta,
.site-header__drawer-link--cta {
  color: #2d241c;
  background:
    linear-gradient(180deg, rgba(244, 202, 99, 0.96), rgba(208, 154, 60, 0.94));
  border: 1px solid rgba(117, 83, 47, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 252, 244, 0.48);
}

.site-header__menu-button {
  appearance: none;
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: inherit;
  border: 1px solid rgba(117, 83, 47, 0.2);
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.42);
  cursor: pointer;
}

.site-header__menu-line {
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-header.is-menu-open .site-header__menu-line:nth-child(1) {
  transform: translateY(7px) rotate(42deg);
}

.site-header.is-menu-open .site-header__menu-line:nth-child(2) {
  opacity: 0;
}

.site-header.is-menu-open .site-header__menu-line:nth-child(3) {
  transform: translateY(-7px) rotate(-42deg);
}

.site-header__drawer {
  position: absolute;
  top: calc(100% - 8px);
  left: clamp(14px, 4vw, 34px);
  right: clamp(14px, 4vw, 34px);
  pointer-events: auto;
}

.site-header__drawer[hidden] {
  display: none !important;
}

.site-header__drawer-inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  padding: 14px;
  border: 1px solid rgba(117, 83, 47, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.98), rgba(242, 235, 219, 0.98)),
    var(--surface);
  box-shadow: 0 18px 48px rgba(54, 36, 21, 0.18);
}

.site-header__drawer-head {
  display: grid;
  gap: 4px;
  padding: 10px 12px 14px;
  border-bottom: 1px solid rgba(117, 83, 47, 0.16);
}

.site-header__drawer-label,
.site-header__drawer-copy,
.site-header__empty {
  margin: 0;
}

.site-header__drawer-label {
  width: fit-content;
  padding: 4px 9px;
  color: #2d241c;
  border: 1px solid rgba(117, 83, 47, 0.28);
  border-radius: 999px;
  background: rgba(244, 202, 99, 0.42);
  font-size: 0.78rem;
  font-weight: 800;
}

.site-header__drawer-copy,
.site-header__empty {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

.site-header__drawer-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 14px 0;
}

.site-header__drawer-link {
  min-height: 42px;
  border: 1px solid rgba(117, 83, 47, 0.16);
  background: rgba(255, 252, 244, 0.62);
}

.site-header__drawer-link--cta {
  grid-column: 1 / -1;
}

.site-header__drawer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.site-header__drawer-panel {
  padding: 12px;
  border: 1px solid rgba(117, 83, 47, 0.16);
  border-radius: 14px;
  background: rgba(255, 252, 244, 0.54);
}

.site-header__drawer-panel h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 0.92rem;
}

.site-header__list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.site-header__list a,
.site-header__list span {
  display: grid;
  gap: 2px;
  color: inherit;
  text-decoration: none;
}

.site-header__list small {
  color: var(--muted);
  font-size: 0.72rem;
}

.site-header__list strong {
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.55;
}

.site-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.site-main {
  display: block;
}

html.site-header-menu-open {
  overflow: hidden;
}

body:not(.p-home) .site-main {
  padding-top: 76px;
}

.site-footer {
  position: relative;
  overflow: clip;
  padding: clamp(var(--space-7), 7vw, var(--space-9)) var(--space-5) var(--space-5);
  color: var(--text-on-dark);
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 178, 122, 0.22), transparent 30%),
    linear-gradient(180deg, var(--surface-dark-soft), var(--surface-dark));
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(244, 235, 221, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(244, 235, 221, 0.04) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 76%, transparent);
  opacity: 0.5;
}

.site-footer__sleep,
.site-footer__inner {
  position: relative;
  z-index: 1;
}

.site-footer__sleep {
  display: grid;
  place-items: center;
  width: min(21rem, 76vw);
  margin: 0 auto clamp(var(--space-4), 3vw, var(--space-6));
}

.site-footer__sleep::before {
  content: "";
  position: absolute;
  right: 10%;
  bottom: 8%;
  left: 10%;
  height: 24%;
  border-radius: 999px;
  background: rgba(17, 12, 9, 0.22);
  filter: blur(12px);
}

.site-footer__cats {
  position: relative;
  z-index: 1;
  width: min(100%, 335px);
  height: auto;
  filter:
    drop-shadow(0 14px 18px rgba(17, 12, 9, 0.22))
    drop-shadow(0 0 18px rgba(244, 235, 221, 0.12));
}

.site-footer__sleep-fx {
  position: absolute;
  z-index: 2;
  top: -38%;
  left: 50%;
  width: clamp(3.6rem, 13vw, 5.4rem);
  height: auto;
  opacity: 0.72;
  transform: translateX(-50%);
  transform-origin: 50% 80%;
  animation: site-footer-sleep-float 5.6s ease-in-out infinite;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(16rem, 0.65fr);
  gap: var(--space-5) var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid rgba(244, 235, 221, 0.16);
}

.site-footer__message {
  display: grid;
  gap: var(--space-2);
}

.site-footer__eyebrow,
.site-footer__copy,
.site-footer__small {
  margin: 0;
}

.site-footer__eyebrow {
  color: var(--accent-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.site-footer__copy {
  max-width: 34rem;
  color: var(--muted-on-dark);
  font-size: clamp(0.92rem, 1.6vw, 1rem);
  line-height: 1.9;
}

.site-footer__nav,
.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);
}

.site-footer__nav-link,
.site-footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  padding: 0 var(--space-3);
  color: var(--text-on-dark);
  border: 1px solid rgba(244, 235, 221, 0.14);
  border-radius: var(--radius-pill);
  background: rgba(244, 235, 221, 0.06);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.site-footer__nav-link:hover,
.site-footer__social-link:hover {
  border-color: rgba(216, 178, 122, 0.42);
  background: rgba(216, 178, 122, 0.14);
  transform: translateY(-1px);
}

.site-footer__nav-link--top {
  color: var(--surface-dark);
  border-color: rgba(216, 178, 122, 0.38);
  background: rgba(216, 178, 122, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 252, 244, 0.32);
}

.site-footer__nav-link--top::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.45rem;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: translateY(2px) rotate(45deg);
}

.site-footer__nav-link--top:hover {
  color: var(--surface-dark);
  background: var(--accent-soft);
}

.site-footer__nav-link:focus-visible,
.site-footer__social-link:focus-visible {
  outline: 3px solid rgba(90, 158, 166, 0.7);
  outline-offset: 3px;
}

.site-footer__social,
.site-footer__small {
  grid-column: 1 / -1;
}

.site-footer__small {
  padding-top: var(--space-4);
  color: rgba(213, 198, 176, 0.7);
  border-top: 1px solid rgba(244, 235, 221, 0.1);
  font-size: 0.84rem;
  text-align: right;
}

@keyframes site-footer-sleep-float {
  0%,
  100% {
    opacity: 0.58;
    transform: translate(-50%, 0) rotate(-4deg) scale(0.98);
  }

  50% {
    opacity: 0.84;
    transform: translate(-50%, -10px) rotate(4deg) scale(1.03);
  }
}

@supports not (overflow: clip) {
  .site-footer {
    overflow: hidden;
  }
}

@media (min-width: 1041px) {
  .site-header {
    padding-inline: clamp(var(--space-5), 3vw, var(--space-7));
    background: linear-gradient(180deg, rgba(35, 25, 17, 0.16), rgba(35, 25, 17, 0));
  }

  .site-header__inner {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    pointer-events: none;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-header__brand,
  .site-header__nav {
    min-height: 54px;
    color: var(--text-on-dark);
    pointer-events: auto;
    border: 1px solid rgba(244, 235, 221, 0.16);
    background:
      linear-gradient(135deg, rgba(38, 25, 17, 0.32), rgba(38, 25, 17, 0.12)),
      rgba(24, 18, 14, 0.16);
    box-shadow: 0 12px 34px rgba(24, 15, 10, 0.1);
  }

  .site-header__brand {
    padding: 8px 18px 8px 12px;
    border-radius: var(--radius-pill);
  }

  .site-header__brand-text {
    gap: 0;
    font-size: 0.94rem;
  }

  .site-header__brand-text small {
    display: none;
  }

  .site-header__nav {
    padding: 7px;
    border-radius: var(--radius-pill);
  }

  .site-header.is-scrolled,
  .site-header.is-default,
  .site-header.is-menu-open {
    background: linear-gradient(180deg, rgba(251, 250, 247, 0.36), rgba(251, 250, 247, 0));
  }

  .site-header.is-scrolled .site-header__inner,
  .site-header.is-default .site-header__inner,
  .site-header.is-menu-open .site-header__inner {
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .site-header.is-scrolled .site-header__brand,
  .site-header.is-default .site-header__brand,
  .site-header.is-menu-open .site-header__brand,
  .site-header.is-scrolled .site-header__nav,
  .site-header.is-default .site-header__nav,
  .site-header.is-menu-open .site-header__nav {
    color: var(--text);
    border-color: var(--line-strong);
    background:
      linear-gradient(135deg, rgba(255, 252, 244, 0.96), rgba(243, 237, 224, 0.92)),
      var(--surface);
    box-shadow: 0 12px 36px rgba(70, 48, 29, 0.13);
  }

  .site-header__nav-link {
    min-height: 40px;
  }
}

@media (max-width: 1040px) {
  .site-header__nav {
    display: none;
  }

  .site-header__menu-button {
    display: inline-flex;
  }
}

@media (max-width: 720px) {
  body:not(.p-home) .site-main {
    padding-top: 70px;
  }

  .site-footer {
    padding: var(--space-7) var(--space-4) var(--space-5);
  }

  .site-footer__sleep {
    width: min(18rem, 84vw);
    margin-bottom: var(--space-4);
  }

  .site-footer__sleep-fx {
    top: -38%;
    width: clamp(3rem, 18vw, 4.4rem);
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    text-align: center;
  }

  .site-footer__copy {
    margin: 0 auto;
  }

  .site-footer__nav,
  .site-footer__social {
    justify-content: center;
  }

  .site-footer__small {
    text-align: center;
  }

  .site-header {
    padding: 8px 10px;
  }

  .site-header__inner {
    min-height: 50px;
    border-radius: 16px;
  }

  .site-header__brand-text {
    font-size: 0.9rem;
  }

  .site-header__mark {
    width: 42px;
  }

  .site-header__drawer {
    top: calc(100% - 4px);
    left: 8px;
    right: 8px;
  }

  .site-header__drawer-inner {
    max-height: min(calc(100dvh - 86px), 680px);
    overflow: auto;
    overscroll-behavior: contain;
  }

  .site-header__drawer-grid,
  .site-header__drawer-nav {
    grid-template-columns: 1fr;
  }

  .site-header.is-menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 18% 16%, rgba(110, 247, 223, 0.16), transparent 28%),
      linear-gradient(180deg, rgba(32, 22, 16, 0.52), rgba(32, 22, 16, 0.34));
    backdrop-filter: blur(5px);
  }

  .site-header__inner,
  .site-header__drawer {
    position: relative;
    z-index: 2;
  }

  .site-header.is-menu-open .site-header__mark {
    color: #5a3a24;
    filter: none;
  }

  .site-header.is-menu-open .site-header__brand-text small {
    color: rgba(90, 58, 36, 0.66);
  }

  .site-header__drawer-inner {
    position: relative;
    padding: 18px 14px 16px;
    border-color: rgba(117, 83, 47, 0.32);
    border-radius: 24px;
    background:
      radial-gradient(circle at 88% 8%, rgba(110, 247, 223, 0.18), transparent 28%),
      linear-gradient(180deg, rgba(255, 252, 244, 0.86), rgba(244, 230, 203, 0.92)),
      url("/assets/images/common/bg/texture_contact_letter_paper_cream.webp") center / cover,
      #f6e6c7;
    box-shadow:
      0 24px 58px rgba(34, 22, 14, 0.34),
      inset 0 1px 0 rgba(255, 255, 255, 0.46);
  }

  .site-header__drawer-inner::before {
    content: "";
    position: sticky;
    top: -18px;
    z-index: 1;
    display: block;
    height: 14px;
    margin: -18px -14px 12px;
    border-radius: 24px 24px 0 0;
    background:
      linear-gradient(90deg, rgba(25, 17, 11, 0.36), rgba(255, 236, 184, 0.14), rgba(25, 17, 11, 0.28)),
      url("/assets/images/common/bg/texture_contact_wood_rail_warm.webp") center / cover;
  }

  .site-header__drawer-head {
    position: relative;
    gap: 7px;
    padding: 16px;
    overflow: hidden;
    color: #fff8e7;
    border: 1px solid rgba(255, 236, 184, 0.18);
    border-radius: 20px;
    background:
      linear-gradient(135deg, rgba(45, 31, 20, 0.94), rgba(83, 54, 31, 0.88)),
      url("/assets/images/common/bg/texture_contact_wood_rail_warm.webp") center / cover;
    box-shadow: inset 0 1px 0 rgba(255, 252, 244, 0.18), 0 12px 24px rgba(74, 49, 29, 0.18);
  }

  .site-header__drawer-head::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -26px;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(110, 247, 223, 0.2), transparent 68%);
    pointer-events: none;
  }

  .site-header__drawer-label {
    color: #352313;
    border-color: rgba(255, 252, 244, 0.32);
    background: linear-gradient(180deg, rgba(255, 222, 118, 0.98), rgba(221, 160, 59, 0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46);
  }

  .site-header__drawer-copy {
    max-width: 23em;
    color: rgba(255, 248, 231, 0.82);
  }

  .site-header__drawer-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 12px 0;
  }

  .site-header__drawer-link {
    justify-content: flex-start;
    min-height: 52px;
    padding: 0 12px;
    color: #3d2b1c;
    border-color: rgba(117, 83, 47, 0.2);
    border-radius: 16px;
    background:
      linear-gradient(180deg, rgba(255, 252, 244, 0.9), rgba(246, 232, 205, 0.82)),
      rgba(255, 252, 244, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.48), 0 8px 16px rgba(80, 53, 31, 0.08);
  }

  .site-header__drawer-link::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-top: 2px solid rgba(86, 61, 39, 0.54);
    border-right: 2px solid rgba(86, 61, 39, 0.54);
    transform: rotate(45deg);
  }

  .site-header__drawer-link--cta,
  .site-header__drawer-link[href="/#ai-philosophy"] {
    grid-column: 1 / -1;
  }

  .site-header__drawer-link--cta {
    justify-content: center;
    min-height: 56px;
    color: #2f2115;
    background:
      linear-gradient(180deg, rgba(255, 222, 118, 0.98), rgba(211, 151, 54, 0.96)),
      rgba(244, 202, 99, 0.9);
  }

  .site-header__drawer-link--cta::after {
    display: none;
  }

  .site-header__drawer-grid {
    gap: 10px;
  }

  .site-header__drawer-panel {
    position: relative;
    overflow: hidden;
    padding: 14px;
    border-color: rgba(117, 83, 47, 0.18);
    border-radius: 18px;
    background:
      linear-gradient(180deg, rgba(255, 252, 244, 0.78), rgba(244, 231, 205, 0.74)),
      url("/assets/images/common/bg/texture_contact_letter_paper_cream.webp") center / cover;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
  }

  .site-header__drawer-panel h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #3d2b1c;
  }

  .site-header__drawer-panel h2::before {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #6ef7df;
    box-shadow: 0 0 0 4px rgba(110, 247, 223, 0.14);
  }

  .site-header__list {
    gap: 0;
  }

  .site-header__list li + li {
    border-top: 1px solid rgba(117, 83, 47, 0.13);
  }

  .site-header__list a,
  .site-header__list span {
    padding: 8px 0;
  }

  .site-header__list small {
    color: rgba(87, 64, 42, 0.72);
    font-weight: 700;
  }

  .site-header__list strong {
    color: #302217;
  }
}

@media (max-width: 380px) {
  .site-header__drawer-nav {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .site-header *,
  .site-header *::before,
  .site-header *::after,
  .site-footer *,
  .site-footer *::before,
  .site-footer *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
