/* ============================================================
   FINES TECH — redesign 2026
   ============================================================ */

:root {
  --bg: #0a0f10;
  --bg-soft: #0e1517;
  --bg-card: #111a1c;
  --line: rgba(173, 203, 199, 0.12);
  --text: #e8efee;
  --text-dim: #8da3a0;
  --accent: #49c5b1;
  --accent-soft: rgba(73, 197, 177, 0.12);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --container: 1320px;
  --pad: clamp(20px, 4vw, 56px);
  --radius: 20px;
  --ease: cubic-bezier(0.65, 0.05, 0, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--accent); color: #06302a; }

img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(90px, 12vw, 180px); }

.section__head { margin-bottom: clamp(40px, 6vw, 80px); }

.section__label {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* ============ Preloader ============ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.preloader__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: 0.04em;
}
.preloader__logo i, .header__logo i, .footer__logo i {
  font-style: normal;
  color: var(--accent);
}
.preloader__count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
}

/* ============ Cursor ============ */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 150;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), opacity 0.3s;
  mix-blend-mode: difference;
}
.cursor.is-active { width: 56px; height: 56px; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* ============ Header ============ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px var(--pad);
  transition: background 0.4s, backdrop-filter 0.4s, padding 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.header.is-scrolled {
  background: rgba(10, 15, 16, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
  padding-block: 12px;
}
.header__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: 0.04em;
}
.header__nav { display: flex; gap: 34px; }
.header__link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.3s;
}
.header__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.header__link:hover { color: var(--text); }
.header__link:hover::after { transform: scaleX(1); transform-origin: left; }

