/* Collage hero: a green cutting mat drawn in CSS, with desk objects that drop in,
   float, and react to the pointer (motion lives in hero-mat.js). */
:root {
  --mat: #3d7a3a;
  --mat-deep: #2f6430;
  --mat-line: rgb(255 255 255 / .2);
  --mat-line-soft: rgb(255 255 255 / .08);
  --mat-brown: #151515;
  --mat-yellow: #ffe500;
  --mat-lime: #c6f432;
  --mat-clay: #d97757;
}

html, body { overflow-x: clip; }
.page:has(> .mat-hero) { padding-top: 0; }

.mat-hero {
  position: relative;
  width: 100vw;
  margin: 0 calc(50% - 50vw);
  padding: 0;
  background-color: var(--mat);
  background-image:
    radial-gradient(ellipse at 50% 45%, transparent 40%, rgb(0 0 0 / .22) 100%),
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px),
    linear-gradient(var(--mat-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line-soft) 1px, transparent 1px);
  background-size: 100% 100%, 96px 96px, 96px 96px, 24px 24px, 24px 24px;
  background-position: center, -1px -1px, -1px -1px, -1px -1px, -1px -1px;
  overflow: hidden;
  color: #fff;
}
/* Paper grain, like a worn mat. */
.mat-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: .28;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23173a18' opacity='.5' filter='url(%23g)' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: multiply;
  pointer-events: none;
}

.mat-stage {
  position: relative;
  min-height: max(760px, min(100svh, 940px));
  display: grid;
  place-items: center;
  padding: 5rem 1rem 4.5rem;
}

/* ---------- Draggable-feeling objects ---------- */
.mat-floats { position: absolute; inset: 0; z-index: 1; }
.drop {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: rotate(var(--r, 0deg));
  will-change: transform;
}
.drop-static { position: relative; left: auto; top: auto; }
.drop-body { display: block; transform-origin: 50% 60%; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .drop:hover > .drop-body { animation: mat-wiggle .62s var(--ease-spring, cubic-bezier(.22,1.35,.48,1)); }
  .mat-floats .drop { cursor: grab; }
}
@keyframes mat-wiggle {
  0% { transform: none; }
  30% { transform: scale(1.07) rotate(-4deg); }
  60% { transform: scale(1.04) rotate(3deg); }
  100% { transform: none; }
}

