/* ============================================================
   Syntico — components.css
   Cursor, header/nav, buttons, cards, footer, loader, forms
   ============================================================ */

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
}
.cursor-dot {
  width: 7px; height: 7px;
  background: var(--accent-2);
  box-shadow: 0 0 12px 2px rgba(255,176,46,0.8);
}
.cursor-ring {
  width: 38px; height: 38px;
  border: 1px solid rgba(255,255,255,0.4);
  transition: width .3s var(--ease), height .3s var(--ease),
              border-color .3s var(--ease), background-color .3s var(--ease);
}
.cursor-ring.is-hover {
  width: 64px; height: 64px;
  border-color: transparent;
  background: var(--accent-soft);
  backdrop-filter: blur(2px);
}
.cursor-ring.is-drag {
  width: 96px; height: 96px;
  border-color: transparent;
  background: var(--accent-grad);
}
.cursor-label {
  position: fixed; top: 0; left: 0; z-index: var(--z-cursor);
  transform: translate3d(-50%, -50%, 0);
  font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  font-weight: 700; color: #0a0a0a; opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease); will-change: transform;
}
.cursor-label.show { opacity: 1; }
@media (pointer: coarse) { .cursor-dot, .cursor-ring, .cursor-label { display: none; } }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: var(--z-header);
  padding-block: 1.1rem;
  transition: transform .5s var(--ease), background-color .4s var(--ease),
              backdrop-filter .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(8,8,10,0.65);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.site-header.hide { transform: translateY(-110%); }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 2rem;
}
.nav-logo { display: inline-flex; align-items: center; gap: .7rem; }
.nav-logo img { height: 30px; width: auto; }
.nav-links {
  display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.4rem);
}
.nav-link {
  position: relative;
  font-size: 0.92rem; font-weight: 500;
  color: #d6d6de;
  padding: .4rem 0;
  transition: color .3s var(--ease);
}
.nav-link::after {
  content: ''; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px;
  background: var(--accent-grad);
  transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: #fff; }
.nav-link:hover::after, .nav-link[aria-current="page"]::after {
  transform: scaleX(1); transform-origin: left;
}
.nav-actions { display: flex; align-items: center; gap: 1.1rem; }

/* Language switch */
.lang-switch {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-2); border-radius: 999px;
  padding: 3px; gap: 2px;
}
.lang-switch button {
  background: none; border: 0; cursor: none;
  font-size: 0.75rem; font-weight: 600; letter-spacing: .04em;
  color: var(--muted); padding: .28rem .6rem; border-radius: 999px;
  transition: color .3s, background-color .3s;
}
.lang-switch button.active { color: #0a0a0a; background: var(--fg); }

/* Burger */
.burger {
  display: none; width: 44px; height: 44px;
  background: none; border: 1px solid var(--line-2); border-radius: 12px;
  position: relative; cursor: none;
}
.burger span {
  position: absolute; left: 11px; right: 11px; height: 1.5px;
  background: var(--fg); transition: transform .4s var(--ease), opacity .3s;
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 22px; }
.burger span:nth-child(3) { top: 28px; }
.burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 45;
  background: rgba(8,8,10,0.96);
  backdrop-filter: blur(20px);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform .6s var(--ease);
  pointer-events: none;
}
.mobile-menu.open { transform: translateY(0); pointer-events: auto; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 500; letter-spacing: -0.02em;
  padding: .4rem 0; color: #e9e9ee;
}
.mobile-menu a:hover { color: var(--accent-2); }

@media (max-width: 1024px) {
  .nav-links, .nav-actions .btn { display: none; }
  .burger { display: block; }
}

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  z-index: calc(var(--z-header) + 1);
  background: transparent; pointer-events: none;
}
.scroll-progress i {
  display: block; height: 100%; width: 100%;
  transform: scaleX(0); transform-origin: left;
  background: var(--accent-grad);
  box-shadow: 0 0 14px rgba(255,94,26,0.7);
}

