/* ==========================================================================
   home.css: every section of the one page, top to bottom:
   hero · marquee · about · services · tools · work (bento logos + project
   cards + detail dialog) · why · process.
   Tokens only; no raw colours. CSS animations use the individual
   `translate` / `scale` / `rotate` properties so Anime.js keeps `transform`.
   ========================================================================== */

/* ==========================================================================
   1 · HERO
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding: calc(var(--nav-height) + clamp(1rem, 4vw, 3rem)) 0 clamp(3.5rem, 8vw, 6.5rem);
  background: var(--paper);
}
.hero::before {                      /* fine blueprint grid, faded toward the edges */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 72% 42%, black, transparent);
          mask-image: radial-gradient(ellipse 70% 75% at 72% 42%, black, transparent);
}
.hero__orb { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero__orb--a {
  top: 2%; right: -9%;
  width: clamp(320px, 48vw, 640px);
  aspect-ratio: 1;
  background: radial-gradient(circle at 32% 30%, var(--lavender-soft), color-mix(in srgb, var(--lavender) 65%, transparent));
}
.hero__orb--b {
  bottom: 6%; left: -5%;
  width: clamp(140px, 18vw, 240px);
  aspect-ratio: 1;
  background: color-mix(in srgb, var(--highlight) 60%, transparent);
  filter: blur(46px);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  min-height: clamp(520px, calc(100svh - var(--nav-height) - 5rem), 740px);
}

.hero__copy { display: grid; gap: 1.35rem; justify-items: start; }
.hero__copy > * { animation: hero-rise var(--dur-slow) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 90ms + 80ms); }
.hero__copy > :nth-child(2) { --i: 1; }
.hero__copy > :nth-child(3) { --i: 2; }
.hero__copy > :nth-child(4) { --i: 3; }
.hero__copy > :nth-child(5) { --i: 4; }

.hero__title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--fs-hero);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--navy-ink);
}
.hero__accent { font-style: italic; font-weight: 400; color: var(--purple); }
.hero__keep { white-space: nowrap; }
.hero__sub { font-size: var(--fs-lead); color: var(--slate-soft); }
.hero__sub strong { font-weight: 600; color: var(--navy-ink); }
.hero__lead { max-width: 31rem; color: var(--slate-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.4rem; }

.hero__visual {
  position: relative;
  width: min(100%, 460px);
  margin-inline: auto;
  animation: hero-pop 1.1s var(--ease-out) 0.15s both;
}
.hero__arch {
  position: relative;
  aspect-ratio: 440 / 540;
  overflow: hidden;
  background: var(--lavender);
  border-radius: 999px 999px var(--radius-xl) var(--radius-xl);
  box-shadow: 0 0 0 10px var(--white), var(--shadow-media);
}
.hero__arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.hero__ring {
  position: absolute;
  inset: 0;
  z-index: -1;
  translate: 28px 24px;
  border: 2px solid var(--line-strong);
  border-radius: 999px 999px var(--radius-xl) var(--radius-xl);
}
.hero__star {
  position: absolute;
  z-index: 2;
  top: -5%; right: -8%;
  width: clamp(64px, 9vw, 96px);
  color: var(--purple);
}
.hero__star .starburst { animation: spin 26s linear infinite; }

.hero__badge { position: absolute; z-index: 3; left: -10%; bottom: 9%; animation: hero-pop 0.9s var(--ease-out) 0.7s both; }
.hero__badge-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  max-width: 15.5rem;
  padding: 0.8rem 1.2rem 0.8rem 0.8rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  animation: drift 6s ease-in-out 1.6s infinite;
}
.hero__badge-mark, .about__card-mark {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  aspect-ratio: 1;
  padding: 9px;
  color: var(--purple);
  background: var(--lavender-soft);
  border-radius: 13px;
}
.hero__tag { font-size: 0.88rem; font-weight: 600; line-height: 1.3; color: var(--navy-ink); }

