/* ===== Tokens ===== */
:root {
  --bg: #0B0D17;
  --surface: #1A1D2D;
  --line: #262B3D;
  --text: #EDEFF5;
  --muted: #94A3B8;
  --violet: #9333EA;
  --violet-lt: #D8B4FE;
  --wa: #25D366;

  --font-head: 'Unbounded', sans-serif;
  --font-body: 'Onest', sans-serif;

  --r-card: 20px;
  --r-pill: 999px;
  --r-sm: 10px;

  --ease: cubic-bezier(0.215, 0.61, 0.355, 1);
  --dur-fast: 0.25s;
  --dur-slow: 0.4s;

  --gap-section: 72px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 600px) {
  :root { --gap-section: 96px; }
}

/* ===== Reset ===== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  padding-bottom: calc(88px + var(--safe-bottom));
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ol, ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-head); font-weight: 600; }
p { margin: 0; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--violet-lt);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  font-weight: 500;
  z-index: 200;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--violet-lt);
  outline-offset: 3px;
}

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

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  padding-inline: 20px;
}

.section { padding-block: var(--gap-section); }

.bg-blob {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.bg-blob--violet {
  top: -120px;
  right: -140px;
  width: 420px;
  height: 420px;
  background: var(--violet);
  opacity: 0.25;
  filter: blur(80px);
}
.bg-blob--indigo {
  top: 260px;
  left: -160px;
  width: 380px;
  height: 380px;
  background: #4338CA;
  opacity: 0.2;
  filter: blur(60px);
}

main { position: relative; overflow: hidden; }

.section, .hero, .site-header, .site-footer, .sticky-cta, .lightbox {
  position: relative;
  z-index: 1;
}

/* ===== Logo ===== */
.logo { display: inline-flex; align-items: center; gap: 8px; }
.logo__mark { fill: var(--text); }
.logo__word {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: lowercase;
}
.logo--compact .logo__mark { width: 20px; height: 20px; }
.logo--compact .logo__word { font-size: 1rem; }
.logo--hero { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 24px; }
.logo--hero .logo__mark { width: 44px; height: 44px; }
.logo--hero .logo__word { font-size: 1.25rem; }
.logo--hero .logo__mark--photo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 2px rgba(216, 180, 254, 0.35);
  transform: scaleX(-1);
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-top: var(--safe-top);
  background: rgba(11, 13, 23, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding-inline: 24px;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn .icon { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; }
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--violet);
  color: #fff;
  box-shadow: 0 0 0 0 rgba(147, 51, 234, 0);
}
.btn--primary:hover, .btn--primary:focus-visible {
  box-shadow: 0 0 24px rgba(147, 51, 234, 0.55);
}

.btn--wa {
  background: var(--wa);
  color: #08210f;
  font-weight: 500;
}
.btn--wa:hover, .btn--wa:focus-visible {
  box-shadow: 0 0 24px rgba(37, 211, 102, 0.45);
}

.btn--outline {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}
.btn--outline:hover, .btn--outline:focus-visible {
  border-color: var(--violet-lt);
}
.btn--outline .icon { color: var(--violet-lt); }
.btn--outline.is-pending { opacity: 0.55; cursor: default; }

.btn--ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.btn--ghost:hover, .btn--ghost:focus-visible { border-color: var(--violet-lt); }

.btn--sm { min-height: 40px; padding-inline: 16px; font-size: 0.875rem; }
.btn--lg { min-height: 56px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

/* ===== Hero ===== */
.hero {
  padding-top: 48px;
  padding-bottom: var(--gap-section);
  min-height: calc(100svh - 64px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: rgba(147, 51, 234, 0.18);
  border: 1px solid rgba(147, 51, 234, 0.4);
  color: var(--violet-lt);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.hero__title {
  font-size: 2.125rem;
  line-height: 1.15;
  margin-bottom: 16px;
}
@media (min-width: 600px) { .hero__title { font-size: 3.25rem; } }

.hero__subtitle {
  color: var(--muted);
  font-size: 1rem;
  max-width: 480px;
  margin-bottom: 32px;
}
@media (min-width: 600px) { .hero__subtitle { font-size: 1.0625rem; } }

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }

.hero__note { color: var(--muted); font-size: 0.875rem; }

.hero__reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: reveal var(--dur-slow) var(--ease) forwards;
}
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }

/* ===== Sections ===== */
.section__title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}
@media (min-width: 600px) { .section__title { font-size: 1.875rem; } }

.section__subtitle {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 32px;
}

#about p { color: var(--muted); margin-bottom: 16px; max-width: 560px; }
#about p:last-child { margin-bottom: 0; }
#about .section__title { margin-top: 24px; margin-bottom: 16px; }

.about__photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-card);
}

/* ===== Works grid ===== */
.works-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 32px;
}
@media (min-width: 600px) {
  .works-grid { grid-template-columns: 1fr 1fr; }
  .work-card[data-format="horizontal"] { grid-column: 1 / -1; }
}

