/* ============================================================
   Delfina Labate — Portfolio
   Light · editorial · airy · magenta accent
   ============================================================ */

:root {
  /* light theme (default) */
  --bg-base: #FFFFFF;
  --bg-soft: #F6F5F2;
  --bg-card: #FFFFFF;
  --border: #ECEAE5;
  --text-primary: #0D0D0F;
  --text-secondary: #6E6E73;
  --text-faint: #A6A6AB;

  --accent: #7B0593;        /* overridden live by Tweaks */
  --accent-hover: #67047B;
  --accent-glow: color-mix(in srgb, var(--accent) 34%, transparent);

  --container: 1180px;
  --pad-x: clamp(22px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  --font-display: 'Hanken Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;

  --shadow-card: 0 1px 2px rgba(20,20,25,0.04), 0 8px 30px rgba(20,20,25,0.05);
  --shadow-card-hover: 0 2px 6px rgba(20,20,25,0.06), 0 24px 60px rgba(20,20,25,0.10);
}

[data-theme="cream"] {
  --bg-base: #FBF8F3;
  --bg-soft: #F2ECE1;
  --bg-card: #FFFDF9;
  --border: #E8DFD0;
  --text-primary: #1A1612;
  --text-secondary: #756C5F;
  --text-faint: #ADA391;
}

[data-theme="dark"] {
  --bg-base: #0B0B0C;
  --bg-soft: #131315;
  --bg-card: #18181B;
  --border: #28282C;
  --text-primary: #F4F4F5;
  --text-secondary: #9A9AA1;
  --text-faint: #5E5E66;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.4), 0 10px 34px rgba(0,0,0,0.5);
  --shadow-card-hover: 0 2px 8px rgba(0,0,0,0.5), 0 28px 70px rgba(0,0,0,0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background .4s var(--ease), color .4s var(--ease);
}

@media (pointer: fine) {
  body, a, button, [data-cursor-grow] { cursor: none; }
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
  position: relative;
  z-index: 1;
}

::selection { background: var(--accent); color: #fff; }

/* ---------- Pink/magenta soft glows ---------- */
.glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at center,
              var(--accent-glow) 0%,
              color-mix(in srgb, var(--accent) 12%, transparent) 38%,
              transparent 70%);
  filter: blur(20px);
  opacity: 0.9;
  transition: opacity .4s var(--ease);
}
.glow--hero {
  top: -180px; left: -120px;
  width: 720px; height: 560px;
}
.glow--contact {
  bottom: -160px; left: 50%;
  transform: translateX(-50%);
  width: 760px; height: 460px;
}
[data-glow="off"] .glow { display: none; }
[data-theme="dark"] .glow { opacity: 0.6; }

/* ---------- Eyebrow / labels ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.eyebrow::before {
  content: "✦";
  font-size: 11px;
  transform: translateY(-0.5px);
}
.label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
}


/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .35s var(--ease), border-color .35s var(--ease), backdrop-filter .35s;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg-base) 72%, transparent);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__logo {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
}
.nav__right { display: flex; align-items: center; gap: 32px; }
.nav__links {
  display: flex;
  gap: 30px;
  list-style: none;
}
.nav__links a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color .3s var(--ease);
}
.nav__links a:hover { color: var(--accent); }

/* lang toggle */
.lang {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px;
}
.lang button {
  background: none;
  border: none;
  color: var(--text-secondary);
  font: inherit;
  padding: 4px 11px;
  border-radius: 100px;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.lang button.active { background: var(--accent); color: #fff; }

.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Hero ---------- */
.hero .container { width: 100%; }
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 92px;
  padding-bottom: 72px;
  overflow: hidden;
}
.hero__eyebrow { margin-bottom: 26px; }
.hero__title {
  font-weight: 800;
  font-size: clamp(52px, 9.5vw, 124px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  margin-bottom: 30px;
  text-wrap: balance;
}
.hero__lead {
  font-size: clamp(18px, 2.3vw, 25px);
  line-height: 1.5;
  max-width: 640px;
  color: var(--text-secondary);
  font-weight: 400;
}
.hero__lead strong { color: var(--text-primary); font-weight: 600; }
.hero__lead + .hero__lead { margin-top: 18px; }
.hero__ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 44px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 100px;
  padding: 14px 24px;
  transition: transform .3s var(--ease), background .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.btn .arrow { transition: transform .3s var(--ease); }
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 36%, transparent);
}
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn--primary:hover .arrow { transform: translateY(3px); }
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn--ghost:hover { border-color: var(--text-primary); transform: translateY(-2px); }
.btn--ghost:hover .arrow { transform: translateX(3px); }

/* hero entrance */
.reveal-line { opacity: 0; transform: translateY(22px); }
.hero.in .reveal-line { animation: revealUp .7s var(--ease) forwards; }
.hero.in .reveal-line:nth-child(1) { animation-delay: .05s; }
.hero.in .reveal-line:nth-child(2) { animation-delay: .14s; }
.hero.in .reveal-line:nth-child(3) { animation-delay: .24s; }
.hero.in .reveal-line:nth-child(4) { animation-delay: .34s; }
.hero.in .reveal-line:nth-child(5) { animation-delay: .44s; }
@keyframes revealUp { to { opacity: 1; transform: translateY(0); } }

/* ---------- Section scaffolding ---------- */
section { position: relative; }
.section-pad { padding-top: 132px; padding-bottom: 132px; }
.section-soft { background: var(--bg-soft); transition: background .4s var(--ease); }

.section-head { margin-bottom: 60px; max-width: 760px; }
.section-head .label { display: block; margin-bottom: 16px; }
.section-head h2 {
  font-weight: 800;
  font-size: clamp(34px, 5vw, 56px);
  letter-spacing: -0.03em;
  line-height: 1.02;
}
.section-head .sub {
  margin-top: 18px;
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-secondary);
  line-height: 1.5;
}

