/* Keep the desktop composition at its authored Figma width on larger displays. */
html {
  background: #faf6ec;
}

.has-dropdown.open .nav-dropdown {
  display: block !important;
}

.download-dropdown {
  right: 0;
  left: auto;
  width: 422px;
  height: 352px;
  box-shadow: 0 16px 30px rgb(15 32 64 / 10%);
}

.download-dropdown .nav-dropdown-label {
  height: 40px;
  padding: 11px 20px;
}

.download-dropdown-item {
  height: 62px;
  padding: 0 20px;
  font-size: 14px;
}

.download-dropdown-item:hover,
.download-dropdown-item:focus-visible {
  padding-left: 24px;
}

.download-platform,
.download-row-meta {
  display: flex;
  align-items: center;
}

.download-platform {
  min-width: 0;
  gap: 12px;
}

.download-row-meta {
  flex-shrink: 0;
  gap: 16px;
}

.download-row-meta .chevron {
  color: #181d27;
  font-size: 28px;
  line-height: 1;
}

.download-icon {
  display: flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
}

.download-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.windows-mark-small {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  gap: 2px;
}

.windows-mark-small i {
  display: block;
  width: 8px;
  height: 8px;
}

.windows-mark-small i:nth-child(1) {
  background: #f25022;
}

.windows-mark-small i:nth-child(2) {
  background: #7fba00;
}

.windows-mark-small i:nth-child(3) {
  background: #00a4ef;
}

.windows-mark-small i:nth-child(4) {
  background: #ffb900;
}

