@import "../design/tokens/colors.css";
@import "../design/tokens/typography.css";
@import "../design/tokens/spacing.css";

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

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: var(--leading-body);
  letter-spacing: 0.01em;
}

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

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

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

.wrap {
  width: min(var(--max), calc(100% - var(--page)));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header);
  gap: 1rem;
}

.logo {
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--accent);
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.nav a[aria-current="page"] {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  font-size: 0.75rem;
  cursor: pointer;
}

.hero {
  padding: 4rem 0 2.25rem;
}

.kicker {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 1.25rem;
  letter-spacing: 0.01em;
}

.hero h1 span {
  font-weight: 400;
}

.lede {
  max-width: 58rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.meta-line {
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
}

.hero-note {
  max-width: 58rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 48px;
  padding: 0.85rem 1.7rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
}

.btn:hover {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-solid {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-solid:hover {
  filter: brightness(1.05);
  color: var(--accent-text);
}

.section {
  padding: 2.75rem 0 3.25rem;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.label {
  margin: 0 0 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-faint);
}

.section-head h2,
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
}

.section-head h2 {
  margin: 0;
}

.page-title {
  margin: 0 0 0.9rem;
}

.cases {
  display: grid;
  gap: 0;
}

.case-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2.85rem 0;
  border-bottom: 1px solid var(--line);
}

.case-row:first-child {
  padding-top: 0.15rem;
}

.case-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.case-row:nth-child(even) .cover {
  order: 2;
}

.cover {
  display: grid;
  place-items: end start;
  aspect-ratio: 3 / 2;
  min-height: 280px;
  padding: 1.4rem;
  border-radius: var(--radius-card);
  background: var(--bg-cover);
  color: var(--text-muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}

.cover:has(video),
.cover:has(img) {
  padding: 0;
}

.cover video,
.cover > img,
.cover .shot-reel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.cover-kicker {
  position: absolute;
  inset: auto auto 1.2rem 1.2rem;
  z-index: 1;
  color: #fff;
}

.cover:has(video)::after,
.cover:has(img)::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgb(0 0 0 / 0.55));
  pointer-events: none;
}

.cover[data-p="faraswap"] {
  background: #1a2422;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent);
}

.cover[data-p="faraswap"] > img {
  object-position: center 40%;
}

.cover[data-p="devotel"] {
  background: #182028;
}

.cover[data-p="esimora"] {
  background: #1c2030;
}

.cover[data-p="esimora"] > img {
  object-position: center 38%;
}

.cover[data-p="bringboo"] {
  background: #24201c;
}

.cover[data-p="hireflo"] {
  background: #1e2228;
}

.cover[data-p="hireflo"] > img {
  object-position: center 42%;
}

.num {
  margin: 0 0 0.15rem;
  color: var(--accent);
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.case-row h3,
.case-copy h1 {
  font-family: var(--font-body);
  font-size: 1.7rem;
  line-height: 1.25;
  margin: 0.2rem 0 0.85rem;
}

.case-row p,
.prose p {
  color: var(--text-muted);
  margin: 0 0 1.1rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.chip {
  font-size: 0.78rem;
  color: var(--text-faint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.7rem;
}

.cta {
  text-align: center;
  padding: 3.25rem 0 3.5rem;
}

.cta p:not(.cta-contact) {
  max-width: 52rem;
  margin: 0.9rem auto 1.5rem;
  color: var(--text-muted);
}

.cta-contact {
  margin: 1.1rem 0 0;
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 1.2rem 0 1.6rem;
  font-size: var(--size-small);
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-inner p:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.15rem;
}

.page {
  padding: 2.5rem 0 4rem;
}

.page-kicker {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.6rem;
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2rem;
  padding: 1.1rem 0;
  border-block: 1px solid var(--line);
}

.facts-stack {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.facts dt {
  font-size: 0.75rem;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 0.35rem;
}

.facts dd {
  margin: 0;
}

.facts-live {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0;
}

.facts-live a:not(:last-child)::after {
  content: "·";
  margin: 0 0.55rem;
  color: var(--text-faint);
  pointer-events: none;
}

.prose {
  max-width: none;
}

.shot {
  margin: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-cover);
}

.shot video,
.shot img {
  width: 100%;
  height: auto;
}

.shot figcaption {
  padding: 0.65rem 1rem 0.85rem;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.shot-hero {
  margin: 0 0 2rem;
}

.prose .shot {
  margin: 1.6rem 0;
}

.shot-hero.shot-phone {
  display: grid;
  place-items: center;
  min-height: 420px;
  background: #161820;
}

.shot-hero.shot-phone img {
  width: auto;
  max-height: 480px;
  margin-inline: auto;
}

.shot-reel {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  background: var(--bg-cover);
}

.shot-reel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: reel-fade 14s infinite, reel-ken 14s infinite;
}

.shot-reel img:nth-child(1) {
  animation-delay: 0s, 0s;
}

.shot-reel img:nth-child(2) {
  animation-delay: 7s, 7s;
}

.cover .shot-reel {
  min-height: 0;
}

@keyframes reel-fade {
  0%,
  6% {
    opacity: 0;
  }
  12%,
  44% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}

@keyframes reel-ken {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1.06);
  }
}

.shot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.shot-phones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0 2rem;
}

.shot-phones .shot figcaption {
  padding: 0.55rem 0.65rem 0.75rem;
  font-size: 0.72rem;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 1.85rem 0 0.55rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose .shot + h2 {
  margin-top: 1.5rem;
}

.prose ul {
  color: var(--text-muted);
  padding-inline-start: 1.2rem;
}

.prose li + li {
  margin-top: 0.55rem;
}

.note {
  font-size: 0.85rem;
  color: var(--text-faint);
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-top: 1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.skip {
  position: absolute;
  inset-inline-start: -999px;
}

.skip:focus {
  inset: 0.5rem auto auto 0.5rem;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.5rem 0.8rem;
  z-index: 40;
}

@media (max-width: 860px) {
  :root {
    --page: 32px;
  }

  .nav-toggle {
    display: inline-flex;
    min-height: 44px;
  }

  .nav {
    display: none;
    position: absolute;
    inset: var(--header) var(--page) auto;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .nav.is-open {
    display: flex;
  }

  .case-row,
  .case-row:nth-child(even) .cover,
  .about-grid,
  .facts {
    grid-template-columns: 1fr;
  }

  .case-row:nth-child(even) .cover {
    order: 0;
  }

  .case-row {
    gap: 1.35rem;
    padding: 2.15rem 0;
  }

  .case-row:first-child {
    padding-top: 0.5rem;
  }

  .hero {
    padding: 2.5rem 0 1.75rem;
  }

  .section {
    padding: 2rem 0 2.5rem;
  }

  .cta {
    padding: 2.5rem 0 3rem;
  }

  .page {
    padding: 1.75rem 0 3rem;
  }

  .shot-grid,
  .shot-phones {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  video[autoplay] {
    display: none;
  }

  .shot-reel img {
    animation: none;
    opacity: 0;
  }

  .shot-reel img:first-child {
    opacity: 1;
  }
}
