/* ---- Header container ---- */
header.header.glass.sticky {
  background: rgba(18, 18, 18, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  padding: var(--space-sm) 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, .2);
}

/* Logo */
.header .logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  mix-blend-mode: plus-lighter;
}

.header .logo svg {
  height: 42px;
  width: auto;
}

/* ---- Primary nav row ---- */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-item {
  position: relative;
  padding: .5rem 1rem;
  border-radius: 10px;
  color: var(--color-text);
  font-weight: 600;
}

.nav-item:hover,
.nav-item:active,
.nav-item::focus {
  background: rgba(255, 106, 19, .10);
}

.nav-item>a {
  color: inherit;
  text-decoration: none;
  position: relative;
  padding-bottom: .25rem;
  line-height: 1.1;
}

/* underline on hover */
.nav-item>a::after {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width .25s ease;
}

.nav-item>a:hover::after .nav-item>a:active::after,
.nav-item>a:focus::after {
  width: 100%;
}

/* caret on items with dropdowns */
.has-dropdown {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
}

.has-dropdown::after {
  margin-left: .35rem;
  font-size: .85em;
  opacity: .85;
  line-height: 1;
}

/* ---- Dropdowns (level 1) ---- */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  margin-top: .4rem;
  padding: .35rem;
  border-radius: 12px;
  isolation: isolate;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: var(--transition);
  z-index: 1200;
}

.has-dropdown:hover>.dropdown,
.has-dropdown:focus-within>.dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Menu items */
.dropdown-item {
  display: block;
  padding: .6rem .85rem;
  border-radius: 8px;
  color: var(--color-text);
  white-space: nowrap;
}

.dropdown-item:hover,
.dropdown-item:active,
.dropdown-item:focus {
  background: rgba(255, 106, 19, .14);
  color: var(--color-text);
}

/* ---- Nested dropdowns (level 2+) ---- */
.dropdown .has-dropdown {
  position: relative;
}

.dropdown .has-dropdown>.dropdown {
  top: 0;
  left: calc(100% + .35rem);
  margin-top: 0;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

/* Remove any legacy colors from other bundles */
.dropdown,
.dropdown .dropdown,
.dropdown-item {
  background-image: none !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* ---- Socials & mobile toggle ---- */
.header-actions {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.header-actions .mobile-toggle {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  background: transparent;
  border: none;
}

.header-actions .mobile-toggle:hover,
.header-actions .mobile-toggle:active,
.header-actions .mobile-toggle:focus {
  background: rgba(255, 255, 255, .1);
}

/* ---- Mobile navigation ---- */
@media (max-width: 992px) {
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    padding: 1rem .75rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: .35rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-item {
    padding: .35rem .5rem;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }

  .dropdown-item {
    padding: .55rem .9rem;
  }

  .header-actions .mobile-toggle {
    display: inline-flex;
  }
}

/* ---- Footer (match homepage grid/layout) ---- */
.footer {
  margin-top: var(--space-xl);
  padding: var(--space-lg) 0 var(--space-md);
  background: rgba(18, 18, 18, .75);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--glass-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md);
}

.footer-col h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: .75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: .35rem;
}

.footer-links a {
  color: var(--color-text);
  opacity: .85;
}

.footer-links a:hover,
.footer-links a:active,
.footer-links a:focus {
  opacity: 1;
  color: var(--color-secondary);
}

.footer-social {
  display: inline-flex;
  gap: .5rem;
  margin-top: .75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .08);
  color: var(--color-text);
}

.footer-social a:hover,
.footer-social a:active,
.footer-social a:focus {
  background: var(--color-primary);
  color: #fff;
}

.copyright {
  margin-top: var(--space-md);
  opacity: .7;
  font-size: .9rem;
  text-align: center;
}

img {
  max-width: 60vw;
  max-height: 60vh;
  backdrop-filter: invert(1);
  padding: 10px;
}

img#twitter-logo {
  backdrop-filter: unset;
  padding: 0;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ============ NAV OVERRIDES (desktop) ============ */
