/* markfail.com — Midnight Studio */

:root {
  --bg: #0C0A12;
  --band: #110E18;
  --surface: #16121F;
  --surface-2: #1E1829;
  --line: #221C2E;
  --line-2: #2A2336;
  --line-3: #3A3148;
  --card-line: #241D30;
  --text: #F4F1F8;
  --muted: #B3AAC2;
  --dim: #8C829C;
  --accent: #E64FB0;
  --ink: #0C0A12;
  --display: 'Sora', system-ui, sans-serif;
  --body: 'Manrope', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --gutter: 24px;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { opacity: .85; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }

.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }

.wrap { width: 100%; max-width: calc(1248px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 16px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 999px; background: var(--accent); color: var(--ink); font-weight: 700; }
.skip:focus { top: 16px; }

/* ---------- Backdrop: graph-paper mesh + glow behind header and hero ---------- */
.backdrop { position: absolute; top: 0; left: 0; right: 0; height: 1180px; overflow: hidden; pointer-events: none; z-index: 0; }
.backdrop__mesh {
  position: absolute; inset: 0;
  background: url(https://markfail.b-cdn.net/img/graph-mesh.svg) center top / 100px 100px;
  -webkit-mask-image: radial-gradient(ellipse 80% 75% at 50% 30%, #000 30%, transparent 100%);
  mask-image: radial-gradient(ellipse 80% 75% at 50% 30%, #000 30%, transparent 100%);
}
.backdrop__glow { position: absolute; border-radius: 50%; filter: blur(110px); }
.backdrop__glow--a { width: 640px; height: 640px; right: max(40px, calc(50% - 680px)); top: 140px; opacity: .3; background: linear-gradient(45deg, #6366F1 0%, #D946EF 50%, var(--accent) 100%); }
.backdrop__glow--b { width: 440px; height: 440px; left: -140px; top: -180px; opacity: .18; background: linear-gradient(45deg, #6366F1 0%, #D946EF 100%); }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); }
.nav { height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.01em; }
.brand img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: 1px solid var(--line-3); }
.nav__links { display: flex; gap: 40px; font-size: 15px; font-weight: 500; color: var(--muted); }
.nav__links a:hover { color: var(--text); opacity: 1; }
.nav__links .nav__book { display: none; }
.nav__toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; }

/* ---------- Buttons, labels ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 60px; padding: 0 28px; border-radius: 999px; font-weight: 700; font-size: 17px; white-space: nowrap; }
.btn--primary { background: var(--accent); color: var(--ink); }
.btn--ghost { border: 1px solid var(--line-3); font-weight: 600; }
.btn--outline { height: 44px; padding: 0 20px; border: 1px solid var(--accent); font-weight: 600; font-size: 15px; }
.btn--block { display: flex; width: 100%; height: 56px; font-size: 16px; }

.label { font-family: var(--mono); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.label--dim { color: var(--dim); }
.dot { width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--accent); }
.accent { color: var(--accent); }
.rule { flex-grow: 1; height: 1px; background: var(--card-line); }
.label-row { display: flex; align-items: center; gap: 20px; }

.h2 { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.1; letter-spacing: -.025em; }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); }
.body-muted { font-size: 17px; line-height: 1.6; color: var(--muted); }

.section { position: relative; padding: 112px 0; }
.section--band { background: var(--band); border-top: 1px solid #1E1829; border-bottom: 1px solid #1E1829; }
.section__stack { display: flex; flex-direction: column; gap: 56px; }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; }
.section__head > div { display: flex; flex-direction: column; gap: 16px; }
.section__head .h2 { max-width: 900px; }
.section__head p { max-width: 400px; }
.stack-16 { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Hero ---------- */
main { position: relative; z-index: 1; }
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 72px; align-items: center; padding-top: 96px; padding-bottom: 104px; }
.hero__copy { display: flex; flex-direction: column; gap: 32px; }
.hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 5.4vw, 74px); line-height: 1.07; letter-spacing: -.03em; }
.hero__lead { max-width: 600px; }
.actions { display: flex; flex-wrap: wrap; gap: 16px; }
.meta { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--dim); }
.hero__media { position: relative; height: 620px; }
.hero__media > img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; border-radius: 28px; border: 1px solid var(--line-2); }
.pill { position: absolute; right: 22px; top: 22px; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: rgba(12, 10, 18, .82); border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; }
.float-card { position: absolute; left: -36px; bottom: 44px; display: flex; flex-direction: column; gap: 4px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.float-card span:first-child { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
.float-card span:last-child { font-weight: 600; font-size: 17px; }

/* ---------- Logos ---------- */
.logos { padding-bottom: 104px; display: flex; flex-direction: column; gap: 28px; }
.logos .label-row .rule { background: var(--line); }
.logos__grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 16px; align-items: center; margin: 0; padding: 0; list-style: none; }
.logos__grid img { width: 100%; height: 64px; object-fit: contain; opacity: .72; }

/* ---------- Work ---------- */
.showcase { position: relative; height: 640px; border-radius: 28px; overflow: hidden; background: var(--bg); border: 1px solid var(--card-line); }
.showcase__wall {
  --s: 1px;
  position: absolute; inset: 0; perspective: 2200px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 14%, #000 86%, transparent 100%);
}
.wall { position: absolute; left: 50%; top: 50%; width: 1760px; display: flex; gap: 20px; transform: translate(-44%, -50%) rotateX(24deg) rotateZ(-12deg); }
.wall__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.wall__col:nth-child(2) { margin-top: calc(var(--s) * -110); }
.wall__col:nth-child(3) { margin-top: calc(var(--s) * 60); }
.wall__col:nth-child(4) { margin-top: calc(var(--s) * -60); }
.wall__col:nth-child(5) { margin-top: calc(var(--s) * 90); }
.wall__col:nth-child(6) { margin-top: calc(var(--s) * -30); }
.wall img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 40px rgba(0, 0, 0, .45); }
.showcase__shade { position: absolute; top: 0; left: 0; bottom: 0; width: 72%; background: linear-gradient(90deg, rgba(12, 10, 18, .97) 0%, rgba(12, 10, 18, .92) 45%, rgba(12, 10, 18, 0) 100%); pointer-events: none; }
.showcase__card { position: absolute; left: 64px; top: 0; bottom: 0; width: 460px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.showcase__card > img { width: 72px; height: 55px; object-fit: contain; object-position: left center; }
.showcase__card h3 { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1.08; letter-spacing: -.025em; }
.stats { display: flex; gap: 36px; padding-top: 4px; }
.stats > div { display: flex; flex-direction: column; gap: 2px; }
.stats > div + div { padding-left: 36px; border-left: 1px solid var(--line-2); }
.stats strong { font-family: var(--display); font-weight: 700; font-size: 40px; letter-spacing: -.03em; line-height: 1.2; }
.stats span { font-size: 14px; color: var(--dim); }
.btn--small { height: 52px; padding: 0 24px; font-size: 16px; font-weight: 600; align-self: flex-start; }

.featured { display: flex; flex-direction: column; gap: 24px; }
.featured__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.shot { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--card-line); border-radius: 20px; overflow: hidden; }
.shot__bar { height: 30px; flex-shrink: 0; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: var(--surface-2); }
.shot__bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-3); }
.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.shot__caption { padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 600; font-size: 18px; }
.tag { height: 28px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 400; color: var(--muted); white-space: nowrap; }

