
/* =========================================================
   Signature Sweets - Layout System v57
   Purpose: controlled, reusable header/nav/accessibility rules.
   ========================================================= */

:root {
  --ss-max-site: 1440px;
  --ss-header-height: clamp(92px, 6.4vw, 112px);
  --ss-gold: #d4a84f;
  --ss-gold-soft: #efcc7a;
  --ss-black: #050403;
  --ss-text: #fffaf2;
  --ss-muted: rgba(255, 250, 242, 0.78);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--ss-gold-soft);
  outline-offset: 4px;
}

/* Header */
.site-header {
  min-height: var(--ss-header-height);
  background: rgba(5, 4, 3, 0.965);
  border-bottom: 1px solid rgba(212, 168, 79, 0.16);
  backdrop-filter: blur(14px);
  position: relative;
  z-index: 30;
}

.header-inner {
  width: min(92vw, var(--ss-max-site));
  min-height: var(--ss-header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.5rem, 3.2vw, 4.2rem);
}

.brand {
  display: grid;
  grid-template-columns: auto minmax(0, auto);
  align-items: center;
  gap: clamp(0.85rem, 1.45vw, 1.25rem);
  min-width: 0;
  text-decoration: none;
}

.brand img {
  width: clamp(62px, 4.8vw, 82px);
  height: clamp(62px, 4.8vw, 82px);
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-text {
  min-width: 0;
  display: grid;
  gap: 0.3rem;
  line-height: 1;
}

.brand-text strong {
  display: block;
  white-space: nowrap;
  font-size: clamp(2rem, 2.65vw, 3rem);
  line-height: 0.86;
}

.brand-text span {
  display: block;
  white-space: nowrap;
  width: max-content;
  max-width: 100%;
  color: var(--ss-gold-soft);
  font-size: clamp(0.78rem, 0.92vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

/* Desktop navigation */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(1.65rem, 2.55vw, 3.1rem);
  margin-left: auto;
}

.site-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: rgba(255, 250, 242, 0.78);
  font-size: clamp(0.98rem, 0.94vw, 1.08rem);
  font-weight: 650;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ss-gold-soft);
}

.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: -0.25rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ss-gold-soft), transparent);
}

.site-nav a:last-child {
  min-height: 48px;
  padding: 0.78rem 1.32rem;
  border: 1px solid rgba(212, 168, 79, 0.78);
  border-radius: 0.85rem;
  color: var(--ss-gold-soft);
  background: rgba(212, 168, 79, 0.035);
}

.site-nav a:last-child::after {
  display: none;
}

.site-nav a:last-child:hover {
  background: linear-gradient(135deg, #f1ce7a, #d4a84f, #a97724);
  color: #100d08;
}

.nav-toggle {
  display: none;
}

/* Prevent medium-width brand/nav collision */
@media (max-width: 1180px) and (min-width: 981px) {
  .header-inner {
    width: min(94vw, var(--ss-max-site));
    gap: 1.35rem;
  }

  .brand img {
    width: 64px;
    height: 64px;
  }

  .brand-text strong {
    font-size: clamp(1.85rem, 2.35vw, 2.55rem);
  }

  .brand-text span {
    font-size: 0.76rem;
    letter-spacing: 0.145em;
  }

  .site-nav {
    gap: clamp(1rem, 1.75vw, 1.8rem);
  }

  .site-nav a {
    font-size: 0.96rem;
  }

  .site-nav a:last-child {
    padding: 0.72rem 1.05rem;
  }
}

/* Mobile navigation */
@media (max-width: 980px) {
  :root {
    --ss-header-height: 88px;
  }

  .header-inner {
    width: min(94vw, var(--ss-max-site));
  }

  .brand {
    gap: 0.7rem;
  }

  .brand img {
    width: 62px;
    height: 62px;
  }

  .brand-text strong {
    font-size: clamp(1.65rem, 7.5vw, 2.35rem);
  }

  .brand-text span {
    font-size: clamp(0.66rem, 2.2vw, 0.78rem);
    letter-spacing: 0.135em;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border: 1px solid rgba(212, 168, 79, 0.55);
    border-radius: 50%;
    color: var(--ss-text);
    background: rgba(255, 255, 255, 0.035);
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
  }

  body:not(.nav-open) .site-nav {
    display: none;
  }

  body.nav-open .site-nav {
    position: fixed;
    top: calc(var(--ss-header-height) + 0.7rem);
    right: 1rem;
    z-index: 1000;
    width: min(320px, calc(100vw - 2rem));
    max-height: calc(100vh - var(--ss-header-height) - 1.4rem);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.9rem;
    background: rgba(7, 6, 5, 0.975);
    border: 1px solid rgba(212, 168, 79, 0.28);
    border-radius: 1.2rem;
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.68);
  }

  body.nav-open .site-nav a {
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1rem;
    min-height: 48px;
  }

  body.nav-open .site-nav a[aria-current="page"]::after {
    display: none;
  }

  body.nav-open .site-nav a:last-child {
    margin-top: 0.35rem;
  }
}

