/* PAIR Agency, pairmax.digital */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-dark: #000000;
  --tile-dark: #161617;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #86868b;
  --on-dark: #f5f5f7;
  --on-dark-2: #a1a1a6;
  --line: #d2d2d7;
  --link: #1f4fe0;
  --link-dark: #7aa2ff;
  --accent: #1f4fe0;
  --accent-hover: #1a44c4;
  --accent-text: #1f4fe0;
  --red: #e5262c;
  --red-2: #ff3b30;
  --radius: 28px;
  --radius-sm: 18px;
  --nav-h: 48px;
  --maxw: 1180px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.28, .11, .32, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; letter-spacing: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--maxw), 100% - 44px); margin-inline: auto; }
.wrap-narrow { width: min(820px, 100% - 44px); margin-inline: auto; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Global nav ---------- */
.gnav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(251, 251, 253, .8);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}
.gnav.is-dark { background: rgba(22, 22, 23, .8); border-bottom-color: rgba(255, 255, 255, .08); color: var(--on-dark); }
.gnav-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.gnav-logo { display: flex; align-items: center; color: inherit; height: 100%; }
.gnav-logo:hover { text-decoration: none; }
.wordmark {
  font-family: var(--font); font-size: 19px; font-weight: 700; letter-spacing: -0.035em; line-height: 1;
  color: currentColor; white-space: nowrap;
}
.wordmark-max {
  background: linear-gradient(90deg, #ff3b30 0%, #e5262c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gnav-links { display: flex; align-items: center; gap: 34px; margin: 0; padding: 0; list-style: none; }
.gnav-links a { color: inherit; opacity: .8; font-size: 13px; letter-spacing: -0.01em; transition: opacity .2s; }
.gnav-links a:hover, .gnav-links a[aria-current="page"] { opacity: 1; text-decoration: none; }
.gnav-links a[aria-current="page"] { font-weight: 600; }
.gnav-cta {
  font-size: 12px; font-weight: 500; padding: 5px 13px; border-radius: 980px;
  background: var(--accent); color: #fff !important; opacity: 1 !important;
}
.gnav-cta:hover { background: var(--accent-hover); }

/* Bottom tab bar, phones and small tablets only */
.tabbar { display: none; }
@media (max-width: 833px) {
  .gnav-links li:not(.gnav-cta-item) { display: none; }
  .gnav-links .gnav-cta { font-size: 13px; padding: 6px 14px; }
  body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 110;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(251, 251, 253, .82);
    backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid rgba(0, 0, 0, .08);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 4px 0 2px; color: #8e8e93; font-size: 10px; font-weight: 500; letter-spacing: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar svg { width: 25px; height: 25px; }
  .tabbar a[aria-current="page"] { color: var(--accent); }
  .tabbar a[aria-current="page"] svg { stroke-width: 2.1; }
  .tabbar a:active svg { transform: scale(.9); }
}

/* ---------- Type ---------- */
.eyebrow { font-size: 21px; font-weight: 600; letter-spacing: .004em; margin: 0 0 6px; }
.eyebrow-sm { font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--red); margin: 0 0 12px; }
.display {
  font-size: clamp(48px, 8vw, 96px); line-height: 1.03; font-weight: 700;
  letter-spacing: -0.035em; margin: 0;
}
.headline {
  font-size: clamp(36px, 5.2vw, 64px); line-height: 1.06; font-weight: 700;
  letter-spacing: -0.03em; margin: 0;
}
.title { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.subhead { font-size: clamp(19px, 2.2vw, 28px); line-height: 1.25; font-weight: 500; letter-spacing: -0.012em; color: var(--text-2); margin: 14px 0 0; }
.lead { font-size: clamp(19px, 1.8vw, 21px); line-height: 1.45; letter-spacing: -0.01em; color: var(--text-2); }
.muted { color: var(--text-2); }
.gradient-text {
  background: linear-gradient(90deg, #ff5a4f 0%, #ff3b30 45%, #e5262c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Links and buttons ---------- */
.ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 28px; margin-top: 26px; }
.ctas.left { justify-content: flex-start; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 11px 22px; border-radius: 980px; border: 1px solid transparent;
  font-size: 17px; font-weight: 400; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; font-weight: 500; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: var(--accent); color: var(--accent-text); background: transparent; }
.btn-ghost:hover { background: var(--accent); color: #fff; }
.on-dark .btn-ghost { border-color: var(--link-dark); color: var(--link-dark); }
.on-dark .btn-ghost:hover { background: var(--link-dark); color: #000; }
.more { font-size: 17px; white-space: nowrap; }
.more::after { content: "›"; display: inline-block; margin-left: .3em; font-size: 1.1em; line-height: 1; transition: transform .2s var(--ease); }
.more:hover::after { transform: translateX(2px); }
.on-dark a:not(.btn) { color: var(--link-dark); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0; }
.section-tight { padding: clamp(56px, 7vw, 96px) 0; }
.bg-alt { background: var(--bg-alt); }
.on-dark { background: var(--bg-dark); color: var(--on-dark); }
.on-dark .subhead, .on-dark .lead, .on-dark .muted { color: var(--on-dark-2); }
.section-head { text-align: center; max-width: 820px; margin: 0 auto clamp(40px, 5vw, 64px); }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 9vw, 120px) 0 0; text-align: center; overflow: hidden; }
.hero .subhead { max-width: 720px; margin-inline: auto; }
.hero-media {
  position: relative; margin: clamp(48px, 6vw, 80px) auto 0; width: min(1280px, 100% - 44px);
  aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #1a1610;
}
.hero-media video { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0) 55%, rgba(0,0,0,.55) 100%);
}
.hero-caption {
  position: absolute; left: 0; right: 0; bottom: clamp(18px, 3vw, 36px); z-index: 1;
  display: flex; justify-content: center; gap: clamp(20px, 5vw, 64px); flex-wrap: wrap;
  font-size: 14px; color: var(--on-dark-2); padding: 0 16px;
}
.hero-caption strong { display: block; font-size: clamp(22px, 2.6vw, 32px); color: #fff; font-weight: 700; letter-spacing: -0.02em; }
.page-hero { padding: clamp(72px, 10vw, 128px) 0 clamp(40px, 5vw, 64px); text-align: center; }
.page-hero .subhead { max-width: 760px; margin-inline: auto; }

/* ---------- Tiles (Apple home style) ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: min(1440px, 100% - 24px); margin-inline: auto; }
.tile {
  position: relative; overflow: hidden; border-radius: 0;
  background: var(--bg-alt); color: var(--text); text-align: center;
  min-height: 580px; padding: 52px 28px 0; display: flex; flex-direction: column; align-items: center;
}
.tile.wide { grid-column: 1 / -1; min-height: 620px; }
.tile.dark { background: var(--tile-dark); color: var(--on-dark); }
.tile.dark .tile-sub { color: var(--on-dark-2); }
.tile.dark a.more { color: var(--link-dark); }
.tile.white { background: #fff; }
.tile-name { font-size: clamp(32px, 3.6vw, 48px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.08; margin: 0; }
.tile-sub { font-size: clamp(19px, 1.9vw, 24px); color: var(--text-2); margin: 6px 0 0; letter-spacing: -0.01em; line-height: 1.25; }
.tile-tag { font-size: 14px; color: var(--text-3); margin-top: 14px; }
.tile .ctas { margin-top: 16px; }
.tile-media { margin-top: auto; padding-top: 32px; width: 100%; display: flex; justify-content: center; align-items: flex-end; flex: 1; }
.tile-media img { width: clamp(220px, 26vw, 300px); height: auto; border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.25); margin-bottom: 52px; transition: transform .8s var(--ease); }
.tile:hover .tile-media img { transform: scale(1.03); }
.tile.wide .tile-media img { width: min(980px, 100%); border-radius: 22px 22px 0 0; margin-bottom: 0; box-shadow: none; }
@media (min-width: 1069px) { .tiles { gap: 12px; } }
@media (max-width: 833px) {
  .tiles { grid-template-columns: 1fr; width: 100%; gap: 12px; }
  .tile, .tile.wide { min-height: 500px; padding-top: 44px; }
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; text-align: center; }
.stat-num { font-size: clamp(40px, 5vw, 64px); font-weight: 700; letter-spacing: -0.035em; line-height: 1; }
.stat-label { font-size: 15px; color: var(--text-2); margin-top: 10px; line-height: 1.35; }
.on-dark .stat-label { color: var(--on-dark-2); }
@media (max-width: 833px) { .stats { grid-template-columns: repeat(2, 1fr); row-gap: 44px; } .stats > :last-child { grid-column: 1 / -1; } }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 20px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 1068px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border-radius: var(--radius-sm); padding: 30px 28px 28px;
  display: flex; flex-direction: column; gap: 10px; color: var(--text);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.bg-alt .card { background: #fff; }
.section:not(.bg-alt) .card.soft { background: var(--bg-alt); }
a.card:hover { text-decoration: none; transform: scale(1.015); box-shadow: 0 4px 30px rgba(0,0,0,.08); }
.card-icon { width: 44px; height: 44px; color: var(--accent); margin-bottom: 8px; }
.card-icon svg { width: 100%; height: 100%; }
.card h3 { font-size: 21px; line-height: 1.2; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.card p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text-2); }
.card .more { margin-top: auto; padding-top: 10px; font-size: 15px; color: var(--link); }

/* ---------- Logos ---------- */
.logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 36px 56px; }
.logos img { height: 34px; width: auto; max-width: 160px; object-fit: contain; filter: grayscale(1); opacity: .55; transition: opacity .3s, filter .3s; }
.logos img:hover { opacity: 1; filter: none; }

/* ---------- Work grid ---------- */
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 auto 44px; }
.chip {
  border: 1px solid var(--line); background: #fff; border-radius: 980px; padding: 8px 18px;
  font-size: 15px; cursor: pointer; color: var(--text); transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--text-3); }
