:root {
  --bg: #f8f9fd;
  --bg-soft: #f1f3fb;
  --card: #ffffff;
  --text: #171923;
  --muted: #6e7484;
  --line: #e7eaf3;
  --accent: #5d61df;
  --accent-2: #7c80ee;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(50, 56, 96, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  color: inherit;
  font: inherit;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0;
  background: rgba(248, 249, 253, 0.78);
  backdrop-filter: blur(16px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  width: fit-content;
  font-size: 1.08rem;
  font-weight: 800;
}

.logo span {
  width: 5px;
  height: 5px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 48px;
  color: #242838;
  font-size: 0.9rem;
  font-weight: 600;
}

.nav a,
.header-button {
  transition: color 180ms ease, transform 180ms ease;
}

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

.header-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 24px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(93, 97, 223, 0.22);
}

.hero {
  position: relative;
  min-height: calc(100dvh - 78px);
  display: block;
  overflow: hidden;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(34px, 7vh, 58px) 0 30px;
  background: var(--bg);
}

.hero-bg {
  --hero-image-y: -46%;
  position: absolute;
  top: 50%;
  right: -2px;
  z-index: 0;
  width: min(900px, 72vw);
  height: auto;
  object-fit: contain;
  object-position: right center;
  pointer-events: none;
  filter: drop-shadow(0 26px 34px rgba(50, 56, 96, 0.14));
  animation: heroImageIn 1250ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes heroImageIn {
  from {
    opacity: 0;
    transform: translate(28px, var(--hero-image-y));
  }
  to {
    opacity: 1;
    transform: translate(0, var(--hero-image-y));
  }
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(500px, 46%);
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 600;
}

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

h1 {
  max-width: 500px;
  margin-bottom: 16px;
  font-size: clamp(2.1rem, 3.45vw, 3.35rem);
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2.1rem, 4vw, 3.35rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow),
.section-head p,
.benefit-card p,
.work-meta p {
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.62;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 28px 0 34px;
}

.button,
.contact-button {
  --mx: 0px;
  --my: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 700;
  transform: translate(var(--mx), var(--my));
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button.primary,
.contact-button.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 18px 36px rgba(93, 97, 223, 0.22);
}

.button.secondary:hover,
.contact-button:hover {
  border-color: rgba(93, 97, 223, 0.35);
  box-shadow: 0 14px 30px rgba(50, 56, 96, 0.08);
}

.hero-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 570px;
}

.hero-services article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
}

.icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(93, 97, 223, 0.22);
  border-radius: 7px;
  color: var(--accent);
  background: #fff;
}

.hero-services strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.82rem;
}

.hero-services small {
  color: var(--muted);
  font-size: 0.72rem;
}

.section {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 110px 0;
}

.section-head {
  max-width: 690px;
  margin: 0 auto 68px;
  text-align: center;
}

.about {
  position: relative;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 42px;
}

.benefit-card {
  transition: transform 220ms ease;
}

.benefit-card:hover {
  transform: translateY(-8px);
}

.benefit-card .icon {
  margin-bottom: 24px;
}

.benefit-card h3 {
  margin-bottom: 12px;
  font-size: 1.08rem;
}

.benefit-card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.work-switcher {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(720px, 100%);
  margin: -34px auto 44px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 50px rgba(50, 56, 96, 0.06);
}

.work-tab {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.work-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.66);
  transform: translateY(-1px);
}

.work-tab.is-active {
  border-color: rgba(93, 97, 223, 0.18);
  color: var(--text);
  background: #fff;
  box-shadow: 0 14px 32px rgba(50, 56, 96, 0.08);
}

.work-tab span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--accent);
  background: rgba(93, 97, 223, 0.09);
  font-size: 0.84rem;
  font-weight: 800;
}

.work-tab strong {
  overflow: hidden;
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-tab small {
  justify-self: end;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.work-panel {
  animation: workPanelIn 260ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.work-panel:not(.is-active) {
  display: none;
}

@keyframes workPanelIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.work-group + .work-group {
  margin-top: 92px;
}

.work-subhead {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  margin-bottom: 28px;
}

.work-subhead span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(93, 97, 223, 0.22);
  border-radius: 9px;
  color: var(--accent);
  background: #fff;
  font-weight: 800;
}

.work-subhead h3 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.work-subhead p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.work-card {
  content-visibility: auto;
  contain-intrinsic-size: 620px 500px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 18px 50px rgba(50, 56, 96, 0.06);
  cursor: pointer;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}

.work-card:focus-visible {
  outline: 3px solid rgba(93, 97, 223, 0.28);
  outline-offset: 4px;
}

.work-card-centered {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, calc((100% - 28px) / 2));
}

.work-card:hover {
  border-color: rgba(93, 97, 223, 0.28);
  transform: translateY(-10px);
  box-shadow: var(--shadow);
}

.browser-preview {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 18px 18px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.browser-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
}

.work-card:hover .browser-preview img {
  transform: scale(1.035);
}

.project-card {
  --project-accent: var(--accent);
  --project-soft: #f5f6ff;
  --project-ink: var(--ink);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 12%, color-mix(in srgb, var(--project-accent) 16%, transparent), transparent 32%),
    linear-gradient(180deg, #fff 0%, #fbfbff 100%);
}

.project-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--project-accent) 16%, transparent);
  border-radius: inherit;
  content: "";
}