.fade-up { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.fade-up.in { opacity: 1; transform: translateY(0); }

/* ---------- Work grid ---------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 22px 26px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card-hover);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}
.card__media {
  border-radius: 11px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg-soft);
  display: block;
  margin-bottom: 22px;
}
.card__media image-slot { width: 100%; height: 100%; display: block; }
.card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card__badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 100px;
  padding: 4px 11px;
}
.card__title {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin-bottom: 12px;
}
.card__tags {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.5;
}
.card__oneliner {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease), opacity .35s var(--ease), margin .35s var(--ease), padding .35s var(--ease);
  margin-top: 0; padding-top: 0; border-top-color: transparent;
}
.card:hover .card__oneliner {
  max-height: 160px;
  opacity: 1;
  margin-top: 16px;
  padding-top: 16px;
  border-top-color: var(--border);
}
.card__cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.card__cta .arrow { transition: transform .3s var(--ease); }
.card:hover .card__cta .arrow { transform: translateX(4px); }

/* ---------- Brands I've worked with (marquee) ---------- */
.brands {
  /* tighter than a full section — it's a quiet credibility strip */
  padding-top: 96px;
  padding-bottom: 96px;
  border-top: 1px solid var(--border);
}
.brands__label {
  display: block;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  margin-bottom: 40px;
}
/* viewport: clips the track + fades both edges */
.brands__viewport {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right,
      transparent 0,
      #000 12%,
      #000 88%,
      transparent 100%);
          mask-image: linear-gradient(to right,
      transparent 0,
      #000 12%,
      #000 88%,
      transparent 100%);
}
.brands__track {
  display: flex;
  align-items: center;
  gap: 56px;
  width: max-content;
  animation: brandsScroll 28s linear infinite;
  will-change: transform;
}
.brands__viewport:hover .brands__track { animation-play-state: paused; }
@keyframes brandsScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }   /* one full set; second set seams in */
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
  opacity: 0.55;
  cursor: pointer;
  transition: opacity .35s var(--ease);
}
.brand:hover,
.brand.is-active { opacity: 1; }
/* the open brand reads as selected */
.brand.is-active .brand__slot::part(frame) {
  border-color: color-mix(in srgb, var(--text-primary) 32%, var(--border));
}
.brand.is-active .brand__name { color: var(--text-primary); }
/* the logo slot — now a fillable <image-slot> (drop a logo onto it) */
.brand__slot {
  width: 72px;
  height: 40px;
  display: block;
}
.brand__slot::part(frame) {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-soft);
  transition: border-color .35s var(--ease);
}
.brand:hover .brand__slot::part(frame) {
  border-color: color-mix(in srgb, var(--text-primary) 22%, var(--border));
}
/* hide the default dashed drop-ring — the solid frame border carries the look */
.brand__slot::part(ring) { display: none; }
/* compact empty state: the brand shorthand reads as the placeholder */
.brand__slot::part(empty) {
  gap: 0;
  padding: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.brand__name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* paused while a detail card is open (mirrors the hover-pause) */
.brands__track.is-paused { animation-play-state: paused; }

/* ---------- Brand detail card (click to reveal, below the carousel) ---------- */
.brand-detail {
  position: relative;
  max-width: 520px;
  margin: 44px auto 0;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 26px 26px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .42s var(--ease), transform .42s var(--ease);
}
.brand-detail[hidden] { display: none; }
.brand-detail.is-open { opacity: 1; transform: translateY(0); }
.brand-detail__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 9px;
}
.brand-detail__name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
  white-space: nowrap;
}
.brand-detail__period {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-faint);
  white-space: nowrap;
}
.brand-detail__role {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 13px;
}
.brand-detail__desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 46ch;
  text-wrap: pretty;
}
.brand-detail__close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 19px;
  line-height: 1;
  color: var(--text-faint);
  transition: color .25s var(--ease), background .25s var(--ease);
}
.brand-detail__close:hover { color: var(--text-primary); background: var(--bg-soft); }

