@font-face {
  font-family: 'Lexend';
  src: url('/assets/Lexend-VariableFont_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #9e70ff;
  --accent-strong: #7c4dff;
  --accent-soft: #efe9ff;
  --surface: #ffffff;
  --surface-elevated: #f9f7ff;
  --surface-muted: #f6f4ff;
  --text-strong: #1f1936;
  --text: #2b2544;
  --text-muted: #5f5980;
  --border: rgba(121, 101, 160, 0.16);
  --shadow-soft: 0 18px 40px rgba(34, 21, 81, 0.1);
  --shadow-raised: 0 22px 42px rgba(158, 112, 255, 0.12);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius: 20px;
  --radius-lg: 28px;
  --nav-height: 72px;
  --container-max: 1080px;
  color-scheme: light;
}

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

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

body {
  font-family: 'Lexend', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #ffffff;
  color: var(--text);
  line-height: 1.65;
  letter-spacing: 0.01em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 10vw, 8rem);
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background: transparent;
}

.content {
  width: min(90vw, var(--container-max));
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 5rem) 0;
}

.content.wide {
  width: min(92vw, 1280px);
  padding: 0;
}

h1, h2, h3 {
  color: var(--text-strong);
  line-height: 1.1;
  font-weight: 600;
}

h2 {
  font-size: clamp(2rem, 3vw, 2.75rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

p {
  font-size: clamp(1rem, 1.1vw, 1.05rem);
  margin: 0;
}

/* ----------------------------- Navigation ----------------------------- */
nav#navbar {
  position: sticky;
  top: 0;
  z-index: 9999;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 0 min(5vw, 64px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(158, 112, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(31, 25, 54, 0.05);
}

.logo {
  width: 42px;
  height: 42px;
  background: url('/assets/UBIBOARD-LOGO-RGB_ICON-INV.png') center/contain no-repeat;
  flex-shrink: 0;
}

nav .nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: clamp(1.6rem, 4vw, 3.4rem);
  margin: 0;
  padding: 0;
}

nav .nav-links a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

nav .nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

nav .nav-links a:hover,
nav .nav-links a:focus-visible {
  color: var(--text-strong);
}

nav .nav-links a:hover::after,
nav .nav-links a:focus-visible::after {
  transform: scaleX(1);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

button.login {
  padding: 0.55rem 1.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid rgba(158, 112, 255, 0.5);
  background: rgba(158, 112, 255, 0.08);
  color: var(--accent-strong);
  transition: all 0.2s ease;
}

button.login:hover {
  background: var(--accent-strong);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 22px rgba(122, 74, 253, 0.24);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px;
}

.menu-toggle span {
  width: 26px;
  height: 2px;
  background: var(--text-strong);
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 30, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 9000;
}

.menu-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* ----------------------------- Hero ---------------------------------- */
.hero-section {
  width: min(92vw, 1240px);
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 8vw, 6rem);
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: center;
}

.hero-copy {
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 2.5vw, 2rem);
}

.hero-section h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  margin: 0;
}

.hero-section p {
  font-size: clamp(1.05rem, 1.4vw, 1.15rem);
  color: var(--text-muted);
  max-width: 32rem;
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-frame {
  width: min(100%, 540px);
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0;
  background: linear-gradient(135deg, rgba(237, 230, 255, 0.35), rgba(255, 255, 255, 0.8));
  box-shadow: var(--shadow-soft);
  display: flex;
}

.hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

button.cta {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 2.4rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 18px 30px rgba(122, 74, 253, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

button.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 36px rgba(122, 74, 253, 0.28);
  background: var(--accent-strong);
}

/* ----------------------------- Product narrative ---------------------- */
.features-section {
  background: var(--surface-muted);
}

.features-section .content {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.features-section .steps {
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 4.5vw, 3.5rem);
}

.features-section .step {
  display: flex;
  align-items: flex-start;
  gap: clamp(1.75rem, 4vw, 2.75rem);
  padding: clamp(1.75rem, 4vw, 2.4rem);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid rgba(158, 112, 255, 0.1);
  box-shadow: var(--shadow-soft);
}

.features-section .step.reverse {
  flex-direction: row-reverse;
  text-align: right;
}

.features-section .number {
  flex-shrink: 0;
  width: clamp(66px, 10vw, 92px);
  height: clamp(66px, 10vw, 92px);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(158, 112, 255, 0.4);
}

.features-section p {
  font-size: clamp(1rem, 1.2vw, 1.05rem);
  color: var(--text);
  max-width: 42ch;
}

/* ----------------------------- Feature matrix ------------------------- */
.product-section .content {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3rem);
}

.product-section .product-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  font-size: 0.98rem;
  table-layout: auto;
}

