/* product_phsm.css */

:root {
  --cream: #fff7ee;
  --beige: #f4e8d9;
  --choc-900: #2f2016;
  --choc-800: #3a291d;
  --choc-700: #4a3525;
  --cocoa: #574338;
  --cocoa-70: rgba(87, 67, 56, 0.7);
  --orange: #ff6a13;
  /* brand accent */
  --amber: #ffb489;
  /* soft accent */
  --cocoa-line: #7b5d4b2b;
  --bg: linear-gradient(180deg, var(--cream), var(--beige) 60%);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(51, 28, 10, 0.12);
  --focus: 0 0 0 3px #fff, 0 0 0 6px var(--orange);
  --header-h: 72px;
}

/* ===== Reset / Base ===== */

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto,
    "Helvetica Neue", Arial, Noto Sans, "Apple Color Emoji", "Segoe UI Emoji",
    "Segoe UI Symbol";
  color: var(--choc-900);
  background: var(--bg);
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  place-self: anchor-center;
}

img#black-background {
  background-color: black;
}

img#bright-contrast {
  backdrop-filter: brightness(0.5);
}

/* ===== Layout ===== */

.container {
  width: min(1200px, 92%);
  margin-inline: auto;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
}

/* ===== Header ===== */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(240, 156, 128, 0.3);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--cocoa-line);
  overflow: visible;
}

.header .header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  overflow: visible;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.logo svg {
  height: 40px;
  width: auto;
}

.mobile-toggle,
.mnav-close {
  display: none;
  background: transparent;
  border: 0;
  font-size: 1.25rem;
  color: var(--choc-900);
}

.mobile-toggle:focus-visible,
.mnav-close:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 10px;
}

/* ===== Primary Nav (desktop structure) ===== */

.nav-links {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 4vw, 36px);
  text-align: center;
  align-items: stretch;
  overflow: visible;
}

.nav-item {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--choc-800);
  position: relative;
  cursor: default;
  user-select: none;
}

.nav-item:hover {
  color: var(--choc-900);
}

/* Base dropdown panel */

.nav-item .dropdown {
  position: absolute;
  left: 50%;
  translate: -50% 8px;
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--cocoa-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  text-align: left;
  display: none;
  max-width: min(92vw, 420px);
  max-height: calc(100vh - var(--header-h) - 24px);
  overflow: auto;
  z-index: 1200;
}

/* Nested dropdown baseline */

.nav-item .dropdown .dropdown {
  left: calc(100% + 12px);
  translate: 0 0;
  top: 0;
  max-width: min(92vw, 420px);
}

/* Broad show (kept) */

.nav-item:focus-within .dropdown,
.nav-item:hover .dropdown {
  display: block;
}

/* Specific show: level-1 only (kept, ordered after broad for readability) */

.nav-item:where(:hover, :focus-within) > .dropdown {
  display: block;
}

/* Dropdown items */

.dropdown-item {
  display: inline-block;
  padding: 6px 4px;
  color: var(--choc-700);
  text-decoration: none;
  border-radius: 8px;
}

.dropdown-item:hover,
.dropdown-item:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--amber) 26%, white);
  color: var(--choc-900);
}

/* Nested (level-2+) flyouts */

.dropdown-item.has-dropdown {
  position: relative;
}

.dropdown-item.has-dropdown > .dropdown {
  display: none;
  position: absolute;
  top: 0;
  left: 100%;
  transform: translate(8px, 0);
  min-width: 280px;
  background: #fff;
  border: 1px solid var(--cocoa-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: calc(100vh - var(--header-h) - 24px);
  overflow: auto;
  z-index: 1300;
  width: 360px;
  height: 360px;
}

.dropdown-item.has-dropdown:where(:hover, :focus-within) > .dropdown {
  display: block;
}

/* Header-only scrollbar hiding */

.header .dropdown {
  scrollbar-width: none;
}

/* Firefox */

.header .dropdown::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* WebKit */

/* Header actions / Social */

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-icons a,
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--choc-900);
  color: #fff;
}

