@import url('./variables.css');

:root {
  scroll-padding-top: 72px;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

section[id] {
  scroll-margin-top: 72px;
}

body.is-rtl {
  direction: rtl;
}

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

.icon {
  --icon-min: 1.25rem;
  --icon-ideal: 1.6vw;
  --icon-max: 1.75rem;
  --icon-dimension: clamp(var(--icon-min), var(--icon-ideal), var(--icon-max));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--icon-dimension);
  block-size: var(--icon-dimension);
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  box-sizing: border-box;
  max-inline-size: var(--icon-dimension);
  max-block-size: var(--icon-dimension);
}

.icon--lg {
  --icon-min: 1.75rem;
  --icon-ideal: calc(1.45rem + 0.5vw);
  --icon-max: 2.25rem;
}

.icon--sm {
  --icon-min: 1rem;
  --icon-ideal: 1.2vw;
  --icon-max: 1.25rem;
}

.icon--badge {
  --icon-min: 1.65rem;
  --icon-ideal: calc(1.35rem + 0.45vw);
  --icon-max: 2.25rem;
}

.app--admin .icon {
  --icon-min: 1.5rem;
  --icon-ideal: calc(1.25rem + 0.45vw);
  --icon-max: 2.25rem;
}

.app--admin .icon--lg {
  --icon-min: 1.85rem;
  --icon-ideal: calc(1.55rem + 0.45vw);
  --icon-max: 2.25rem;
}

.app--admin .icon--badge {
  --icon-min: 1.75rem;
  --icon-ideal: calc(1.45rem + 0.45vw);
  --icon-max: 2.25rem;
}

.icon svg,
.icon img,
svg.icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
}

button {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 2px;
}

.app {
  background-color: var(--color-bg);
  background-image: var(--aurexalgo-watermark),
    linear-gradient(160deg, rgba(90, 125, 255, 0.12), transparent 45%),
    radial-gradient(circle at 20% -10%, rgba(61, 220, 151, 0.18), transparent 50%);
  background-size: 320px 320px, auto, auto;
  background-repeat: repeat, no-repeat, no-repeat;
  background-position: center, center, center;
  background-attachment: fixed, scroll, scroll;
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -40px;
  background: var(--color-surface-alt);
  color: var(--color-text);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-xs);
  box-shadow: var(--elevation-1);
  transition: top var(--transition-fast);
  z-index: 1000;
}

.skip-link:focus {
  top: var(--space-2);
}

main[data-app-root] {
  display: block;
}

.container {
  width: min(100% - var(--space-7), var(--max-width));
  margin-inline: auto;
}

.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid--responsive {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.toolkit__grid {
  align-items: stretch;
}

.section {
  padding: var(--space-10) 0;
}

.section--divider {
  border-top: 1px solid var(--color-border);
}

.section--muted {
  background: linear-gradient(180deg, rgba(22, 27, 40, 0.92), rgba(10, 12, 20, 0.88));
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

@supports (content-visibility: auto) {
  .section,
  .hero,
  .trust-card,
  .workflow__item {
    content-visibility: auto;
    contain: layout paint style;
  }

  .section {
    contain-intrinsic-size: 520px;
  }
}

.section__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-7);
}

.section__kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.section__title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  margin: 0;
}

.section__description {
  max-width: 640px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
}

.site-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(18px);
  background: rgba(5, 8, 15, 0.76);
  border-bottom: 1px solid var(--color-border);
  z-index: 1000;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 600;
  font-size: 1rem;
}

.brand__glyph {
  width: 40px;
  height: 40px;
  border-radius: 40px;
  background: rgba(90, 125, 255, 0.18);
  display: grid;
  place-items: center;
  color: var(--color-accent);
  box-shadow: inset 0 0 0 1px rgba(90, 125, 255, 0.2);
}

.brand__glyph img {
  width: 26px;
  height: auto;
}

.brand__glyph--gold {
  background: linear-gradient(150deg, rgba(247, 216, 124, 0.25), rgba(226, 169, 74, 0.2));
  box-shadow: inset 0 0 0 1px rgba(247, 216, 124, 0.4), 0 12px 28px rgba(21, 12, 4, 0.45);
}

.brand__glyph--gold img {
  width: 28px;
}

