/* Superblend redesign
   Theme lock: dark only (brand). Accent lock: emerald #34c980.
   Radius rule: interactive = pill, cards = 20px, app icons = 22% (iOS squircle feel).
   Type: Space Grotesk (display) / Outfit (body). */

:root {
  color-scheme: dark;
  --bg: #0c0e12;
  --surface: #14171d;
  --surface-raised: #1a1e26;
  --text: #f2f4f6;
  --muted: #a1a8b3;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #34c980;
  --accent-ink: #06130c;
  --radius-card: 20px;
  --max: 1200px;
  --display: "Space Grotesk", "Helvetica Neue", sans-serif;
  --body: "Outfit", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  line-height: 1.6;
  overflow-x: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--display);
  letter-spacing: -0.03em;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 14, 18, 0.82);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  height: 68px;
}

.brand-mark {
  display: flex;
  align-items: center;
  width: 168px;
}

.brand-mark img {
  width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 160ms ease, background 160ms ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100dvh - 68px);
  padding-top: 40px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  position: relative;
  max-width: 18ch;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 4.8vw, 4rem);
  font-weight: 700;
  line-height: 1.04;
}

h1::before {
  content: "";
  position: absolute;
  top: 1.02em;
  left: 0;
  z-index: -1;
  width: 4.5em;
  height: 0.09em;
  border-radius: 999px;
  background: var(--accent);
  animation: title-bar-grow 900ms cubic-bezier(0.16, 1, 0.3, 1) 600ms both;
}

@keyframes title-bar-grow {
  from {
    width: 0;
  }
}

.hero-lede {
  max-width: 34rem;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform 180ms ease, background 180ms ease;
}

.button:active {
  transform: translateY(1px);
}

.button.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button.primary:hover {
  background: #3fdd90;
}

/* Hero brand block: phones layered over the image-filled wordmark */

.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  margin-top: 56px;
}

.wordmark {
  position: relative;
  z-index: 1;
  margin: -0.14em 0 0;
  color: var(--text);
  font-family: var(--display);
  font-size: min(17rem, 15.5vw);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  white-space: nowrap;
}