.product-section th,
.product-section td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(121, 101, 160, 0.12);
  vertical-align: middle;
}

.product-section th {
  background: rgba(158, 112, 255, 0.12);
  font-weight: 600;
  color: var(--text-strong);
}

.product-section th:last-child,
.product-section td:last-child {
  width: 180px;
  text-align: center;
}

.product-section tbody tr:nth-child(even) {
  background: rgba(157, 112, 255, 0.06);
}

.product-section tbody tr:last-child td {
  border-bottom: none;
}

.product-section .available {
  color: var(--accent-strong);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
}

.product-section .small-note {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.check-icon {
  width: 20px;
  height: 20px;
  margin: 0 auto;
  display: block;
}

/* ----------------------------- Pricing -------------------------------- */
.pricing-section {
  background: linear-gradient(150deg, rgba(158, 112, 255, 0.08), rgba(255, 255, 255, 0.95));
}

.pricing-section .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 5vw, 3.5rem);
}

.pricing-grid {
  width: min(92vw, 680px);
  padding: clamp(2.2rem, 5vw, 3.5rem);
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  border: 1px solid rgba(158, 112, 255, 0.12);
  box-shadow: var(--shadow-raised);
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 3vw, 2rem);
}

.pricing-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: clamp(1rem, 3vw, 1.8rem);
}

.pricing-form {
  min-width: 220px;
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pricing-form label {
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.95rem;
}

.custom-select {
  position: relative;
}

.select-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius);
  border: 1px solid rgba(121, 101, 160, 0.18);
  background: #fff;
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select-display:hover {
  border-color: var(--accent-strong);
  box-shadow: 0 12px 24px rgba(158, 112, 255, 0.15);
}

.custom-select.open .select-display {
  border-color: var(--accent-strong);
  box-shadow: 0 16px 30px rgba(158, 112, 255, 0.16);
}

.select-arrow {
  width: 18px;
  height: 18px;
  transition: transform 0.25s ease;
}

.custom-select.open .select-arrow {
  transform: rotate(180deg);
}

.select-options {
  position: absolute;
  inset: calc(100% + 6px) 0 auto 0;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid rgba(121, 101, 160, 0.18);
  box-shadow: 0 18px 36px rgba(17, 10, 41, 0.12);
  overflow: hidden auto;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  z-index: 20;
}

.custom-select.open .select-options {
  max-height: 260px;
  opacity: 1;
  pointer-events: auto;
}

.select-option {
  padding: 0.85rem 1.15rem;
  font-weight: 500;
  font-size: 0.98rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.select-option:hover {
  background: var(--accent-soft);
}

.select-option.selected {
  background: rgba(158, 112, 255, 0.14);
  color: var(--accent-strong);
}

.billing-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(121, 101, 160, 0.18);
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 20px rgba(158, 112, 255, 0.08);
}

.billing-toggle button {
  flex: 1;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.billing-toggle button.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 20px rgba(122, 74, 253, 0.25);
}

.pricing-body {
  border-radius: var(--radius);
  padding: clamp(1.6rem, 3.5vw, 2.4rem);
  background: #fff;
  border: 1px solid rgba(121, 101, 160, 0.12);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.price-output {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-output .amount {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--text-strong);
}

.price-output .per-unit {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--text);
}

.price-output .frequency {
  font-size: 0.95rem;
  color: var(--text-muted);
}

#billed-label {
  display: inline-block;
  margin-left: 0.35rem;
}

.contact-sales {
  display: inline-flex;
  align-self: center;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 1rem;
  box-shadow: 0 18px 30px rgba(122, 74, 253, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-sales:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 34px rgba(122, 74, 253, 0.28);
}

/* ----------------------------- FAQ ------------------------------------ */
.faq-section .content {
  display: flex;
  flex-direction: column;
  gap: clamp(1.8rem, 4vw, 2.6rem);
}

.faq-list {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.5rem);
}

.faq-section .faq-item {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid rgba(121, 101, 160, 0.14);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-section .faq-item.active {
  transform: translateY(-2px);
  box-shadow: 0 24px 40px rgba(24, 17, 52, 0.14);
  border-color: rgba(158, 112, 255, 0.4);
}

.faq-section .faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(1.1rem, 2.5vw, 1.4rem) clamp(1.2rem, 4vw, 1.75rem);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-strong);
  background: transparent;
  position: relative;
}