.header__burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: 0;
  padding: 10px 4px;
  cursor: pointer;
}
.header__burger span {
  display: block;
  width: 26px; height: 2px;
  background: var(--text);
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.header__burger.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
.header__burger.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ============ Buttons ============ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  padding: 16px 32px;
  border-radius: 100px;
  overflow: hidden;
  transition: color 0.35s var(--ease), border-color 0.35s, transform 0.15s;
  will-change: transform;
}
.btn:active { transform: scale(0.97); }
.btn span { position: relative; z-index: 1; }
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--text);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease);
}
.btn:hover::before { transform: translateY(0); }
.btn--primary { background: var(--accent); color: #06302a; }
.btn--primary:hover { color: #0a0f10; }
.btn--ghost {
  border: 1px solid var(--line);
  color: var(--text);
}
.btn--ghost:hover { color: #0a0f10; border-color: var(--text); }
.btn--small { padding: 11px 22px; font-size: 13px; background: var(--accent-soft); color: var(--accent); }
.btn--small:hover { color: #0a0f10; }

/* ============ Mobile menu ============ */
.mmenu {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg-soft);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--pad);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.6s var(--ease), visibility 0s 0.6s;
}
.mmenu.is-open {
  clip-path: inset(0 0 0% 0);
  visibility: visible;
  transition: clip-path 0.6s var(--ease);
}
.mmenu__nav { display: flex; flex-direction: column; gap: 6px; }
.mmenu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 600;
  letter-spacing: -0.02em;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.mmenu__link em {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}
.mmenu__foot {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 15px;
  color: var(--text-dim);
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.hero__grain {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}
.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-top: 120px;
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: clamp(20px, 3vw, 36px);
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(46px, 9.4vw, 148px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero__line { display: block; overflow: hidden; }
.hero__line > span { display: inline-block; will-change: transform; }
.hero__line--accent { color: var(--accent); }
.hero__period { font-style: normal; color: var(--accent); }

.hero__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: clamp(30px, 4vw, 56px);
  margin-bottom: clamp(60px, 8vw, 110px);
}
.hero__sub {
  max-width: 46ch;
  color: var(--text-dim);
  font-size: clamp(15px, 1.3vw, 18px);
}
.hero__actions { display: flex; gap: 14px; flex-shrink: 0; }

.hero__meta {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.hero__scroll { display: flex; gap: 8px; align-items: center; }
.hero__scroll i { font-style: normal; display: inline-block; animation: bob 1.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(4px); } }

/* ============ Marquee ============ */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-soft);
  padding-block: 22px;
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 48px;
  width: max-content;
  will-change: transform;
}
.marquee__track span {
  font-family: var(--font-display);
  font-size: clamp(18px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--text-dim);
}
.marquee__track i { font-style: normal; color: var(--accent); font-size: 14px; }

/* ============ About ============ */
.about__statement {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 4vw, 54px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  max-width: 22ch;
  text-wrap: pretty;
}
.about__statement .word { opacity: 0.14; display: inline-block; }
.about__statement em { font-style: normal; color: var(--accent); }

.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(56px, 7vw, 110px);
  max-width: 980px;
  margin-left: auto;
}
.about__col h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}
.about__col p { color: var(--text-dim); font-size: 15.5px; max-width: 42ch; }

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(70px, 9vw, 130px);
  border-top: 1px solid var(--line);
}
.stats__item {
  padding: clamp(24px, 3vw, 44px) clamp(8px, 2vw, 32px);
  border-right: 1px solid var(--line);
}
.stats__item:last-child { border-right: 0; }
.stats__num {
  display: block;
  font-size: clamp(34px, 4.6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.stats__num sup {
  font-size: 0.45em;
  color: var(--accent);
  margin-left: 2px;
}
.stats__label {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--text-dim);
}

/* ============ Services ============ */
.services { background: var(--bg-soft); position: relative; }
.services__list { border-top: 1px solid var(--line); }
.service { border-bottom: 1px solid var(--line); }
.service__row {
  display: grid;
  grid-template-columns: 60px 1.1fr 1.4fr 50px;
  align-items: center;
  gap: clamp(14px, 3vw, 48px);
  padding-block: clamp(24px, 3.4vw, 44px);
  transition: padding-left 0.45s var(--ease), opacity 0.3s;
}
.service__index { font-size: 13px; color: var(--accent); }
.service__name {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  transition: color 0.3s;
}
.service__desc {
  font-size: 14.5px;
  color: var(--text-dim);
  max-width: 52ch;
}
.service__arrow {
  font-size: 22px;
  color: var(--accent);
  transform: translateX(-10px) rotate(45deg);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
@media (hover: hover) {
  .services__list:hover .service__row { opacity: 0.45; }
  .services__list .service__row:hover { opacity: 1; padding-left: 18px; }
  .service__row:hover .service__arrow { transform: translateX(0) rotate(0deg); opacity: 1; }
}

.service__preview {
  position: fixed;
  top: 0; left: 0;
  z-index: 60;
  width: 230px; height: 150px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: translate(-300px, -300px) scale(0.8);
  background:
    radial-gradient(120% 160% at 20% 10%, rgba(73, 197, 177, 0.5), transparent 55%),
    radial-gradient(150% 130% at 85% 90%, rgba(36, 99, 109, 0.65), transparent 60%),
    #102023;
  border: 1px solid rgba(173, 203, 199, 0.18);
  box-shadow: 0 24px 60px -18px rgba(4, 24, 22, 0.85);
}
.service__preview-text {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
@media (hover: none), (pointer: coarse) { .service__preview { display: none; } }

/* ============ Work ============ */
.work { padding-block: 0; }
.work__pin {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-block: clamp(80px, 10vh, 120px);
}
.work__head {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 8px 24px;
  margin-bottom: clamp(36px, 5vh, 64px);
}
.work__head .section__label { grid-column: 1 / -1; margin-bottom: 0; }
.work__progress { font-size: 13px; color: var(--text-dim); letter-spacing: 0.12em; }

.work__track {
  display: flex;
  gap: clamp(20px, 3vw, 44px);
  padding-inline: var(--pad);
  width: max-content;
  will-change: transform;
}
.project {
  width: min(78vw, 720px);
  flex-shrink: 0;
}
.project__visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  transition: transform 0.5s var(--ease);
}
.project:hover .project__visual { transform: translateY(-6px); }
.project__visual--a { background: radial-gradient(130% 150% at 18% 12%, rgba(73, 197, 177, 0.4), transparent 52%), radial-gradient(140% 130% at 85% 90%, rgba(20, 78, 88, 0.8), transparent 65%), #0d1a1c; }
.project__visual--b { background: radial-gradient(130% 150% at 80% 10%, rgba(73, 197, 177, 0.32), transparent 50%), radial-gradient(150% 140% at 12% 88%, rgba(26, 60, 92, 0.85), transparent 62%), #0c161d; }
.project__visual--c { background: radial-gradient(140% 140% at 50% 0%, rgba(110, 211, 197, 0.3), transparent 55%), radial-gradient(130% 150% at 90% 95%, rgba(16, 86, 76, 0.9), transparent 60%), #0a1517; }
.project__visual--d { background: radial-gradient(130% 160% at 12% 85%, rgba(73, 197, 177, 0.36), transparent 52%), radial-gradient(140% 130% at 88% 12%, rgba(34, 80, 110, 0.8), transparent 62%), #0d171b; }

.project__mark {
  position: relative;
  z-index: 1;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(232, 239, 238, 0.92);
}
.project__rings { position: absolute; inset: 0; }
.project__rings i {
  position: absolute;
  top: 50%; left: 50%;
  border: 1px solid rgba(173, 203, 199, 0.14);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.project__rings i:nth-child(1) { width: 38%; aspect-ratio: 1; }
.project__rings i:nth-child(2) { width: 62%; aspect-ratio: 1; border-color: rgba(173, 203, 199, 0.09); }
.project__rings i:nth-child(3) { width: 88%; aspect-ratio: 1; border-color: rgba(173, 203, 199, 0.05); }

.project__info { padding-top: 22px; }
.project__tag {
  display: inline-block;
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(73, 197, 177, 0.3);
  padding: 5px 10px;
  margin-bottom: 14px;
}
.project__name {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.project__desc { color: var(--text-dim); font-size: 15px; max-width: 52ch; }

/* ============ Process ============ */
.process { background: var(--bg-soft); }
.process__stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.process__card {
  position: sticky;
  top: 110px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 52px);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
  box-shadow: 0 -18px 50px -30px rgba(3, 18, 16, 0.9);
}
.process__card:nth-child(2) { top: 130px; }
.process__card:nth-child(3) { top: 150px; }
.process__card:nth-child(4) { top: 170px; }
.process__num {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.process__card h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 40px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.08;
}
.process__card p {
  color: var(--text-dim);
  font-size: 15.5px;
  max-width: 46ch;
  align-self: end;
}

/* ============ Contact ============ */
.contact { position: relative; overflow: hidden; }
.contact .container { text-align: center; }
.contact__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(44px, 8.6vw, 128px);
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-block: clamp(20px, 3vw, 40px) clamp(36px, 5vw, 64px);
}
.contact__line { display: block; overflow: hidden; }
.contact__line > span { display: inline-block; }
.contact__title em { font-style: normal; color: var(--accent); }

.contact__email {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(20px, 3.4vw, 40px);
  letter-spacing: -0.01em;
  padding: clamp(18px, 2.4vw, 28px) clamp(28px, 4vw, 56px);
  border: 1px solid var(--line);
  border-radius: 100px;
  transition: background 0.4s var(--ease), color 0.4s, border-color 0.4s, transform 0.15s;
}
.contact__email:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #06302a;
}
.contact__email:active { transform: scale(0.98); }
.contact__email i {
  font-style: normal;
  transition: transform 0.35s var(--ease);
}
.contact__email:hover i { transform: translate(4px, -4px); }

.contact__row {
  margin-top: clamp(28px, 4vw, 44px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 15px;
}
.contact__item { transition: color 0.3s; }
a.contact__item:hover { color: var(--accent); }
.contact__sep { color: var(--accent); }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); }
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-block: 30px;
}
.footer__logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.04em;
}
.footer__social { display: flex; gap: 22px; }
.footer__social a {
  font-size: 13.5px;
  color: var(--text-dim);
  transition: color 0.3s;
}
.footer__social a:hover { color: var(--accent); }
.footer__copy { font-size: 12px; color: var(--text-dim); }

/* ============ Reveal defaults (JS adds motion) ============ */
[data-reveal] { will-change: transform, opacity; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1024px) {
  .service__row { grid-template-columns: 44px 1fr 36px; }
  .service__desc { grid-column: 2; grid-row: 2; margin-top: 6px; }
  .service__arrow { grid-row: 1; grid-column: 3; }
}

@media (max-width: 820px) {
  .header__nav, .header__cta { display: none; }
  .header__burger { display: flex; }

  .hero__bottom { flex-direction: column; align-items: flex-start; }
  .hero__title { font-size: clamp(44px, 12.5vw, 92px); }
  .hero__meta { font-size: 11px; gap: 12px; }

  .about__grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; border-left: 0; }
  .stats__item:nth-child(2n) { border-right: 0; }
  .stats__item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }

  .work__head { grid-template-columns: 1fr; align-items: start; }
  .work__progress { display: none; }
  .project { width: min(84vw, 520px); }

  .process__card { grid-template-columns: 1fr; }
  .process__card { top: 90px; }
  .process__card:nth-child(2) { top: 104px; }
  .process__card:nth-child(3) { top: 118px; }
  .process__card:nth-child(4) { top: 132px; }

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

@media (max-width: 480px) {
  .hero__actions { width: 100%; flex-direction: column; }
  .hero__actions .btn { width: 100%; }
  .contact__email { font-size: 18px; gap: 10px; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