.hero-photo {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: min(730px, 56vw);
  margin-bottom: clamp(-120px, -9vw, -64px);
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 40px 70px rgba(0, 0, 0, 0.6));
  -webkit-mask-image: linear-gradient(180deg, #000 74%, transparent 98%),
    linear-gradient(to top left, transparent 3%, #000 32%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, #000 74%, transparent 98%),
    linear-gradient(to top left, transparent 3%, #000 32%);
  mask-composite: intersect;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-brand:hover .hero-photo img {
  transform: scale(1.03);
}

/* Hero load-in choreography */

.hero-item {
  animation: rise 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-copy .hero-item:nth-child(1) { animation-delay: 60ms; }
.hero-copy .hero-item:nth-child(2) { animation-delay: 140ms; }
.hero-copy .hero-item:nth-child(3) { animation-delay: 220ms; }
.hero-copy .hero-item:nth-child(4) { animation-delay: 300ms; }
.hero-photo.hero-item { animation-delay: 320ms; }
.wordmark.hero-item { animation-delay: 400ms; }

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

/* Scroll-linked hero transition (Chrome/Edge; others fall back to static) */

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero-copy {
      animation: hero-copy-away linear both;
      animation-timeline: scroll();
      animation-range: 0 60vh;
    }

    .hero-brand {
      animation: hero-brand-recede linear both;
      animation-timeline: scroll();
      animation-range: 0 110vh;
    }
  }
}

@keyframes hero-copy-away {
  to {
    opacity: 0;
    transform: translateY(-48px);
  }
}

@keyframes hero-brand-recede {
  0%,
  55% {
    opacity: 1;
  }

  100% {
    transform: translateY(9vh) scale(0.94);
    opacity: 0.3;
  }
}

/* ---------- App shelf marquee (signature) ---------- */

.shelf {
  margin: 48px 0 0;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.shelf-track {
  display: flex;
  width: max-content;
  animation: shelf-scroll 60s linear infinite;
}

.shelf-group {
  display: flex;
  align-items: center;
  gap: 56px;
  padding-right: 56px;
}

.shelf-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
}

.shelf-item img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

@keyframes shelf-scroll {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- Apps grid ---------- */

.apps {
  padding-top: 110px;
}

.section-head {
  max-width: 46rem;
  margin-bottom: 48px;
}

.section-head h2,
.how h2,
.contact h2 {
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  font-weight: 700;
  line-height: 1.06;
  margin-bottom: 18px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.app-card {
  position: relative;
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    radial-gradient(120% 90% at 85% 0%, rgba(var(--tint), 0.16), transparent 60%),
    var(--surface);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 260ms ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--tint), 0.45);
}

.app-card.featured {
  grid-column: span 3;
  flex-direction: row;
  min-height: 380px;
}

.app-card.wide {
  grid-column: span 6;
  flex-direction: row;
  align-items: stretch;
  min-height: 300px;
}

.app-card-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  padding: 28px;
}

.app-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  margin-bottom: 20px;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.app-tag {
  color: rgb(var(--tint));
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.app-card h3 {
  margin-bottom: 10px;
  font-size: 1.55rem;
  font-weight: 700;
}

.app-tag.under-title {
  display: block;
  margin: -4px 0 14px;
}

.app-card p {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 30rem;
}

.store-link {
  display: inline-flex;
  align-items: center;
  margin-top: auto;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(var(--tint), 0.4);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 180ms ease;
}

.store-link:hover {
  background: rgba(var(--tint), 0.14);
}

.app-card-shot {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  flex: 0 0 46%;
  padding: 32px 24px 0;
}

.app-card-shot img {
  width: min(46%, 175px);
  border-radius: 24px 24px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.app-card-shot img:nth-child(even) {
  transform: translateY(26px);
}

.app-card.featured .app-card-shot {
  padding-right: 12px;
}

.app-card.featured .app-card-shot img {
  width: min(62%, 225px);
}

.app-card.featured .app-card-shot img:first-child {
  z-index: 1;
  margin-right: -16%;
  transform: rotate(-3deg) translateY(14px);
}

.app-card.featured .app-card-shot img:nth-child(2) {
  z-index: 2;
  transform: rotate(2deg) translateY(34px);
  box-shadow: -18px 28px 60px rgba(0, 0, 0, 0.65);
}

.app-card-shot.duo {
  gap: 18px;
  flex-basis: 52%;
}

.app-card-shot.duo img {
  width: min(30%, 165px);
}

/* ---------- Studio ---------- */

.studio {
  padding: 130px 0 10px;
}

.coming-badge {
  position: relative;
  display: flex;
  width: fit-content;
  margin: 0 auto 34px;
  padding: 1px;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.coming-badge::before {
  content: "";
  position: absolute;
  inset: -150%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg 175deg,
    rgba(255, 255, 255, 0.85) 224deg,
    transparent 275deg 360deg
  );
  filter: blur(10px);
  animation: badge-spin 4s linear infinite;
}

.badge-inner {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  border-radius: 11px;
  background: #0d0f13;
  color: #9bc7b1;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-shadow: 0 0 7px rgba(46, 133, 176, 0.42);
}

.badge-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(55, 212, 133, 0.85);
  box-shadow: 0 0 8px rgba(55, 212, 133, 0.7);
  animation: badge-pulse 2.2s ease-in-out infinite;
}

@keyframes badge-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes badge-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

.studio-quote {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
}

.studio-quote p {
  margin-bottom: 28px;
  font-family: var(--display);
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.studio-quote em {
  color: var(--accent);
  font-style: normal;
}

.studio-quote footer {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- How we work ---------- */

.how {
  padding-top: 130px;
}

.how-head {
  max-width: 44rem;
  margin-bottom: 20px;
}

.how-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.how-road {
  display: flex;
  flex-direction: column;
  margin-top: 44px;
}

.road-seg {
  display: block;
  width: min(100%, 900px);
  height: clamp(380px, 52vh, 480px);
  margin: -26px auto;
  overflow: visible;
  pointer-events: none;
}

.journey-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4px;
  stroke-linecap: round;
  stroke-dasharray: 3 4.5;
  opacity: 0.65;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .road-seg {
      clip-path: inset(0 0 100% 0);
      animation: journey-draw linear both;
      animation-timeline: view();
      animation-range: entry 35% cover 70%;
    }
  }
}

@keyframes journey-draw {
  to {
    clip-path: inset(0 0 -5% 0);
  }
}

.how-road article {
  position: relative;
  z-index: 1;
  width: min(100%, 500px);
  align-self: flex-start;
  margin-left: 6%;
}

.how-road article:nth-of-type(even) {
  align-self: flex-end;
  margin-right: 6%;
  margin-left: 0;
}

.how-road article {
  position: relative;
  overflow: hidden;
  padding: 34px 32px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(52, 201, 128, 0.09), transparent 55%),
    var(--surface);
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 260ms ease;
}

.how-road article:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 201, 128, 0.4);
}