@media (prefers-reduced-motion: reduce) {
  .brands__track { animation: none !important; }
  .brand-detail { transition: none !important; transform: none !important; }
}

/* ---------- How I Work : principles ⇄ stages ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.principle {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 26px 30px;
  cursor: pointer;
  transition: border-color .25s var(--ease), background .25s var(--ease),
              box-shadow .25s var(--ease), transform .25s var(--ease);
}
.principle:hover {
  border-color: color-mix(in srgb, var(--text-primary) 18%, var(--border));
  transform: translateY(-2px);
}
.principle.is-active {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 5%, var(--bg-card));
  box-shadow: inset 3px 0 0 var(--accent);
  transform: none;
}
.principle__idx {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  transition: color .25s var(--ease);
}
.principle.is-active .principle__idx { color: var(--accent); }
.principle__title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--text-primary);
  text-wrap: balance;
  padding-right: 22px;
}
.principle__desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-secondary);
  text-wrap: pretty;
}
/* plus → × toggle cue, top-right */
.principle__cue {
  position: absolute;
  top: 26px; right: 24px;
  width: 16px; height: 16px;
  opacity: 0.5;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.principle__cue::before,
.principle__cue::after {
  content: "";
  position: absolute;
  background: var(--text-faint);
  transition: background .25s var(--ease);
}
.principle__cue::before { left: 0; right: 0; top: 50%; height: 1.5px; transform: translateY(-50%); }
.principle__cue::after { top: 0; bottom: 0; left: 50%; width: 1.5px; transform: translateX(-50%); }
.principle:hover .principle__cue { opacity: 1; }
.principle.is-active .principle__cue { opacity: 1; transform: rotate(45deg); }
.principle.is-active .principle__cue::before,
.principle.is-active .principle__cue::after { background: var(--accent); }

/* the 5 process stages — circular arrangement */
.stages { margin-top: 54px; display: flex; justify-content: center; }
.stages__circle {
  --size: 340px;
  --r: calc(var(--size) * 0.42);
  position: relative;
  width: var(--size);
  height: var(--size);
}
/* thin circular path, stroke only — no fill */
.stages__ring {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
}
.stages__ring circle {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
/* each stage: a small node on the ring, label radially outside */
.stage {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  transform: rotate(var(--ang)) translateY(calc(-1 * var(--r)));
  opacity: 0.45;
  transition: opacity .25s var(--ease);
}
.stage__dot {
  position: absolute;
  left: 0; top: 0;
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: var(--bg-base);
  border: 1px solid var(--text-faint);
  transition: background .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.stage__name {
  position: absolute;
  left: 0; top: -26px;
  transform: translate(-50%, -50%) rotate(calc(-1 * var(--ang)));
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  transition: color .25s var(--ease);
}
/* engaged: a principle is active */
.stage.is-on { opacity: 1; }
.stage.is-on .stage__dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent);
}
.stage.is-on .stage__name { color: var(--accent); }
.stage.is-off { opacity: 0.25; }

/* hover hint — sits between the principle cards and the loop */
.stages__hint {
  display: block;
  max-width: 480px;
  margin: 30px auto 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.5;
  color: var(--text-secondary);
  text-wrap: balance;
}
.stages__hint-ic {
  display: inline-block;
  vertical-align: -4px;
  width: 18px; height: 18px;
  margin-right: 7px;
  color: var(--accent);
}
.stages__hint-ic svg { width: 100%; height: 100%; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .stages__hint-ic { animation: hint-nudge 2.6s var(--ease) infinite; }
  @keyframes hint-nudge {
    0%, 62%, 100% { transform: translate(0, 0); }
    74% { transform: translate(3px, 3px); }
    86% { transform: translate(0, 0); }
  }
}
/* the line sits centered inside the circle */
.stages__note {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56%;
  margin: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.45;
  color: var(--text-faint);
  text-wrap: balance;
}

@media (max-width: 860px) {
  .principles { grid-template-columns: 1fr; gap: 14px; }
  .principle { padding: 24px 22px 26px; }
}
@media (max-width: 520px) {
  .stages__circle { --size: 282px; }
  .stage__name { font-size: 13px; }
}

/* ---------- How I Work : the loop (orbital) ---------- */
.flow { position: relative; }

.flow__orbit {
  position: relative;
  width: min(620px, 100%);
  aspect-ratio: 1 / 1;
  margin: 8px auto 0;
}

/* the ring (track + animated progress arc) */
.flow__ring {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.flow__ring .ring-track {
  fill: none;
  stroke: var(--border);
  stroke-width: 1.4;
}
.flow__ring .ring-progress {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linecap: round;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 55%, transparent));
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset .75s cubic-bezier(0.65, 0, 0.35, 1);
}
.flow--noanim .ring-progress { transition: none !important; }