.social-icons a:hover {
  background: var(--orange);
}

.social-icons i,
.footer-social i {
  font-size: 18px;
  line-height: 1;
}

/* ===== Mobile (layout triggers) ===== */

@media (max-width: 980px) {
  .mobile-toggle {
    display: inline-flex;
  }
  .nav-links {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Mobile Overlay Nav ===== */

.mnav[hidden] {
  display: none !important;
}

.mnav {
  position: fixed;
  inset: 0;
  z-index: 1100;
}

.mnav-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.mnav-panel {
  position: absolute;
  inset-block: 0;
  right: 0;
  width: min(420px, 92%);
  background: #fff;
  padding: 20px;
  overflow: auto;
  box-shadow: -20px 0 40px rgba(0, 0, 0, 0.2);
}

.mnav-root[role="menu"] a,
.mnav-sub[role="menu"] a {
  display: block;
  padding: 14px 10px;
  color: var(--choc-800);
  text-decoration: none;
  border-radius: 10px;
}

.mnav-root a:hover,
.mnav-sub a:hover {
  background: #f6efe8;
}

.mnav-close--inmenu {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: 0;
  font-size: 1.2rem;
}

.mnav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

/* ===== Hero ===== */

.hero {
  position: relative;
  padding: clamp(40px, 6vw, 80px) 0;
  border-bottom: 1px solid var(--cocoa-line);
}

.hero-inner {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  place-items: center;
  text-align: center;
}

.eyebrow {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--orange);
  margin: 6px 0 0;
}

.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
  margin: 0;
  color: var(--choc-900);
}

.hero-title .accent {
  background: linear-gradient(42deg, #ffa500 13%, #cc5500 71%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--cocoa-70);
  max-width: 72ch;
  margin: 8px auto 0;
}

.hero-art {
  margin: clamp(18px, 3vw, 40px) auto 0;
  max-width: 980px;
  filter: drop-shadow(0 20px 50px rgba(255, 106, 19, 0.41));
}

img.phsm-hero {
  width: 753px;
}

img#securityr-illus {
  height: 250px;
  width: fit-content;
}

/* ===== Cards (6 / 8 series) ===== */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 3vw, 28px);
  margin: clamp(28px, 5vw, 56px) auto;
}

.card {
  background: #fff;
  border: 1px solid var(--cocoa-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(16px, 2vw, 22px);
}

.card header h3 {
  margin: 0.25rem 0 0.25rem;
  font-size: 1.25rem;
}

.card header p {
  color: var(--cocoa-70);
  margin: 0 0 0.5rem;
}

.card-img {
  border-radius: 12px;
  height: 360px;
  width: auto;
}

/* ===== Alternating features ===== */

.feature {
  padding: clamp(28px, 6vw, 80px) 0;
  border-top: 1px solid var(--cocoa-line);
  background: #fff5ec;
}

.feature.alt {
  background: transparent;
}

.feature .feature-copy h3 {
  font-size: clamp(20px, 2.6vw, 30px);
  margin: 0.25rem 0 0.5rem;
  color: var(--choc-900);
}

.feature .feature-copy p {
  color: var(--cocoa-70);
  margin: 0;
}

.feature figure {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* ===== Footer (merged tweaks + base) ===== */

footer.footer,
.footer {
  background: var(--choc-900);
  color: #fff;
  border-top: 1px solid #00000024;
}

.footer .container {
  padding: 32px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr;
  gap: clamp(16px, 3vw, 32px);
  align-items: flex-start;
}

.footer h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: 0.03em;
  color: #fff;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin: 6px 0;
}

.footer-links a {
  color: #ffe1cf;
}

.footer-links a:hover {
  color: var(--amber);
  transform: translateX(4px);
}

.footer .submenu-header {
  margin-top: 12px;
  font-weight: 700;
  color: #fff;
  opacity: 0.85;
}

.footer a {
  color: #ffe1cf;
}

.footer a:hover {
  color: var(--amber);
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.header .social-icons a,
.footer .footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--choc-900);
  color: #fff;
}