@media (min-width: 768px) {

  /* Layout: keep one clean row */
  .header .nav-links {
    /* display: flex; */
    align-items: center;
    gap: 2rem;
  }

  .header .nav-links br {
    display: none !important;
  }

  .header .nav-item {
    position: relative;
    padding: .75rem 0;
  }

  .header .nav-item>a,
  .nav-item.has-dropdown {
    display: inline-block;
    font-family: var(--font-heading, "Space Grotesk", sans-serif);
    font-size: .95rem;
    /* slightly tighter than base */
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--color-text);
    padding: .5rem 0;
    line-height: 1.1;
  }

  .header .nav-item>a:hover,
  .header .nav-item>a:active,
  .header .nav-item>a:focus {
    color: var(--color-secondary);
  }

  /* Caret */
  .header .has-dropdown::after {
    margin-left: .35rem;
    font-size: .8em;
    color: var(--color-secondary);
  }

  /* Base dropdown (hidden by default) */
  .header .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    padding: .5rem 0;
    border-radius: 12px;
    background: var(--dropdown-bg, #1b120e);
    border: 1px solid var(--dropdown-border, rgba(255, 106, 19, .22));
    box-shadow: var(--shadow-md, 0 10px 30px rgba(0, 0, 0, .5));
    z-index: 1200;

    /* keep it in flow but invisible for smoother transitions */
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: transform .2s ease, opacity .2s ease, visibility .2s ease;
  }

  /* Nested dropdowns open to the right */
  .header .dropdown .dropdown {
    top: 0;
    left: 100%;
    margin-left: .25rem;
  }

  /* Dropdown items */
  .header .dropdown-item {
    display: block;
    padding: .6rem 1rem;
    margin: 0;
    color: var(--color-text);
    white-space: nowrap;
  }

  .header .dropdown-item:hover,
  .header .dropdown-item:active,
  .header .dropdown-item:focus {
    background: rgba(255, 106, 19, .12);
    color: var(--color-white);
  }

  .header .has-dropdown:hover>.dropdown,
  .header .has-dropdown:active>.dropdown,
  .header .has-dropdown:focus-within>.dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Optional: ensure dropdowns overlay hero sections on all engines */
.header {
  z-index: 1000;
}

/* vw-ovr.css
   Force design to render as if viewport = 1715px (≈ 2560px * 0.67) on all devices
*/

/* Root font sizing baseline */
html {
  font-size: calc(1715px / 100);
  /* 1rem ≈ 17.15px baseline */
}

/* Override container widths */
.container {
  max-width: 1715px !important;
  padding: 0 3vw;
  /* keep proportional padding */
}

/* Force nav and header to scale consistently */
header.header,
.header-inner,
.nav-links {
  max-width: 1715px;
  margin: 0 auto;
}

/* Typography adjustments */
body {
  font-size: 1rem;
  /* baseline is now locked */
  line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 1em;
  /* keep relative */
  line-height: 1.2;
}

h1 {
  font-size: 1.7rem;
}

h2,
.section__header h2 {
  font-size: 1.3rem;
}

/* Scale hero and section padding to match */
.hero,
.section {
  padding-left: 3vw;
  padding-right: 3vw;
}

/* Ensure dropdowns scale correctly */
.header .dropdown {
  min-width: 260px;
  font-size: 0.95rem;
}

/* ================================
   Submenu visibility control
   ================================ */

/* Base: hide nested submenus */
.header .dropdown .dropdown {
  display: block;
  /* keep them in flow for transition */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: transform .2s ease, opacity .2s ease, visibility .2s ease;
}

.header .dropdown-item.has-dropdown:hover>.dropdown,
.header .dropdown-item.has-dropdown:active>.dropdown,
.header .dropdown-item.has-dropdown:focus-within>.dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 1280px) {

  .features__grid,
  .products__grid {
    grid-template-columns: 0.5fr 0.5fr;
  }

  .grid {
    display: grid;
    align-items: start;
    gap: 3rem;
  }
}

.icon-grid {
  display: grid;
  align-items: center;
}

section.hero {
  min-height: 40vh;
  height: 55vh;
}

article.glass,
.container.hero-content {
  padding: 55px;
  padding-top: 40px;
}

.container,
.section {
  padding: 30px;
}

header.header.glass.sticky {
  height: 19vh;
}

path#path13,
path#path15,
path#path17,
path#path19,
path#path21,
path#path23,
path#path25,
path#path27,
polygon#polygon33,
polyline#polyline37 {
  fill: rgb(255 255 255 / 70%);
}

#page-design .accordion {
  max-width: 1200px;
  margin: 0 auto;
}

#page-design details {
  border-radius: 16px;
  background: var(--surface-1, rgba(255, 255, 255, .02));
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  margin: 1rem 0;
  border: 1px solid rgba(255, 255, 255, .06)
}

#page-design summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 600;
  font-size: 1.125rem;
}

#page-design summary::-webkit-details-marker {
  display: none
}

#page-design .summary-pill {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  background: var(--pill, rgba(255, 255, 255, .06));
  border-radius: 999px;
  padding: .5rem 1rem
}

#page-design .summary-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08)
}

#page-design details[open] .chev {
  transform: rotate(180deg)
}

/* Horizontally scrollable row */
#page-design .scroll-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: .75rem 1rem 1.25rem;
  scroll-snap-type: x proximity
}

#page-design .scroll-row::-webkit-scrollbar {
  height: 10px
}

#page-design .scroll-row::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .15);
  border-radius: 999px
}

/* Card */
#page-design .dr-card {
  scroll-snap-align: start;
  min-width: 280px;
  max-width: 320px;
  border-radius: 16px
}

#page-design .dr-figure {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, .04)
}

#page-design .dr-body {
  padding: .75rem 1rem 1rem
}

#page-design .dr-title {
  font-weight: 600;
  line-height: 1.25;
  margin: .5rem 0 .25rem
}

#page-design .dr-sub {
  font-size: .9rem;
  opacity: .8;
  margin: 0 0 .5rem
}

#page-design .dr-actions {
  display: flex;
  gap: .5rem;
  align-items: center
}