/* travelling dot — rides the ring by rotating a full-size layer (robust, on-curve) */
.flow__dot-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  transform: rotate(0deg);
  transform-origin: 50% 50%;
  transition: transform .75s cubic-bezier(0.65, 0, 0.35, 1);
}
.flow__dot {
  position: absolute;
  left: 50%;
  top: 8%;                 /* ring top = 50% − 42% radius */
  width: 13px; height: 13px;
  margin: -6.5px 0 0 -6.5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent);
}

/* nodes: the ICON is anchored on the ring; the label sits OUTSIDE it */
.flow__nodes { position: absolute; inset: 0; z-index: 2; }
.node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 62px; height: 62px;
  cursor: pointer;
}
.node__icon {
  width: 62px; height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  color: var(--text-secondary);
  transition: transform .45s var(--ease), background .45s var(--ease),
              border-color .45s var(--ease), color .45s var(--ease), box-shadow .45s var(--ease);
}
.node__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.node:hover .node__icon { border-color: var(--accent); color: var(--accent); transform: scale(1.06); }
.node.active .node__icon {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 40%, transparent);
}
.node__meta {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
.node--up .node__meta {
  top: auto;
  bottom: calc(100% + 10px);
}
.node__idx {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-faint);
  transition: color .3s var(--ease);
}
.node.active .node__idx, .node:hover .node__idx { color: var(--accent); }
.node__name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
  color: var(--text-secondary);
  transition: color .3s var(--ease);
}
.node.active .node__name, .node:hover .node__name { color: var(--text-primary); }

/* hub — the active step's detail, in the centre of the circle */
.flow__feature {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(340px, 56%);
  text-align: center;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.flow__feature-num {
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: transparent;
  -webkit-text-stroke: 1.4px color-mix(in srgb, var(--accent) 60%, transparent);
  margin-bottom: 14px;
}
.flow__feature-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.flow__feature-icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 36%, transparent);
}
.flow__feature-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.flow__feature-name {
  font-weight: 800;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.025em;
  line-height: 1;
}
.flow__feature-desc {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 18px;
  text-wrap: balance;
}
.flow__feature-tools {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 7px;
}
.flow__feature-tools .t-label {
  flex-basis: 100%;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-bottom: 4px;
}
.flow__feature-tools .flow__panel-tools {
  flex-basis: 100%;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 7px;
}
.tool-chip {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 11px;
}

/* swap animation when the active step changes */
@keyframes featSwap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.flow__feature.swap .flow__feature-num,
.flow__feature.swap .flow__feature-head,
.flow__feature.swap .flow__feature-desc,
.flow__feature.swap .flow__feature-tools { animation: featSwap .5s var(--ease); }

.flow__hint {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  font-size: 13px; font-weight: 500;
  color: var(--text-faint);
  margin-top: 40px;
}
.flow__hint .loop-mark {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border));
  color: var(--accent);
  font-size: 13px;
  animation: spin 6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- About ---------- */