@keyframes hero-rise { from { opacity: 0; translate: 0 28px; } to { opacity: 1; translate: 0 0; } }
@keyframes hero-pop  { from { opacity: 0; scale: 0.92; } to { opacity: 1; scale: 1; } }

/* ==========================================================================
   2 · MARQUEE (decorative discipline ticker)
   ========================================================================== */
.marquee { overflow: hidden; padding-block: 1.15rem; color: var(--lavender-soft); background: var(--purple); }
.marquee__track { display: flex; width: max-content; animation: marquee 44s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; flex: none; }
.marquee__list li {
  display: flex;
  align-items: center;
  gap: 3rem;
  padding-right: 3rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  white-space: nowrap;
}
.marquee__list li::after {
  content: "";
  width: 16px;
  aspect-ratio: 1;
  background: var(--highlight);
  -webkit-mask: url(../assets/images/icons/starburst.svg) center / contain no-repeat;
          mask: url(../assets/images/icons/starburst.svg) center / contain no-repeat;
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ==========================================================================
   3 · ABOUT
   ========================================================================== */
.about__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 6rem);
}
.about__media { position: relative; width: min(100%, 440px); justify-self: center; isolation: isolate; }
.about__media::before {              /* offset lavender block behind the photo */
  content: "";
  position: absolute;
  inset: 26px -26px -26px 26px;
  z-index: -1;
  background: var(--lavender-soft);
  border-radius: var(--radius-xl);
}
.about__frame {
  aspect-ratio: 471 / 561;
  overflow: hidden;
  background: var(--purple);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-media);
}
.about__frame img { width: 100%; height: 100%; object-fit: cover; }
.about__card {
  position: absolute;
  right: -9%; bottom: 9%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1.25rem 0.8rem 0.8rem;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
}
.about__card p { display: grid; line-height: 1.3; }
.about__card strong { font-size: 0.92rem; color: var(--navy-ink); }
.about__card span { font-size: 0.78rem; color: var(--slate-soft); }

.about__copy { display: grid; gap: 1.15rem; justify-items: start; }
.about__subtitle { font-family: var(--font-serif); font-style: italic; font-size: var(--fs-h3); line-height: 1.3; color: var(--purple); }
.about__text { display: grid; gap: 1rem; max-width: 34rem; margin-bottom: 0.5rem; }

/* ==========================================================================
   4 · SERVICES
   ========================================================================== */
.services__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.service {
  position: relative;
  padding: 2rem 1.9rem 2.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur);
}
.service:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.service__no { position: absolute; top: 1.5rem; right: 1.75rem; font-family: var(--font-serif); font-style: italic; font-size: 1.5rem; color: var(--lavender); }
.service__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 1.4rem;
  color: var(--purple);
  background: var(--wash);
  border-radius: 17px;
  transition: color var(--dur), background var(--dur), transform var(--dur) var(--ease-out);
}
.service__icon .icon { width: 1.7rem; height: 1.7rem; }
.service:hover .service__icon { color: var(--white); background: var(--purple); transform: rotate(-6deg) scale(1.06); }
.service__title { margin-bottom: 0.55rem; font-family: var(--font-serif); font-size: 1.2rem; line-height: 1.25; color: var(--navy-ink); }
.service p { font-size: 0.94rem; color: var(--slate-soft); }

/* ==========================================================================
   5 · TOOLS
   ========================================================================== */
.tools__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tool-group { padding: 1.75rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.tool-group__head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.4rem; }
.tool-group__head h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--navy-ink); }
.tool-group__icon { display: grid; place-items: center; width: 46px; height: 46px; color: var(--white); background: var(--gradient-purple); border-radius: 14px; }
.tool-group__icon .icon { width: 1.5rem; height: 1.5rem; }
.tool-group__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  padding: 1rem 0.5rem 0.9rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur), border-color var(--dur);
}
.tool:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow-card); }
.tool img { width: 56px; height: 56px; object-fit: cover; border-radius: 14px; }
.tool__name { font-size: 0.8rem; font-weight: 600; line-height: 1.3; text-align: center; color: var(--navy-ink); }

