/* Homepage rhythm: tighter sections, a two-column About and a full-width work carousel.
   Loaded after the legacy sheets so it only overrides spacing and layout. */

/* Inter for the Compare Electronic card. Self-hosted next to the case-study brand assets. */
@font-face {
  font-family: "Inter Brand";
  src: url("/projects/compareelectronic/brand/inter-latin-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* The carousel bleeds to the window edges; clip (not scroll) any scrollbar-width overhang. */
#main {
  overflow-x: clip;
}
.hero {
  padding-bottom: 8px;
}
.hero > .room-host {
  margin-bottom: 0;
}

/* About: a short header, then a six-card story joined by a dotted route. */
.about-preview {
  display: block;
  padding-block: 56px 36px;
}
.about-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px 56px;
  align-items: end;
}
.about-preview .about-copy {
  margin: 0;
}
.about-preview .about-copy h2 {
  font-size: clamp(38px, 4.4vw, 62px);
  margin-bottom: 0;
}
.about-lead {
  max-width: 440px;
  padding-bottom: 6px;
  font-size: 16px;
  line-height: 1.6;
  color: #3e4f42;
}

.story {
  position: relative;
  isolation: isolate;
  margin-top: 64px;
}
.story-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}
.story-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.story.is-armed .story-draw {
  stroke-dashoffset: 1;
}
.story.is-armed.is-drawn .story-draw {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 2.6s cubic-bezier(0.45, 0, 0.25, 1);
}
.story-cards {
  list-style: none;
  margin: 0;
  padding: 0 0 0 44px;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
}
.story-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.78);
  transition: translate 0.3s cubic-bezier(0.22, 1, 0.36, 1), rotate 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease;
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid #dfe5d9;
  box-shadow:
    0 1px 0 #fff inset,
    0 18px 30px -20px rgba(23, 62, 43, 0.5),
    0 2px 6px -2px rgba(23, 62, 43, 0.1);
  rotate: var(--tilt, 0deg);
}
@media (hover: hover) {
  .story-card:hover {
    translate: 0 -8px;
    rotate: 0deg;
    border-color: #c9d6c3;
    box-shadow:
      0 1px 0 #fff inset,
      0 30px 44px -22px rgba(23, 62, 43, 0.55),
      0 6px 14px -4px rgba(23, 62, 43, 0.14);
  }
}
.story-card:nth-child(1) { --tilt: -1.2deg; }
.story-card:nth-child(2) { --tilt: 0.9deg; }
.story-card:nth-child(3) { --tilt: -0.6deg; }
.story-card:nth-child(4) { --tilt: 1.3deg; }
.story-card:nth-child(5) { --tilt: -1deg; }
.story-card:nth-child(6) { --tilt: 0.7deg; }
.story-ill {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 0;
}
.story-year {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: 3px;
  font: 600 11px/1.3 "Geist Mono", "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #173e2b;
  box-shadow: 0 4px 10px -5px #173e2b66;
  rotate: -2deg;
}
.yc-lime { background: #c4e899; }
.yc-sky { background: #8fd0f0; }
.yc-mint { background: #a9e3c9; }
.yc-amber { background: #f5c04a; }
.yc-rasp { background: #e8405f; color: #fff; }
.story-card b {
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #173e2b;
}
.story-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #4a5a4c;
}
.story-note {
  position: absolute;
  z-index: 2;
  top: -50px;
  left: 44px;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-family: Caveat, "Segoe Script", cursive;
  font-weight: 600;
  font-size: 28px;
  line-height: 1;
  color: #173e2b;
  rotate: -3deg;
  pointer-events: none;
}
.story-note svg {
  margin-top: 8px;
}

@media (min-width: 1000px) {
  .story-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 40px;
    padding-left: 0;
  }
  .story-note {
    left: 8px;
  }
}
@media (max-width: 900px) {
  .about-preview {
    padding-block: 44px 24px;
  }
  .about-head {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 999px) {
  .story-cards {
    gap: 14px;
  }
  .story-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    grid-template-areas: "ill year" "ill title" "ill text";
    column-gap: 14px;
    row-gap: 4px;
    padding: 14px 16px 16px;
    align-items: start;
  }
  .story-ill {
    grid-area: ill;
    width: 44px;
    height: 44px;
    margin-top: 2px;
  }
  .story-year {
    grid-area: year;
    justify-self: start;
  }
  .story-card b {
    grid-area: title;
    font-size: 17px;
  }
  .story-text {
    grid-area: text;
    font-size: 13px;
  }
}
@media (max-width: 560px) {
  .story-cards {
    padding-left: 34px;
  }
  .story-note {
    left: 34px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .story-card {
    transition: none;
  }
  .story.is-armed .story-draw,
  .story.is-armed.is-drawn .story-draw {
    stroke-dashoffset: 0;
    transition: none;
  }
}
@media (prefers-reduced-transparency: reduce) {
  .story-card {
    background: #fff;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Work: the sub-heading row and carousel continue the About section as one block. */
.work-block {
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid #e3e7df;
}
.work-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
}
.work-head h3 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 46px);
  line-height: 1;
  letter-spacing: -0.045em;
  color: #173e2b;
}
.work-head p {
  margin: 0;
  max-width: 380px;
  font-size: 13.5px;
  line-height: 1.5;
  color: #536354;
  text-align: right;
}
.wc-fallback {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.wc-fallback a {
  display: block;
  padding: 14px 16px;
  border: 1px solid #cdd5c6;
  border-radius: 12px;
  background: #fff;
  font-weight: 600;
}
.contact-section {
  margin-top: 24px;
}

@media (max-width: 760px) {
  .work-block {
    margin-top: 32px;
    padding-top: 26px;
  }
  .work-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .work-head p {
    text-align: left;
  }
}
/* ---- Hero copy: paper and stickers ---- */
.hero .hero-copy{position:relative;isolation:isolate;max-width:1100px;padding:96px 0 56px;display:flex;flex-direction:column;align-items:center}
.hero .hero-copy::before{content:"";position:absolute;inset:0 -32px;z-index:-1;pointer-events:none;background-image:linear-gradient(#0000000a 1px,transparent 1px),linear-gradient(90deg,#0000000a 1px,transparent 1px);background-size:60px 60px;-webkit-mask-image:radial-gradient(ellipse 75% 80% at 50% 45%,#000 55%,transparent 100%);mask-image:radial-gradient(ellipse 75% 80% at 50% 45%,#000 55%,transparent 100%)}
.hero-hand{margin:0 0 14px;display:flex;flex-direction:column;align-items:center;font-family:Caveat,"Segoe Script",cursive;font-weight:600;font-size:34px;line-height:1;color:#173e2b;transform:rotate(-2deg)}
.hero-hand svg{margin-top:2px;opacity:1}
.name-frame{position:relative;display:inline-block;padding:clamp(10px,1.6vw,20px) clamp(18px,3vw,40px);border:2px solid #39b6f2;max-width:100%}
.hero .name-frame h1{margin:0;max-width:none;font-family:Geist,Arial,Helvetica,sans-serif;font-weight:800;font-size:clamp(56px,8.4vw,120px);line-height:1;letter-spacing:-.06em;color:#0f2a1c;white-space:nowrap}
.name-frame .handle{position:absolute;width:14px;height:14px;box-sizing:border-box;background:#fff;border:2px solid #39b6f2}
.handle.h-tl{top:-8px;left:-8px}.handle.h-tr{top:-8px;right:-8px}.handle.h-bl{bottom:-8px;left:-8px}.handle.h-br{bottom:-8px;right:-8px}
.hero-status{display:flex;align-items:center;gap:9px;margin:22px 0 0;font:500 12px/1.3 "Geist Mono","IBM Plex Mono",monospace;letter-spacing:.1em;text-transform:uppercase;color:#173e2b}
.status-dot{width:10px;height:10px;border-radius:50%;background:#c4e899;box-shadow:0 0 0 1px #173e2b}
.hero .hero-line{margin:30px 0 0;max-width:760px;font-size:clamp(26px,2.9vw,40px);font-weight:600;line-height:1.12;letter-spacing:-.04em;color:#173e2b;text-wrap:balance}
.hero .hero-description{max-width:640px;margin:20px auto 22px;font-size:16px;line-height:1.6;color:#3e4f42}
.hero .hero-ctas{margin-top:4px}
.hero-stickers{list-style:none;margin:0;padding:0}
.sticker{position:absolute;z-index:1;padding:9px 15px;font:600 12px/1.25 "Geist Mono","IBM Plex Mono",monospace;letter-spacing:.06em;text-transform:uppercase;color:#173e2b;box-shadow:0 6px 14px -6px #173e2b66;rotate:var(--r);animation:sticker-float var(--d,6s) ease-in-out var(--delay,0s) infinite alternate;pointer-events:none;user-select:none}
.st-mint{background:#a9e3c9}.st-sky{background:#8fd0f0}.st-amber{background:#f5c04a;border:1.5px solid #173e2b}.st-white{background:#fff;border:1.5px solid #173e2b;text-transform:none;letter-spacing:0;font-family:Arial,Helvetica,sans-serif;font-size:13px;max-width:190px;border-radius:4px}.st-rasp{background:#e8405f;color:#fff;border-radius:999px;padding:9px 18px}
.st-amber,.st-mint{border-radius:3px}
.s1{--r:-6deg;--d:6s;top:64px;left:3%}
.s2{--r:5deg;--d:7s;--delay:-2s;top:56px;right:3%}
.s3{--r:4deg;--d:5s;--delay:-1s;top:392px;left:1%}
.s4{--r:-4deg;--d:6.5s;--delay:-3s;top:500px;right:1%}
.s5{--r:7deg;--d:5.5s;--delay:-4s;top:640px;left:7%}
@keyframes sticker-float{from{translate:0 -4px}to{translate:0 4px}}
.cursor{position:absolute;z-index:2;display:block;pointer-events:none;animation:cursor-drift var(--d,7s) ease-in-out infinite alternate}
.cursor b{position:absolute;left:14px;top:20px;padding:3px 9px;border-radius:999px;font:600 11px/1.3 Arial,Helvetica,sans-serif;letter-spacing:.04em;color:#fff;white-space:nowrap}
.cursor-you{--d:7s;right:2%;bottom:-58px}.cursor-you b{background:#0a0a0a}
.cursor-kevin{--d:9s;left:8%;top:-62px}.cursor-kevin b{background:#173e2b}
@keyframes cursor-drift{0%{transform:translate(0,0)}50%{transform:translate(14px,-10px)}100%{transform:translate(-8px,16px)}}
@media(max-width:1200px){.sticker{font-size:10px;padding:6px 10px}.st-white{font-size:11px;max-width:140px}.s3{top:440px;left:1.5%}.s4{top:500px}.s5{top:600px;left:3%}}
@media(max-width:760px){
 .hero .hero-copy{padding:44px 0 0}.hero .hero-copy::before{inset:0 -16px}
 .hero-hand{font-size:28px}
 .hero .name-frame h1{font-size:clamp(28px,10vw,52px)}.name-frame{padding:10px 12px}
 .hero-status{font-size:10px;text-align:center;margin-top:18px}
 .hero .hero-line{font-size:26px;margin-top:22px}
 .hero .hero-description{font-size:15px}
 .hero-stickers{order:5;display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0 0 20px}
 .hero .hero-ctas{order:6}
 .sticker{position:static;rotate:none;animation:none;font-size:10px;padding:6px 10px;max-width:none;box-shadow:none}
 .st-white{font-size:11px}
 .cursor{display:none}
}
@media(prefers-reduced-motion:reduce){.sticker,.cursor{animation:none}}

/* Custom cursor: a tight dot and a lagging ring. The native cursor hides only while the custom one is showing. */
html.has-custom-cursor.cursor-visible:not(.cursor-native),
html.has-custom-cursor.cursor-visible:not(.cursor-native) * {
  cursor: none !important;
}
.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2147483000;
  pointer-events: none;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease, width 0.25s cubic-bezier(0.22, 1, 0.36, 1), height 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}
.cursor-dot {
  width: 7px;
  height: 7px;
  background: #173e2b;
}
.cursor-ring {
  width: 36px;
  height: 36px;
  border: 1.5px solid #173e2b;
  background: transparent;
  mix-blend-mode: difference;
  border-color: #fff;
}
html.cursor-visible:not(.cursor-native) .cursor-dot,
html.cursor-visible:not(.cursor-native) .cursor-ring {
  opacity: 1;
}
html.cursor-hot .cursor-ring {
  width: 60px;
  height: 60px;
  mix-blend-mode: normal;
  background: rgba(196, 232, 153, 0.35);
  border-color: rgba(23, 62, 43, 0.45);
}
html.cursor-hot .cursor-dot {
  width: 5px;
  height: 5px;
}
html.cursor-down .cursor-ring {
  width: 28px;
  height: 28px;
}
html.cursor-down.cursor-hot .cursor-ring {
  width: 48px;
  height: 48px;
}
