/* ==========================================================================
   HOME PAGE
   Hero · Card fan · Services · Work grid · About summary · References
   ========================================================================== */

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; background: var(--surface-hero);
  padding-block: clamp(64px, 9vw, 120px) clamp(24px, 4vw, 56px);
}
.hero-ring {
  left: 50%; top: 44%; aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%);
}
.hero-ring--outer { width: min(120vw, 1180px); border: 1px solid rgba(124, 44, 221, 0.22); }
.hero-ring--inner {
  width: min(88vw, 840px); border: 1px solid rgba(124, 44, 221, 0.16);
  background: radial-gradient(closest-side, rgba(196, 160, 255, 0.42), rgba(196, 160, 255, 0) 78%);
}
.hero-drift {
  inset: -12%; filter: blur(90px);
  background: conic-gradient(from 210deg at 32% 38%, rgba(124, 44, 221, 0.32), rgba(255, 122, 196, 0.24) 22%, rgba(58, 20, 130, 0.28) 46%, rgba(124, 44, 221, 0) 66%, rgba(140, 90, 255, 0.3) 88%, rgba(124, 44, 221, 0.32));
  animation: drift var(--dur-drift) ease-in-out infinite alternate;
}
.hero-rules {
  inset: 0; background-size: 14.28% 100%;
  background-image: linear-gradient(to right, rgba(58, 20, 130, 0.07) 1px, transparent 1px);
}
@keyframes drift {
  0% { transform: translate3d(-3%, -2%, 0) scale(1.05) rotate(0deg); }
  100% { transform: translate3d(3%, 2%, 0) scale(1.14) rotate(12deg); }
}

.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-name {
  font-weight: 800; font-size: var(--size-name); line-height: var(--leading-name);
  letter-spacing: var(--tracking-name); text-align: center; text-wrap: balance;
}
.hero-foot {
  width: 100%; padding: 8px 0 46px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px 24px; align-items: center; font-size: 17px; font-weight: 500;
}
.hero-foot p { text-align: center; font-size: 18px; line-height: 1.45; text-wrap: balance; }
.hero-foot .availability { justify-content: flex-end; }
.hero-foot > span:first-child { font-family: var(--font-display); font-weight: 600; }
@media (max-width: 767px) {
  .hero { padding-top: 40px; }
  .hero-name { font-size: min(20vw, 112px); line-height: 0.92; }
  .hero-foot { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 18px; }
  .hero-foot > span:first-child { font-size: 19px; }
  .hero-foot p { font-family: var(--font-display); font-weight: 500; font-size: min(4.8vw, 22px); line-height: 1.35; }
  .hero-foot .availability { justify-content: center; }
}

/* ---------- Card fan ----------
   All geometry is in CSS, so the fan can never overflow the screen.
   Rest state is tighter; .is-open (hover / tap) spreads the cards. */
