/* ============================================================
   FabricSuccess — production stylesheet
   Faithfully derived from the FabricSuccess design handoff.
   Palette: deep space (#0a0a12) with violet→pink→amber gradients.
   Type: Space Grotesk (display) + Manrope (body).
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  /* offset anchor scrolling for the sticky nav */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Manrope", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #e8e8f0;
  background: #0a0a12;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: #c8b6ff; }
a:hover { color: #f472b6; }

::selection { background: rgba(219, 39, 119, .35); color: #fff; }

:focus-visible {
  outline: 2px solid #a78bfa;
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Skip link for keyboard users */
.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 10px;
  background: linear-gradient(120deg, #7c3aed, #db2777);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Keyframes ---------- */
@keyframes fs-dash  { to { stroke-dashoffset: -1000; } }
@keyframes fs-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes fs-spin  { to { transform: rotate(360deg); } }

/* ---------- Layout helpers ---------- */
.wrap { max-width: 1240px; margin: 0 auto; }
.section-pad { padding: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 64px); }

.section-head {
  max-width: 44rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.kicker {
  font-family: "Space Grotesk", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.kicker--violet { color: #a78bfa; }
.kicker--pink   { color: #f472b6; }
.kicker--amber  { color: #fbbf24; }
.kicker--cyan   { color: #67e8f9; }

.section-title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.06;
  letter-spacing: -.025em;
  margin: 0;
  color: #fff;
}
.section-sub {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
  color: #a9a9c0;
}

.gradient-text {
  background: linear-gradient(115deg, #a78bfa, #f472b6, #fbbf24);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 64px);
  background: rgba(10, 10, 18, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand__word {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  letter-spacing: -.01em;
}
.brand__word .thin { font-weight: 400; color: #c9c9db; }
.brand__word .bold { font-weight: 700; color: #fff; }

.nav__right {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2.4vw, 30px);
}
.nav__links {
  display: flex;
  gap: clamp(14px, 2vw, 28px);
  font-size: 14.5px;
  font-weight: 500;
}
.nav-link {
  color: #a0a0b8;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s;
}
.nav-link:hover,
.nav-link:focus-visible { color: #fff; }

/* Language switch */
.lang {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  border: 1px solid #2a2a3c;
  background: rgba(255, 255, 255, .02);
}
.lang__btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 13px;
  background: transparent;
  color: #9a9ab2;
  transition: color .2s, background .2s;
}
.lang__btn[aria-pressed="true"] {
  background: linear-gradient(120deg, #7c3aed, #db2777);
  color: #fff;
}

/* Mobile menu toggle (hidden on desktop) */
.nav__toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 560px at 82% -10%, rgba(124, 58, 237, .30), transparent 60%),
    radial-gradient(900px 520px at 100% 100%, rgba(219, 39, 119, .18), transparent 55%),
    #0a0a14;
  overflow: hidden;
}
.hero__grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
  padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 64px) clamp(64px, 8vw, 110px);
}
.hero__col {
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.badge {
  align-self: flex-start;
  padding: 8px 17px;
  border: 1px solid #2c2c40;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: #c8b6ff;
  background: rgba(124, 58, 237, .12);
}
.hero__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 0;
  color: #fff;
}
.hero__sub {
  margin: 0;
  max-width: 32em;
  font-size: clamp(16px, 1.6vw, 18.5px);
  line-height: 1.6;
  color: #b7b7cc;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}
.hero__art {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 340px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: transform .25s, filter .25s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.btn--primary {
  padding: 16px 28px;
  background: linear-gradient(120deg, #7c3aed, #db2777);
  color: #fff;
  box-shadow: 0 16px 40px -14px rgba(219, 39, 119, .7);
}
.btn--ghost {
  padding: 16px 28px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid #2f2f44;
  color: #eaeaf4;
  font-weight: 600;
}
.btn__arrow { font-size: 17px; }

/* Weave art panel */
.weave-panel {
  position: absolute;
  inset: 0;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid #23233a;
  background: radial-gradient(circle at 50% 45%, rgba(124, 58, 237, .22), transparent 60%), #0c0c18;
  animation: fs-float 7s ease-in-out infinite;
}
.weave-panel__spin {
  position: absolute;
  inset: 8%;
  animation: fs-spin 60s linear infinite;
}
.weave-panel__vignette {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 90px 24px rgba(10, 10, 20, .92);
}
.weave-svg { width: 100%; height: 100%; display: block; }

/* ---------- Cards (shared) ---------- */
.card {
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), border-color .35s, box-shadow .35s;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(167, 139, 250, .5);
  box-shadow: 0 30px 70px -30px rgba(124, 58, 237, .5);
}

/* Services grid */
.grid-services {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}
.svc {
  position: relative;
  padding: 28px;
  border-radius: 20px;
  background: #0e0e1a;
  border: 1px solid #20202f;
  overflow: hidden;
}
.svc__glow { position: absolute; inset: 0; opacity: .5; }
.svc__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.svc__icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.svc__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 19px;
  margin: 0;
  color: #fff;
}
.card-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: #a2a2ba;
}

/* ---------- Programmes ---------- */
.band {
  position: relative;
  background: linear-gradient(180deg, #0a0a12, #0c0c18, #0a0a12);
  border-top: 1px solid rgba(255, 255, 255, .05);
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pill {
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid #2a2a3c;
  background: rgba(255, 255, 255, .03);
  font-size: 14.5px;
  font-weight: 600;
  color: #d6d6e6;
  transition: all .28s;
}
.pill:hover {
  background: linear-gradient(120deg, rgba(124, 58, 237, .25), rgba(219, 39, 119, .2));
  color: #fff;
  border-color: rgba(167, 139, 250, .55);
  transform: translateY(-2px);
}

/* ---------- Work / portfolio ---------- */
.grid-work {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 карти на ред → 4 проекта в 2×2 */
  gap: 24px;
}
.work {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: #0e0e1a;
  border: 1px solid #20202f;
  text-decoration: none;
  color: inherit;
}
.work__cover {
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: #0a0a14;
}
.work__cover-art {
  position: absolute;
  inset: 0;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.work:hover .work__cover-art,
.work:focus-visible .work__cover-art { transform: scale(1.05); }
.work__cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.work:hover .work__cover-img,
.work:focus-visible .work__cover-img { transform: scale(1.05); }
.work__cover-weave { position: absolute; inset: 0; opacity: .55; }
.work__stripes {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 12px);
}
.work__program {
  position: absolute;
  left: 16px; top: 16px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: #fff;
}
.work__body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.work__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.work__name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin: 0;
  color: #fff;
}
.work__domain {
  font-size: 13px;
  color: #8a8aa2;
  font-family: monospace;
  white-space: nowrap;
}
.work__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.tag {
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(124, 58, 237, .12);
  border: 1px solid rgba(167, 139, 250, .22);
  font-size: 12.5px;
  font-weight: 600;
  color: #c8b6ff;
}

/* ---------- How we work ---------- */
.grid-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 24px;
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border-radius: 20px;
  background: #0e0e1a;
  border: 1px solid #20202f;
}
.step__top { display: flex; align-items: center; gap: 12px; }
.step__num {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
}
.step__line { height: 2px; flex: 1; }
.step__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 18px;
  margin: 0;
  color: #fff;
}

/* ---------- Why us ---------- */
.grid-why {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.why {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border-radius: 20px;
  background: #0e0e1a;
  border: 1px solid #20202f;
}
.why__icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(124, 58, 237, .16);
  color: #c8b6ff;
}
.why__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 18px;
  margin: 0;
  color: #fff;
}

/* ---------- Contact ---------- */
.contact {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 12% 10%, rgba(124, 58, 237, .28), transparent 60%),
    radial-gradient(800px 500px at 100% 100%, rgba(219, 39, 119, .20), transparent 55%),
    #09090f;
}
.contact__weave { position: absolute; inset: 0; opacity: .35; }
.contact__inner {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: clamp(64px, 8vw, 120px) clamp(20px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}
.contact__title {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.04;
  letter-spacing: -.03em;
  margin: 0;
  max-width: 16ch;
  color: #fff;
}
.contact__sub {
  margin: 0;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.6;
  color: #bcbcd0;
  max-width: 40ch;
}
.contact__cards {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  justify-content: center;
  width: 100%;
  margin-top: 8px;
}
.contact-card {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 18px;
  background: rgba(14, 14, 26, .72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .1);
  text-decoration: none;
  text-align: left;
}
.contact-card__icon {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: #fff;
}
.contact-card__icon--phone { background: linear-gradient(120deg, #7c3aed, #a78bfa); }
.contact-card__icon--mail  { background: linear-gradient(120deg, #db2777, #f472b6); }
.contact-card__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.contact-card__label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #9a9ab2;
}
.contact-card__value {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  word-break: break-word;
}
.contact__note { margin: 0; font-size: 13px; color: #77778e; }

/* ---------- Footer ---------- */
.footer {
  background: #09090f;
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px clamp(20px, 5vw, 64px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand .brand__word { font-size: 17px; }
.footer__brand .thin { color: #a9a9c0; }
.footer__note { margin: 0; font-size: 13.5px; color: #77778e; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__art { min-height: 260px; max-width: 420px; }

  /* портфолио: 1 карта на ред на мобилен */
  .grid-work { grid-template-columns: 1fr; }

  /* Collapse desktop nav into a toggle menu */
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px clamp(20px, 5vw, 64px) 16px;
    background: rgba(10, 10, 18, .96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    font-size: 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav__links.is-open { max-height: 340px; }
  .nav__links .nav-link {
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }
  .nav__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 10px;
    border: 1px solid #2a2a3c;
    background: rgba(255, 255, 255, .03);
    color: #e8e8f0;
    cursor: pointer;
  }
  .nav__toggle svg { width: 22px; height: 22px; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * , *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}