.download-status {
  padding: 2px 6px;
  border-radius: 3px;
  background: #f0ead8;
  color: #6b5c3a;
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.download-dropdown-item.is-coming-soon,
.download-mobile-row.is-coming-soon {
  cursor: default;
}

.download-mobile-row {
  min-height: 58px;
  gap: 12px;
}

/* Shared Features menu interaction states. */
.nav-dropdown-item,
.mobile-nav-subitem {
  transition: background-color 180ms ease, color 180ms ease, padding-left 180ms ease;
}

.nav-dropdown-item .chevron,
.mobile-nav-subitem .chevron {
  display: inline-block;
  transition: color 180ms ease, transform 180ms ease;
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible,
.mobile-nav-subitem:hover,
.mobile-nav-subitem:focus-visible {
  outline: none;
  background: #f6efdc;
  color: #0f2040;
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible {
  padding-left: 24px;
}

.mobile-nav-subitem:hover,
.mobile-nav-subitem:focus-visible {
  padding-left: 36px;
}

.nav-dropdown-item:hover .chevron,
.nav-dropdown-item:focus-visible .chevron,
.mobile-nav-subitem:hover .chevron,
.mobile-nav-subitem:focus-visible .chevron {
  color: #ee6818;
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .nav-dropdown-item,
  .nav-dropdown-item .chevron,
  .mobile-nav-subitem,
  .mobile-nav-subitem .chevron {
    transition: none;
  }
}

body {
  position: relative;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: #faf6ec;
}

/* Button component labels are always a single, non-shrinking line. */
.button,
.table-button,
.header-cta {
  flex-shrink: 0;
  white-space: nowrap;
}

.orange-cta > div:first-child {
  min-width: 0;
}

.orange-cta > .actions {
  flex-shrink: 0;
}

/* Dark-section border token from Figma: colors/gray-dark-mode/700. */
.perks > .center-heading {
  border-right: 1px solid #373a41;
  border-left: 1px solid #373a41;
}

.perks > .feature-grid article,
.faq > .center-heading,
.faq > .faq-layout {
  border-color: #373a41;
}

.faq > .center-heading {
  border-bottom: 1px solid #373a41;
}

.faq > .faq-layout {
  border-top: 0;
  border-bottom: 1px solid #373a41;
}

/* Accordions grow the FAQ surface while preserving its authored padding. */
.faq {
  height: auto;
  overflow: visible;
}

.faq > .faq-layout {
  height: auto;
  min-height: 523px;
  align-items: start;
  padding-top: 72px;
  padding-bottom: 72px;
}

.faq .accordion {
  min-width: 0;
  align-self: start;
}

.faq .faq-item {
  height: auto;
}

/* Full-width section surfaces with centered, non-stretching content. */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-right: max(0px, calc((100% - 1728px) / 2));
  padding-left: max(0px, calc((100% - 1728px) / 2));
  border-bottom: 1px solid #e9eaeb;
  background: #faf6ec;
  transition: transform 180ms ease;
  will-change: transform;
}

.site-header.site-header-hidden {
  transform: translateY(calc(-100% - 1px));
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

.perks > .center-heading,
.perks > .feature-grid,
.security > .center-heading,
.security > .security-grid,
.comparison > .center-heading,
.comparison > .comparison-wrap,
.download > .center-heading,
.pricing > .center-heading,
.pricing > .plans,
.faq > .center-heading,
.faq > .faq-layout {
  width: min(calc(100% - 96px), 1632px);
  margin-right: auto;
  margin-left: auto;
}

.orange-cta {
  padding-right: max(48px, calc((100% - 1632px) / 2));
  padding-left: max(48px, calc((100% - 1632px) / 2));
}

.use-cases {
  border: 1px solid #e9eaeb;
}

.use-cases > .center-heading {
  width: min(calc(100% - 96px), 1632px);
  margin-right: auto;
  margin-left: auto;
  border-right: 1px solid #e9eaeb;
  border-left: 1px solid #e9eaeb;
}

.use-cases > .use-grid {
  width: min(calc(100% - 2px), 1726px);
  margin-right: auto;
  margin-left: auto;
  padding-right: 47px;
  padding-left: 47px;
  border-top: 1px solid #e9eaeb;
  border-bottom: 1px solid #e9eaeb;
}

.use-cases > .use-grid article {
  border: 0;
  border-right: 1px solid #e9eaeb;
}

.use-cases > .use-grid article:nth-child(3n + 1) {
  border-left: 1px solid #e9eaeb;
}

.use-cases > .use-grid article:nth-child(-n + 3) {
  border-bottom: 1px solid #e9eaeb;
}

.location-section {
  padding-right: max(81px, calc((100% - 1566px) / 2));
  padding-left: max(81px, calc((100% - 1566px) / 2));
}

footer {
  padding-right: max(20px, calc((100% - 1216px) / 2));
  padding-left: max(20px, calc((100% - 1216px) / 2));
}

.socials img {
  display: block;
  width: 24px;
  height: 24px;
}

/* Interactive server map; styled to remain part of the KeenVPN visual system. */
.server-map {
  position: relative;
  width: min(100%, 753px);
  height: 592px;
  overflow: hidden;
  border: 1px solid #e3dccb;
  border-radius: 32px;
  background: #ede6d5;
  box-shadow: 0 18px 44px rgb(15 32 64 / 8%);
}

.world-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.continents {
  fill: #d8cfb9;
  stroke: #c9bea5;
  stroke-width: 2;
}

.map-brand,
.map-status,
.map-selection {
  position: absolute;
  z-index: 3;
  border: 1px solid #e9eaeb;
  background: #fff;
  color: #0f2040;
  box-shadow: 0 8px 20px rgb(15 32 64 / 8%);
}

.map-brand {
  top: 24px;
  left: 24px;
  display: flex;
  height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
}

.map-shield {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #ee6818;
  color: #fff;
  font-size: 9px;
}

.map-status {
  top: 24px;
  right: 24px;
  display: flex;
  height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
}

.map-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #17b26a;
}

.map-selection {
  bottom: 32px;
  left: 24px;
  display: flex;
  min-width: 128px;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 12px;
}

.map-selection small {
  color: #717680;
  font-size: 11px;
}

.map-selection strong {
  font-size: 14px;
}

.server-pin {
  position: absolute;
  z-index: 2;
  top: var(--y);
  left: var(--x);
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  transform: translate(-50%, -50%);
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 8px rgb(232 92 4 / 10%), 0 8px 18px rgb(190 74 6 / 28%);
  cursor: pointer;
}

.server-pin span {
  width: 12px;
  height: 12px;
  border: 3px solid #ee6818;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
}

.server-pin em {
  position: absolute;
  bottom: 36px;
  left: 50%;
  display: none;
  padding: 6px 9px;
  transform: translateX(-50%);
  border-radius: 6px;
  background: #0f2040;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.server-pin:hover em,
.server-pin:focus-visible em,
.server-pin.active em {
  display: block;
}

.server-pin.active {
  background: #ee6818;
  box-shadow: 0 0 0 12px rgb(232 92 4 / 13%), 0 10px 24px rgb(190 74 6 / 35%);
}

.server-pin.active span {
  border-color: #fff;
}

@media (max-width: 1200px) {
  /* Keep the authored hero artwork size bounded and centered on tablets. */
  .dashboard-shell {
    width: min(calc(100% - 96px), 1050px);
  }

  .dashboard-inner {
    width: 100%;
    height: auto;
    aspect-ratio: 1.5;
  }

  /* Compact, always-expanded version of the Figma hover cards. */
  .security {
    height: auto;
  }

  .security .center-heading {
    height: auto;
    min-height: 300px;
    padding: 72px 32px;
  }

  .security-grid {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .security-grid article,
  .security-grid article:hover {
    height: auto;
    min-height: 260px;
    justify-content: flex-start;
    gap: 40px;
    padding: 24px;
    overflow: visible;
    border: 0;
    border-right: 1px solid #e9eaeb;
    border-bottom: 1px solid #e9eaeb;
    background: #fff;
  }

  .security-grid article::before,
  .security-grid article:hover::before {
    opacity: 1;
  }

  .security-detail,
  .security-grid article:hover .security-detail {
    display: block;
  }

  /* The Figma table keeps its column geometry; small screens scroll it. */
  .comparison {
    height: auto;
    padding-bottom: 60px;
  }

  .comparison-wrap {
    height: 577px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  .comparison table {
    width: 1632px;
    min-width: 1632px;
  }

  /* Wrapped headings and body copy participate in card height on small screens. */
  .perks,
  .use-cases {
    height: auto;
  }

  .perks > .feature-grid,
  .use-cases > .use-grid {
    height: auto;
  }

  .perks > .feature-grid article,
  .use-cases > .use-grid article {
    display: flex;
    height: auto;
    min-height: 360px;
    flex-direction: column;
  }

  .perks > .feature-grid h3,
  .use-cases > .use-grid h3 {
    line-height: 36px;
  }

  .perks > .feature-grid p,
  .use-cases > .use-grid p {
    position: static;
    margin-top: auto;
    padding-top: 32px;
  }
}

@media (max-width: 1100px) {
  .orange-cta {
    height: auto;
    min-height: 0;
    display: block;
    padding: 72px 48px;
  }

  .orange-cta > div:first-child {
    max-width: 760px;
  }

  .orange-cta > .actions {
    margin-top: 40px;
    flex-wrap: wrap;
  }

  .location-section {
    height: auto;
    grid-template-columns: 1fr;
    gap: 56px;
    padding: 88px 48px;
  }

  .location-copy {
    max-width: 680px;
    padding-top: 0;
  }

  .globe-art {
    width: 100%;
  }

  .server-map {
    width: 100%;
    max-width: 800px;
  }
}

@media (max-width: 1023px) {
  /* Keep one stable header visible while the menu opens beneath it. */
  .site-header {
    z-index: 101;
  }

  .header-actions {
    align-items: center;
  }

  .mobile-menu {
    top: 49px;
  }

  .mobile-menu-header {
    display: none;
  }

  .nav-toggle svg {
    overflow: visible;
  }

  .nav-toggle svg line {
    transform-box: fill-box;
    transform-origin: center;
    transition: transform 220ms ease, opacity 160ms ease;
  }

  body.menu-open .nav-toggle svg line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  body.menu-open .nav-toggle svg line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  body.menu-open .nav-toggle svg line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  footer {
    height: auto;
    padding: 56px 48px 48px;
  }

  .footer-top {
    display: block;
    height: auto;
  }

  .footer-mark {
    display: block;
    width: 200px;
    height: 200px;
    margin: 0 auto;
  }

  .footer-links {
    margin: 48px 0 0;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .footer-bottom {
    height: auto;
    min-height: 56px;
    margin-top: 48px;
  }
}

@media (max-width: 760px) {
  .mobile-menu {
    top: 60px;
  }

  footer {
    padding: 56px 20px 48px;
  }

  .footer-mark {
    width: 160px;
    height: 160px;
  }

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

  .security-grid {
    grid-template-columns: 1fr;
  }

  .security-grid article,
  .security-grid article:hover {
    min-height: 240px;
  }

  .perks > .feature-grid article,
  .use-cases > .use-grid article {
    min-height: 280px;
  }

  .dashboard-shell {
    width: 100%;
  }

  .perks > .center-heading,
  .perks > .feature-grid,
  .security > .center-heading,
  .security > .security-grid,
  .comparison > .center-heading,
  .comparison > .comparison-wrap,
  .download > .center-heading,
  .pricing > .center-heading,
  .pricing > .plans,
  .faq > .center-heading,
  .faq > .faq-layout {
    width: calc(100% - 40px);
  }

  .faq > .faq-layout {
    min-height: 0;
    padding-top: 56px;
    padding-bottom: 56px;
  }

  .orange-cta {
    padding-right: 20px;
    padding-left: 20px;
  }

  .use-cases > .center-heading,
  .use-cases > .use-grid {
    width: calc(100% - 40px);
  }

  .use-cases > .use-grid {
    padding-right: 0;
    padding-left: 0;
  }

  .use-cases > .use-grid article,
  .use-cases > .use-grid article:nth-child(3n + 1),
  .use-cases > .use-grid article:nth-child(-n + 3) {
    border-right: 1px solid #e9eaeb;
    border-bottom: 1px solid #e9eaeb;
    border-left: 1px solid #e9eaeb;
  }

  .use-cases > .use-grid article:last-child {
    border-bottom: 0;
  }

  .location-section {
    padding: 72px 20px;
  }

  .server-map {
    height: 430px;
    border-radius: 24px;
  }

  .map-brand {
    top: 16px;
    left: 16px;
  }

  .map-status {
    top: 16px;
    right: 16px;
  }

  .map-selection {
    bottom: 16px;
    left: 16px;
  }
}
