/* =========================================================
   Sections — hero, work, about, services, contact
   ========================================================= */

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.hero__atmosphere { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
}
.hero__glow--violet {
  width: 60vw; height: 60vw;
  max-width: 900px; max-height: 900px;
  right: -12vw; top: -18vw;
  background: radial-gradient(closest-side, rgb(124 58 237 / 0.38), transparent);
}
.hero__glow--green {
  width: 28vw; height: 28vw;
  right: 18vw; top: 34%;
  background: radial-gradient(closest-side, rgb(155 225 93 / 0.10), transparent);
}
/* Glossy "floor" the cat sits on, like a reflective table edge. */
.hero__floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 28%;
  background:
    linear-gradient(180deg, transparent, rgb(139 92 246 / 0.06) 40%, transparent),
    linear-gradient(180deg, transparent 0, var(--c-bg) 100%);
  border-top: 1px solid rgb(177 140 255 / 0.10);
  mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--s-6);
  padding-top: 7rem;
  padding-bottom: 5rem;
}

.hero__copy { position: relative; z-index: 2; max-width: 40rem; }
.hero__copy .eyebrow { margin-bottom: var(--s-5); }

/* "Available for new projects" badge */
.availability {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--s-5);
  padding: 0.4rem 0.9rem 0.4rem 0.75rem;
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  color: var(--c-text-2);
  border: 1px solid rgb(155 225 93 / 0.28);
  border-radius: var(--r-pill);
  background: rgb(155 225 93 / 0.05);
}
.availability__dot {
  position: relative;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: 0 0 10px rgb(155 225 93 / 0.8);
}
.availability__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--c-green);
  animation: availability-ping 2.4s var(--ease-out) infinite;
}
@keyframes availability-ping {
  0%   { transform: scale(1);   opacity: 0.9; }
  80%, 100% { transform: scale(2.8); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .availability__dot::after { animation: none; opacity: 0; }
}

.hero__title {
  font-family: var(--f-display);
  font-stretch: 100%;
  font-weight: 350;
  font-size: var(--fs-hero);
  line-height: 0.96;
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}
/* Line breaks are art-directed in config.js — never re-wrap them. */
.hero__title-line { display: block; white-space: nowrap; }

.hero__lead {
  margin-top: var(--s-6);
  max-width: 30rem;
  font-size: var(--fs-md);
  color: var(--c-text-2);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-4);
  margin-top: var(--s-7);
}

