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

:root {
  color-scheme: dark;
  --background: #151211;
  --panel: #1e1917;
  --ink: #fff8f4;
  --muted: #c8bcb7;
  --line: #453935;
  --brand: #d61e26;
  --accent: #ff6669;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --sans: system-ui, 'Segoe UI', sans-serif;
  --width: 1240px;
  --gutter: clamp(20px, 5.25vw, 76px);
  --section-space: clamp(62px, 9vw, 132px);
}

html { scroll-padding-top: 86px; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; }
::selection { background: var(--accent); color: var(--background); }

.wrap {
  width: min(var(--width), 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  inset: 10px auto auto var(--gutter);
  z-index: 20;
  padding: 9px 13px;
  color: var(--background);
  background: var(--ink);
  transform: translateY(calc(-100% - 18px));
}

.skip-link:focus { transform: none; }
.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  background: #151211;
  border-bottom: 1px solid var(--line);
}

.header-inner, .site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  min-height: 64px;
  padding-block: 10px;
  font: .78rem/1.4 var(--mono);
}

.portfolio-name, .language-switch a { text-decoration: none; }
.portfolio-name:hover, .site-footer a:hover { color: var(--accent); }
.language-switch { display: flex; gap: 5px; }
.language-switch a {
  display: grid;
  place-items: center;
  min-width: 34px;
  min-height: 34px;
  padding-inline: 5px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  transition: border-color .2s, color .2s;
}