.history { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; padding-top: 8px; }
.history__intro { display: flex; flex-direction: column; gap: 14px; }
.history__list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--card-line); }
.history__list li { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 24px; align-items: center; padding: 18px 0; border-top: 1px solid var(--card-line); }
.history__name { font-weight: 600; font-size: 18px; }
.history__what { font-size: 15px; color: var(--dim); }
.history__link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 80px; align-items: center; padding-top: 120px; padding-bottom: 120px; }
.about__photo { width: 100%; height: 660px; object-fit: cover; object-position: 50% 30%; border-radius: 28px; border: 1px solid var(--line-2); }
.about__copy { display: flex; flex-direction: column; gap: 28px; }
.about__copy .lead { font-size: 20px; line-height: 1.6; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 32px; padding: 8px 0 0; margin: 0; list-style: none; }
.facts li { display: flex; gap: 16px; align-items: flex-start; }
.facts strong { display: block; font-weight: 600; font-size: 18px; margin-bottom: 4px; }
.facts span { font-size: 15px; line-height: 1.5; color: var(--dim); }
.tile-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.tile-icon--lg { width: 48px; height: 48px; border-radius: 14px; border: 0; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; color: var(--accent); }

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; gap: 20px; padding: 36px; background: var(--surface); border: 1px solid var(--card-line); border-radius: 22px; }
.step__top { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 14px; color: var(--dim); }
.step h3 { font-family: var(--display); font-weight: 700; font-size: 30px; letter-spacing: -.02em; }
.step p { font-size: 17px; line-height: 1.6; color: var(--muted); }
.step small { font-size: 14px; color: var(--dim); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; padding: 0; list-style: none; }
.chips__label { font-size: 15px; color: var(--dim); margin-right: 8px; }
.chips li:not(.chips__label) { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 15px; }

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 24px; padding: 40px; background: var(--surface); border: 1px solid var(--card-line); border-radius: 24px; }
.plan--featured { background: #1A1424; border: 2px solid var(--accent); }
.plan__badge { position: absolute; top: -15px; left: 40px; height: 28px; display: flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--accent); color: var(--ink); font-size: 13px; font-weight: 700; }
.plan__name { font-weight: 600; font-size: 22px; }
.plan__desc { font-size: 16px; color: var(--dim); margin-top: 8px; }
.plan__price { display: flex; align-items: baseline; gap: 6px; }
.plan__price strong { font-family: var(--display); font-weight: 700; font-size: 64px; letter-spacing: -.03em; line-height: 1.1; }
.plan__price span { font-size: 16px; color: var(--dim); }
.plan__rule { height: 1px; background: var(--line-2); }
.plan__list { display: flex; flex-direction: column; gap: 14px; flex-grow: 1; margin: 0; padding: 0; list-style: none; font-size: 16px; }
.plan__list li { display: flex; gap: 12px; align-items: center; }
.plan__list .icon { width: 18px; height: 18px; stroke: var(--accent); stroke-width: 2.2; }
.plan--custom { gap: 20px; background: transparent; border: 1px dashed var(--line-3); }
.plan--custom h3 { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.1; letter-spacing: -.02em; }
.plan--custom p { flex-grow: 1; }