/* Cat stage — the moon behind the cat. The cat itself arrives in Phase 3. */
.cat-stage {
  position: relative;
  aspect-ratio: 1;
  /* Stays inside its own column (never over the headline) and leans
     towards the right edge of the screen. */
  width: min(100%, 680px);
  justify-self: end;
  margin-right: calc(var(--gutter) * -1);
}
/* The moon behind the cat's head — gives the black silhouette contrast. */
.cat-stage::before {
  content: "";
  position: absolute;
  left: 9%; top: 0;
  width: 82%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 30%, rgb(222 205 255 / 0.22), transparent 46%),
    radial-gradient(circle at 50% 50%, #3a2c58 0%, #241a38 48%, #150f22 70%);
  box-shadow:
    inset -40px -50px 90px rgb(0 0 0 / 0.55),
    0 0 90px rgb(139 92 246 / 0.30),
    0 0 220px rgb(139 92 246 / 0.16);
}
/* Dark contact shadow where the cat sits. */
.cat-stage::after {
  content: "";
  position: absolute;
  left: 20%; right: 20%; bottom: 3.5%;
  height: 6%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.85), rgb(0 0 0 / 0.4) 60%, transparent);
  filter: blur(4px);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  right: var(--gutter);
  bottom: 12%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  color: var(--c-violet-hi);
}
.scroll-hint__text {
  font-family: var(--f-hand);
  font-size: 1.35rem;
  line-height: 1;
  transform: rotate(-12deg);
}
.scroll-hint__line {
  position: relative;
  width: 1px; height: 72px;
  background: linear-gradient(var(--c-violet-hi), transparent);
  overflow: hidden;
}
.scroll-hint__line::after {
  content: "";
  position: absolute;
  left: -2px; top: 0;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: var(--glow-green);
  animation: scroll-dot 2.4s var(--ease-in-out) infinite;
}
@keyframes scroll-dot {
  0%   { transform: translateY(0);    opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(68px); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .scroll-hint__line::after { animation: none; opacity: 1; }
}

@media (max-width: 900px) {
  .hero { align-items: flex-start; }
  .hero__inner {
    grid-template-columns: 1fr;
    padding-top: 6.5rem;
    gap: 0;
  }
  .cat-stage {
    order: -1;
    width: min(72vw, 380px);
    justify-self: center;
    margin: 0 0 var(--s-4);
  }
  .scroll-hint { display: none; }
}

/* ================= SECTION TITLES ================= */
.section-title {
  font-family: var(--f-display);
  font-stretch: 108%;
  font-weight: 350;
  font-size: var(--fs-mega);
  line-height: 0.92;
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
  margin-top: var(--s-4);
}
.section-title > span { display: block; }
.section-title--sm { font-size: var(--fs-xl); line-height: 1; }

/* ================= WORK ================= */
.work__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: end;
  gap: var(--s-6);
}
.work__head .eyebrow { color: var(--c-violet-hi); }
.work__intro { max-width: 26rem; color: var(--c-text-2); font-size: var(--fs-md); }
.work__note { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--c-text-3); }

/* Asymmetric case-study layout */
.projects {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-7) var(--s-6);
  margin-top: var(--s-9);
  counter-reset: project;
}
.project { counter-increment: project; grid-column: span 12; }
.project:nth-child(3n + 1) { grid-column: 1 / span 7; }
.project:nth-child(3n + 2) { grid-column: 8 / span 5; margin-top: var(--s-10); }
.project:nth-child(3n + 3) { grid-column: 3 / span 8; }

.project__link {
  display: block;
  width: 100%;
  text-align: left;
}
.project__art {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--r-md);
  border: 1px solid var(--c-line);
  background: var(--art-from);
  transform-style: preserve-3d;
  transition:
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-slow) var(--ease-out),
    transform 400ms var(--ease-out);
}
.project:nth-child(3n + 3) .project__art { aspect-ratio: 16 / 8; }

/* A tall mock website inside the card: the hero first, then the rest of the
   page. On hover it slowly scrolls, like someone browsing the concept. */
