/* ==========================================================================
   Tells Studio — styles
   Reference style: light, Inter + JetBrains Mono, tight tracking,
   #0A0D14 ink / #868c98 muted / #306fdb accent, #f5f5f5 surfaces.
   ========================================================================== */

:root {
  --ink: #0A0D14;
  --ink-2: #353535;
  --muted: #868c98;
  --muted-2: #9f9f9f;
  --bg: #ffffff;
  --surface: #f5f5f5;
  --surface-2: #fafafa;
  --line: rgba(10, 13, 20, .07);
  --line-2: rgba(10, 13, 20, .12);
  --accent: #306fdb;
  --accent-2: #375dfb;

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1440px;
  --pad: 48px;
  --r-sm: 4px;
  --r-md: 12px;
  --r-lg: 24px;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-optical-sizing: auto;
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  letter-spacing: -.2px;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.no-scroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
ol, ul, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: #fff; }

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

.mono {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0;
}

.h2 {
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 600;
}
.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 26px;
  font-weight: 500;
  letter-spacing: -.2px;
  max-width: 560px;
}

/* ---------- buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  border-radius: var(--r-md);
  font-size: 14px;
  line-height: 20px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn--sm { padding: 10px 16px; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--accent); }
.btn:active { transform: translateY(1px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-weight: 500;
}
.link-arrow span { transition: transform .25s var(--ease); display: inline-block; }
.link-arrow:hover span { transform: translateX(4px); }

.link-underline {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--line-2);
  transition: text-decoration-color .2s;
}
.link-underline:hover { text-decoration-color: var(--ink); }

/* ---------- header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); }
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo__mark {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0;
}
.logo__text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -.04em;
  white-space: nowrap;
}
.logo__thin { font-weight: 400; color: var(--muted); }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav a {
  color: var(--muted);
  transition: color .2s;
}
.nav a:hover { color: var(--ink); }
.nav__cta { display: none; }

.header__right { display: flex; align-items: center; gap: 12px; }

.burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 10px;
  position: relative;
}
.burger span {
  position: absolute; left: 11px;
  width: 18px; height: 1.5px;
  background: var(--ink);
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.burger span:nth-child(1) { top: 16px; }
.burger span:nth-child(2) { top: 23px; }
.burger.is-open span:nth-child(1) { top: 19.5px; transform: rotate(45deg); }
.burger.is-open span:nth-child(2) { top: 19.5px; transform: rotate(-45deg); }

/* ---------- section head (label + link) ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}
.section-head__label {
  font-size: 24px;
  line-height: 1;
  letter-spacing: -.02em;
  font-weight: 600;
}

/* ---------- works ---------- */
.works { padding: 40px 0 112px; }
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 8px;
  row-gap: 32px;
}
.case-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: var(--r-sm);
}
.case-image {
  aspect-ratio: 3 / 4;
  border-radius: var(--r-sm);
  overflow: hidden;
  position: relative;
  isolation: isolate;
}
.case-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .6s var(--ease);
}
.case-card:hover .case-image img { transform: scale(1.02); }
.case-card:hover .case-title { color: var(--accent); }
.case-info { display: flex; flex-direction: column; gap: 4px; }
.case-title {
  font-size: 18px;
  line-height: 22px;
  font-weight: 500;
  letter-spacing: -.2px;
}
.case-subtitle { color: var(--muted-2); }
.case-tag { color: var(--muted-2); font-size: 13px; }

/* Petrovich: internal tool, no public UI */
.cover--pt {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10%;
  background: #e31e24;
  color: #fff;
}
.cover--pt__brand {
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: .95;
  letter-spacing: -.04em;
  font-weight: 700;
  text-transform: lowercase;
}
.cover--pt__note { font-size: 12px; opacity: .8; }

/* Next: your project */
.cover--next {
  display: flex;
  background: var(--bg);
  border: 1px dashed var(--line-2);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  transition: border-color .3s, color .3s;
}
.cover--next > * { width: auto; flex: 0 0 auto; }
.cover--next__plus { font-size: 64px; line-height: 1; font-weight: 300; letter-spacing: -.04em; }
.cover--next__text { font-size: 14px; line-height: 20px; }
.case-card--next:hover .cover--next { border-color: var(--ink); color: var(--ink); }