/* ==========================================================================
   6 · WORK
   ========================================================================== */
.work__block + .work__block { margin-top: clamp(3.5rem, 7vw, 5.5rem); }
.work__heading {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-serif);
  font-size: var(--fs-h3);
  color: var(--navy-ink);
}
.work__heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- Logo bento --------------------------------------------------------- */
.bento {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: clamp(140px, 17vw, 215px);
  gap: 1rem;
}
.logo-tile {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur);
}
.logo-tile--feature { grid-column: span 2; grid-row: span 2; }
.logo-tile--wide { grid-column: span 2; }
.logo-tile--wash { background: var(--wash); }
.logo-tile--lavender { background: var(--lavender-soft); }
.logo-tile--paper { background: var(--paper); }
.logo-tile:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-lift); }

.logo-tile__btn { position: absolute; inset: 0; display: block; cursor: zoom-in; }
.logo-tile__btn img {
  position: absolute;
  inset: 9%;
  width: 82%;
  height: 82%;
  object-fit: contain;
  mix-blend-mode: multiply;          /* the logo files are white-backed: this lets the tile colour show through */
  transition: transform var(--dur-slow) var(--ease-out);
}
.logo-tile:hover .logo-tile__btn img { transform: scale(1.06); }
.logo-tile:has(.logo-tile__btn:focus-visible) { outline: 3px solid var(--purple-soft); outline-offset: 3px; }

.logo-tile__cap {
  position: absolute;
  left: 0.9rem; bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.95rem;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--white);
  background: var(--purple-ink);
  border-radius: var(--radius-md);
  opacity: 0;
  translate: 0 8px;
  pointer-events: none;
  transition: opacity var(--dur), translate var(--dur) var(--ease-out);
}
.logo-tile__cap span { font-size: 0.72rem; color: var(--lavender); }
.logo-tile:hover .logo-tile__cap,
.logo-tile:focus-within .logo-tile__cap { opacity: 1; translate: 0 0; }
@media (hover: none) { .logo-tile__cap { opacity: 1; translate: 0 0; } }

/* ---- Project cards ------------------------------------------------------ */
.projects { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem; }
.case-card {
  position: relative;
  display: flex;
  flex-direction: column;
  grid-column: span 6;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur);
}
.case-card--wide { grid-column: span 7; }
.case-card--narrow { grid-column: span 5; }
.case-card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: var(--shadow-lift); }
.case-card:has(.case-card__open:focus-visible) { outline: 3px solid var(--purple-soft); outline-offset: 3px; }

.case-card__media { position: relative; flex: 1 1 auto; min-height: clamp(260px, 30vw, 380px); overflow: hidden; background: var(--wash); }
.case-card__media > picture > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 7%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform var(--dur-slow) var(--ease-out);
}
.case-card__media--cover > picture > img { padding: 0; object-fit: cover; mix-blend-mode: normal; }
.case-card:hover .case-card__media > picture > img { transform: scale(1.04); }

.case-card__body { display: grid; gap: 0.6rem; justify-items: start; padding: 1.4rem 1.6rem 1.7rem; }
.case-card__title { font-family: var(--font-serif); font-size: var(--fs-h3); line-height: 1.25; color: var(--navy-ink); text-wrap: balance; }
.case-card__meta { font-size: var(--fs-small); color: var(--slate-soft); }
.case-card__open { display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 0.35rem; font-weight: 600; color: var(--purple); }
.case-card__open::after { content: ""; position: absolute; inset: 0; }      /* the whole card is the click target */
.case-card__open .icon { width: 1.1em; height: 1.1em; transition: transform var(--dur) var(--ease-out); }
.case-card:hover .case-card__open .icon { transform: translateX(5px); }

/* Details live in the card for no-JS readers; the dialog script clones them. */
.case-card [data-dialog-body] { display: none; }
@media (scripting: none) {
  .case-card [data-dialog-body] { display: block; padding-top: 1rem; }
  .case-card__open { display: none; }
}