.project__page {
  --page-h: 260%;
  position: absolute;
  left: 0; right: 0; top: 0;
  height: var(--page-h);
  transition: transform 1.4s var(--ease-in-out);
}
.project__link:hover .project__page,
.project__link:focus-visible .project__page {
  transform: translateY(calc(-100% + 100% / 2.6));
  transition: transform 7s cubic-bezier(0.45, 0, 0.4, 1);
}
.project__page-hero { position: relative; height: calc(100% / 2.6); }
.project__page-hero svg { width: 100%; height: 100%; }
.project__photo { width: 100%; height: 100%; object-fit: cover; }
/* Darken the bottom of a photo so the title on it stays readable. */
.project__page-hero:has(.project__photo)::after {
  content: "";
  position: absolute;
  inset: 40% 0 0 0;
  background: linear-gradient(180deg, transparent, rgb(0 0 0 / 0.55));
  pointer-events: none;
}
.project__page-hero .project__art-title { z-index: 1; }
.project__page-body {
  height: calc(100% - 100% / 2.6);
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 5%;
  padding: 7% 7% 6%;
  background: linear-gradient(180deg, var(--art-from), color-mix(in srgb, var(--art-from) 70%, #000));
}
.mock-lines { display: grid; gap: 0.5rem; }
.mock-line { height: 0.45rem; border-radius: 99px; background: color-mix(in srgb, var(--art-ink) 22%, transparent); }
.mock-line:nth-child(1) { width: 55%; height: 0.7rem; background: color-mix(in srgb, var(--art-ink) 45%, transparent); }
.mock-line:nth-child(2) { width: 82%; }
.mock-line:nth-child(3) { width: 68%; }
.mock-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4%; }
.mock-card {
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  background: linear-gradient(160deg, var(--art-via), var(--art-to));
  opacity: 0.85;
}
.mock-card:nth-child(2) { background: linear-gradient(160deg, var(--art-to), var(--art-via)); }
.mock-banner {
  position: relative;
  min-height: 18%;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(110deg, var(--art-via), var(--art-from));
}
.mock-banner::after {
  content: "";
  position: absolute;
  right: 10%; top: 50%;
  width: 22%; aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  background: var(--art-to);
  opacity: 0.8;
}
.mock-button { width: 30%; height: 1.6rem; border-radius: 99px; background: var(--art-to); opacity: 0.9; }
.mock-foot { height: 1px; background: color-mix(in srgb, var(--art-ink) 25%, transparent); }

/* Moving highlight that follows the cursor across the card (set by cards.js). */
.project__glare {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgb(255 255 255 / 0.22), transparent 42%);
  opacity: 0;
  transition: opacity 400ms var(--ease-out);
}
.project__link:hover .project__glare { opacity: 1; }
.project__art-title {
  position: absolute;
  left: 7%; bottom: 9%;
  font-family: var(--f-display);
  font-stretch: 85%;
  font-weight: 300;
  font-size: clamp(1.6rem, 1rem + 2.4vw, 3.2rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--art-ink);
  max-width: 70%;
}
.project__link:hover .project__art,
.project__link:focus-visible .project__art {
  border-color: rgb(155 225 93 / 0.6);
  box-shadow: var(--glow-green);
}
@media (prefers-reduced-motion: reduce) {
  .project__link:hover .project__page,
  .project__link:focus-visible .project__page { transform: none; }
}

.project__meta {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: var(--s-4);
  margin-top: var(--s-5);
}
.project__index {
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  color: var(--c-text-3);
}
.project__index::before { content: "0" counter(project); }
.project__title {
  font-family: var(--f-display);
  font-stretch: 108%;
  font-weight: 400;
  font-size: var(--fs-lg);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.project__status {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  padding: 6px 12px; border-radius: 99px;
  font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: rgb(6 5 10 / 0.72); border: 1px solid rgb(255 255 255 / 0.25);
  transform: translateZ(30px);
}
.project__category { font-size: var(--fs-xs); letter-spacing: 0.16em; text-transform: uppercase; color: var(--c-violet-hi); }
.project__desc { margin-top: var(--s-3); max-width: 34rem; color: var(--c-text-2); font-size: var(--fs-sm); }
.project__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  margin-top: var(--s-4);
}
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.tag {
  padding: 0.3rem 0.7rem;
  font-size: var(--fs-xs);
  color: var(--c-text-2);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-pill);
}
.project__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--c-text);
}
.project__cta svg { width: 14px; height: 14px; transition: transform var(--dur-base) var(--ease-out); }
.project__link:hover .project__cta { color: var(--c-green); }
.project__link:hover .project__cta svg { transform: translate(3px, -3px); }

@media (max-width: 900px) {
  .work__head { grid-template-columns: 1fr; }
  .projects { gap: var(--s-8); }
  .project:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .project:nth-child(3n + 3) .project__art { aspect-ratio: 4 / 3; }
}

