/* ========================================
   LUCENTIX LABS — Design Tokens & Styles
   ======================================== */

/* --- Fonts --- */
/* Cabinet Grotesk for display, Satoshi for body — both from Fontshare */

/* --- Type Scale --- */
:root {
  --text-xs:   clamp(0.75rem,  0.7rem  + 0.25vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 0.8rem  + 0.35vw, 1rem);
  --text-base: clamp(1rem,     0.95rem + 0.25vw, 1.125rem);
  --text-lg:   clamp(1.125rem, 1rem    + 0.75vw, 1.5rem);
  --text-xl:   clamp(1.5rem,   1.2rem  + 1.25vw, 2.25rem);
  --text-2xl:  clamp(2rem,     1.2rem  + 2.5vw,  3.5rem);
  --text-3xl:  clamp(2.5rem,   1rem    + 4vw,    5rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 180ms cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Content widths */
  --content-narrow: 640px;
  --content-default: 960px;
  --content-wide: 1200px;

  /* Fonts */
  --font-display: 'Cabinet Grotesk', 'Helvetica Neue', sans-serif;
  --font-body: 'Satoshi', 'Inter', sans-serif;
}

/* --- Color Palette: Dark tech studio --- */
:root, [data-theme="light"] {
  --color-bg:             #fafaf8;
  --color-surface:        #ffffff;
  --color-surface-2:      #f5f4f0;
  --color-surface-offset: #eeecea;
  --color-border:         #d8d5ce;
  --color-divider:        #e3e0db;

  --color-text:           #1a1a1a;
  --color-text-muted:     #6b6b6b;
  --color-text-faint:     #a3a3a3;

  --color-primary:        #0d7377;
  --color-primary-hover:  #095558;
  --color-primary-light:  #e6f4f4;

  --color-accent:         #c77b2e;
  --color-accent-light:   #fdf3e6;

  --color-dark:           #111827;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

[data-theme="dark"] {
  --color-bg:             #0b0f1a;
  --color-surface:        #111827;
  --color-surface-2:      #1a2235;
  --color-surface-offset: #0f1525;
  --color-border:         #2a3450;
  --color-divider:        #1e2740;

  --color-text:           #e8e8e8;
  --color-text-muted:     #94a3b8;
  --color-text-faint:     #64748b;

  --color-primary:        #2dd4bf;
  --color-primary-hover:  #5eead4;
  --color-primary-light:  rgba(45, 212, 191, 0.1);

  --color-accent:         #f59e0b;
  --color-accent-light:   rgba(245, 158, 11, 0.1);

  --color-dark:           #0b0f1a;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg:             #0b0f1a;
    --color-surface:        #111827;
    --color-surface-2:      #1a2235;
    --color-surface-offset: #0f1525;
    --color-border:         #2a3450;
    --color-divider:        #1e2740;
    --color-text:           #e8e8e8;
    --color-text-muted:     #94a3b8;
    --color-text-faint:     #64748b;
    --color-primary:        #2dd4bf;
    --color-primary-hover:  #5eead4;
    --color-primary-light:  rgba(45, 212, 191, 0.1);
    --color-accent:         #f59e0b;
    --color-accent-light:   rgba(245, 158, 11, 0.1);
    --color-dark:           #0b0f1a;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
  }
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container--narrow {
  max-width: var(--content-default);
}

/* ========================================
   HEADER / NAV
   ======================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(from var(--color-bg) l c h / 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-divider);
  transition: box-shadow 0.3s var(--ease-out);
}

.header--scrolled {
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-3);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--color-text);
}

.header__logo-img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.header__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.header__nav a {
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  color: var(--color-text-muted);
  transition: color var(--transition-interactive);
}

.header__nav a:hover {
  color: var(--color-text);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.theme-toggle {
  padding: var(--space-2);
  color: var(--color-text-muted);
  border-radius: var(--radius-md);
  transition: color var(--transition-interactive), background var(--transition-interactive);
}

.theme-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.mobile-menu-btn {
  display: none;
  padding: var(--space-2);
  color: var(--color-text-muted);
}

@media (max-width: 768px) {
  .header__nav {
    display: none;
  }
  .header__nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-divider);
    padding: var(--space-4);
    gap: var(--space-4);
  }
  .mobile-menu-btn {
    display: block;
  }
}

/* ========================================
   HERO
   ======================================== */
.hero {
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
  text-align: left;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.hero__title span {
  color: var(--color-primary);
}

.hero__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  max-width: 48ch;
  line-height: 1.7;
}

.hero__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero__image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .hero {
    text-align: left;
  }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--transition-interactive),
              color var(--transition-interactive),
              transform var(--transition-interactive),
              box-shadow var(--transition-interactive);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

.btn--primary {
  background: var(--color-primary);
  color: #ffffff;
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn--secondary:hover {
  background: var(--color-surface-2);
}

.btn--hero {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-sm);
}

/* ========================================
   SECTIONS
   ======================================== */
.section {
  padding-block: clamp(var(--space-12), 8vw, var(--space-24));
}

.section--alt {
  background: var(--color-surface-2);
}

.section__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 56ch;
  line-height: 1.7;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
  margin-top: var(--space-10);
}

.about__image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about__image img {
  width: 100%;
  height: auto;
}

[data-theme="dark"] .about__image {
  background: var(--color-surface-2);
}