/* ---- Poster composition (flat poster + phone) --------------------------- */
.case-card__media--poster { display: block; }
.case-card__media--poster .poster-flat {
  position: absolute;
  left: 13%; top: 50%;
  width: 34%;
  translate: 0 -52%;
  rotate: -8deg;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-media);
}
.case-card__media--poster .poster-flat img { width: 100%; height: auto; }
.phone {
  position: absolute;
  right: 14%; top: 50%;
  width: min(40%, 210px);
  aspect-ratio: 9 / 14;
  translate: 0 -50%;
  background: var(--navy-ink);
  border-radius: 2rem;
  box-shadow: var(--shadow-media), inset 0 0 0 2px var(--glass-on-dark-2);
  transition: transform var(--dur-slow) var(--ease-out);
}
.case-card:hover .phone { transform: translateY(-6px) rotate(1.5deg); }
.phone::before {
  content: "";
  position: absolute;
  top: 14px; left: 50%;
  z-index: 2;
  width: 28%; height: 14px;
  background: var(--navy-ink);
  border-radius: var(--radius-pill);
  transform: translateX(-50%);
}
.phone__screen { position: absolute; inset: 8px; display: grid; align-items: center; overflow: hidden; background: var(--gradient-poster); border-radius: 1.55rem; }
.phone__screen img { width: 100%; height: auto; }

/* ---- Detail dialog ------------------------------------------------------ */
.dialog {
  width: min(1000px, calc(100vw - 2rem));
  max-width: none;
  padding: 0;
  color: var(--slate);
  background: var(--white);
  border: 0;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-media);
  overflow: hidden;
}
.dialog::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.dialog[open] { display: block; animation: dialog-in 0.5s var(--ease-out); }
.dialog[open]::backdrop { animation: fade-in 0.4s var(--ease-soft); }
@keyframes dialog-in { from { opacity: 0; translate: 0 26px; scale: 0.97; } }
@keyframes fade-in   { from { opacity: 0; } }

.dialog__panel { position: relative; overflow: hidden; }
.dialog__bar { position: absolute; top: 1rem; right: 1rem; z-index: 2; display: flex; gap: 0.5rem; }
.dialog__btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--navy-ink);
  background: var(--white);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: color var(--dur-fast), background var(--dur-fast), transform var(--dur) var(--ease-out);
}
.dialog__btn:hover { color: var(--white); background: var(--purple); transform: scale(1.08); }
.dialog__btn--prev .icon { transform: scaleX(-1); }
.dialog[data-single] .dialog__btn:not(.dialog__btn--close) { display: none; }

.dialog__content {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  min-height: 380px;
  max-height: min(88svh, 780px);
}
.dialog__media { display: grid; place-items: center; min-height: 0; padding: clamp(1.5rem, 4vw, 3rem); overflow: hidden; background: var(--wash); }
.dialog__media img { width: 100%; height: auto; max-height: 62svh; object-fit: contain; mix-blend-mode: multiply; border-radius: var(--radius-md); }
.dialog__body { min-height: 0; padding: 4.75rem clamp(1.5rem, 4vw, 3rem) clamp(1.75rem, 4vw, 2.75rem); overflow-y: auto; overscroll-behavior: contain; }
.dialog[data-kind="logos"] { width: min(680px, calc(100vw - 2rem)); }
.dialog[data-kind="logos"] .dialog__content { grid-template-columns: 1fr; grid-template-rows: auto auto; min-height: 0; }
.dialog[data-kind="logos"] .dialog__media { padding: clamp(1.5rem, 5vw, 3rem) clamp(1.5rem, 5vw, 3rem) clamp(1rem, 3vw, 1.75rem); }
.dialog[data-kind="logos"] .dialog__media img { max-height: 46svh; }
.dialog[data-kind="logos"] .dialog__body { padding: 1.25rem 2rem 2rem; text-align: center; }
.dialog__body > strong { display: block; font-family: var(--font-serif); font-size: var(--fs-h3); line-height: 1.25; color: var(--navy-ink); }
.dialog__body > span { display: block; margin-top: 0.3rem; color: var(--slate-soft); }