.language-switch a:hover { color: var(--ink); }
.language-switch a[aria-current] { color: var(--ink); border-color: #79655f; }

.hero {
  display: grid;
  align-items: center;
  gap: clamp(22px, 4.4vw, 66px);
  padding-block: clamp(38px, 7vw, 105px) clamp(34px, 6vw, 94px);
}

.hero-copy { position: relative; z-index: 1; }
.hero-mark {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: clamp(26px, 4vw, 44px);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 750;
  letter-spacing: -.045em;
  line-height: 1;
}

.hero-mark img { width: clamp(42px, 5vw, 64px); border-radius: 24%; }
.eyebrow {
  font: 500 .73rem/1.5 var(--mono);
  letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-category { margin-bottom: 14px; }
.hero h1, h2 {
  font-weight: 780;
  letter-spacing: -.061em;
  text-wrap: balance;
}

.hero h1 {
  font-size: clamp(3rem, 6.5vw, 6.65rem);
  line-height: .99;
  text-wrap: initial;
}

.hero h1 span { display: block; color: var(--accent); text-wrap: balance; }
.hero-summary, .section-copy { color: var(--muted); font-size: clamp(1.04rem, 1.65vw, 1.25rem); }
.hero-summary { max-width: 38ch; margin-top: 22px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-top: 28px; }
.store-link, .text-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.store-link {
  background: var(--ink);
  color: var(--background);
  min-height: 48px;
  padding: .65rem 1rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 720;
  transition: transform .2s, background-color .2s;
}

.store-link:hover { background: #ffe4dd; transform: translateY(-2px); }
.text-link {
  min-height: 42px;
  font-size: .85rem;
  font-weight: 640;
  text-decoration: underline;
  text-decoration-color: #aa8f86;
  text-underline-offset: 5px;
  transition: color .2s, text-decoration-color .2s;
}

.text-link:hover { color: var(--accent); text-decoration-color: currentColor; }
.hero-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  margin-inline: auto;
}

.hero-stage::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 2% 0;
  background:
    repeating-radial-gradient(circle at center, transparent 0 34px, #713337 35px, transparent 36px 52px),
    linear-gradient(145deg, #311b1a, #251718);
  border: 1px solid #4c2c2d;
  border-radius: clamp(18px, 3vw, 34px);
}

.hero-devices {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  padding-block: 2.2% 3%;
}

.phone {
  container-type: inline-size;
  background: #100e0e;
  padding: clamp(3px, .7vw, 7px);
  border: 1px solid #67534f;
  border-radius: clamp(17px, 3vw, 37px);
  box-shadow: 0 13px 28px #05020270;
}

.phone img {
  width: 100%;
  border-radius: 12cqi;
}

.hero-devices .phone { width: 36%; }
.hero-center {
  position: relative;
  z-index: 1;
}

.hero-side { position: absolute; top: 11%; }
.hero-runner { left: 7.5%; transform: rotate(-10deg); }
.hero-hunter { right: 7.5%; transform: rotate(10deg); }

.section { padding-block: var(--section-space); }
.split { display: grid; gap: 18px 48px; }
.split > .eyebrow { margin-top: .65em; }
.hero + .split { border-top: 1px solid var(--line); }
h2 { max-width: 23ch; font-size: clamp(2.35rem, 5vw, 4.7rem); line-height: 1.04; }
.section-copy { max-width: 60ch; margin-top: 20px; line-height: 1.7; }
.features { background: var(--panel); border-block: 1px solid var(--line); }
.section-heading .eyebrow { margin-bottom: 13px; }
.feature-list {
  display: grid;
  gap: 14px;
  margin: clamp(28px, 5vw, 55px) 0 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  min-width: 0;
  padding: clamp(18px, 2.5vw, 28px);
  border: 1px solid #52423d;
  border-radius: 14px;
  background: var(--background);
}

.feature-list h3 {
  font-size: clamp(1.1rem, 1.8vw, 1.38rem);
  line-height: 1.2;
  letter-spacing: -.025em;
}

.feature-list p { color: var(--muted); margin-top: 9px; max-width: 36ch; }
.showcase-header { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.gallery-controls { display: flex; gap: 8px; }
.gallery-controls button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--panel);
  border: 1px solid #79655f;
  border-radius: 50%;
  font-size: 1.15rem;
  cursor: pointer;
  transition: background-color .2s;
}

.gallery-controls button:hover:not([aria-disabled="true"]) { background: #573335; }
.gallery-controls button[aria-disabled="true"] { opacity: .6; cursor: default; }
.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(68%, 245px);
  gap: clamp(13px, 2vw, 22px);
  margin-top: clamp(24px, 4vw, 48px);
  padding: 2px 2px 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  scrollbar-color: #92756d var(--panel);
}

.gallery figure {
  display: grid;
  align-content: end;
  grid-template-rows: 1fr auto;
  gap: 15px;
  min-width: 0;
  padding: clamp(13px, 2vw, 23px) clamp(12px, 2vw, 21px) 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  scroll-snap-align: start;
}

.gallery .phone { align-self: center; width: min(100%, 220px); margin-inline: auto; }
.gallery figcaption { min-height: 2.8em; text-align: center; font-size: .875rem; line-height: 1.4; color: var(--muted); }
.idea { background: #a91920; color: #fff8f4; }
.idea .eyebrow, .idea .section-copy { color: #fff8f4; }
.credits {
  display: flex;
  flex-wrap: wrap;
  gap: 18px clamp(24px, 6vw, 80px);
  margin-top: 30px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.credits dt { font: .73rem/1.5 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.credits dd { margin-top: 4px; font-weight: 660; }
.download { margin-bottom: clamp(42px, 7vw, 86px); }
.download-inner {
  display: grid;
  justify-items: center;
  gap: 16px;
  background: #29191a;
  border: 1px solid #623337;
  border-top: 3px solid var(--brand);
  border-radius: clamp(16px, 2.5vw, 30px);
  padding: clamp(36px, 6.5vw, 76px) 18px;
  text-align: center;
}

.download-inner img { width: clamp(72px, 10vw, 108px); border-radius: 24%; margin-bottom: 5px; }
.download-inner h2 { max-width: 21ch; font-size: clamp(2.15rem, 4.7vw, 4.45rem); }
.download-inner p { color: var(--muted); }
.download-inner .store-link { margin-top: 4px; }
.site-footer { padding-block: 20px; border-top: 1px solid var(--line); color: var(--muted); }

@media (min-width: 540px) {
  .feature-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .hero { grid-template-columns: minmax(0, .98fr) minmax(0, 1.02fr); }
  .hero h1 { font-size: clamp(2.85rem, 5.5vw, 5.15rem); }
  .split { grid-template-columns: minmax(150px, .68fr) minmax(0, 1.8fr); }
  .feature-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row; overflow: visible; }
}

@media (max-width: 767px) {
  .hero-stage { max-width: 510px; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-copy > *, .hero-stage { animation: arrive .55s cubic-bezier(.2,.7,.2,1) both; }
  .hero-category { animation-delay: .06s; }
  .hero-copy h1 { animation-delay: .12s; }
  .hero-summary { animation-delay: .18s; }
  .hero-actions { animation-delay: .24s; }
  .hero-stage { animation-delay: .1s; }
  .gallery .phone { transition: transform .25s ease; }
  .gallery figure:hover .phone { transform: translateY(-3px); }

  @supports (animation-timeline: view()) {
    .hero-devices {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: exit 0% exit 85%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .store-link:hover { transform: none; }
}

@keyframes arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(24px); }
}
