/* ============================================================
   HOME — editorial redesign
   Hero · Marquee · About preview · What I do
   Grid: 12 columns, gap clamp(16px, 2vw, 28px)
   ============================================================ */

/* ---------- Load-in states (only when JS is available; failsafe reveals after 3.5s) ---------- */
@keyframes rv-failsafe {
  to {
    opacity: 1;
  }
}

@keyframes rv-failsafe-t {
  to {
    transform: none;
  }
}

@keyframes rv-failsafe-c {
  to {
    clip-path: inset(0 0 0 0);
  }
}

html.js .hero .rv {
  opacity: 0;
  animation: rv-failsafe 0.01s 3.5s forwards;
}

html.js .hero .mask>.t {
  transform: translateY(112%);
  animation: rv-failsafe-t 0.01s 3.5s forwards;
}

html.js .hero-portrait .frame {
  clip-path: inset(100% 0 0 0);
  animation: rv-failsafe-c 0.01s 3.5s forwards;
}

@media (prefers-reduced-motion: reduce) {
  html.js .hero .rv {
    opacity: 1;
    animation: none;
  }

  html.js .hero .mask>.t {
    transform: none;
    animation: none;
  }

  html.js .hero-portrait .frame {
    clip-path: none;
    animation: none;
  }
}

/* Text-reveal mask: padding/negative margin enlarge the clip box without changing layout */
.mask {
  display: block;
  overflow: hidden;
  padding: 0.14em 0.06em 0.1em 0;
  margin: -0.14em 0 -0.1em;
}

.mask>.t {
  display: block;
  will-change: transform;
}

/* ================= HERO ================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  padding-top: clamp(104px, 11vw, 140px);
}

.hero-inner {
  display: grid;
  flex: 0 1 auto;
  /* keep the container's auto side-margins (flex:1 would swallow them) */
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: auto 1fr auto auto;
  column-gap: clamp(16px, 2vw, 28px);
}

.hero-meta {
  grid-column: 1 / -1;
  grid-row: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero .role-tag {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.hero .role-tag .dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.hero .role-tag .dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  opacity: 0;
  animation: ping 2.6s var(--ease) infinite;
}

@keyframes ping {
  0% {
    transform: scale(0.5);
    opacity: 0.8;
  }

  80%,
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

.hero-clock {
  display: inline-flex;
  gap: 10px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.hero-clock .sep {
  opacity: 0.5;
}

/* Title: name is the display moment; role is a quiet second voice */
.hero-title {
  grid-column: 1 / 9;
  grid-row: 2;
  align-self: center;
  margin: clamp(28px, 5vh, 64px) 0;
  position: relative;
  z-index: 2;
}

.hero-title span {
  color: inherit;
}

.hero-title .name {
  display: block;
  font-size: var(--fs-display);
  line-height: 0.86;
  letter-spacing: -0.065em;
  font-weight: 600;
}


.hero-title .role {
  display: block;
  margin-top: clamp(22px, 3vw, 40px);
  font-size: clamp(1.15rem, 0.9rem + 1.15vw, 1.8rem);
  line-height: 1.12;
  letter-spacing: -0.035em;
  font-weight: 500;
  color: var(--muted);
}

.hero-title .role em {
  font-style: normal;
  color: var(--primary);
}

.hero-intro {
  grid-column: 1 / 9;
  grid-row: 3;
  display: flex;
  align-items: flex-end;
  gap: clamp(24px, 4vw, 64px);
  flex-wrap: wrap;
  padding-bottom: clamp(28px, 5vh, 56px);
}

.hero .lede {
  max-width: 36ch;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin: 0;
}

.hero .cta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Portrait */
.hero-portrait {
  grid-column: 9 / 13;
  grid-row: 2 / 4;
  align-self: end;
  margin-bottom: clamp(28px, 5vh, 56px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-portrait .frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.hero-portrait .frame img {
  position: absolute;
  left: 0;
  top: -6%;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: top center;
  will-change: transform;
}

.hero-portrait figcaption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}

.hero-portrait figcaption span:first-child::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--primary);
  vertical-align: middle;
  margin-right: 10px;
}

/* Foot bar */
.hero-foot {
  grid-column: 1 / -1;
  grid-row: 4;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--border);
}

.hero .stat-strip {
  display: flex;
  gap: clamp(24px, 5vw, 72px);
  flex-wrap: wrap;
  margin: 0;
}

.hero .stat {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.hero .stat b {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--white);
}

.hero .stat span {
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}

.hero .scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-size: var(--fs-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--dim);
  transition: color 0.3s;
}