[data-theme="dark"] .about__image img,
[data-theme="dark"] .app-showcase__image img {
  opacity: 0.88;
  border-radius: var(--radius-lg);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .about__image {
    background: var(--color-surface-2);
  }
  :root:not([data-theme]) .about__image img,
  :root:not([data-theme]) .app-showcase__image img {
    opacity: 0.88;
    border-radius: var(--radius-lg);
  }
}

.about__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.about__stat {
  padding: var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
}

.about__stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-primary);
}

.about__stat-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

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

/* ========================================
   FEATURED APP (MeetingMark)
   ======================================== */
.app-showcase {
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-top: var(--space-10);
}

.app-showcase__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.app-showcase__content {
  padding: clamp(var(--space-8), 4vw, var(--space-12));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.app-showcase__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
  width: fit-content;
}

.app-showcase__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.app-showcase__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.app-showcase__features {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.app-showcase__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.app-showcase__features li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-primary);
  margin-top: 2px;
}

.app-showcase__image {
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
}

.app-showcase__image img {
  width: 100%;
  max-width: 480px;
  height: auto;
  border-radius: var(--radius-lg);
}

@media (max-width: 768px) {
  .app-showcase__inner {
    grid-template-columns: 1fr;
  }
  .app-showcase__image {
    order: -1;
    padding: var(--space-6);
  }
}

/* ========================================
   SERVICES / WHAT WE DO
   ======================================== */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.service-card {
  padding: var(--space-8);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-xl);
  transition: box-shadow var(--transition-interactive),
              transform var(--transition-interactive);
}

.service-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.service-card__icon {
  width: 40px;
  height: 40px;
  color: var(--color-primary);
  margin-bottom: var(--space-4);
}

.service-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.service-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

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

/* ========================================
   PROCESS / HOW WE WORK
   ======================================== */
.process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-10);
}

.process-step {
  text-align: left;
}

.process-step__number {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--color-primary);
  opacity: 0.2;
  line-height: 1;
  margin-bottom: var(--space-3);
}

.process-step__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.process-step__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

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

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

/* ========================================
   CTA SECTION
   ======================================== */
.cta {
  text-align: center;
  padding-block: clamp(var(--space-16), 10vw, var(--space-32));
}

.cta__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.cta__desc {
  font-size: var(--text-base);
  color: var(--color-text-muted);
  max-width: 48ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: 1.7;
}

.cta__buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: var(--color-dark);
  color: #ffffff;
  padding-block: var(--space-12);
}

[data-theme="dark"] .footer,
:root:not([data-theme]) .footer {
  background: #060a12;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-10);
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.footer__brand-desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
  margin-top: var(--space-3);
  max-width: 36ch;
}

.footer__heading {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: rgba(255,255,255,0.9);
}

.footer__links {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__links a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer__links a:hover {
  color: rgba(255,255,255,0.9);
}

.footer__bottom {
  max-width: var(--content-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
  padding-top: var(--space-8);
  margin-top: var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__copyright {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
}

.footer__attribution a {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color var(--transition-interactive);
}

.footer__attribution a:hover {
  color: rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.fade-in {
  opacity: 1;
}

@supports (animation-timeline: scroll()) {
  .fade-in {
    opacity: 0;
    animation: reveal-fade linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 100%;
  }
}

@keyframes reveal-fade {
  to { opacity: 1; }
}

/* ========================================
   PLATFORMS
   ======================================== */
.platforms {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-top: var(--space-10);
  flex-wrap: wrap;
}

.platform-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
  padding: var(--space-2) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
}

.platform-badge svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   LOGO in footer
   ======================================== */
.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: #ffffff;
}

.footer__logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ========================================
   LANGUAGE SWITCHER
   ======================================== */
.lang-switcher {
  position: relative;
}

.lang-switcher__btn {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color var(--transition-interactive), border-color var(--transition-interactive), background var(--transition-interactive);
  white-space: nowrap;
}

.lang-switcher__btn:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.lang-switcher__chevron {
  transition: transform 0.2s ease;
}

.lang-switcher__btn[aria-expanded="true"] .lang-switcher__chevron {
  transform: rotate(180deg);
}

.lang-switcher__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  width: 260px;
  max-height: 360px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 100;
  flex-direction: column;
}

.lang-switcher__dropdown.open {
  display: flex;
}

.lang-switcher__search {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: none;
  border-bottom: 1px solid var(--color-divider);
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  outline: none;
}

.lang-switcher__search::placeholder {
  color: var(--color-text-faint);
}

.lang-switcher__list {
  overflow-y: auto;
  max-height: 300px;
  overscroll-behavior: contain;
}

.lang-switcher__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-2) var(--space-4);
  border: none;
  background: transparent;
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-interactive);
}

.lang-switcher__option:hover {
  background: var(--color-surface-2);
}

.lang-switcher__option.active {
  color: var(--color-primary);
  font-weight: 600;
}

.lang-switcher__option-code {
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 400;
}

/* RTL Support */
[dir="rtl"] .hero__grid,
[dir="rtl"] .about__grid,
[dir="rtl"] .app-showcase__inner {
  direction: rtl;
}

[dir="rtl"] .header__nav {
  direction: rtl;
}

[dir="rtl"] .hero__desc,
[dir="rtl"] .section__desc,
[dir="rtl"] .app-showcase__desc,
[dir="rtl"] .service-card__desc,
[dir="rtl"] .process-step__desc,
[dir="rtl"] .cta__desc,
[dir="rtl"] .footer__brand-desc {
  text-align: right;
}

[dir="rtl"] .app-showcase__features li {
  direction: rtl;
}

[dir="rtl"] .lang-switcher__dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .lang-switcher__option {
  text-align: right;
}
