/*
Theme Name: SHFO
Theme URI: https://sh-fo.ru
Author: SH Family Office
Description: Minimal custom theme for SH Family Office marketplace and corporate pages.
Version: 1.0.0
Text Domain: shfo
*/

:root {
  --shfo-bg: #f4f1eb;
  --shfo-surface: #ffffff;
  --shfo-surface-soft: #fbfaf7;
  --shfo-text: #1e293b;
  --shfo-text-muted: #64748b;
  --shfo-border: #dde4ef;
  --shfo-accent: #2563eb;
  --shfo-accent-dark: #1d4ed8;
  --shfo-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  --shfo-radius-lg: 22px;
  --shfo-radius-md: 16px;
  --shfo-radius-sm: 12px;
  --shfo-container: 1380px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #fcfbf8 0%, #f5f1ea 100%);
  color: var(--shfo-text);
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.shfo-container {
  width: min(var(--shfo-container), calc(100vw - 40px));
  margin: 0 auto;
}

.shfo-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.admin-bar .shfo-site-header {
  top: 32px;
}

.shfo-site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
}

.shfo-menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
}

.shfo-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #0f172a;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.shfo-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.shfo-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.shfo-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.shfo-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.shfo-brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.shfo-brand__title {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.shfo-site-nav .menu {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.shfo-site-nav a {
  color: #334155;
  font-size: 15px;
  font-weight: 600;
  transition: color 0.18s ease;
}

.shfo-site-nav a:hover,
.shfo-site-nav .current-menu-item > a,
.shfo-site-nav .current_page_item > a {
  color: var(--shfo-accent);
}

.shfo-site-main {
  min-height: calc(100vh - 84px);
}

.shfo-page-shell {
  padding: 26px 0 42px;
}

.shfo-page-card {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shfo-shadow);
}

.shfo-page-title {
  margin: 0 0 18px 0;
  font-size: 42px;
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.shfo-page-content {
  color: var(--shfo-text-muted);
  font-size: 17px;
}

.shfo-site-footer {
  padding: 26px 0 34px;
  color: #64748b;
  font-size: 14px;
}

.shfo-site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 18px;
}

@media (max-width: 921px) {
  .admin-bar .shfo-site-header {
    top: 46px;
  }

  .shfo-site-header__inner {
    min-height: 74px;
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 12px 0;
  }

  .shfo-menu-toggle {
    display: inline-flex;
  }

  .shfo-site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 12px;
    left: 12px;
    padding: 14px;
    border: 1px solid rgba(221, 228, 239, 0.96);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  }

  .shfo-site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .shfo-site-nav .menu {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }

  .shfo-page-shell {
    padding: 18px 0 30px;
  }

  .shfo-page-card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .shfo-page-title {
    font-size: 32px;
  }

  .shfo-site-footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .shfo-container {
    width: calc(100vw - 24px);
  }

  .shfo-brand {
    gap: 12px;
  }

  .shfo-brand__title {
    font-size: 17px;
  }

  .shfo-site-nav a {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 15px;
  }
}
