:root {
  --shell-black: #0c0a09;
  --shell-button: #d1a05d;
  --shell-button-hover: #bd8a45;
  --shell-button-line: rgba(209, 160, 93, .52);
  --shell-white: #fff;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 20;
}

.site-header {
  position: sticky;
  top: 0;
  background: rgba(12, 10, 9, .72);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px);
}

.site-header .container,
.site-footer .container {
  width: min(1180px, calc(100% - 40px));
}

.nav {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(230px, 310px) minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--shell-white);
  font-weight: 800;
  white-space: nowrap;
  min-width: 0;
}

.brand img {
  width: 66px;
  height: 66px;
  object-fit: contain;
  border-radius: 0;
  background: transparent;
  border: 0;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .34));
}

.brand span {
  display: block;
  line-height: 1.25;
  min-width: 0;
}

.brand small {
  display: block;
  color: #d7bd70;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px 6px;
  min-width: 0;
  flex-wrap: wrap;
  font-weight: 700;
  color: rgba(255, 255, 255, .78);
}

.nav-links a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 18px;
  white-space: nowrap;
  font-size: 15px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--shell-white);
  background: rgba(184, 148, 53, .18);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border-radius: 999px !important;
  border: 1px solid transparent;
  font-weight: 800;
  cursor: pointer;
  box-sizing: border-box;
  text-decoration: none;
  font-family: inherit;
  outline: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
  background: var(--shell-button);
  color: var(--shell-white);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px !important;
  box-shadow: 0 12px 26px rgba(209, 160, 93, .22);
}

.btn-primary:hover {
  background: var(--shell-button-hover);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--shell-button-line);
  color: #f5dfbd;
  border-radius: 999px !important;
  box-shadow: none;
}

.btn-outline:hover {
  background: rgba(209, 160, 93, .12);
  color: var(--shell-white);
}

.theme-toggle {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, .08);
  color: #f5dfbd;
  border: 1px solid var(--shell-button-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: rgba(209, 160, 93, .14);
  color: var(--shell-white);
}

.theme-toggle-mobile {
  display: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(184, 148, 53, .32);
  color: var(--shell-white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.site-footer {
  padding: 42px 0 54px;
  background:
    radial-gradient(circle at 82% 12%, rgba(209, 160, 93, .16), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .018)),
    rgba(255, 255, 255, .032);
  border-top: 1px solid rgba(209, 160, 93, .16);
  backdrop-filter: blur(12px);
  color: var(--shell-white);
  margin-top: 34px;
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(280px, .95fr) minmax(260px, 1fr) minmax(280px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.footer-brand {
  min-height: 100%;
  grid-row: span 2;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 800;
}

.footer-grid > div:first-child {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(209, 160, 93, .14);
  background:
    linear-gradient(135deg, rgba(209, 160, 93, .12), rgba(255, 255, 255, .026)),
    rgba(255, 255, 255, .035);
}

.footer-logo img {
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .28));
}

.site-footer p,
.site-footer a {
  color: rgba(255,255,255,.72);
}

.site-footer p {
  margin: 0;
  line-height: 1.8;
  max-width: 34ch;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  min-width: 130px;
  min-height: 100%;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(209, 160, 93, .12);
  background: rgba(255, 255, 255, .026);
}

.footer-links:nth-child(3) {
  grid-row: span 2;
}

.footer-links strong {
  flex: 0 0 100%;
  color: var(--shell-white);
  font-size: 17px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.footer-links a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  width: auto;
  line-height: 1.45;
  font-size: 14px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .035);
}

.footer-links a:hover {
  color: var(--shell-white);
  transform: translateX(-2px);
  border-color: rgba(209, 160, 93, .26);
  background: rgba(209, 160, 93, .12);
}

body.theme-day .site-header {
  background: rgba(248, 243, 234, .78);
  border-bottom-color: rgba(156, 105, 46, .18);
}

body.theme-day .brand,
body.theme-day .nav-links,
body.theme-day .nav-links a.active,
body.theme-day .nav-links a:hover {
  color: #211b15;
}

body.theme-day .brand small {
  color: #8f642b;
}

body.theme-day .nav-links a:hover,
body.theme-day .nav-links a.active {
  background: rgba(185, 130, 63, .12);
}

body.theme-day .menu-toggle,
body.theme-day .theme-toggle,
body.theme-day .btn-outline {
  color: #6c451f;
  background: rgba(255, 255, 255, .52);
  border-color: rgba(156, 105, 46, .28);
}

body.theme-day .btn-outline:hover {
  color: #211b15;
  background: rgba(185, 130, 63, .16);
  border-color: rgba(156, 105, 46, .44);
}

body.theme-day .site-footer {
  background: rgba(255, 255, 255, .42);
  border-top-color: rgba(156, 105, 46, .2);
  color: #211b15;
}

body.theme-day .site-footer p,
body.theme-day .site-footer a {
  color: rgba(33, 27, 21, .72);
}