.header .social-icons a:hover,
.footer .footer-social a:hover {
  background: var(--orange);
}

.header .social-icons a[aria-label="X (Twitter)"] i,
.footer .footer-social a[aria-label="Twitter"] svg {
  width: 18px;
  height: 18px;
  display: block;
}

.copyright {
  border-top: 1px solid #ffffff26;
  margin-top: 24px;
  padding-top: 16px;
  text-align: center;
  font-size: 0.875rem;
  color: #f0e5db;
}

/* ===== Accessibility ===== */

a,
button {
  transition: 0.15s ease;
}

a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ===== Responsive Tweaks ===== */

/* Cards collapse */

@media (max-width: 900px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

/* Laptop widths where centered menus would otherwise hug the left */

@media (max-width: 1200px) and (min-width: 1000px) {
  .header .nav-item > .dropdown {
    left: 50%;
    transform: translate(-50%, 8px);
  }
  .header .nav-item > .dropdown .dropdown {
    left: 100%;
    transform: translate(8px, 0);
  }
}

/* Base dropdown: centered under its label, never clipped (desktop+) */

@media (min-width: 1000px) {
  .header .nav-item > .dropdown {
    position: absolute !important;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 8px);
    min-width: 260px;
    max-width: min(92vw, 480px);
    max-height: calc(100vh - var(--header-h) - 24px);
    overflow: auto;
    background: var(--dropdown-bg, #fff);
    border: 1px solid var(--cocoa-line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.5rem 0;
    display: block;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease;
    z-index: 1200;
  }
  /* Show on hover/focus */
  .header .nav-item.has-dropdown:hover > .dropdown,
  .header .nav-item.has-dropdown:focus-within > .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
  }
  /* Nested dropdowns fly to the right */
  .header .nav-item > .dropdown .dropdown {
    top: 0;
    left: 100%;
    transform: translate(8px, 0);
    max-width: min(92vw, 480px);
    max-height: calc(100vh - var(--header-h) - 24px);
  }
  /* Dropdown items – desktop spacing */
  .header .dropdown-item {
    display: block;
    padding: 0.6rem 1rem;
    margin: 0;
    color: var(--choc-700);
    white-space: nowrap;
    border-radius: 8px;
  }
  .header .dropdown-item:hover,
  .header .dropdown-item:focus-visible {
    background: color-mix(in srgb, var(--amber) 26%, #fff);
    color: var(--choc-900);
  }
}

/* WebKit / small laptop realignment */

@media (max-width: 1200px) {
  .nav-item .dropdown {
    left: 0;
    translate: 0 8px;
  }
  .nav-item .dropdown .dropdown {
    left: 0;
    translate: 0 8px;
    top: auto;
  }
}

/* ===== MOBILE OVERLAY — FULLSCREEN ===== */

@media (max-width: 999px) {
  .mobile-toggle {
    display: inline-flex !important;
  }
  .nav-links {
    display: none !important;
  }
  #mobile-nav.mnav {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: block;
    background: rgba(255, 247, 238, 0.86);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    padding-top: calc(var(--header-h) + 8px);
  }
  .mnav-scrim {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
  }
  .mnav-panel {
    position: relative;
    z-index: 1;
    padding: 12px 20px 40px;
    overflow-y: auto;
    width: auto;
    right: auto;
    inset-block: auto;
    box-shadow: none;
    background: transparent;
  }
  .mnav-root {
    display: block;
  }
  .mnav-sub[hidden] {
    display: none !important;
  }
  .mnav-root .m-item,
  .mnav-sub a {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    color: var(--choc-800);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--cocoa-line);
    margin: 0 0 10px;
  }
  .mnav-root .m-item:hover,
  .mnav-sub a:hover {
    background: color-mix(in srgb, var(--amber) 26%, white);
  }
  .mnav-close--inmenu {
    position: fixed;
    top: 14px;
    right: clamp(12px, 8vw, 40px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    border: 0;
    z-index: 1500;
  }
}

/* ===== Narrow grid fallback ===== */

@media (max-width: 960px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