.detail__title { margin-bottom: 1rem; font-family: var(--font-serif); font-size: var(--fs-h3); line-height: 1.25; color: var(--navy-ink); }
.detail__list > div { padding: 0.8rem 0; border-top: 1px solid var(--line); }
.detail__list dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--purple); }
.detail__list dd { margin: 0.15rem 0 0; font-size: 0.95rem; }
.detail__cta { margin-top: 1.4rem; }

/* ==========================================================================
   7 · WHY WORK WITH US
   ========================================================================== */
.why__list { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.why__card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: translate var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.why__card:hover { translate: 0 -6px; box-shadow: var(--shadow-lift); }
.why__stage { aspect-ratio: 4 / 3; background: var(--wash); }
.why__stage svg { display: block; width: 100%; height: 100%; }
.why__body { flex: 1; padding: 1.15rem 1.1rem 1.4rem; }
.why__body h3 { font-family: var(--font-serif); font-size: 1.08rem; line-height: 1.25; color: var(--navy-ink); }
.why__body p { margin-top: 0.4rem; font-size: 0.84rem; line-height: 1.5; color: var(--slate); }

/* ---- Why scenes: inline SVG, palette via classes (no hex in markup) --------
   The base state is the FINISHED frame, so no-JS, reduced-motion and off-screen
   cards all show a complete illustration. Motion lives only under `.is-live`
   (added by js/modules/scene-motion.js while the card is on screen) and only on
   children, using individual transform properties so Anime.js keeps `transform`
   on the card itself. */
.sc-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sc-o { transform-box: fill-box; transform-origin: center; }
.sc-pivot { transform-box: view-box; }
.sc-line { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3; }
.sc-f-purple { fill: var(--purple); }
.sc-f-soft   { fill: var(--purple-soft); }
.sc-f-lav    { fill: var(--lavender); }
.sc-f-lav-s  { fill: var(--lavender-soft); }
.sc-f-hl     { fill: var(--highlight); }
.sc-f-white  { fill: var(--white); }
.sc-f-ink    { fill: var(--navy-ink); }
.sc-s-purple { stroke: var(--purple); }
.sc-s-soft   { stroke: var(--purple-soft); }
.sc-s-lav    { stroke: var(--lavender); }
.sc-s-white  { stroke: var(--white); }
.sc-s-ink    { stroke: var(--navy-ink); }
.why__card.is-live .sc-d1 { animation-delay: -1s; }
.why__card.is-live .sc-d2 { animation-delay: -2s; }
.why__card.is-live .sc-d3 { animation-delay: -3s; }

/* Scene 1 · Creative Problem Solver: an idea lights up */
.why__card.is-live .sc-burst   { animation: spin calc(var(--dur-loop) * 3) linear infinite; }
.why__card.is-live .sc-glow    { animation: sc-glow var(--dur-loop) var(--ease-soft) infinite; }
.why__card.is-live .sc-draw    { stroke-dasharray: 1; animation: sc-draw var(--dur-loop) var(--ease-soft) infinite; }
.why__card.is-live .sc-twinkle { animation: sc-twinkle calc(var(--dur-loop) / 2) var(--ease-soft) infinite; }
@keyframes sc-glow    { 0%, 100% { scale: 0.85; opacity: 0.25; } 40%, 70% { scale: 1.1; opacity: 0.6; } }
@keyframes sc-draw    { 0% { stroke-dashoffset: 1; } 35%, 85% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -1; } }
@keyframes sc-twinkle { 0%, 100% { scale: 0.6; opacity: 0.4; } 50% { scale: 1.3; opacity: 1; } }