.hero .scroll-cue:hover {
  color: var(--primary);
}

.hero .scroll-cue .line {
  width: 56px;
  height: 1px;
  background: var(--primary);
  transform-origin: left;
  animation: cue 2.6s var(--ease) infinite;
}

@keyframes cue {
  0% {
    transform: scaleX(0);
  }

  55% {
    transform: scaleX(1);
    transform-origin: left;
  }

  56% {
    transform-origin: right;
  }

  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}

/* ================= MARQUEE ================= */
.marquee-strip {
  padding: clamp(18px, 2.4vw, 32px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: clamp(32px, 4vw, 60px);
  animation: marquee 40s linear infinite;
}

.marquee-strip:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-track span {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 0.95rem + 1.6vw, 2.3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  align-items: center;
  gap: clamp(32px, 4vw, 60px);
  white-space: nowrap;
}

.marquee-track span i {
  color: var(--primary);
  font-size: 0.5em;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

/* ================= HOME ABOUT ================= */
.home-about .ha-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  margin-bottom: clamp(48px, 7vw, 112px);
}

.home-about .ha-head .eyebrow {
  grid-column: 1 / 4;
  align-self: start;
  margin: 1.1em 0 0;
}

.home-about .ha-head h2 {
  grid-column: 4 / 13;
  font-size: clamp(2rem, 1.15rem + 3.5vw, 4.3rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 500;
}

.home-about .ha-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  align-items: start;
}

.home-about .facts {
  grid-column: 1 / 5;
  align-self: start;
}

.ha-copy {
  grid-column: 6 / 13;
}

.ha-copy .lead {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.15rem, 1rem + 0.85vw, 1.65rem);
  line-height: 1.32;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.94);
  margin-bottom: clamp(20px, 2.4vw, 32px);
  text-wrap: pretty;
}

.ha-copy p:not(.lead) {
  max-width: 54ch;
  margin-bottom: clamp(32px, 4vw, 52px);
}

.ha-list {
  border-top: 1px solid var(--border);
  margin-bottom: clamp(32px, 4vw, 52px);
}

.ha-list li {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.2rem);
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  transition: padding-left 0.5s var(--ease), color 0.3s;
}

.ha-list li .n {
  font-family: var(--font-body);
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}

.ha-list li:hover {
  padding-left: 14px;
  color: var(--primary);
}

/* ================= WHAT I DO ================= */
.services {
  position: relative;
}

.sv-head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 28px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 96px);
}

.sv-head>div {
  grid-column: 1 / 9;
}

.sv-head h2 {
  font-size: clamp(2.1rem, 1.15rem + 4vw, 4.8rem);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 500;
  margin: 0;
}

.sv-head p {
  grid-column: 9 / 13;
  max-width: 34ch;
  margin: 0 0 0.6em;
}

.sv-list {
  border-bottom: 1px solid var(--border);
  counter-reset: none;
}

.sv-row {
  position: relative;
  display: grid;
  grid-template-columns: clamp(44px, 6vw, 96px) minmax(0, 1fr) minmax(0, 27ch);
  align-items: baseline;
  column-gap: clamp(16px, 3vw, 48px);
  padding: clamp(18px, 2.2vw, 30px) 0;
  border-top: 1px solid var(--border);
}

.sv-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s var(--ease);
}

