/* Interactive intro sentence: words paired with small line-art objects.
   Hovering (or focusing) a word or its object frames the object with corner marks,
   sweeps a black highlight across the word and plays the object's own transformation. */

.ix {
  --ix-ink: var(--ink, #14213d);
  --ix-paper: var(--paper, #f4ede0);
  --ix-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ix-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  max-width: 900px;
  margin: 0;
  color: var(--ix-ink);
  font-size: clamp(19px, 1.55vw, 25px);
  font-weight: 500;
  line-height: 2.25;
  letter-spacing: -0.025em;
}

/* Links inside the sentence that have no drawing of their own */
.ix-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s var(--ix-ease);
}

.ix-link:hover,
.ix-link:focus-visible {
  color: #c98442;
}

/* ---------- Words ---------- */
.ix-word {
  position: relative;
  padding: 0.06em 0.12em;
  margin: 0 -0.12em;
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(var(--ix-ink), var(--ix-ink));
  background-repeat: no-repeat;
  background-position: 0 50%;
  background-size: 0% 1.25em;
  transition: background-size 0.45s var(--ix-ease), color 0.25s var(--ix-ease) 0.05s;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  cursor: pointer;
}

.ix-word.is-on {
  color: var(--ix-paper);
  background-size: 100% 1.25em;
}

.ix-word:focus-visible {
  outline: none;
}

/* ---------- Object slot ---------- */
.ix-obj {
  position: relative;
  display: inline-block;
  font-size: 0.66em;
  width: 2.8em;
  height: 1.9em;
  margin: 0 0.12em;
  vertical-align: -0.62em;
  cursor: pointer;
  perspective: 260px;
}

.ix-obj svg {
  overflow: visible;
}

.ix-obj .ix-line {
  fill: none;
  stroke: var(--ix-ink);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.ix-obj .ix-face {
  fill: var(--ix-paper);
}

/* Corner marks that frame the active object */
.ix-frame {
  position: absolute;
  inset: -0.32em -0.36em;
  width: calc(100% + 0.72em);
  height: calc(100% + 0.64em);
  opacity: 0;
  transform: scale(1.22);
  transition: opacity 0.25s var(--ix-ease), transform 0.5s var(--ix-ease);
  pointer-events: none;
}

.ix-frame path {
  fill: none;
  stroke: var(--ix-ink);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.ix-obj.is-on .ix-frame {
  opacity: 1;
  transform: none;
}

/* ---------- 1. Brand: a card lying flat stands up and flips to show the mark ---------- */
.ix-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1.9em;
  height: 1.22em;
  margin: -0.61em 0 0 -0.95em;
  transform-style: preserve-3d;
  transform: rotateX(56deg) rotateZ(-32deg);
  transition: transform 0.85s var(--ix-spring);
}

.ix-card__side {
  position: absolute;
  inset: 0;
  display: grid;
  border: 1.3px solid var(--ix-ink);
  border-radius: 0.12em;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.ix-card__side--front {
  align-content: end;
  gap: 0.09em;
  padding: 0.14em 0.16em;
  background: var(--ix-paper);
}

.ix-card__side--front i {
  display: block;
  height: 1.3px;
  background: var(--ix-ink);
}

.ix-card__side--front i:last-child {
  width: 55%;
}

.ix-card__side--front b {
  position: absolute;
  top: 0.14em;
  left: 0.16em;
  width: 0.24em;
  height: 0.24em;
  border: 1.3px solid var(--ix-ink);
  border-radius: 50%;
}

.ix-card__side--back {
  place-items: center;
  background: var(--ix-ink);
  transform: rotateY(180deg);
}

.ix .ix-card__side--back img {
  width: 60%;
  max-width: none;
  height: auto;
  filter: invert(1);
}

.ix-obj.is-on .ix-card {
  transform: rotateX(0deg) rotateZ(0deg) rotateY(180deg);
}

/* ---------- 2. Search: a magnifier scans a page while results draw in ---------- */
.ix-search {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ix-search__result {
  stroke-dasharray: 20;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s var(--ix-ease);
}

.ix-search__hit {
  fill: var(--ix-ink);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: left center;
  transform: scaleX(0);
  transition: opacity 0.2s, transform 0.45s var(--ix-ease);
}

.ix-search__glass {
  transform-box: view-box;
  transition: transform 0.6s var(--ix-ease);
}

.ix-obj.is-on .ix-search__glass {
  animation: ix-scan 1.5s var(--ix-ease) both;
}

.ix-obj.is-on .ix-search__result {
  animation: ix-draw 0.6s var(--ix-ease) both;
  animation-delay: var(--d, 0s);
}

.ix-obj.is-on .ix-search__hit {
  opacity: 1;
  transform: scaleX(1);
  transition-delay: 1.05s;
}

@keyframes ix-scan {
  0% { transform: translate(0, 0); }
  30% { transform: translate(-13px, -6px); }
  60% { transform: translate(-4px, 2px); }
  100% { transform: translate(-15px, -9px) rotate(-8deg); }
}

@keyframes ix-draw {
  from { stroke-dashoffset: 20; }
  to { stroke-dashoffset: 0; }
}

/* ---------- 3. Campaigns: a flat tile grows a rising bar chart ---------- */
.ix-chart {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ix-chart__tile {
  transition: transform 0.6s var(--ix-spring);
  transform-box: view-box;
  transform-origin: 32px 30px;
}

.ix-chart__bar {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transform: scaleY(0);
  transition: transform 0.55s var(--ix-spring);
  transition-delay: 0s;
}

.ix-chart__arrow {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  transition: stroke-dashoffset 0.5s var(--ix-ease);
}

.ix-obj.is-on .ix-chart__tile {
  transform: translateY(4px) scale(0.92);
}

.ix-obj.is-on .ix-chart__bar {
  transform: scaleY(1);
  transition-delay: var(--d, 0s);
}

.ix-obj.is-on .ix-chart__arrow {
  stroke-dashoffset: 0;
  transition-delay: 0.45s;
}

/* ---------- 4. Website: a screen lying flat rises to face you and builds its page ---------- */
.ix-screen {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2em;
  height: 1.42em;
  margin: -0.71em 0 0 -1em;
  padding: 0.24em 0.14em 0.12em;
  background: var(--ix-paper);
  border: 1.3px solid var(--ix-ink);
  border-radius: 0.14em;
  transform-style: preserve-3d;
  transform: rotateX(58deg) rotateZ(-38deg);
  box-shadow: -0.12em 0.12em 0 -0.02em var(--ix-paper), -0.12em 0.12em 0 0 var(--ix-ink);
  transition: transform 0.85s var(--ix-spring), box-shadow 0.4s var(--ix-ease);
}

.ix-screen::before {
  content: "";
  position: absolute;
  top: 0.1em;
  left: 0.12em;
  width: 0.3em;
  height: 0.06em;
  background: radial-gradient(circle, var(--ix-ink) 45%, transparent 50%) 0 0 / 0.1em 100% repeat-x;
}

.ix-screen::after {
  content: "";
  position: absolute;
  top: 0.2em;
  left: 0;
  right: 0;
  height: 1.3px;
  background: var(--ix-ink);
}

.ix-screen i {
  display: block;
  height: 0.16em;
  margin-top: 0.07em;
  background: var(--ix-ink);
  border-radius: 1px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ix-ease), transform 0.4s var(--ix-ease);
}

.ix-screen i:nth-child(1) { width: 70%; height: 0.2em; }
.ix-screen i:nth-child(2) { width: 100%; opacity: 0; }
.ix-screen i:nth-child(3) { width: 40%; }

.ix-obj.is-on .ix-screen {
  transform: rotateX(0deg) rotateZ(0deg);
  box-shadow: 0 0 0 0 var(--ix-paper), 0 0 0 0 var(--ix-ink);
}

.ix-obj.is-on .ix-screen i {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.4s + var(--d, 0s));
}

.ix-obj.is-on .ix-screen i:nth-child(2) {
  opacity: 0.18;
}

/* ---------- Videography: a clapperboard snaps shut and the film plays ---------- */
.ix-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ix-video__arm {
  transform-box: view-box;
  transform-origin: 17px 17.5px;
  transform: rotate(-15deg);
  transition: transform 0.5s var(--ix-ease);
}

.ix-obj .ix-video__play {
  fill: transparent;
  transform-box: fill-box;
  transform-origin: center;
  transition: fill 0.2s var(--ix-ease);
}

.ix-obj.is-on .ix-video__arm {
  animation: ix-clap 0.8s var(--ix-ease) both;
}

.ix-obj.is-on .ix-video__play {
  fill: var(--ix-ink);
  animation: ix-play 0.5s var(--ix-spring) 0.5s both;
}

@keyframes ix-clap {
  0% { transform: rotate(-15deg); }
  34% { transform: rotate(0deg); }
  58% { transform: rotate(-8deg); }
  100% { transform: rotate(0deg); }
}

@keyframes ix-play {
  from { transform: scale(0.5); }
  to { transform: scale(1); }
}

/* ---------- Founders: two heads that lean in and share an idea ---------- */
.ix-obj--us {
  width: 2.9em;
  height: 2.15em;
  vertical-align: -0.62em;
  perspective: none;
}

.ix-char {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ix-obj .ix-char__skin {
  fill: #f4dcc6;
}

.ix-char__cheek {
  fill: #f0c590;
  opacity: 0.45;
  transition: opacity 0.3s var(--ix-ease);
}

.ix-obj--us.is-on .ix-char__cheek {
  opacity: 0.85;
}

.ix-char__hair,
.ix-char__eyes {
  fill: var(--ix-ink);
}

.ix-char__head {
  transform-box: view-box;
  transform-origin: 30px 31px;
  transition: transform 0.6s var(--ix-spring);
}

.ix-char__eyes {
  transform-box: fill-box;
  transform-origin: center;
}

.ix-char__grin {
  fill: var(--ix-ink);
  opacity: 0;
  transition: opacity 0.2s var(--ix-ease);
}

.ix-char__mouth {
  transition: opacity 0.2s var(--ix-ease);
}

.ix-obj--us.is-on .ix-char__head {
  transform: rotate(-7deg) translateY(-1px);
}

.ix-obj--us.is-on .ix-char__eyes {
  animation: ix-blink 2.4s ease-in-out 0.15s infinite;
}

.ix-obj--us.is-on .ix-char__grin {
  opacity: 1;
  transition-delay: 0.2s;
}

.ix-obj--us.is-on .ix-char__mouth {
  opacity: 0;
  transition-delay: 0.2s;
}

@keyframes ix-blink {
  0%, 8%, 100% { transform: scaleY(1); }
  4% { transform: scaleY(0.1); }
}

/* ---------- Used inside a headline: takes the headline's own type, with smaller drawings ---------- */
.ix.ix--inline {
  display: inline;
  max-width: none;
  margin: 0;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
}

.ix--inline .ix-obj {
  width: 1.7em;
  height: 1.15em;
  margin: 0 0.2em 0 0;
  vertical-align: -0.16em;
}

.ix--inline .ix-frame {
  inset: -0.14em -0.14em;
  width: calc(100% + 0.28em);
  height: calc(100% + 0.28em);
}

/* ---------- Shared moves for the drawings ---------- */
.ix-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ix-obj .ix-fill {
  fill: var(--ix-ink);
}

.ix-draw {
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  transition: stroke-dashoffset 0.25s var(--ix-ease);
}

.ix-obj.is-on .ix-draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.7s var(--ix-ease) var(--d, 0s);
}

.ix-gone {
  transition: opacity 0.25s var(--ix-ease) 0.2s;
}

.ix-obj.is-on .ix-gone {
  opacity: 0;
  transition-delay: 0s;
}

.ix-pop {
  opacity: 0;
  transition: opacity 0.3s var(--ix-ease);
}

.ix-obj.is-on .ix-pop {
  opacity: 1;
  transition-delay: var(--d, 0s);
}

/* Speech: dots become words */
.ix-say__bubble {
  transform-box: fill-box;
  transform-origin: 30% 100%;
  transition: transform 0.5s var(--ix-spring);
}

.ix-obj.is-on .ix-say__bubble {
  transform: scale(1.06);
}

/* Systems: a stack opens into its layers */
.ix-layer {
  transition: transform 0.65s var(--ix-spring);
}

.ix-obj.is-on .ix-layer {
  transform: translateY(var(--y));
}

/* Stories: a page turns */
.ix-book__page {
  transform-box: view-box;
  transform-origin: 32px 25px;
  transition: transform 0.45s var(--ix-ease);
}

.ix-obj.is-on .ix-book__page {
  animation: ix-turn 0.8s var(--ix-ease) both;
}

@keyframes ix-turn {
  0% { transform: scaleX(1); }
  100% { transform: scaleX(0.02); opacity: 0; }
}

/* Development: the brackets open and the slash arrives */
.ix-code__l,
.ix-code__r {
  transition: transform 0.55s var(--ix-spring);
}

.ix-code__s {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.55s var(--ix-spring);
}

.ix-obj.is-on .ix-code__l { transform: translateX(-4px); }
.ix-obj.is-on .ix-code__r { transform: translateX(4px); }
.ix-obj.is-on .ix-code__s { transform: rotate(180deg) scale(1.1); }

/* Mail: the flap opens and the letter rises */
.ix-mail__letter {
  transform: translateY(8px);
  transition: transform 0.6s var(--ix-spring);
}

.ix-obj.is-on .ix-mail__letter {
  transform: translateY(-9px);
  transition-delay: 0.1s;
}

.ix-mail__flap {
  transform-box: view-box;
  transform-origin: 32px 16px;
  transition: transform 0.4s var(--ix-ease);
}

.ix-obj.is-on .ix-mail__flap {
  transform: scaleY(0);
}

/* Suitcase: picked up and set down, ready to go */
.ix-case__body {
  transform-box: view-box;
  transform-origin: 32px 40px;
}

.ix-obj.is-on .ix-case__body {
  animation: ix-lift 0.9s var(--ix-spring) both;
}

@keyframes ix-lift {
  0% { transform: none; }
  40% { transform: translateY(-5px) rotate(-5deg); }
  100% { transform: none; }
}

/* Position: a pin drops exactly on its spot */
.ix-pin__drop {
  transform: translateY(-3px);
  transition: transform 0.3s var(--ix-ease);
}

.ix-obj.is-on .ix-pin__drop {
  animation: ix-drop 0.75s var(--ix-spring) both;
}

@keyframes ix-drop {
  0% { transform: translateY(-14px); }
  100% { transform: translateY(0); }
}

.ix-pin__ring {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.ix-obj.is-on .ix-pin__ring {
  animation: ix-ring 0.9s var(--ix-ease) 0.45s both;
}

@keyframes ix-ring {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(1.5); }
}

/* The highlight stays inside a headline's tight lines. */
.ix--inline .ix-word {
  background-size: 0% 1em;
}

.ix--inline .ix-word.is-on {
  background-size: 100% 1em;
}

/* The thought bubble reaches above its line and runs into whatever sits there. */
.ix-think {
  display: none;
}

/* An object and its word never split across lines. */
.ix-pair {
  white-space: nowrap;
}

.ix-obj--us.is-on .ix-head--a {
  transform: rotate(6deg) translateX(2px);
}

.ix-obj--us.is-on .ix-head--b {
  transform: rotate(-6deg) translateX(-2px);
}

.ix-think {
  position: absolute;
  left: 64%;
  bottom: 80%;
  width: 2.2em;
  height: 1.4em;
  pointer-events: none;
}

.ix-think > * {
  opacity: 0;
  transform: scale(0.2);
  transform-box: fill-box;
  transform-origin: 0 100%;
  transition: opacity 0.2s, transform 0.45s var(--ix-spring);
}

.ix-obj--us.is-on .ix-think > * {
  opacity: 1;
  transform: none;
  transition-delay: var(--d, 0s);
}

.ix-think__bulb {
  transform-origin: 50% 50% !important;
}

.ix-obj--us.is-on .ix-think__bulb {
  animation: ix-glow 1.6s ease-in-out 0.6s infinite;
}

@keyframes ix-glow {
  0%, 100% { fill: var(--ix-paper); }
  50% { fill: #ffd84d; }
}

/* ---------- Small screens: tighter rhythm ---------- */
@media (max-width: 1023px) {
  .ix {
    font-size: 19px;
    line-height: 2.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ix *,
  .ix *::before,
  .ix *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
}