/* Scene 2 · Fast Turnaround: a clock beats the deadline */
.sc-hand-m { rotate: 60deg; transform-origin: 108px 75px; }
.sc-hand-h { rotate: -30deg; transform-origin: 108px 75px; }
.why__card.is-live .sc-hand-m { animation: sc-turn var(--dur-loop) linear infinite; }
.why__card.is-live .sc-hand-h { animation: sc-turn-h calc(var(--dur-loop) * 4) linear infinite; }
.why__card.is-live .sc-ring   { stroke-dasharray: 1; animation: sc-fill var(--dur-loop) var(--ease-soft) infinite; }
.sc-ring { rotate: -90deg; }
.why__card.is-live .sc-rush   { animation: sc-rush calc(var(--dur-loop) / 4) var(--ease-soft) infinite; }
.why__card.is-live .sc-pop    { animation: sc-pop var(--dur-loop) var(--ease-out) infinite; }
@keyframes sc-turn   { from { rotate: 60deg; } to { rotate: 420deg; } }
@keyframes sc-turn-h { from { rotate: -30deg; } to { rotate: 330deg; } }
@keyframes sc-fill   { 0% { stroke-dashoffset: 1; } 80%, 100% { stroke-dashoffset: 0; } }
@keyframes sc-rush   { 0% { translate: 12px 0; opacity: 0; } 40% { opacity: 1; } 100% { translate: -12px 0; opacity: 0; } }
@keyframes sc-pop    { 0%, 70% { scale: 0; opacity: 0; } 82% { scale: 1.15; opacity: 1; } 90%, 94% { scale: 1; opacity: 1; } 100% { scale: 0; opacity: 0; } }

/* Scene 3 · Professional Communication: a clear back-and-forth */
.why__card.is-live .sc-msg-a  { animation: sc-msg-a var(--dur-loop) var(--ease-out) infinite; }
.why__card.is-live .sc-msg-b  { animation: sc-msg-b var(--dur-loop) var(--ease-out) infinite; }
.why__card.is-live .sc-typing { animation: sc-typing var(--dur-loop) var(--ease-soft) infinite; }
.why__card.is-live .sc-dot    { animation: sc-dot 1.1s var(--ease-soft) infinite; }
@keyframes sc-msg-a   { 0% { opacity: 0; translate: 0 10px; scale: 0.9; } 8%, 88% { opacity: 1; translate: 0 0; scale: 1; } 96%, 100% { opacity: 0; translate: 0 0; scale: 1; } }
@keyframes sc-msg-b   { 0%, 24% { opacity: 0; translate: 0 10px; scale: 0.9; } 34%, 88% { opacity: 1; translate: 0 0; scale: 1; } 96%, 100% { opacity: 0; translate: 0 0; scale: 1; } }
@keyframes sc-typing  { 0%, 40% { opacity: 0; } 48%, 80% { opacity: 1; } 88%, 100% { opacity: 0; } }
@keyframes sc-dot     { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 -4px; } }

/* Scene 4 · Attention to Detail: inspected, aligned, approved */
.why__card.is-live .sc-lens  { animation: sc-scan var(--dur-loop) var(--ease-soft) infinite; }
.why__card.is-live .sc-snap  { animation: sc-snap var(--dur-loop) var(--ease-out) infinite; }
.why__card.is-live .sc-guide { animation: sc-flow var(--dur-loop) linear infinite; }
@keyframes sc-scan { 0%, 100% { translate: 0 0; } 25% { translate: -44px -22px; } 55% { translate: -34px 14px; } 80% { translate: 8px -4px; } }
@keyframes sc-snap { 0%, 35% { rotate: 14deg; translate: 3px -3px; } 50%, 100% { rotate: 0deg; translate: 0 0; } }
@keyframes sc-flow { to { stroke-dashoffset: -20; } }