/* ---------- services ---------- */
.services { padding: 0 0 112px; background: var(--bg); }
.services__title { margin-bottom: 32px; }
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.service-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--r-sm);
  padding: 70px 32px;
  text-align: center;
  overflow: hidden;
  min-height: 220px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: background-color .3s var(--ease);
}
.service-card__label {
  font-size: 24px;
  line-height: 28px;
  color: var(--ink);
}
/* ---------- process ---------- */
.process { padding: 0 0 112px; }
.steps { margin-bottom: 0; }
.process__intro { display: flex; flex-direction: column; gap: 20px; margin-bottom: 56px; }
.steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  border-top: 1px solid var(--line-2);
}
.step {
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 20px;
  position: relative;
}
.step::before {
  content: "";
  position: absolute; top: -1px; left: 0;
  width: 0; height: 1px;
  background: var(--ink);
  transition: width .8s var(--ease);
}
.step.is-visible::before { width: 100%; }
.step__num { font-size: 12px; color: var(--muted); }
.step__name { font-size: 20px; line-height: 24px; font-weight: 500; letter-spacing: -.02em; }
.step__desc { color: var(--muted); font-size: 14px; line-height: 20px; }

/* ---------- cta ---------- */
.cta { padding: 0 0 112px; }
.cta__box {
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 96px 64px;
  display: flex;
  flex-direction: column;
  gap: 40px;
  position: relative;
  overflow: hidden;
}
.cta__box::after {
  content: "";
  position: absolute;
  right: -10%; bottom: -60%;
  width: 60%; aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(48, 111, 219, .55), rgba(48, 111, 219, 0));
  pointer-events: none;
}
.cta__title {
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -.04em;
  position: relative; z-index: 1;
}
.cta__title span { color: rgba(255, 255, 255, .55); }
.cta__actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; position: relative; z-index: 1; }
.cta__actions .btn--dark { background: #fff; color: var(--ink); }
.cta__actions .btn--dark:hover { background: var(--accent); color: #fff; }
.cta__or { color: rgba(255, 255, 255, .55); }
.cta__actions .link-underline { color: #fff; text-decoration-color: rgba(255, 255, 255, .3); }
.cta__actions .link-underline:hover { text-decoration-color: #fff; }

/* ---------- footer ---------- */
.footer { padding: 64px 0 40px; border-top: 1px solid var(--line); }
.footer__top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
}
.footer__brand { display: flex; flex-direction: column; gap: 24px; }
.footer__tagline { font-size: 24px; line-height: 30px; letter-spacing: -.03em; font-weight: 500; }
.footer__contacts {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 32px;
  justify-content: end;
  align-content: start;
}
.footer__contacts dt { color: var(--muted); margin-bottom: 6px; }
.footer__contacts dd a { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--line-2); }
.footer__contacts dd a:hover { text-decoration-color: var(--ink); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.footer__links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer__links a:hover { color: var(--ink); }
.footer__links .muted { color: var(--muted-2); }

/* ---------- reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 1200px) {
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .footer__contacts { grid-template-columns: 1fr 1fr; justify-content: start; }
}

@media (max-width: 900px) {
  :root { --pad: 24px; }
  .nav {
    position: fixed;
    inset: 72px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 16px var(--pad) 40px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
    z-index: 40;
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a {
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    font-size: 24px;
    letter-spacing: -.03em;
    color: var(--ink);
  }
  .nav__cta { display: block; color: var(--accent) !important; border-bottom: 0 !important; }
  .header__right .btn { display: none; }
  .burger { display: block; }

  .h2 { font-size: 36px; }
  .lead { font-size: 16px; line-height: 24px; }

  .works-grid { grid-template-columns: 1fr 1fr; }
  .services { padding: 0 0 80px; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 48px 24px; min-height: 0; }
  .service-card__label { font-size: 20px; line-height: 24px; }

  .process { padding-bottom: 80px; }
  .steps { grid-template-columns: 1fr 1fr; }

  .cta { padding-bottom: 80px; }
  .cta__box { padding: 56px 32px; border-radius: 20px; }
  .cta__title { font-size: 40px; }

  .footer__top { grid-template-columns: 1fr; }
  .footer__contacts { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  :root { --pad: 16px; }
  .works-grid { grid-template-columns: 1fr; row-gap: 28px; }
  .steps { grid-template-columns: 1fr; }
  .cta__title { font-size: 32px; }
  .footer__contacts { grid-template-columns: 1fr; gap: 20px; }
  .footer__tagline { font-size: 20px; line-height: 26px; }
}