/* ---------- Buttons ---------- */
.btn {
  --pad-y: 0.95rem; --pad-x: 1.7rem;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  padding: var(--pad-y) var(--pad-x);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  letter-spacing: .01em;
  border-radius: 999px; border: 1px solid transparent;
  cursor: none; overflow: hidden; white-space: nowrap;
  transition: transform .3s var(--ease), box-shadow .4s var(--ease), color .3s;
  will-change: transform;
}
.btn svg { flex: 0 0 auto; width: 1.15em; height: 1.15em; }
.btn span { position: relative; z-index: 2; }
.btn-primary { color: #100600; background: var(--accent-grad); background-size: 160% 160%; }
.btn-primary::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: var(--accent-grad); background-size: 160% 160%;
  background-position: 100% 0; opacity: 0;
  transition: opacity .5s var(--ease);
}
.btn-primary:hover { box-shadow: 0 12px 40px -8px rgba(255,94,26,0.6); }
.btn-primary:hover::after { opacity: 1; }
.btn-ghost {
  color: #fff; border-color: var(--line-2); background: rgba(255,255,255,0.02);
}
.btn-ghost:hover { border-color: var(--accent-1); box-shadow: 0 0 0 1px var(--accent-soft) inset; }
.btn-lg { --pad-y: 1.15rem; --pad-x: 2.2rem; font-size: 1rem; }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* Magnetic wrapper hint — note: do NOT set display here, it would override
   .btn's inline-flex (equal specificity, later rule) and break button layout */
[data-magnetic] { will-change: transform; }

/* Text link with arrow */
.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; color: #fff;
  border-bottom: 1px solid var(--line-2); padding-bottom: 3px;
  transition: color .3s, border-color .3s;
}
.link-arrow:hover { color: var(--accent-2); border-color: var(--accent-2); }
.link-arrow .arrow { transition: transform .35s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(4px); }

/* ---------- Cards (glass + tilt) ---------- */
.card {
  position: relative;
  background: var(--bg-glass);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  overflow: hidden;
  transition: border-color .4s var(--ease), transform .3s var(--ease);
  transform-style: preserve-3d;
}
.card::before { /* gradient glow border on hover */
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  padding: 1px; background: var(--accent-grad);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .4s var(--ease);
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: transparent; }
.card .card-inner { transform: translateZ(40px); transform-style: preserve-3d; }