@media (max-width: 520px) {
  :root {
    --ss-header-height: 78px;
  }

  .brand img {
    width: 52px;
    height: 52px;
  }

  .brand-text strong {
    font-size: clamp(1.45rem, 7vw, 1.95rem);
  }

  .brand-text span {
    font-size: 0.58rem;
    letter-spacing: 0.115em;
  }

  .nav-toggle {
    width: 48px;
    height: 48px;
    font-size: 1.65rem;
  }
}

/* =========================================================
   Version 61 - Header logo clipping and project cleanup
   ========================================================= */

.site-header {
  overflow: visible !important;
}

.header-inner {
  overflow: visible !important;
  min-height: clamp(96px, 6.8vw, 118px) !important;
  padding-block: clamp(0.35rem, 0.75vw, 0.65rem) !important;
}

.brand {
  align-items: center !important;
  overflow: visible !important;
  max-width: min(43vw, 520px) !important;
}

.brand img {
  width: clamp(58px, 4.35vw, 76px) !important;
  height: clamp(58px, 4.35vw, 76px) !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
}

.brand-text strong {
  font-size: clamp(1.9rem, 2.45vw, 2.78rem) !important;
  line-height: 0.9 !important;
  white-space: nowrap !important;
}

.brand-text span {
  white-space: nowrap !important;
  font-size: clamp(0.72rem, 0.84vw, 0.94rem) !important;
  letter-spacing: clamp(0.13em, 0.38vw, 0.19em) !important;
}

.site-nav {
  gap: clamp(1.55rem, 2.35vw, 2.9rem) !important;
}

.site-nav a {
  font-size: clamp(0.96rem, 0.92vw, 1.05rem) !important;
}

@media (max-width: 1180px) and (min-width: 981px) {
  .header-inner {
    min-height: 94px !important;
    padding-block: 0.35rem !important;
  }

  .brand {
    max-width: 420px !important;
    gap: 0.7rem !important;
  }

  .brand img {
    width: 58px !important;
    height: 58px !important;
  }

  .brand-text strong {
    font-size: clamp(1.65rem, 2.05vw, 2.22rem) !important;
  }

  .brand-text span {
    font-size: 0.66rem !important;
    letter-spacing: 0.105em !important;
  }

  .site-nav {
    gap: clamp(0.9rem, 1.55vw, 1.55rem) !important;
  }

  .site-nav a {
    font-size: 0.91rem !important;
  }

  .site-nav a:last-child {
    padding: 0.66rem 0.95rem !important;
  }
}

@media (max-width: 980px) {
  .header-inner {
    min-height: 86px !important;
    padding-block: 0.45rem !important;
  }

  .brand {
    max-width: calc(100vw - 130px) !important;
  }

  .brand img {
    width: 56px !important;
    height: 56px !important;
  }

  .brand-text strong {
    font-size: clamp(1.55rem, 6.4vw, 2.15rem) !important;
    line-height: 0.9 !important;
  }

  .brand-text span {
    font-size: clamp(0.58rem, 1.85vw, 0.72rem) !important;
    letter-spacing: 0.1em !important;
  }

  .nav-toggle {
    flex: 0 0 auto !important;
  }
}

@media (max-width: 520px) {
  .header-inner {
    min-height: 78px !important;
    padding-block: 0.35rem !important;
  }

  .brand {
    gap: 0.55rem !important;
    max-width: calc(100vw - 105px) !important;
  }

  .brand img {
    width: 48px !important;
    height: 48px !important;
  }

  .brand-text strong {
    font-size: clamp(1.25rem, 6.2vw, 1.75rem) !important;
  }

  .brand-text span {
    font-size: 0.5rem !important;
    letter-spacing: 0.08em !important;
  }
}