.about-wrap { max-width: 720px; }
.about-photo {
  float: right;
  width: 200px; height: 240px;
  margin: 4px 0 26px 40px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  shape-outside: margin-box;
}
.about-photo image-slot { width: 100%; height: 100%; display: block; }
.about-wrap p {
  font-size: clamp(18px, 2vw, 21px);
  line-height: 1.65;
  margin-bottom: 24px;
  color: var(--text-secondary);
}
.about-wrap p .kw {
  color: var(--text-primary);
  font-weight: 600;
  transition: color .3s var(--ease);
}
.about-wrap p:hover .kw { color: var(--accent); }

/* ---------- Contact ---------- */
.contact { overflow: hidden; }
.contact__inner { text-align: center; }
.contact h2 {
  font-weight: 800;
  font-size: clamp(46px, 10vw, 118px);
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: 22px;
}
.contact__sub {
  font-size: clamp(17px, 2vw, 21px);
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 44px;
}
.contact__cta {
  margin-bottom: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.contact__links {
  max-width: 620px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
}
.contact__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 6px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: clamp(18px, 3vw, 26px);
  letter-spacing: -0.01em;
  transition: color .3s var(--ease), padding-left .3s var(--ease);
}
.contact__link:hover { color: var(--accent); padding-left: 14px; }
.contact__link .arrow { transition: transform .3s var(--ease); color: var(--text-faint); }
.contact__link:hover .arrow { transform: translate(5px, -5px); color: var(--accent); }

/* ---------- Footer ---------- */
.footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-faint);
}

/* ---------- Custom cursor ---------- */
.cursor-dot {
  position: fixed; top: 0; left: 0;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .25s var(--ease), height .25s var(--ease), background .25s var(--ease);
}
.cursor-dot.grow { width: 42px; height: 42px; background: color-mix(in srgb, var(--accent) 16%, transparent); }
@media (pointer: coarse) { .cursor-dot { display: none; } }

/* ---------- image-slot placeholder ---------- */
image-slot::part(frame) { background: var(--bg-soft); }
image-slot::part(empty) {
  color: var(--text-faint);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1023px) {
  .section-pad { padding-top: 104px; padding-bottom: 104px; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .nav__links { display: none; }
  .nav__links.open {
    display: flex; position: absolute;
    top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: color-mix(in srgb, var(--bg-base) 96%, transparent);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 6px var(--pad-x);
  }
  .nav__links.open li { padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav__links.open li:last-child { border-bottom: none; }
  .nav__toggle { display: block; }

  .work-grid { grid-template-columns: 1fr; }
  .card__oneliner, .card:hover .card__oneliner {
    max-height: 160px; opacity: 1; margin-top: 16px; padding-top: 16px; border-top-color: var(--border);
  }

  /* How-I-work: drop the circle, stack vertically on mobile */
  .flow__orbit { aspect-ratio: auto; width: 100%; }
  .flow__ring, .flow__dot-layer { display: none; }
  .flow__nodes { position: static; inset: auto; display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
  .node { position: static !important; transform: none !important; width: 100%; height: auto; display: flex; flex-direction: row; align-items: center; gap: 16px; }
  .node__icon { width: 52px; height: 52px; flex-shrink: 0; }
  .node__meta { position: static !important; transform: none !important; top: auto; bottom: auto; align-items: flex-start; }
  .node__name { font-size: 18px; }
  .flow__feature {
    position: static; transform: none; width: 100%;
    text-align: left; align-items: flex-start;
    border: 1px solid var(--border); border-radius: 18px;
    background: var(--bg-card); box-shadow: var(--shadow-card);
    padding: 26px 24px;
  }
  .flow__feature-head { flex-direction: row; align-items: center; }
  .flow__feature-tools { justify-content: flex-start; }
  .flow__feature-tools .t-label { text-align: left; }
  .flow__feature-desc { text-align: left; }

  .about-photo { float: none; width: 150px; height: 180px; margin: 0 0 24px 0; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal-line, .fade-up { opacity: 1 !important; transform: none !important; }
  .cursor-dot { display: none; }
}

/* ---------- No-animation fallback ----------
   Added by script ONLY when the frame clock isn't advancing (e.g. throttled
   offscreen/preview iframes), so content that animates in is never left stuck
   at opacity:0. Scoped to the entrance-reveal elements only — decorative
   animations (brands marquee) and hover transitions (cards) are untouched. */
body.no-anim .reveal-line,
body.no-anim .fade-up {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}
body.no-anim .brand-detail.is-open {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
body.no-anim .cursor-dot { display: none; }