.sv-num {
  font-size: var(--fs-label);
  letter-spacing: 0.04em;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.sv-title {
  font-size: clamp(1.45rem, 0.95rem + 2.2vw, 2.9rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
  transition: transform 0.7s var(--ease), color 0.4s;
}

.sv-desc {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.6;
  transition: color 0.4s;
}

@media (hover: hover) {
  .sv-row:hover::before {
    transform: scaleX(1);
  }

  .sv-row:hover .sv-title {
    transform: translateX(clamp(8px, 1.2vw, 20px));
    color: var(--primary);
  }

  .sv-row:hover .sv-num {
    color: var(--primary);
  }

  .sv-row:hover .sv-desc {
    color: rgba(255, 255, 255, 0.85);
  }
}

.sv-foot {
  margin-top: clamp(28px, 4vw, 48px);
}

/* Cursor-following preview (hover devices only; positioned by app.js) */
.sv-preview {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  will-change: transform;
}

.sv-preview.is-on {
  opacity: 1;
}

@media (hover: none),
(prefers-reduced-motion: reduce) {
  .sv-preview {
    display: none;
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1000px) {
  :root {
    --fs-display: 14.5vw;
  }

  .hero-title {
    grid-column: 1 / -1;
    margin: clamp(28px, 4vh, 48px) 0;
  }

  .hero-intro {
    grid-column: 1 / 8;
    align-self: end;
  }

  .hero-portrait {
    grid-column: 8 / 13;
    grid-row: 3;
  }

  .hero .scroll-cue {
    display: none;
  }

  .hero-title .name .mask:nth-child(2) {
    margin-left: 0.32em;
  }

  .sv-head>div {
    grid-column: 1 / -1;
  }

  .sv-head p {
    grid-column: 1 / 9;
    margin-top: 18px;
  }

  .sv-row {
    grid-template-columns: clamp(44px, 7vw, 72px) minmax(0, 1fr);
  }

  .sv-desc {
    grid-column: 2;
    margin-top: 14px;
    max-width: 46ch;
  }

  .sv-row:nth-child(even) .sv-title {
    margin-left: 0;
  }

  .home-about .ha-head .eyebrow {
    grid-column: 1 / -1;
    margin: 0 0 18px;
  }

  .home-about .ha-head h2 {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  :root {
    --fs-display: 17vw;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    grid-template-rows: auto;
  }

  .hero-meta,
  .hero-title,
  .hero-intro,
  .hero-portrait,
  .hero-foot {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .hero-title {
    margin: 36px 0 28px;
  }

  .hero-intro {
    padding-bottom: 36px;
  }

  .hero-portrait {
    width: min(78%, 340px);
    margin-bottom: 40px;
  }

  .hero-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero .scroll-cue {
    display: none;
  }

  .home-about .ha-body {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .home-about .facts,
  .ha-copy {
    grid-column: 1 / -1;
  }

  .sv-head p {
    grid-column: 1 / -1;
  }
}

/* ================= SELECTED WORKS ================= */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.work-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  cursor: pointer;
}

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

.work-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(9, 9, 10, 0.92) 100%);
  display: flex;
  align-items: flex-end;
  padding: 26px;
}

.work-card .overlay .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.work-card .overlay h3 {
  font-size: 1.1rem;
}

.work-card .overlay span {
  font-size: 0.78rem;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.work-card .arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.7) rotate(-45deg);
  opacity: 0;
  transition: all 0.4s var(--ease);
}

.work-card:hover img {
  transform: scale(1.08);
}

.work-card:hover .arrow {
  transform: scale(1) rotate(0deg);
  opacity: 1;
}

.works-foot {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

/* ================= TESTIMONIALS ================= */
.testi-wrap {
  display: grid;
  grid-template-columns: 0.55fr 1.45fr;
  gap: 40px;
  align-items: stretch;
}

.testi-names {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.testi-names button {
  text-align: left;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--dim);
  transition: all 0.35s var(--ease);
  border: 1px solid transparent;
}

.testi-names button.is-active {
  color: var(--white);
  background: var(--surface);
  border-color: var(--border);
}

.testi-names button.is-active {
  color: var(--primary);
}

.testi-panel {
  padding: 50px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 320px;
}

.testi-panel i.fa-quote-right {
  color: var(--primary);
  font-size: 1.8rem;
  opacity: 0.5;
  margin-bottom: 20px;
}

.testi-panel .slide {
  display: none;
}

.testi-panel .slide.is-active {
  display: block;
}

.testi-panel p {
  font-size: 1.3rem;
  color: var(--white);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 26px;
}

.testi-panel .who {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testi-panel .who img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.testi-panel .who h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.testi-panel .who span {
  font-size: 0.82rem;
  color: var(--dim);
}

@media (max-width: 1024px) {
  .hero .grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .hero .portrait {
    order: -1;
    max-width: 320px;
    margin: 0 auto;
  }

  .home-about .grid {
    grid-template-columns: 1fr;
  }

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

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

  .testi-wrap {
    grid-template-columns: 1fr;
  }

  .testi-names {
    flex-direction: row;
    overflow-x: auto;
  }
}

@media (max-width: 640px) {

  .services-grid,
  .works-grid {
    grid-template-columns: 1fr;
  }

  .hero .stat-strip {
    gap: 28px;
  }

  .hero .badge-float {
    display: none;
  }

  .cta-band .panel {
    padding: 44px 26px;
    flex-direction: column;
    align-items: flex-start;
  }
}