/* Project detail dialog */
.project-dialog {
  width: min(92vw, 760px);
  max-height: 88vh;
  padding: 0;
  color: var(--c-text);
  background: var(--c-bg-raised);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-md);
  box-shadow: 0 40px 120px rgb(0 0 0 / 0.6), 0 0 80px rgb(139 92 246 / 0.15);
}
.project-dialog::backdrop { background: rgb(4 3 8 / 0.75); backdrop-filter: blur(6px); }
.project-dialog__art { aspect-ratio: 16 / 7; position: relative; overflow: hidden; background: var(--art-from); }
.project-dialog__art svg { width: 100%; height: 100%; }
.project-dialog__body { padding: var(--s-6); }
.project-dialog__body h3 {
  margin-top: var(--s-2);
  font-family: var(--f-display);
  font-stretch: 108%;
  font-weight: 400;
  font-size: var(--fs-xl);
  text-transform: uppercase;
  line-height: 1;
}
.project-dialog__body p { margin-top: var(--s-4); color: var(--c-text-2); }
.project-dialog__body .tags { margin-top: var(--s-5); }
.project-dialog__note { font-size: var(--fs-xs); color: var(--c-text-3); }
.project-dialog__close {
  position: absolute;
  top: var(--s-4); right: var(--s-4);
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgb(6 5 10 / 0.7);
  border: 1px solid var(--c-line-strong);
}
.project-dialog__close svg { width: 16px; height: 16px; }

/* ================= ABOUT ================= */
.about { border-top: 1px solid var(--c-line); }
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: var(--s-8);
}
.about__head .eyebrow { color: var(--c-violet-hi); }
.about__head .section-title { max-width: 12ch; }
.about__text p { color: var(--c-text-2); font-size: var(--fs-md); }
.about__text p + p { margin-top: var(--s-4); }
.about__text p:first-child {
  font-family: var(--f-display);
  font-stretch: 100%;
  font-size: var(--fs-lg);
  line-height: 1.3;
  color: var(--c-text);
}
.about__focus {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-7);
}
.about__focus li {
  padding: 0.45rem 0.9rem;
  font-size: var(--fs-sm);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-pill);
}
.about__focus li::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: 0.55rem;
  border-radius: 50%;
  background: var(--c-green);
  box-shadow: var(--glow-green);
  vertical-align: middle;
}
.about__audience { margin-top: var(--s-6); font-size: var(--fs-sm); color: var(--c-text-3); max-width: 36rem; }

@media (max-width: 900px) {
  .about__inner { grid-template-columns: 1fr; gap: var(--s-6); }
}

/* ================= SERVICES ================= */
.services .eyebrow { color: var(--c-violet-hi); }
.services__list {
  margin-top: var(--s-8);
  border-top: 1px solid var(--c-line);
  counter-reset: service;
}
.service {
  counter-increment: service;
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr) minmax(0, 1fr);
  align-items: baseline;
  gap: var(--s-5);
  padding-block: var(--s-6);
  border-bottom: 1px solid var(--c-line);
  transition: background-color var(--dur-base) var(--ease-out);
}
.service::before {
  content: "0" counter(service);
  font-family: var(--f-display);
  font-size: var(--fs-sm);
  color: var(--c-text-3);
  transition: color var(--dur-base) var(--ease-out);
}
.service__title {
  font-family: var(--f-display);
  font-stretch: 108%;
  font-weight: 350;
  font-size: var(--fs-lg);
  line-height: 1.1;
  text-transform: uppercase;
  transition: transform var(--dur-base) var(--ease-out);
}
.service__text { color: var(--c-text-2); max-width: 32rem; }
.service:hover::before { color: var(--c-green); }
.service:hover .service__title { transform: translateX(8px); }

@media (max-width: 767px) {
  .service { grid-template-columns: 3rem 1fr; }
  .service__text { grid-column: 2; }
}