/* Scene 5 · Strategic Design Thinking: one idea, consistently connected */
.sc-flow-line { stroke-dasharray: 4 6; stroke-width: 2; }
.why__card.is-live .sc-flow-line { animation: sc-flow calc(var(--dur-loop) / 3) linear infinite; }
.why__card.is-live .sc-halo      { animation: sc-halo calc(var(--dur-loop) / 2) var(--ease-out) infinite; }
@keyframes sc-halo { 0% { scale: 0.8; opacity: 0.9; } 100% { scale: 1.5; opacity: 0; } }

/* ==========================================================================
   8 · DESIGN PROCESS
   ========================================================================== */
.steps { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; }
.steps::before { content: ""; position: absolute; top: 42px; left: 10%; right: 10%; border-top: 2px dashed var(--line-on-dark); }
.step { position: relative; display: grid; align-content: start; justify-items: center; gap: 1.25rem; text-align: center; }
.step__badge {
  display: grid;
  place-items: center;
  align-content: center;
  width: 84px;
  height: 84px;
  color: var(--purple);
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 0 0 8px var(--glass-on-dark);
  transition: transform var(--dur) var(--ease-out), background var(--dur);
}
.step:hover .step__badge { transform: scale(1.08); background: var(--highlight); }
.step__badge small { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; line-height: 1; }
.step__badge b { font-family: var(--font-serif); font-size: 1.7rem; line-height: 1.1; }
.step__label { max-width: 12rem; font-weight: 600; line-height: 1.4; color: var(--white); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .why__list { gap: 0.75rem; }
  .why__body { padding: 1rem 0.9rem 1.15rem; }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; min-height: 0; gap: 3rem; }
  .hero__visual { width: min(100%, 380px); }
  .hero__badge { left: -4%; }

  .about__grid { grid-template-columns: 1fr; }
  .about__media { width: min(100%, 380px); }
  .about__card { right: -4%; }

  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tools__grid { grid-template-columns: 1fr; }
  .tool-group__list { grid-template-columns: repeat(4, minmax(0, 1fr)); }

  .case-card, .case-card--wide, .case-card--narrow { grid-column: 1 / -1; }
  .case-card__media { flex: none; min-height: 0; aspect-ratio: 4 / 3; }
  .case-card__media--poster { aspect-ratio: 1 / 1; }

  .dialog__panel { max-height: 90svh; overflow-y: auto; overscroll-behavior: contain; }
  .dialog__content { grid-template-columns: 1fr; grid-template-rows: none; max-height: none; min-height: 0; }
  .dialog__body { overflow: visible; padding-top: 1.75rem; }
  .dialog__media img { max-height: 40svh; }

  /* Why cards become a swipe carousel */
  .why__list {
    grid-auto-flow: column;
    grid-auto-columns: min(66%, 270px);
    grid-template-columns: none;
    gap: 1rem;
    margin-inline: calc(var(--gutter) * -1);
    padding: 0.25rem var(--gutter) 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    -webkit-overflow-scrolling: touch;
  }
  .why__card { scroll-snap-align: start; }

  /* Process becomes a vertical timeline */
  .steps { grid-template-columns: 1fr; gap: 1.75rem; }
  .steps::before { top: 0; bottom: 0; left: 41px; right: auto; border-top: 0; border-left: 2px dashed var(--line-on-dark); }
  .step { grid-template-columns: 84px 1fr; justify-items: start; align-items: center; gap: 1.25rem; text-align: left; }
}

@media (max-width: 640px) {
  .services__grid { grid-template-columns: 1fr; gap: 0.9rem; }
  .service { display: grid; grid-template-columns: 54px 1fr; column-gap: 1rem; padding: 1.25rem 1.25rem 1.35rem; }
  .service__no { display: none; }
  .service__icon { grid-row: span 2; width: 54px; height: 54px; margin: 0; }
  .service__title { margin-bottom: 0.25rem; }
  .tool-group__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 132px; gap: 0.75rem; }
  .logo-tile__cap { display: none; }
  .hero__actions .btn { flex: 1 1 100%; }
  .case-card__media--poster .poster-flat { left: 8%; width: 36%; }
  .phone { right: 9%; width: 42%; }
}