/* ---------- Contact ---------- */
.contact { padding-bottom: 120px; }
.contact__card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: center;
  padding: 72px; border: 1px solid var(--line-2); border-radius: 32px;
  background-color: var(--surface);
  background-image: linear-gradient(to bottom left, rgba(22, 18, 31, 0) 0%, rgba(22, 18, 31, .6) 35%, var(--surface) 65%), url(https://markfail.b-cdn.net/img/graph-mesh.svg);
  background-size: auto, 100px 100px;
  background-position: 0 0, right top;
}
.contact__copy { display: flex; flex-direction: column; gap: 24px; }
.contact__copy .h2 { font-size: clamp(34px, 4vw, 52px); }
.contact__copy .btn { align-self: flex-start; }
.contact__list { margin: 0; padding: 0; list-style: none; }
.contact__list li + li { border-top: 1px solid var(--line-2); }
.contact__item { display: flex; align-items: center; gap: 18px; padding: 22px 0; }
.contact__item .tile-icon { border: 0; width: 48px; height: 48px; border-radius: 14px; }
.contact__item small { display: block; font-size: 14px; color: var(--dim); }
.contact__item b { display: block; font-size: 18px; font-weight: 600; overflow-wrap: break-word; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid #1E1829; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 36px; padding-bottom: 40px; font-size: 14px; color: var(--dim); }
.site-footer nav { display: flex; gap: 28px; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .hero__media { height: 540px; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan--custom { grid-column: 1 / -1; }
  .about { gap: 56px; }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .nav { height: 64px; }
  .brand { font-size: 18px; }
  .brand img { width: 32px; height: 32px; }
  .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__links {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 20px;
    background: var(--surface); border-bottom: 1px solid var(--line-2); box-shadow: 0 24px 48px rgba(0, 0, 0, .5);
    font-size: 17px; color: var(--text);
  }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
  .nav__links .nav__book { display: flex; margin-top: 16px; border-bottom: 0; padding: 0; }
  .site-header.is-open .nav__links { display: flex; }

  .backdrop { height: 1000px; }
  .backdrop__glow--a { width: 360px; height: 360px; right: -120px; top: 60px; filter: blur(80px); }
  .backdrop__glow--b { display: none; }

  .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 32px; padding-bottom: 72px; }
  .hero__copy { gap: 20px; }
  .actions { flex-direction: column; gap: 12px; }
  .actions .btn { width: 100%; height: 56px; }
  .meta { justify-content: center; font-size: 13px; }
  .hero__media { height: auto; aspect-ratio: 7 / 6; }
  .hero__media > img { object-position: 50% 20%; border-radius: 24px; }
  .float-card { left: 16px; bottom: 16px; padding: 12px 16px; border-radius: 14px; }
  .float-card span:last-child { font-size: 15px; }
  .pill { right: 14px; top: 14px; font-size: 13px; padding: 8px 12px; }

  .logos { padding-bottom: 72px; }
  .logos__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 12px; }
  .logos__grid img { height: 48px; }

  .section { padding: 80px 0; }
  .section__stack { gap: 40px; }
  .section__head { flex-direction: column; align-items: flex-start; gap: 16px; }

  .showcase { height: auto; display: flex; flex-direction: column; }
  .showcase__wall { --s: .62px; position: relative; inset: auto; height: 300px; }
  .wall { width: 1100px; gap: 12px; }
  .wall__col { gap: 12px; }
  .wall img { border-radius: 8px; }
  .showcase__shade { display: none; }
  .showcase__card { position: static; width: auto; padding: 8px 24px 32px; gap: 18px; }
  .showcase__card h3 { font-size: 28px; }
  .stats strong { font-size: 32px; }

  .featured__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .history { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .history__list li { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; }
  .history__what { grid-column: 1; grid-row: 2; }
  .history__list li > :last-child { grid-column: 2; grid-row: 1 / span 2; }

  .about { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 80px; padding-bottom: 80px; }
  .about__photo { height: 420px; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 20px; }

  .steps { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .step { padding: 28px; }

  .plans { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .plan { padding: 32px 24px; }
  .plan__price strong { font-size: 52px; }

  .contact { padding-bottom: 80px; }
  .contact__card { grid-template-columns: minmax(0, 1fr); gap: 32px; padding: 32px 24px; border-radius: 24px; }
  .contact__copy .btn { align-self: stretch; }
  .contact__item b { font-size: 16px; }

  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

@media (min-width: 601px) and (max-width: 900px) {
  .actions { flex-direction: row; }
  .actions .btn { width: auto; }
  .meta { justify-content: flex-start; }
}