.mock-card {
  width: 260px;
  padding: 10px 10px 14px;
  border-radius: 6px;
  background: #fff;
  color: #111;
  box-shadow: 0 22px 40px -12px rgb(0 0 0 / .5);
}
.mock-card--wide { width: 280px; }
.mock-card:not(.mock-card--wide) { width: 210px; }
.mock-card img { width: 100%; height: 150px; object-fit: cover; object-position: top left; border-radius: 3px; background: #eee; }
.mock-card:not(.mock-card--wide) img { height: 190px; object-position: top; }
.mock-card strong { display: block; margin: 10px 2px 2px; font-size: 13px; line-height: 1.25; }
.mock-card small { display: block; margin: 0 2px; font-size: 11px; color: #555; }

.mock-phone-mini {
  width: 150px;
  padding: 7px;
  border-radius: 30px;
  background: #111;
  box-shadow: 0 26px 46px -12px rgb(0 0 0 / .6);
}
.mock-phone-mini img { width: 100%; height: 300px; object-fit: cover; object-position: top; border-radius: 24px; }

.sticker {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 92px;
  padding: 14px 0 10px;
  border-radius: 24px;
  background: #fff;
  color: #111;
  box-shadow: 0 0 0 4px #fff, 0 14px 26px -8px rgb(0 0 0 / .5);
}
.sticker svg { width: 38px; height: 46px; }
.sticker span { font-size: 12px; font-weight: 700; }
.sticker--cream { background: #f4ede4; box-shadow: 0 0 0 4px #fff, 0 14px 26px -8px rgb(0 0 0 / .5); }
.sticker--dark { background: #111; color: #fff; }

.app-sticker {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  object-fit: cover;
  border: 4px solid #fff;
  background: #fff;
  box-shadow: 0 12px 22px -6px rgb(0 0 0 / .5);
}

.cursor-tag { display: grid; justify-items: start; }
.cursor-tag svg { width: 24px; height: 24px; stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; filter: drop-shadow(0 3px 4px rgb(0 0 0 / .35)); }
.cursor-tag span { margin: -3px 0 0 18px; padding: 4px 10px; border-radius: 3px 12px 12px 12px; font-size: 13px; font-weight: 700; }
.cursor-tag--lime svg { fill: #111; }
.cursor-tag--lime span { background: var(--mat-lime); color: #111; }
.cursor-tag--clay svg { fill: var(--mat-clay); }
.cursor-tag--clay span { background: var(--mat-clay); color: #fff; }

.bubble { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; color: #111; font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 12px 22px -8px rgb(0 0 0 / .45); }
.toggle { position: relative; width: 78px; height: 42px; border-radius: 999px; background: var(--mat-lime); box-shadow: 0 12px 22px -8px rgb(0 0 0 / .45); }
.toggle i { position: absolute; top: 5px; right: 5px; width: 32px; height: 32px; border-radius: 50%; background: #fff; transition: right .45s var(--ease-spring, ease); }
.drop:hover .toggle i { right: 41px; }
.swatches { display: flex; gap: 6px; padding: 8px; border-radius: 10px; background: #fff; box-shadow: 0 12px 22px -8px rgb(0 0 0 / .45); }
.swatches i { width: 24px; height: 24px; border-radius: 6px; }
.swatches i:nth-child(1) { background: var(--mat-brown); }
.swatches i:nth-child(2) { background: var(--mat-yellow); }
.swatches i:nth-child(3) { background: var(--mat-lime); }
.swatches i:nth-child(4) { background: #bfe3f7; }
.swatches i:nth-child(5) { background: var(--mat-clay); }
.sticky-note { width: 120px; padding: 14px 12px 18px; background: #fff27a; color: #3b2f00; font-size: 14px; font-weight: 700; line-height: 1.25; box-shadow: 0 14px 22px -10px rgb(0 0 0 / .5); }
.star { width: 30px; height: 30px; fill: #fff; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .3)); }
.star--yellow { width: 38px; height: 38px; fill: var(--mat-yellow); }
.star--lime { fill: var(--mat-lime); }

/* ---------- Centre: avatar on top of the name ---------- */
.mat-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}
.mat-center a, .mat-center .drop { pointer-events: auto; }
.mat-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  background: #bfe3f7;
  border: 6px solid #fff;
  box-shadow: 0 20px 36px -12px rgb(0 0 0 / .55);
}
.mat-tag { margin: .9rem 0 -.4rem; z-index: 3; }
.mat-tag { --r: -3deg; }
.mat-tag .drop-body { padding: 6px 12px; background: var(--mat-yellow); color: #111; font-size: 1rem; font-weight: 700; box-shadow: 0 6px 14px rgb(0 0 0 / .25); }

.mat-hero h1.mat-title {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  font-size: clamp(3.4rem, 9vw, 8.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.055em;
}
.mat-block .drop-body { padding: .02em .22em .12em; box-shadow: 0 18px 34px -10px rgb(0 0 0 / .5); }
.mat-block--brown { --r: -3deg; }
.mat-block--brown .drop-body { background: var(--mat-brown); color: #fff; }
.mat-block--yellow { --r: 2deg; margin: -.04em 0 0 1.4em; }
.mat-block--yellow .drop-body { position: relative; background: var(--mat-yellow); color: var(--mat-brown); font-size: .9em; }
.mat-block--white { --r: -2deg; margin: -.02em 1.2em 0 0; }
.mat-block--white .drop-body { background: #fff; color: var(--mat-brown); font-size: .74em; }

/* Figma-style selection around "designer". */
.mat-select { position: absolute; inset: -10px; border: 1.5px solid #fff; pointer-events: none; }
.mat-select i { position: absolute; width: 9px; height: 9px; background: #fff; border: 1.5px solid #1a73e8; }
.mat-select i:nth-child(1) { left: -5px; top: -5px; }
.mat-select i:nth-child(2) { right: -5px; top: -5px; }
.mat-select i:nth-child(3) { left: -5px; bottom: -5px; }
.mat-select i:nth-child(4) { right: -5px; bottom: -5px; }

.mat-note { font-size: clamp(.95rem, 1.6vw, 1.25rem); font-weight: 700; letter-spacing: -.01em; color: #fff; text-shadow: 0 2px 6px rgb(0 0 0 / .35); }
.mat-note--a { position: absolute; z-index: 3; right: -1.2em; bottom: .9em; width: 9em; text-align: left; line-height: 1.15; transform: rotate(-5deg); }

.mat-hero .lede.mat-lede { max-width: 30ch; margin: 1.6rem 0 0; color: #fff; font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 600; line-height: 1.4; text-shadow: 0 2px 6px rgb(0 0 0 / .3); }
.mat-actions { justify-content: center; margin-top: 1.2rem; }
.mat-hero .mat-actions .icon-btn { background: #fff; color: #111; box-shadow: 0 10px 20px -8px rgb(0 0 0 / .45); transition: transform .35s var(--ease-spring, ease); }
.mat-hero .mat-actions .icon-btn:hover { background: var(--mat-yellow); transform: translateY(-3px) rotate(-6deg); }
.mat-hero .mat-actions .icon-btn:focus-visible { outline: 3px solid var(--mat-yellow); outline-offset: 3px; }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 899px) {
  .mat-stage { min-height: 0; padding: 6.5rem 1rem 7.5rem; }
  .drop-desk { display: none; }
  .mat-floats .drop { left: var(--mx, var(--x)); top: var(--my, var(--y)); }
  .sticker { width: 64px; padding: 9px 0 7px; border-radius: 18px; }
  .sticker svg { width: 26px; height: 30px; }
  .sticker span { font-size: 10px; }
  .app-sticker { width: 46px; height: 46px; border-radius: 12px; border-width: 3px; }
  .mat-avatar { width: 104px; height: 104px; }
  .mat-block--yellow { margin-left: .6em; }
  .mat-block--white { margin-right: .4em; }
  .mat-note--a { position: static; order: 9; width: auto; margin-top: 1rem; text-align: center; transform: rotate(-2deg); }
}

@media (prefers-reduced-motion: reduce) {
  .drop-body, .toggle i, .mat-hero .mat-actions .icon-btn { animation: none !important; transition: none !important; }
}
