/*
  Popular redesign
  Radius scale: interactive = pill, media/panels = 24px, inner tiles = 16px.
  Z-index scale: nav 10, skip-link 20, grain 30.
*/

:root {
  --bg: #f3f6f5;
  --surface: #e7efec;
  --surface-2: #ffffff;
  --ink: #0c2f2c;
  --ink-2: #4a6460;
  --line: rgb(12 47 44 / 0.12);
  --accent: #22c08b;
  --accent-ink: #0d7655;
  --brand: #0b4a45;
  --on-brand: #e9f6f1;
  --shadow: 0 24px 60px -24px rgb(11 74 69 / 0.35);

  --r-pill: 999px;
  --r-lg: 24px;
  --r-md: 16px;

  --font-display: "Cabinet Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Satoshi", ui-sans-serif, system-ui, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 68px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1a19;
    --surface: #112624;
    --surface-2: #15302d;
    --ink: #e6f1ee;
    --ink-2: #9db4af;
    --line: rgb(230 241 238 / 0.12);
    --accent: #2fd39c;
    --accent-ink: #5fe3b5;
    --brand: #0f3d39;
    --on-brand: #e6f1ee;
    --shadow: 0 24px 60px -24px rgb(0 0 0 / 0.6);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

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

.container {
  width: min(1240px, 100% - 2.5rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 20;
  padding: 0.75rem 1rem;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.975rem;
  white-space: nowrap;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn--lg {
  padding: 0.95rem 1.6rem;
  font-size: 1.05rem;
}

.btn--primary {
  background: var(--accent);
  color: #06241f;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.35), 0 10px 24px -12px rgb(34 192 139 / 0.8);
}

.btn--primary:hover {
  background: color-mix(in oklab, var(--accent) 88%, white);
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: rgb(233 246 241 / 0.4);
  color: var(--on-brand);
}

.btn--ghost:hover {
  background: rgb(233 246 241 / 0.1);
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn .ph {
  transition: transform 0.25s var(--ease);
}

.btn:hover .ph-arrow-right {
  transform: translateX(3px);
}

.link-arrow {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  transition: text-underline-offset 0.25s var(--ease);
}

.link-arrow:hover {
  text-underline-offset: 9px;
}

/* Navigation */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 10;
  height: var(--nav-h);
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.nav.is-scrolled {
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
}

.nav__inner {
  width: min(1240px, 100% - 2.5rem);
  height: 100%;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.nav__brand img {
  border-radius: 10px;
}

.nav__links {
  display: flex;
  gap: 1.75rem;
  margin-left: auto;
}

.nav__links a {
  position: relative;
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--ink-2);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.nav__links a:hover,
.nav__links a.is-current {
  color: var(--ink);
}

.nav__links a.is-current::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

.nav__toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 1.35rem;
  cursor: pointer;
}

@media (max-width: 960px) {
  .nav {
    background: color-mix(in oklab, var(--bg) 90%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .nav__toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav__cta {
    display: none;
  }

  .nav__links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0.5rem 1.25rem 1.25rem;
    background: var(--bg);
    box-shadow: 0 1px 0 var(--line), var(--shadow);
    display: none;
  }

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

  .nav__links a {
    padding: 0.85rem 0;
    font-size: 1.1rem;
    border-bottom: 1px solid var(--line);
  }

  .nav__links a.is-current::after {
    display: none;
  }
}

/* Hero */

.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 2rem) 0 4rem;
  overflow: hidden;
  background:
    radial-gradient(60% 70% at 85% 45%, color-mix(in oklab, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(40% 50% at 100% 100%, color-mix(in oklab, var(--brand) 18%, transparent), transparent 70%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 3rem;
}

.hero__title {
  font-size: clamp(2.6rem, 5.2vw, 4.6rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 13ch;
}

.hero__lead {
  margin-top: 1.5rem;
  max-width: 42ch;
  font-size: 1.2rem;
  color: var(--ink-2);
}

.hero__actions {
  margin-top: 2.25rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.75rem;
}

.hero__phones {
  position: relative;
  height: min(640px, 78dvh);
}

.phone {
  margin: 0;
  overflow: hidden;
  border-radius: 34px;
  border: 7px solid var(--ink);
  background: var(--ink);
  box-shadow: var(--shadow);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__phones .phone {
  position: absolute;
  aspect-ratio: 2 / 3;
}

.phone--front {
  z-index: 2;
  height: 92%;
  left: 50%;
  top: 4%;
  translate: -50% 0;
}

.phone--back-left,
.phone--back-right {
  height: 76%;
  top: 14%;
  opacity: 0.92;
}

.phone--back-left {
  left: 2%;
  rotate: -7deg;
}

.phone--back-right {
  right: 2%;
  rotate: 7deg;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }

  .hero__phones {
    height: 460px;
  }
}

@media (max-width: 520px) {
  .hero__phones {
    height: 380px;
  }

  .phone--back-left {
    left: -6%;
  }

  .phone--back-right {
    right: -6%;
  }
}

/* Sections */

.section {
  padding: clamp(5rem, 10vw, 8rem) 0 clamp(5.5rem, 11vw, 9rem);
}

.section__head {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section__title {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.section__lead {
  margin-top: 1rem;
  max-width: 60ch;
  font-size: 1.15rem;
  color: var(--ink-2);
}

/* Problem bento */

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 1rem;
}

.bento__cell {
  margin: 0;
  padding: 2rem;
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5rem;
}

.bento__cell .ph {
  font-size: 2rem;
  margin-bottom: auto;
  color: var(--accent-ink);
}

.bento__cell h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.bento__cell p {
  color: var(--ink-2);
  max-width: 40ch;
}

.bento__photo {
  grid-column: 1 / span 7;
  grid-row: span 2;
  padding: 0;
  overflow: hidden;
  min-height: 420px;
}

.bento__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.8s var(--ease);
}

.bento__photo:hover img {
  scale: 1.04;
}

.bento__cell--tint {
  grid-column: span 5;
  background: var(--surface);
}

.bento__cell--plain {
  grid-column: span 5;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.bento__cell--brand {
  grid-column: span 7;
  background:
    radial-gradient(80% 120% at 100% 0%, color-mix(in oklab, var(--accent) 35%, transparent), transparent 60%),
    var(--brand);
  color: var(--on-brand);
}

.bento__cell--brand .ph {
  color: var(--accent);
}

.bento__cell--brand p {
  color: color-mix(in oklab, var(--on-brand) 78%, transparent);
}

@media (max-width: 900px) {
  .bento {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento__cell,
  .bento__photo {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .bento__photo {
    min-height: 280px;
  }

  .bento__cell {
    min-height: 200px;
  }
}

/* Steps: sticky media + scrolling list */

.steps {
  background: var(--surface);
}

.steps__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
}

.steps__media {
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  height: calc(100dvh - var(--nav-h));
  display: grid;
  align-items: center;
}

.steps__frame {
  position: relative;
  aspect-ratio: 1280 / 813;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow);
}

.steps__frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  scale: 1.03;
  transition: opacity 0.6s var(--ease), scale 0.8s var(--ease);
}

.steps__frame img.is-active {
  opacity: 1;
  scale: 1;
}

.steps__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.step {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0 2rem 1.75rem;
  border-left: 2px solid var(--line);
  opacity: 0.4;
  transition: opacity 0.5s var(--ease), border-color 0.5s var(--ease);
}

.step.is-active {
  opacity: 1;
  border-left-color: var(--accent);
}

.step h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.step p {
  color: var(--ink-2);
  max-width: 46ch;
}

.step__img {
  display: none;
}

.checks {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.checks li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-weight: 500;
}

.checks .ph {
  flex: none;
  margin-top: 0.3rem;
  color: var(--accent-ink);
}

@media (max-width: 900px) {
  .steps__grid {
    grid-template-columns: 1fr;
  }

  .steps__media {
    display: none;
  }

  .step {
    min-height: 0;
    opacity: 1;
    padding: 0 0 3rem;
    border-left: 0;
  }

  .step__img {
    display: block;
    border-radius: var(--r-md);
    box-shadow: var(--shadow);
    margin-bottom: 0.5rem;
  }
}

/* Features */

.features__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.features__aside {
  position: sticky;
  top: calc(var(--nav-h) + 3rem);
}

.phone--solo {
  width: min(240px, 60%);
  margin-top: 2.5rem;
  rotate: -4deg;
}

.features__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem 2.5rem;
}

.features__list li {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.features__list .ph,
.dashboard__list .ph {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--surface);
  color: var(--accent-ink);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.features__list h3,
.dashboard__list h3 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}

.features__list p,
.dashboard__list p {
  color: var(--ink-2);
}

@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: 1fr;
  }

  .features__aside {
    position: static;
  }

  .phone--solo {
    display: none;
  }
}

@media (max-width: 560px) {
  .features__list {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Dashboard */

.dashboard {
  background: var(--surface);
}

.dashboard__shot {
  width: min(100%, 480px);
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.dashboard__shot img {
  width: 100%;
  height: auto;
}

.dashboard__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem 2.5rem;
}

.dashboard__list li:first-child {
  grid-row: span 2;
  padding: 2rem;
  border-radius: var(--r-lg);
  background: var(--brand);
  color: var(--on-brand);
}

.dashboard__list li:first-child h3 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.025em;
}

.dashboard__list li:first-child p {
  color: color-mix(in oklab, var(--on-brand) 78%, transparent);
  font-size: 1.1rem;
  max-width: 34ch;
}

.dashboard__list li:first-child .ph {
  background: rgb(255 255 255 / 0.08);
  color: var(--accent);
}

.dashboard__list .ph {
  background: var(--surface-2);
}

@media (max-width: 900px) {
  .dashboard__list {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard__list li:first-child {
    grid-column: 1 / -1;
    grid-row: auto;
  }
}

@media (max-width: 560px) {
  .dashboard__list {
    grid-template-columns: 1fr;
  }
}

/* Gallery */

.gallery__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  grid-template-rows: repeat(2, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--surface);
}

.gallery__item--wide {
  grid-row: span 2;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: scale 0.8s var(--ease);
}

.gallery__item:hover img {
  scale: 1.05;
}

@media (max-width: 760px) {
  .gallery__grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }

  .gallery__item--wide {
    grid-row: auto;
  }

  .gallery__item {
    aspect-ratio: 4 / 3;
  }
}

/* CTA */

.cta {
  padding-top: 0;
}

.cta__panel {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.75rem, 6vw, 5rem);
  border-radius: var(--r-lg);
  color: var(--on-brand);
  background:
    radial-gradient(70% 90% at 100% 0%, color-mix(in oklab, var(--accent) 45%, transparent), transparent 60%),
    radial-gradient(50% 80% at 0% 100%, rgb(255 255 255 / 0.06), transparent 70%),
    var(--brand);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08), var(--shadow);
}

.cta__title {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
  max-width: 16ch;
}

.cta__text {
  margin-top: 1.25rem;
  max-width: 48ch;
  font-size: 1.15rem;
  color: color-mix(in oklab, var(--on-brand) 80%, transparent);
}

.cta__actions {
  margin-top: 2.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Contact */

.contact {
  padding-top: clamp(3rem, 6vw, 5rem);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
}

.contact__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem;
}

.contact__list li {
  display: grid;
  gap: 0.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.contact__label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
}

.contact__value {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s var(--ease);
}

.contact__value:hover {
  color: var(--accent-ink);
}

@media (max-width: 800px) {
  .contact__grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */

.footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.925rem;
  color: var(--ink-2);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer__brand img {
  border-radius: 8px;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
}

.footer__links a {
  text-decoration: none;
}

.footer__links a:hover {
  color: var(--ink);
}

/* Reveal motion */

@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] {
    opacity: 0;
    translate: 0 24px;
    transition: opacity 0.7s var(--ease), translate 0.7s var(--ease);
    transition-delay: calc(var(--i, 0) * 80ms);
  }

  .js [data-reveal].is-in {
    opacity: 1;
    translate: 0 0;
  }

  .js .hero__phones .phone--back-left[data-reveal],
  .js .hero__phones .phone--back-right[data-reveal] {
    translate: 0 40px;
  }

  .js .hero__phones .phone--front[data-reveal] {
    translate: -50% 40px;
  }

  .js .hero__phones .phone--back-left[data-reveal].is-in,
  .js .hero__phones .phone--back-right[data-reveal].is-in {
    opacity: 0.92;
    translate: 0 0;
  }

  .js .hero__phones .phone--front[data-reveal].is-in {
    translate: -50% 0;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