/* ================= PROCESS ================= */
.process { border-top: 1px solid var(--c-line); }
.process .eyebrow { color: var(--c-violet-hi); }
.process__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
  align-items: end;
  gap: var(--s-6);
}
.process__intro { max-width: 26rem; color: var(--c-text-2); font-size: var(--fs-md); }
.process__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6);
  margin-top: var(--s-8);
}
/* Thin line connecting the steps */
.process__steps::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 1.1rem;
  height: 1px;
  background: linear-gradient(90deg, var(--c-green), var(--c-violet) 40%, var(--c-line-strong));
  opacity: 0.6;
}
.step { position: relative; padding-top: var(--s-7); }
.step__num {
  position: absolute;
  top: 0; left: 0;
  display: grid;
  place-items: center;
  width: 2.25rem; height: 2.25rem;
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  color: var(--c-text);
  background: var(--c-bg);
  border: 1px solid var(--c-line-strong);
  border-radius: 50%;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), color var(--dur-base);
}
.step:hover .step__num { border-color: var(--c-green); color: var(--c-green); box-shadow: var(--glow-green); }
.step__title {
  font-family: var(--f-display);
  font-stretch: 108%;
  font-weight: 400;
  font-size: var(--fs-lg);
  line-height: 1.1;
  text-transform: uppercase;
}
.step__text { margin-top: var(--s-3); color: var(--c-text-2); font-size: var(--fs-sm); }

@media (max-width: 900px) {
  .process__head { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: 1fr 1fr; row-gap: var(--s-7); }
  .process__steps::before { display: none; }
}
@media (max-width: 560px) {
  .process__steps { grid-template-columns: 1fr; }
}

/* ================= CONTACT ================= */
.contact {
  overflow: hidden;
  isolation: isolate;
  text-align: center;
  border-top: 1px solid var(--c-line);
}
.contact__glow {
  position: absolute;
  left: 50%; bottom: -40%;
  width: 90vw; height: 70vw;
  max-width: 1200px; max-height: 900px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgb(124 58 237 / 0.30), rgb(155 225 93 / 0.05) 60%, transparent);
  filter: blur(40px);
  z-index: -1;
}
.contact__inner { display: flex; flex-direction: column; align-items: center; }
.contact .eyebrow { color: var(--c-violet-hi); }
.contact__title {
  margin-top: var(--s-5);
  font-family: var(--f-display);
  font-stretch: 108%;
  font-weight: 350;
  /* ~20% smaller than the other section titles; each line never re-wraps. */
  font-size: clamp(2rem, 0.6rem + 4.6vw, 5.4rem);
  line-height: 1;
  letter-spacing: var(--tracking-tight);
  text-transform: uppercase;
}
.contact__title > span { display: block; white-space: nowrap; }
.contact__text { margin-top: var(--s-6); max-width: 34rem; color: var(--c-text-2); font-size: var(--fs-md); }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-4); margin-top: var(--s-7); }
.contact__actions .btn:hover svg { transform: none; }
.contact__email {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--s-3);
  margin-top: var(--s-6);
  font-size: var(--fs-md);
}
.contact__email a {
  color: var(--c-text);
  border-bottom: 1px solid var(--c-line-strong);
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.contact__email a:hover { color: var(--c-green); border-color: var(--c-green); }
.contact__copy {
  min-height: 32px;
  padding: 0.3rem 0.8rem;
  font-size: var(--fs-xs);
  color: var(--c-text-2);
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-pill);
  transition: color var(--dur-fast), border-color var(--dur-fast);
}
.contact__copy:hover { color: var(--c-green); border-color: var(--c-green); }
.contact__meta { margin-top: var(--s-4); font-size: var(--fs-sm); color: var(--c-text-3); }
.contact__hint { margin-top: var(--s-3); font-size: var(--fs-xs); color: var(--c-text-3); }
.contact__socials { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-5); margin-top: var(--s-6); }
.contact__socials a { color: var(--c-text-2); font-size: var(--fs-sm); }
.contact__socials a:hover { color: var(--c-green); }
.contact__cat-note {
  margin-top: var(--s-8);
  font-family: var(--f-hand);
  font-size: 1.4rem;
  color: var(--c-green);
  text-shadow: 0 0 18px rgb(155 225 93 / 0.4);
}