.chip[aria-pressed="true"] { background: var(--text); color: #fff; border-color: var(--text); }
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 1068px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .work-grid { grid-template-columns: 1fr; } }
.work-card { display: flex; flex-direction: column; border-radius: var(--radius-sm); overflow: hidden; background: #fff; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.work-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -18px rgba(0,0,0,.22); }
.work-card[hidden] { display: none; }
.work-thumb { aspect-ratio: 1920 / 700; background: #fff; border-bottom: 1px solid #f0f0f2; overflow: hidden; }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work-card:hover .work-thumb img { transform: scale(1.04); }
.work-body { padding: 20px 22px 24px; }
.work-body h3 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.work-body p { margin: 4px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.4; }
.work-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.work-tags span { font-size: 12px; color: var(--text-2); background: var(--bg-alt); border-radius: 980px; padding: 3px 10px; }

/* ---------- Sub nav (services) ---------- */
.subnav {
  position: sticky; top: var(--nav-h); z-index: 50;
  background: rgba(255, 255, 255, .78); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.subnav-inner { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; padding: 14px 0; white-space: nowrap; }
.subnav-inner::-webkit-scrollbar { display: none; }
.subnav a { font-size: 13px; color: var(--text); opacity: .75; }
.subnav a:hover, .subnav a.active { opacity: 1; text-decoration: none; }
.subnav a.active { font-weight: 600; }

.service { padding: clamp(72px, 9vw, 120px) 0; scroll-margin-top: calc(var(--nav-h) + 50px); }
.service:nth-of-type(even) { background: var(--bg-alt); }
.service-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
@media (max-width: 833px) { .service-grid { grid-template-columns: 1fr; } }
.service-icon { width: 64px; height: 64px; color: var(--accent); margin-bottom: 24px; }
.service-icon svg { width: 100%; height: 100%; }
.service h2 { margin: 0; }
.service .lead { margin: 18px 0 0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: grid; gap: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 44px 1fr; gap: 4px 14px; padding: 20px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-size: 14px; font-weight: 600; color: var(--text-3); padding-top: 3px; grid-row: span 2; }
.steps strong { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; }
.steps span { font-size: 15px; color: var(--text-2); }

/* ---------- About ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
@media (max-width: 833px) { .split { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 16px; }
.stack-row { background: #fff; border-radius: var(--radius-sm); padding: 24px 26px; }
.stack-row h3 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); font-weight: 600; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills span { font-size: 15px; padding: 6px 14px; border-radius: 980px; background: var(--bg-alt); }
.big-quote { font-size: clamp(28px, 3.6vw, 48px); font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; margin: 0; }

/* ---------- Contact ---------- */
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 640px) { .contact-cards { grid-template-columns: 1fr; } }
.contact-card { background: var(--bg-alt); border-radius: var(--radius-sm); padding: 32px 30px; }
.contact-card h3 { margin: 0 0 6px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); font-weight: 600; }
.contact-card a { font-size: clamp(19px, 2vw, 24px); font-weight: 600; letter-spacing: -0.015em; word-break: break-word; }
.contact-card p { margin: 8px 0 0; font-size: 15px; color: var(--text-2); }

.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }
.field { position: relative; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  padding: 24px 16px 8px; font-size: 17px; min-height: 56px; transition: border-color .2s, box-shadow .2s; appearance: none;
}
.field textarea { min-height: 140px; resize: vertical; }
.field label { position: absolute; left: 17px; top: 17px; font-size: 17px; color: var(--text-3); pointer-events: none; transition: all .15s var(--ease); }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(31, 79, 224, .18); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label,
.field select + label { top: 7px; font-size: 12px; }
.field select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2386868b' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }
.form-note { font-size: 13px; color: var(--text-3); margin: 6px 0 0; }
.choice { display: flex; flex-wrap: wrap; gap: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label { border: 1px solid var(--line); border-radius: 980px; padding: 8px 16px; font-size: 15px; cursor: pointer; background: #fff; transition: all .2s; }
.choice input:checked + label { background: var(--text); border-color: var(--text); color: #fff; }
.choice input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.fieldset-label { font-size: 14px; color: var(--text-2); margin: 10px 0 10px; font-weight: 500; }


/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band .headline { max-width: 900px; margin-inline: auto; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-alt); color: var(--text-2); font-size: 12px; line-height: 1.33; padding: 32px 0 22px; letter-spacing: -0.01em; }
.footer a { color: var(--text-2); }
.footer a:hover { color: var(--text); }
.footer-note { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.footer-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.footer-cols h4 { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--text); }
.footer-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-top: 16px; }
@media (max-width: 833px) { .footer-cols { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
.no-js .reveal { opacity: 1; transform: none; }
.stack.alt .stack-row { background: var(--bg-alt); }
.stack.alt .pills span { background: #fff; }
.tiles-band { background: var(--bg-alt); padding: 12px 0; }
.tiles-band .tile:not(.dark) { background: #fff; }
@media (max-width: 640px) {
  .hero-media { aspect-ratio: 4 / 5; border-radius: 22px; }
  .hero-caption { gap: 14px 28px; }
}
.tile .tile-media.banner { align-items: center; padding-bottom: 52px; }
.tile .tile-media.banner img { width: min(560px, 100%); border-radius: 16px; margin-bottom: 0; }
.tile:not(.dark) .tile-media.banner img { box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 24px 48px -24px rgba(0,0,0,.25); }

/* Russian copy */
html[lang="ru"] .display, html[lang="ru"] .headline, html[lang="ru"] .title { hyphens: manual; overflow-wrap: break-word; }
.wordmark { letter-spacing: -0.03em; }
.stat-num.red { color: var(--red); }
