/* ============================================================
   Zaycev Studio — Global Nav + Footer
   Safe to load alongside Webflow CSS (no global reset).
   ============================================================ */

:root {
  --ink:    #111111;
  --paper:  #F7F6F2;
  --white:  #FFFFFF;
  --muted:  #686864;
  --line:   #D7D6D0;
  --panel:  #ECEBE6;
  --accent: #FFD84D;
  --font:   "Onest", "Inter", Arial, sans-serif;

  /* Motion tokens */
  --motion-fast:   160ms;
  --motion-base:   280ms;
  --motion-reveal: 600ms;
  --ease-out:      cubic-bezier(0.22, 1, 0.36, 1);
  --ease-std:      ease-out;
  --motion-arrow:  5px;
}

/* ============================================================
   WEBFLOW BODY MARGIN — TWO PAGE TYPES
   ============================================================
   WEBFLOW-EXPORTED pages (e.g. about.html, blog.html, ux-review.html)
     → have <body class="body">
     → Webflow CSS applies: .body { margin: 10px 40px 0 }
     → nav.css counters with -40px on .hp-header/.hp-footer so they
       span full viewport width. No extra CSS needed on those pages.

   CUSTOM pages (e.g. services.html, services/*, portfolio/index.html)
     → do NOT use class="body" on <body>
     → no Webflow side margins, so no -40px compensation needed
     → add this to the page <style> to cancel nav.css compensation:
         .hp-header, .hp-footer { margin-left: 0 !important; margin-right: 0 !important; }
   ============================================================ */
body.body {
  margin-top: 0 !important;
}
.hp-header,
.hp-footer {
  margin-left: -40px;
  margin-right: -40px;
}

/* ============================================================
   HEADER
   ============================================================ */
.hp-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.hp-header .inner {
  width: min(calc(100% - 96px), 1440px);
  margin-inline: auto;
  height: 70px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}
.hp-header .logo img { width: 154px; display: block; }

/* Desktop nav */
.hp-nav { display: flex; gap: 6px; align-items: center; }
.hp-nav-pill {
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition:
    background   var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    color        var(--motion-fast) var(--ease-out);
  white-space: nowrap;
}
.hp-nav-pill:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Services dropdown */
.hp-dropdown { position: relative; }
.hp-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 6px;
  min-width: 260px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.07);
  z-index: 200;
}
.hp-dropdown:hover .hp-dropdown-menu,
.hp-dropdown:focus-within .hp-dropdown-menu,
.hp-dropdown-menu:hover { display: block; }
.hp-dropdown-link {
  display: block;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  transition: background 150ms;
}
.hp-dropdown-link:hover,
.hp-dropdown-link:focus { background: var(--panel); outline: none; }
.hp-dropdown-link--active { background: var(--panel); }

/* Active nav state */
.hp-nav-pill--active {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}

/* Header CTA */
.hp-header-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1.5px solid var(--ink);
  transition: gap var(--motion-fast) var(--ease-out);
}
.hp-header-cta:hover { gap: 12px; }
.hp-cta-arrow {
  width: 13px; height: 13px; display: inline-block;
  transition: transform var(--motion-fast) var(--ease-out);
}
.hp-header-cta:hover .hp-cta-arrow {
  transform: translate(var(--motion-arrow), calc(var(--motion-arrow) * -1));
}

/* Mobile toggle */
.hp-mobile-toggle {
  display: none;
  justify-self: end;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.hp-mobile-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 220ms, opacity 220ms;
}
.hp-mobile-toggle.open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.hp-mobile-toggle.open span:nth-child(2) { opacity: 0; }
.hp-mobile-toggle.open span:nth-child(3) { transform: translateY(-3.25px) rotate(-45deg); }

/* Mobile nav */
.hp-mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 8px 16px 24px;
}
.hp-mobile-nav.open { display: flex; }
.hp-mobile-nav a {
  padding: 13px 0;
  font-size: 19px;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: -0.03em;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.hp-mobile-nav a:last-child { border-bottom: none; }

/* Mobile services accordion */
.hp-mobile-services { border-bottom: 1px solid var(--line); }
.hp-mobile-services-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-family: var(--font);
  color: var(--ink);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}
.hp-mobile-services-toggle svg {
  flex-shrink: 0;
  transition: transform 220ms var(--ease-out, cubic-bezier(0.22,1,0.36,1));
}
.hp-mobile-services-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.hp-mobile-services-list {
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}
.hp-mobile-services-list[hidden] { display: none; }
.hp-mobile-services-list a {
  padding: 9px 0 9px 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--muted);
  text-decoration: none;
  border-bottom: none !important;
  letter-spacing: 0;
  transition: color 160ms;
}
.hp-mobile-services-list a:hover,
.hp-mobile-services-list a:focus { color: var(--ink); }

.hp-mobile-nav .hp-mobile-cta {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: none;
  padding-bottom: 0;
  font-weight: 700;
}

/* ============================================================
   FOOTER
   ============================================================ */
.hp-footer {
  background: var(--ink);
  border-top: 1px solid #222220;
  padding: 40px 0 32px;
}
.hp-footer .frame {
  width: min(calc(100% - 96px), 1440px);
  margin-inline: auto;
}
.hp-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.hp-footer-logo img { width: 148px; filter: invert(1); }
.hp-footer-col { display: flex; flex-direction: column; gap: 10px; }
.hp-footer-col-head {
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #444440;
  margin-bottom: 4px;
}
.hp-footer-col a {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  color: #666660;
  text-decoration: none;
  transition: color 180ms;
}
.hp-footer-col a:hover { color: var(--white); }
.hp-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid #222220;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  color: #444440;
}

/* ============================================================
   RESPONSIVE BODY MARGIN COUNTERS
   Match Webflow's .body responsive margins at each breakpoint.
   ============================================================ */
@media screen and (max-width: 991px) {
  .hp-header, .hp-footer { margin-left: -20px; margin-right: -20px; }
}
@media screen and (max-width: 479px) {
  .hp-header, .hp-footer { margin-left: -8px; margin-right: -8px; }
}

/* ============================================================
   MOBILE  ≤ 768px
   ============================================================ */
@media (max-width: 768px) {
  .hp-header .inner {
    width: calc(100% - 32px);
    grid-template-columns: 1fr auto;
  }
  .hp-nav { display: none; }
  .hp-header-cta { display: none; }
  .hp-mobile-toggle { display: flex; }

  .hp-footer .frame { width: calc(100% - 32px); }
  .hp-footer-grid { grid-template-columns: 1fr 1fr; }
  .hp-footer-logo { grid-column: 1 / -1; }
  .hp-footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}