.work-card {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.work-card:hover, .work-card:focus-visible { border-color: var(--violet-lt); }
.work-card.is-hidden { display: none; }

.work-media {
  display: block;
  position: relative;
  width: 100%;
  background: var(--bg);
  overflow: hidden;
}
.work-media[data-format="vertical"] { aspect-ratio: 9 / 16; }
.work-media[data-format="horizontal"] { aspect-ratio: 16 / 9; }

.work-poster, .work-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.work-video {
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease);
}
.work-card.is-playing .work-video { opacity: 1; }
.work-card.is-playing .work-poster { opacity: 0; }

.work-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(11, 13, 23, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--dur-fast) var(--ease);
}
.work-play svg { width: 18px; height: 18px; fill: var(--text); margin-left: 2px; }
.work-card.is-playing .work-play { opacity: 0; }

.work-caption { display: block; padding: 12px 14px 14px; }
.work-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: rgba(147, 51, 234, 0.18);
  color: var(--violet-lt);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.work-title {
  display: block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.0625rem;
}
@media (min-width: 600px) { .work-title { font-size: 1.125rem; } }

#works-more.is-hidden { display: none; }

/* ===== Services ===== */
.services-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 24px;
}
.service-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: rgba(147, 51, 234, 0.18);
  margin-bottom: 16px;
}
.service-card__icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--violet-lt);
  stroke-width: 1.6;
}
.service-card__title {
  font-size: 1.0625rem;
  margin-bottom: 8px;
}
@media (min-width: 600px) { .service-card__title { font-size: 1.125rem; } }
.service-card__text { color: var(--muted); font-size: 0.9375rem; }

.services__note { color: var(--muted); font-size: 0.875rem; margin-bottom: 16px; }

/* ===== Process ===== */
.steps { display: flex; flex-direction: column; gap: 24px; }
.step {
  display: grid;
  grid-template-columns: 40px 1fr;
  column-gap: 16px;
  row-gap: 4px;
}
.step__num {
  grid-row: 1 / 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--violet-lt);
  color: var(--violet-lt);
  font-family: var(--font-head);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step__title { font-size: 1.0625rem; align-self: end; }
.step__text { color: var(--muted); font-size: 0.9375rem; }

/* ===== Reviews (template only) ===== */
.reviews-list { display: flex; flex-direction: column; gap: 16px; }
.review-card__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; }
.review-card__text { margin-bottom: 12px; }
.review-card__name { font-weight: 500; }
.review-card__company { color: var(--muted); font-size: 0.875rem; }

/* ===== Contacts ===== */
#contacts p { color: var(--muted); margin-bottom: 32px; max-width: 480px; }
.contact-buttons { display: flex; flex-direction: column; gap: 16px; }

/* ===== Footer ===== */
.site-footer {
  padding-block: 40px calc(40px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.site-footer__meta { color: var(--muted); font-size: 0.875rem; }
.site-footer__copy { color: var(--muted); font-size: 0.8125rem; }

/* ===== Sticky mobile CTA ===== */
.sticky-cta {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 16px;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border-radius: var(--r-pill);
  background: var(--wa);
  color: #08210f;
  font-weight: 500;
  padding-bottom: var(--safe-bottom);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(120%);
  opacity: 0;
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.sticky-cta .icon { width: 20px; height: 20px; fill: currentColor; }
.sticky-cta.is-visible { transform: translateY(0); opacity: 1; }

@media (min-width: 600px) {
  .sticky-cta { display: none !important; }
}
@media (max-width: 599px) {
  .sticky-cta { display: flex; }
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 5, 10, 0.92);
  padding: 20px;
  padding-top: calc(20px + var(--safe-top));
  padding-bottom: calc(20px + var(--safe-bottom));
}
.lightbox.is-open { display: flex; }

.lightbox__body { width: 100%; max-width: 480px; }
.lightbox__video {
  width: 100%;
  max-height: 80svh;
  border-radius: var(--r-sm);
  background: #000;
}
.lightbox__caption {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 12px;
  text-align: center;
}

.lightbox__close, .lightbox__nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}
.lightbox__close svg, .lightbox__nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.lightbox__close { top: calc(16px + var(--safe-top)); right: 16px; }
.lightbox__nav--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 599px) {
  .lightbox__nav { display: none; }
}

/* ===== Desktop layout (wide screens get their own arrangement, not a stretched phone view) ===== */
@media (min-width: 1024px) {
  .container { max-width: 1160px; padding-inline: 48px; }

  .hero__title, .hero__subtitle { max-width: 620px; }

  .about__photo {
    max-width: 380px;
  }
  #about {
    display: grid;
    grid-template-columns: 380px 1fr;
    column-gap: 64px;
    align-items: center;
  }
  #about .about__photo { grid-column: 1; grid-row: 1 / -1; margin: 0; }
  #about .section__title { grid-column: 2; margin-top: 0; }
  #about p { grid-column: 2; max-width: 640px; }

  .works-grid { grid-template-columns: repeat(3, 1fr); }

  .services-list { flex-direction: row; align-items: stretch; }
  .services-list .service-card { flex: 1; }

  .steps { flex-direction: row; }
  .steps .step {
    flex: 1;
    grid-template-columns: 1fr;
    row-gap: 16px;
  }
  .steps .step__num { grid-row: auto; }
  .steps .step__title { align-self: start; }

  #contacts, #contacts p { max-width: 640px; }
  .contact-buttons { max-width: 420px; }
}