.brand__label {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__subtitle {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.65);
}

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

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav__list::-webkit-scrollbar {
  display: none;
}

.nav__link[data-active='true'] {
  color: var(--color-accent);
  font-weight: 600;
}

.nav__link {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.nav__link:hover,
.nav__link:focus-visible {
  color: var(--color-text);
  background: rgba(90, 125, 255, 0.12);
}

.nav__cta {
  display: flex;
  gap: var(--space-2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-weight: 500;
  line-height: 1.2;
  transition: background var(--transition-medium), color var(--transition-fast), border-color var(--transition-fast);
}

.btn--accent {
  background: var(--color-accent);
  color: #0b1120;
}

.btn--accent:hover,
.btn--accent:focus-visible {
  background: #738cff;
}

.btn--ghost {
  border-color: var(--color-border);
  background: rgba(148, 163, 184, 0.06);
  color: var(--color-text);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--color-border-strong);
}

.btn--icon {
  padding-inline: var(--space-2);
}

.hero { 
  position: relative;
  padding: var(--space-10) 0 var(--space-9);
  overflow: hidden;
}

.hero--compact {
  padding: var(--space-8) 0 var(--space-7);
}

.hero--access::before {
  background: linear-gradient(140deg, rgba(90, 125, 255, 0.16), rgba(15, 20, 35, 0.92));
  opacity: 0.9;
}

.hero--access .hero__title {
  font-size: clamp(2.3rem, 4.5vw, 3.1rem);
}

.hero--access .hero__subtitle {
  max-width: 560px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-hero);
  opacity: 0.8;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 640px;
}

.hero__title {
  font-size: clamp(2.8rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.01em;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin: 0;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.hero__heartbeat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
}

.hero__heartbeat-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.hero__heartbeat-badge {
  font-size: 0.95rem;
}

.hero__heartbeat-meta {
  font-size: 0.95rem;
  flex-basis: 100%;
}

.hero__tile {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--elevation-1);
}

.hero__rotation {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--color-accent);
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero__rotation span[data-phrase] {
  transition: opacity var(--transition-medium), transform var(--transition-medium);
  opacity: 1;
}

.hero__rotation span[data-phrase][data-state='leaving'] {
  opacity: 0;
  transform: translateY(-8px);
}

.hero__rotation span[data-phrase][data-state='entering'] {
  opacity: 0;
  transform: translateY(8px);
}

.hero__rotation span[data-phrase][data-state='idle'] {
  opacity: 1;
  transform: translateY(0);
}

.hero__highlights {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.hero__highlights li {
  display: grid;
  gap: var(--space-1);
}

.hero__highlights strong {
  font-weight: 600;
}

.hero__highlights p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.hero__panel {
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--elevation-2);
}

.trust-row {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.trust-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--gradient-card);
  backdrop-filter: blur(12px);
}

.trust-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(90, 125, 255, 0.18);
  display: grid;
  place-items: center;
  color: var(--color-accent);
}

.trust-card button {
  align-self: flex-start;
}

.site-footer {
  margin-top: auto;
  padding: var(--space-8) 0 var(--space-6);
  border-top: 1px solid var(--color-border);
  background: rgba(5, 8, 15, 0.86);
}

.footer-inner {
  display: grid;
  gap: var(--space-6);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  list-style: none;
  margin: 0;
  padding: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.14);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--color-text-muted);
}

.status-dot[data-state='ok'] {
  background: var(--color-success);
}

.status-dot[data-state='warn'] {
  background: var(--color-warn);
}

.status-dot[data-state='error'] {
  background: var(--color-error);
}

@media (max-width: 960px) {
  .app-header {
    flex-wrap: wrap;
  }
  .nav {
    gap: var(--space-3);
  }
}

@media (max-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr;
  }
  .nav {
    width: 100%;
    justify-content: space-between;
    align-items: flex-start;
  }
  .nav__list {
    display: flex;
    overflow-x: auto;
    padding-block-end: 6px;
    margin-inline-end: auto;
  }
  .nav__list::after {
    content: '';
    flex: 0 0 var(--space-4);
  }
  .site-shell {
    padding-top: 0;
  }
}

@media (max-width: 600px) {
  .section {
    padding: var(--space-8) 0;
  }
  .hero {
    padding-top: var(--space-8);
  }
}