.faq-section .faq-question::after {
  content: '';
  width: 18px;
  height: 18px;
  background: url('/assets/chevron-down-solid.svg') center/contain no-repeat;
  transition: transform 0.35s ease;
}

.faq-section .faq-item.active .faq-question::after {
  transform: rotate(180deg);
}

.faq-section .faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  padding: 0 clamp(1.4rem, 4vw, 2rem);
  color: var(--text);
  font-size: 0.98rem;
  transition: max-height 0.32s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.2s ease, padding 0.28s ease;
}

.faq-section .faq-item.active .faq-answer {
  padding: clamp(1.1rem, 3vw, 1.4rem) clamp(1.4rem, 4vw, 2rem) clamp(1.2rem, 3vw, 1.6rem);
  max-height: clamp(16rem, 45vh, 32rem);
  opacity: 1;
}

/* ----------------------------- Footer ---------------------------------- */
footer {
  background: radial-gradient(circle at top left, #9e70ff 0%, #6a4be0 45%, #2f206b 100%);
  color: #fff;
  margin-top: clamp(4rem, 8vw, 6rem);
}

footer .footer-top {
  width: min(92vw, 1080px);
  margin: 0 auto;
  padding: clamp(3rem, 5vw, 4rem) 0;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: flex-start;
  justify-content: space-between;
}

footer .logo {
  background-image: url('/assets/UBIBOARD-LOGO-RGB_APP_ICON.png');
  width: 56px;
  height: 56px;
  border-radius: 16px;
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.18);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
  flex: 1;
}

.footer-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #fff;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-section a:hover {
  color: #fff;
}

.footer-copy {
  text-align: center;
  font-size: 0.92rem;
  padding: 1.5rem 0 2.4rem;
  color: rgba(255, 255, 255, 0.75);
}

/* ----------------------------- Responsive ------------------------------ */
@media (min-width: 1040px) {
  .hero-section {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

@media (max-width: 1039px) {
  nav#navbar {
    gap: 24px;
  }
  nav .nav-links {
    gap: clamp(1.2rem, 3vw, 2.2rem);
  }
  .hero-section {
    text-align: center;
    grid-template-columns: 1fr;
  }
  .hero-copy {
    align-items: center;
    text-align: center;
  }
  .hero-section p {
    max-width: 40rem;
  }
  button.cta {
    align-self: center;
  }
  .features-section .step,
  .features-section .step.reverse {
    flex-direction: column;
    text-align: left;
  }
  .features-section .number {
    margin-bottom: 1rem;
  }
}

@media (max-width: 900px) {
  :root {
    --nav-height: 66px;
  }

  nav#navbar {
    position: fixed;
    left: 0;
    right: 0;
    padding: 0 min(5vw, 32px);
  }

  main {
    margin-top: var(--nav-height);
    gap: clamp(3rem, 12vw, 6rem);
  }

  nav .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(158, 112, 255, 0.18);
    padding: 1.8rem min(8vw, 48px) 2.6rem;
    gap: 1.35rem;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }

  nav .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    box-shadow: 0 30px 40px rgba(18, 12, 40, 0.18);
  }

  .nav-controls {
    gap: 12px;
  }

  button.login {
    padding: 0.5rem 1.2rem;
    font-size: 0.92rem;
  }

  .menu-toggle {
    display: flex;
  }

  .content,
  .content.wide,
  .hero-section {
    width: min(94vw, 620px);
  }

  .hero-frame {
    width: 100%;
  }

  .pricing-grid {
    width: min(95vw, 520px);
  }

  .product-section .product-table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  h2 {
    font-size: clamp(1.75rem, 6vw, 2.2rem);
  }

  nav#navbar {
    padding: 0 min(5vw, 24px);
  }

  .hero-section {
    padding: clamp(3.2rem, 12vw, 4.2rem) 0 clamp(3rem, 10vw, 4rem);
  }

  .features-section .step {
    padding: clamp(1.4rem, 8vw, 1.9rem);
  }

  .pricing-grid {
    padding: clamp(1.8rem, 8vw, 2.4rem);
  }

  .pricing-header {
    flex-direction: column;
    align-items: stretch;
  }

  .billing-toggle {
    align-self: flex-start;
  }

  .faq-section .faq-question {
    font-size: 0.98rem;
  }

  footer .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    width: 100%;
    grid-template-columns: 1fr;
  }
}