body.theme-day .footer-grid > div:first-child {
  border-color: rgba(156, 105, 46, .18);
}

body.theme-day .footer-links {
  border-color: rgba(156, 105, 46, .18);
}

body.theme-day .footer-links a {
  border-color: rgba(156, 105, 46, .16);
}

body.theme-day .footer-links strong {
  color: #211b15;
}

body.theme-day .footer-links {
  border-color: rgba(156, 105, 46, .18);
}

body.theme-day .footer-links strong {
  color: #211b15;
}

.nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  z-index: 998;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header.is-open .nav-overlay {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 980px) {
  .site-header .container,
  .site-footer .container {
    width: min(100% - 28px, 1180px);
  }

  .nav {
    min-height: 70px;
    grid-template-columns: auto 44px;
    position: relative;
  }

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

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(184, 148, 53, .32);
    cursor: pointer;
    z-index: 1001;
  }

  .menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--shell-white);
    border-radius: 99px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  }

  .site-header.is-open .menu-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .site-header.is-open .menu-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-header.is-open .menu-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: rgba(12, 10, 9, 0.96);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(209, 160, 93, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 100px 24px 30px;
    gap: 12px;
    z-index: 999;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .site-header.is-open .nav-links {
    right: 0;
    display: flex;
  }

  .nav-links a {
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 16px;
    transition: all 0.25s ease;
  }

  .nav-links a:hover,
  .nav-links a.active {
    color: #fff !important;
    background: rgba(209, 160, 93, 0.15) !important;
    border-color: rgba(209, 160, 93, 0.3) !important;
    padding-right: 24px;
  }

  .nav-actions {
    position: fixed;
    bottom: 30px;
    right: -320px;
    width: 300px;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .site-header.is-open .nav-actions {
    right: 0;
    display: flex;
  }

  body.theme-day .nav-links {
    background: rgba(248, 243, 234, 0.98);
    border-left-color: rgba(156, 105, 46, 0.18);
    box-shadow: -10px 0 30px rgba(112, 77, 36, 0.08);
  }
  body.theme-day .nav-links a {
    color: rgba(33, 27, 21, 0.8) !important;
    background: rgba(33, 27, 21, 0.03);
    border-color: rgba(33, 27, 21, 0.05);
  }
  body.theme-day .nav-links a:hover,
  body.theme-day .nav-links a.active {
    color: #8f642b !important;
    background: rgba(185, 130, 63, 0.12) !important;
    border-color: rgba(185, 130, 63, 0.25) !important;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
    text-align: center;
  }

  .footer-links:nth-child(3) {
    grid-row: auto;
  }

  .footer-logo {
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .site-header {
    background: rgba(17, 17, 17, .76);
  }

  .site-header .container,
  .site-footer .container {
    width: min(100% - 20px, 1180px);
  }

  .site-footer {
    padding: 18px 0 26px;
    margin-top: 24px;
  }

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

  .footer-grid > div:first-child {
    grid-column: 1 / -1;
    padding: 14px;
    border-radius: 18px;
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
    margin-bottom: 4px;
    gap: 8px;
  }

  .footer-logo img {
    width: 46px;
    height: 46px;
  }

  .site-footer p {
    max-width: none;
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
  }

  .footer-links {
    min-width: 0;
    gap: 5px;
    padding: 12px;
  }

  .footer-links strong {
    font-size: 14px;
    line-height: 1.3;
  }

  .footer-links a {
    font-size: 12px;
    line-height: 1.35;
    min-height: 32px;
    padding: 0 10px;
  }

  .footer-links:nth-child(3),
  .footer-links:last-child {
    grid-column: 1 / -1;
  }

  .footer-links:nth-child(3) a {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    text-align: center;
  }

  .footer-links:last-child a {
    flex: 1 1 0;
    justify-content: center;
  }

  .nav {
    direction: ltr;
    min-height: 70px;
    grid-template-columns: 52px 52px minmax(0, 1fr) 62px;
    gap: 6px;
  }

  .brand {
    display: contents;
  }

  .brand img {
    grid-column: 4;
    grid-row: 1;
    width: 62px;
    height: 62px;
    justify-self: end;
    align-self: center;
  }

  .brand span {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
    text-align: center;
    direction: rtl;
    font-size: 17px;
    line-height: 1.18;
    white-space: normal;
  }

  .brand small {
    display: block;
    font-size: 11px;
    margin-top: 2px;
  }

  .menu-toggle {
    grid-column: 1;
    grid-row: 1;
    width: 48px;
    height: 48px;
    justify-self: start;
    align-self: center;
  }

  .theme-toggle-mobile {
    grid-column: 2;
    grid-row: 1;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    display: inline-flex;
    font-size: 12px;
    border-radius: 16px;
    justify-self: start;
    align-self: center;
  }

  .site-header .theme-toggle-mobile {
    width: 48px;
  }

  .nav-links,
  .nav-actions {
    direction: rtl;
  }

  .site-header .nav-actions .btn {
    width: 100%;
  }
}