.how-road article::before {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), rgba(52, 201, 128, 0.25));
}

.how-road h3 {
  margin-bottom: 12px;
  font-size: 1.32rem;
  font-weight: 700;
}

.how-road p {
  margin: 0;
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

/* ---------- Contact ---------- */

.contact {
  margin-top: 120px;
  padding: clamp(48px, 7vw, 90px) clamp(28px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background:
    radial-gradient(90% 120% at 12% 0%, rgba(52, 201, 128, 0.14), transparent 55%),
    var(--surface);
}

.contact h2 {
  max-width: 44rem;
  margin-bottom: 32px;
}

.email-button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 0 26px;
  border: 1px solid rgba(52, 201, 128, 0.45);
  border-radius: 999px;
  background: rgba(52, 201, 128, 0.1);
  color: var(--text);
  cursor: pointer;
  font-family: var(--body);
  font-size: 1.02rem;
  transition: background 180ms ease, transform 180ms ease;
}

.email-button:hover {
  background: rgba(52, 201, 128, 0.18);
}

.email-button:active {
  transform: translateY(1px);
}

.email-button span {
  font-weight: 600;
}

.email-button small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ---------- Footer ---------- */

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 56px 0 48px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Scroll reveal ---------- */

.js-enabled .reveal {
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.js-enabled .reveal.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* ---------- Reduced motion ---------- */

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

  .hero-item,
  h1::before {
    animation: none;
  }

  .shelf-track {
    width: auto;
    flex-wrap: wrap;
    animation: none;
  }

  .coming-badge::before,
  .badge-dot {
    animation: none;
  }

  .shelf-group[aria-hidden="true"] {
    display: none;
  }

  .js-enabled .reveal {
    transform: none;
    opacity: 1;
    transition: none;
  }

  .hero-photo img,
  .app-card,
  .button,
  .email-button,
  .store-link {
    transition: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    padding-top: 56px;
    padding-bottom: 8px;
  }

  .hero-brand {
    margin-top: 36px;
  }

  .hero-photo {
    height: min(520px, 64vw);
    margin-bottom: -40px;
  }

  .app-card.featured {
    grid-column: span 6;
  }

  .app-card {
    grid-column: span 3;
  }

  .app-card.wide {
    flex-direction: column;
  }

  .app-card.wide .app-card-shot {
    flex-basis: auto;
  }

  .how-road article,
  .how-road article:nth-of-type(even) {
    align-self: center;
    margin-left: 0;
    margin-right: 0;
  }

  .road-seg {
    height: clamp(280px, 42vh, 360px);
    margin: -16px auto;
  }
}

@media (max-width: 680px) {
  .container,
  .header-inner {
    width: calc(100% - 32px);
  }

  .brand-mark {
    width: 128px;
  }

  .nav-links a {
    padding: 8px 10px;
    font-size: 0.85rem;
  }

  .hero {
    padding-top: 44px;
  }

  h1 {
    font-size: clamp(2.1rem, 9vw, 2.8rem);
  }

  .hero-brand {
    margin-top: 24px;
  }

  .hero-photo {
    height: min(360px, 88vw);
    margin-bottom: -22px;
  }

  .wordmark {
    font-size: 15.5vw;
  }

  .apps {
    padding-top: 80px;
  }

  .app-card,
  .app-card.featured {
    grid-column: span 6;
  }

  .app-card.featured {
    flex-direction: column;
    min-height: auto;
  }

  .app-card-body {
    padding: 22px;
  }

  .app-card-shot {
    padding-top: 8px;
  }

  .studio {
    padding-top: 88px;
  }

  .contact {
    margin-top: 88px;
  }

  .email-button {
    flex-direction: column;
    gap: 4px;
    padding: 14px 22px;
  }

  .site-footer {
    flex-direction: column;
    gap: 10px;
  }
}