.project-card--gift {
  --project-accent: #83d82a;
  --project-soft: #08100d;
  --project-ink: #f5fff0;
  background:
    radial-gradient(circle at 80% 8%, rgba(131, 216, 42, 0.25), transparent 34%),
    linear-gradient(180deg, #08100d 0%, #030706 100%);
  color: #f5fff0;
}

.project-card--tailcare {
  --project-accent: #2f7e48;
  --project-soft: #f4f8ee;
  background:
    radial-gradient(circle at 78% 4%, rgba(70, 132, 76, 0.14), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8faf4 100%);
}

.project-card--maverick {
  --project-accent: #9b150e;
  --project-soft: #fff1df;
  background:
    radial-gradient(circle at 78% 6%, rgba(155, 21, 14, 0.15), transparent 34%),
    linear-gradient(180deg, #fff9ef 0%, #f8e8d5 100%);
}

.project-preview {
  aspect-ratio: 4 / 3;
  border-color: color-mix(in srgb, var(--project-accent) 18%, var(--line));
  background: var(--project-soft);
}

.project-card--gift .project-preview {
  border-color: rgba(131, 216, 42, 0.25);
  background: #050907;
}

.project-card--maverick .project-preview {
  background: #f5dfc8;
}

.project-preview img {
  object-fit: cover;
}

.project-preview--phone {
  display: grid;
  place-items: center;
}

.project-preview--phone img {
  width: min(58%, 210px);
  height: calc(100% - 26px);
  border: 1px solid color-mix(in srgb, var(--project-accent) 24%, var(--line));
  border-radius: 22px;
  object-fit: cover;
  object-position: top center;
  background: var(--project-soft);
  box-shadow: 0 20px 48px color-mix(in srgb, var(--project-accent) 22%, transparent);
}

.project-card--gift .project-preview--phone img {
  box-shadow: 0 20px 60px rgba(131, 216, 42, 0.18);
}

.project-card--tailcare .project-preview img {
  object-position: top center;
}

.project-card--gift .work-meta p {
  color: rgba(245, 255, 240, 0.72);
}

.project-card--gift .work-meta button {
  border-color: rgba(131, 216, 42, 0.25);
  background: rgba(131, 216, 42, 0.12);
  color: #b9ff62;
}

.project-card--gift:hover .work-meta button {
  color: #061006;
  background: #83d82a;
}

.project-card--tailcare:hover {
  border-color: rgba(47, 126, 72, 0.26);
}

.project-card--maverick:hover {
  border-color: rgba(155, 21, 14, 0.25);
}

.work-meta {
  position: relative;
  padding: 24px 24px 28px;
}

.work-meta h3 {
  margin: 0 58px 18px 0;
  font-size: 1.22rem;
}

.work-meta p {
  margin: 0;
  font-size: 0.9rem;
}

.work-meta button {
  position: absolute;
  right: 22px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.work-card:hover .work-meta button {
  color: #fff;
  background: var(--accent);
  transform: rotate(8deg);
}

.contact {
  padding-bottom: 78px;
}

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 42px;
}

.contact-button {
  gap: 10px;
  min-width: 170px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 58px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer a {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  background: #fff;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  padding: 20px;
}

.preview-modal.open {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 25, 35, 0.58);
  backdrop-filter: blur(12px);
}

.modal-shell {
  position: relative;
  width: min(1280px, 100%);
  height: min(820px, calc(100dvh - 40px));
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.28);
  animation: modalIn 220ms ease both;
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.modal-head div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-link,
.modal-head button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}

.modal-frame {
  display: block;
  width: 100%;
  height: calc(100% - 74px);
  border: 0;
}

.reveal {
  opacity: 0;
  filter: blur(4px);
  transform: translateY(46px) scale(0.99);
  transition:
    filter 780ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 820ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 980ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.reveal.visible {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0) scale(1);
  will-change: auto;
}

.button:active,
.contact-button:active,
.header-button:active {
  transform: translateY(1px) scale(0.99);
}

@media (max-width: 980px) {
  .header {
    grid-template-columns: auto auto;
  }

  .nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-top: 42px;
    padding-bottom: 270px;
  }

  .hero-bg {
    --hero-image-y: 0;
    top: auto;
    inset: auto -18px 0 auto;
    width: min(760px, 112vw);
    height: auto;
    object-fit: contain;
    object-position: right bottom;
  }

  .hero-copy {
    width: 100%;
    max-width: 560px;
  }

  .benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .header,
  .hero,
  .section,
  .footer {
    width: min(100% - 28px, 1160px);
  }

  h1 {
    font-size: 2.32rem;
  }

  .hero-services,
  .benefits,
  .work-grid,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .work-switcher {
    margin-top: -42px;
  }

  .work-tab {
    grid-template-columns: auto 1fr;
  }

  .work-tab small {
    grid-column: 2;
    justify-self: start;
  }

  .work-card-centered {
    width: 100%;
  }

  .work-subhead {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .button,
  .contact-button {
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}


/* Mobile reveal tuning */
@media (prefers-reduced-motion: no-preference) and (pointer: coarse), (prefers-reduced-motion: no-preference) and (max-width: 768px) {
  .reveal,
  .reveal-card {
    transition:
      filter 720ms cubic-bezier(0.16, 1, 0.3, 1),
      opacity 780ms cubic-bezier(0.16, 1, 0.3, 1),
      transform 940ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  .reveal:not(.visible),
  .reveal-card:not(.visible) {
    transform: translate3d(0, 42px, 0) scale(0.99);
  }
}