.fan {
  --cw: min(260px, max(104px, 17vw));                              /* card width */
  --half: min(50vw - 48px, 672px);                                  /* half the usable width */
  --room: max(0px, calc(var(--half) - 1.364 * var(--cw)));
  --outer: min(calc(2.3 * var(--cw)), calc(0.8 * var(--room)));
  --inner: calc(0.34 * var(--outer));
  --rest-out: calc(0.55 * var(--outer));
  --rest-in: calc(0.34 * var(--rest-out));
  position: relative; z-index: 2; width: 100%;
  height: clamp(330px, 52vw, 720px); margin-top: clamp(-90px, -5vw, -32px);
  display: flex; align-items: flex-end; justify-content: center; cursor: pointer;
}
.fan-card {
  position: absolute; bottom: 60px; width: var(--cw); aspect-ratio: 3 / 5;
  border-radius: 14px; overflow: hidden; background: var(--violet-050); box-shadow: var(--shadow-card);
  transform-origin: 50% 118%; transition: transform var(--dur-stage) var(--ease);
}
.fan-card img { width: 100%; height: 100%; object-fit: cover; }
.fan-card--1 { transform: translate(calc(-1 * var(--rest-out)), 18px) rotate(-16deg); }
.fan-card--2 { transform: translate(calc(-1 * var(--rest-in)), 2px) rotate(-5.5deg); }
.fan-card--3 { transform: translate(var(--rest-in), 2px) rotate(5.5deg); }
.fan-card--4 { transform: translate(var(--rest-out), 18px) rotate(16deg); }
.fan.is-open .fan-card--1 { transform: translate(calc(-1 * var(--outer)), 44px) rotate(-28deg); }
.fan.is-open .fan-card--2 { transform: translate(calc(-1 * var(--inner)), 6px) rotate(-9.5deg); }
.fan.is-open .fan-card--3 { transform: translate(var(--inner), 6px) rotate(9.5deg); }
.fan.is-open .fan-card--4 { transform: translate(var(--outer), 44px) rotate(28deg); }
.fan-card--phones { display: grid; place-items: center; background: #EFE0F3; }
.fan-card--phones .phone { height: 72%; }

/* Tablet & mobile: the fan is always spread, and the cards float gently.
   The float uses the separate `translate` property so it stacks on top of
   each card's fan transform instead of replacing it. */
@media (max-width: 1024px) {
  .fan {
    --cw: min(260px, max(84px, 17vw));
    --outer: min(calc(1.9 * var(--cw)), calc(50vw - 1.45 * var(--cw)));
    cursor: default;
  }
  .fan .fan-card { animation: fan-float 5s ease-in-out infinite; }
  .fan .fan-card--1 { transform: translate(calc(-1 * var(--outer)), 28px) rotate(-18deg); animation-delay: -1.2s; }
  .fan .fan-card--2 { transform: translate(calc(-1 * var(--inner)), 4px) rotate(-7deg); animation-delay: -3.4s; animation-duration: 5.6s; }
  .fan .fan-card--3 { transform: translate(var(--inner), 4px) rotate(7deg); animation-delay: -0.4s; animation-duration: 4.6s; }
  .fan .fan-card--4 { transform: translate(var(--outer), 28px) rotate(18deg); animation-delay: -2.6s; animation-duration: 5.3s; }
}
/* Phones: big cards, tightly overlapped. Offsets are in card widths so the
   fan keeps its shape and always fits the screen. */
@media (max-width: 767px) {
  .fan { --cw: min(32vw, 190px); height: calc(var(--cw) * 5 / 3 + 96px); margin-top: 8px; }
  .fan-card { bottom: 48px; border-radius: 16px; }
  .fan .fan-card--1 { transform: translate(calc(-0.7 * var(--cw)), 16px) rotate(-10deg); }
  .fan .fan-card--2 { transform: translate(calc(-0.24 * var(--cw)), 0) rotate(-3deg); }
  .fan .fan-card--3 { transform: translate(calc(0.24 * var(--cw)), 2px) rotate(4deg); }
  .fan .fan-card--4 { transform: translate(calc(0.7 * var(--cw)), 18px) rotate(9deg); }
}
@keyframes fan-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

/* ---------- Services ---------- */
.service .numeral { font-family: var(--font-display); font-weight: 600; font-size: 34px; line-height: 1; color: var(--accent); }
.service p { font-size: var(--size-body-sm); line-height: 1.62; color: var(--ink-600); }
.service:hover { border-color: var(--accent); }
.service.card--dark .numeral { color: var(--violet-300); }
.service.card--dark p { color: var(--ink-on-dark-strong); }
.service .dash-list { margin-top: auto; padding-top: 6px; }

.work-more { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- About summary ---------- */
.about-summary {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: clamp(32px, 5vw, 56px); align-items: center;
}
.about-portrait { position: relative; width: 100%; max-width: 380px; justify-self: center; }
.about-portrait .well { aspect-ratio: 4 / 5; border-radius: 24px; display: flex; align-items: flex-end; justify-content: center; }
/* The cut-out portrait sits on the bottom edge at 80% of the frame width */
.about-portrait .well img { width: 80%; height: auto; }
.about-badge {
  position: absolute; right: -14px; bottom: -18px; width: 76px; height: auto;
  padding: 12px; background: var(--surface-page); border-radius: 18px;
}
.about-text { display: flex; flex-direction: column; gap: 18px; }
.about-text h2 { font-size: clamp(32px, 3.6vw, 46px); }
.about-text > p:not(.eyebrow) { font-size: 17px; line-height: 1.68; color: var(--ink-600); }

/* ---------- References ---------- */
.reference > p { font-family: var(--font-display); font-weight: 500; font-size: 21px; line-height: var(--leading-quote); color: var(--ink-900); }
.reference footer { margin-top: auto; display: flex; align-items: center; gap: 12px; }