#page-design .btn-icon {
  display: inline-flex;
  align-items: center;
  gap: .5rem
}

/* Helper layout */
#page-design .section+.section {
  margin-top: 1rem
}

#page-press .press-list {
  display: grid;
  gap: 2rem;
}

#page-press .press-item {
  padding: 1.25rem 1.25rem 1.25rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .12)
}

#page-press .press-item:last-child {
  border-bottom: none
}

#page-press .press-date {
  display: inline-block;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: .35rem
}

#page-press .press-title {
  font-size: 1.15rem;
  font-weight: 700
}

#page-press .press-excerpt {
  margin-top: .4rem;
  opacity: .9
}

#page-press .pager {
  display: flex;
  gap: .35rem;
  justify-content: flex-end;
  margin: 1rem 0
}

#page-press .pager a {
  display: inline-block;
  padding: .35rem .6rem;
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  opacity: .85
}

#page-press .pager a:hover,
#page-press .pager a:active,
#page-press .pager a:focus {
  opacity: 1;
  background: rgba(255, 255, 255, .06)
}

/* Bring header/menu text back to normal case and original rhythm */
.header .nav-item>a,
.header .nav-item.has-dropdown,
.header .dropdown-item {
  text-transform: none !important;
  /* undo ALL CAPS */
  letter-spacing: 0 !important;
  /* back to normal kerning */
  font-weight: 600;
  /* match body/heading weight */
}

/* Normalize spacing/radius so :hover/:focus/:active don't “jump” */
.header .nav-item {
  padding: .5rem 1rem;
  border-radius: 10px;
}

.header .dropdown-item {
  padding: .6rem 1rem;
  border-radius: 8px;
}

/* Unify states: use same background for hover/focus/active without changing size */
.header .nav-item:hover,
.header .nav-item:focus,
.header .nav-item:active {
  background: rgba(255, 106, 19, .10);
}

.header .dropdown-item:hover,
.header .dropdown-item:focus,
.header .dropdown-item:active {
  background: rgba(255, 106, 19, .14);
}

.nav-item.has-dropdown,
.header .dropdown-item:hover,
.header .dropdown-item:focus,
.header .dropdown-item:active {
  font-family: var(--font-body);
  color: bisque;
}

/* --- ReRAM pages: spacing so sticky header never hides content --- */
:root {
  --header-h: 76px;
}

html {
  scroll-padding-top: calc(var(--header-h) + 12px);
}

body#page-reram-overview main,
body#page-reram-advan main {
  padding-top: calc(var(--header-h) + 24px);
}

.section {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

/* --- Reveal-on-scroll helpers (paired with GSAP triggers) --- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
  transition: transform .6s ease, opacity .6s ease;
}

/* Figures responsive + centered */
.figure {
  display: grid;
  gap: .75rem;
  justify-items: center;
  margin: 1.25rem auto;
  text-align: center;
}

.figure img {
  max-width: min(780px, 100%);
  height: auto;
}

.figure figcaption {
  opacity: .85;
  font-size: .9rem;
}

.container.hero-content {
  mix-blend-mode: exclusion;
  font-size: large;
}

#hero-standard {
  background: url('../img/Background.png') center / cover no-repeat;
}

/* ===== News pagination & grouping (additive) ===== */
#page-press .news-item a {
  color: var(--color-secondary);
  text-decoration: underline;
}

#page-press .pager button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .18), 0 0 0 6px rgba(255, 106, 19, .55);
}

img.news-logos {
  width: 15vw;
  max-height: 15vh;
  margin-bottom: 10px;
}

/* ==== About: Dual cards (Key Facts + Tech Highlights) ==== */
#about-highlights .cards-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg, 2rem);
  align-items: start;
}

.kb-card {
  border-radius: var(--border-radius, 12px);
  padding: clamp(1rem, 2vw, 1.75rem);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}

.kb-card__title {
  margin: 0 0 .75rem;
  font-family: var(--font-heading, "Space Grotesk", system-ui, sans-serif);
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kb-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: .65rem;
}

.kb-list li {
  position: relative;
  padding-left: 1.6rem;
  line-height: 1.5;
  color: var(--color-text);
}

/* Brand tick bullets */
.kb-list li::before {
  content: "✕";
  /* minimalist square tick that matches your screenshots but brand-colored */
  position: absolute;
  left: 0;
  top: .15rem;
  width: 1rem;
  height: 1rem;
  display: inline-grid;
  place-items: center;
  font-size: .85rem;
  line-height: 1;
  color: var(--color-primary);
  background: rgba(255, 106, 19, .12);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
}

/* Light theme readability */
[data-theme="light"] .kb-list li::before {
  background: rgba(123, 63, 0, .08);
  color: var(--color-primary-dark);
  border-color: rgba(123, 63, 0, .25);
}

/* Responsive stack */
@media (max-width: 900px) {
  #about-highlights .cards-duo {
    grid-template-columns: 1fr;
    gap: var(--space-md, 1.5rem);
  }
}

li {
  color: sandybrown;
}