.card-num {
  font-family: var(--font-display); font-size: .85rem; font-weight: 500;
  color: var(--accent-2); letter-spacing: .1em; margin-bottom: 1.4rem;
}
.card h3 { margin-bottom: .7rem; }
.card-icon {
  width: 54px; height: 54px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 1.4rem;
  background: var(--accent-soft); color: var(--accent-2);
  border: 1px solid var(--line);
}
.card-icon svg { width: 26px; height: 26px; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-block: 1px solid var(--line);
  padding-block: 1.6rem;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: inline-flex; gap: 3rem; align-items: center;
  animation: marquee 32s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-item {
  font-family: var(--font-display); font-size: clamp(1.3rem, 3vw, 2.4rem);
  font-weight: 500; color: #2c2c34; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 3rem;
}
.marquee-item span.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-1); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  border-top: 1px solid var(--line);
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: 2.5rem;
  overflow: hidden;
}
.footer-cta { margin-bottom: clamp(3.5rem, 8vw, 6rem); }
.footer-cta h2 { max-width: 14ch; }
.footer-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
}
.footer-col h4 {
  font-family: var(--font-body); font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .18em; color: var(--muted-2);
  margin-bottom: 1.2rem;
}
.footer-col a { color: #c2c2cc; font-size: .95rem; display: block; padding: .25rem 0; transition: color .3s; }
.footer-col a:hover { color: var(--accent-2); }
.footer-brand img { height: 34px; margin-bottom: 1.2rem; }
.footer-brand p { max-width: 34ch; font-size: .92rem; }
.socials { display: flex; gap: .7rem; margin-top: 1.4rem; }
.socials a {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-2); display: grid; place-items: center;
  color: #cfcfd6; transition: all .3s var(--ease);
}
.socials a:hover { color: #0a0a0a; background: var(--accent-grad); border-color: transparent; transform: translateY(-3px); }
.socials svg { width: 17px; height: 17px; }
.footer-bottom {
  margin-top: clamp(3rem, 6vw, 4.5rem); padding-top: 1.8rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  color: var(--muted-2); font-size: .85rem;
}
.footer-bottom a { color: var(--muted-2); }
.footer-bottom a:hover { color: var(--fg); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Loader / intro ---------- */
.loader {
  position: fixed; inset: 0; z-index: var(--z-loader);
  background: var(--bg);
  display: grid; place-items: center;
  /* Failsafe: never block the page permanently if JS fails to load */
  animation: loaderFailsafe 0s linear 6s forwards;
}
@keyframes loaderFailsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }
.no-js .loader { display: none; }
.loader-inner { text-align: center; width: min(78vw, 440px); }
/* Logo that fills with its real gradient colours as loading progresses */
.logo-fill { position: relative; width: 100%; aspect-ratio: 500 / 125; margin: 0 auto 1.5rem; }
.logo-fill-base, .logo-fill-color {
  position: absolute; inset: 0;
  -webkit-mask: url(../img/syntico-logo-500.png) center / contain no-repeat;
          mask: url(../img/syntico-logo-500.png) center / contain no-repeat;
}
.logo-fill-base { background: rgba(255, 255, 255, 0.12); }   /* faint contour/silhouette */
.logo-fill-color {
  background: linear-gradient(100deg, #E8231B 0%, #FF5E1A 45%, #FFB02E 100%);
  clip-path: inset(100% 0 0 0);   /* JS animates top inset 100%→0% to fill upward */
  will-change: clip-path;
}
.loader-pct {
  margin-top: .4rem; font-family: var(--font-display); font-size: 1rem;
  letter-spacing: .22em; color: var(--muted);
}

/* ---------- Page transition overlay ---------- */
.page-trans {
  position: fixed; inset: 0; z-index: var(--z-loader);
  background: var(--accent-grad);
  transform: translateY(100%);        /* slides in/out — JS animates yPercent */
  pointer-events: none; will-change: transform;
  /* Knock the company logo OUT of the gradient surface (logo area = transparent) */
  -webkit-mask-image: url(../img/syntico-logo-500.png), linear-gradient(#000, #000);
          mask-image: url(../img/syntico-logo-500.png), linear-gradient(#000, #000);
  -webkit-mask-repeat: no-repeat, no-repeat; mask-repeat: no-repeat, no-repeat;
  -webkit-mask-position: center, center;     mask-position: center, center;
  -webkit-mask-size: min(46vw, 400px) auto, 100% 100%;
          mask-size: min(46vw, 400px) auto, 100% 100%;
  -webkit-mask-composite: xor;        mask-composite: exclude;
}
/* Arriving via internal navigation: hide the entrance loader and let the
   gradient cover from the very first paint -> seamless, no loader flash. */
.via-transition .loader { display: none !important; }
.via-transition .page-trans { transform: translateY(0); }

/* ---------- Forms ---------- */
.field { position: relative; margin-bottom: 1.6rem; }
.field label {
  display: block; font-size: .82rem; font-weight: 500; letter-spacing: .04em;
  color: var(--muted); margin-bottom: .6rem; text-transform: uppercase;
}
.field input, .field textarea, .field select {
  width: 100%; background: var(--bg-elev); border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); padding: .95rem 1.1rem;
  color: var(--fg); font-size: 1rem; cursor: none;
  transition: border-color .3s, box-shadow .3s, background-color .3s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent-1);
  box-shadow: 0 0 0 3px var(--accent-soft); background: var(--bg-elev-2);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.hp { position: absolute; left: -9999px; opacity: 0; }
.form-note { font-size: .82rem; color: var(--muted-2); }
.form-status { margin-top: 1rem; font-size: .92rem; min-height: 1.4em; }
.form-status.ok { color: #51d88a; }
.form-status.err { color: #ff6b5e; }
