/* ============================================================
   SCREEN SYNC — /how-it-works opening hook
   "What makes us different?" for visitors arriving from the Seed
   Hunt: a pixel street where people book every kind of ad space,
   then a "deep dive" into the technical page below.
   Loaded after styles.css + hiw.css.
   ============================================================ */

.hook {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: 7rem 0 1.4rem;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 78% 40%, rgba(142, 31, 51, 0.28), transparent 70%),
    radial-gradient(40% 40% at 10% 90%, rgba(153, 69, 255, 0.1), transparent 70%),
    var(--charcoal);
  color: var(--beige);
}
.hook__grid {                         /* faint pixel grid, drifting */
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(234, 227, 211, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(234, 227, 211, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 80%);
  animation: hkGrid 18s linear infinite;
}
@keyframes hkGrid { to { background-position: 0 32px, 32px 0; } }

.hook__stage {
  position: relative; z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  transform-origin: 50% 30%;
  will-change: transform, opacity;
}
.hook__v { display: none; width: 100%; }
.hook[data-hook="5"] .hook__v--5 { display: block; animation: hkIn 0.8s var(--ease-out) both; }
@keyframes hkIn { from { opacity: 0; transform: translateY(18px); } }

/* pixel outlines read on charcoal here too */
.hook .px {
  --o: #3a352f;
  box-shadow:
    0 -4px 0 0 var(--o), 0 4px 0 0 var(--o),
    -4px 0 0 0 var(--o), 4px 0 0 0 var(--o),
    8px 10px 0 0 rgba(0, 0, 0, 0.35);
}

/* ---------- shared copy ---------- */
.hk-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hk-eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  margin-bottom: 1.3rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  background: linear-gradient(100deg, #14f195, #00c2d6 45%, #9945ff);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hk-eyebrow__dot { width: 8px; height: 8px; background: #14f195; box-shadow: 0 0 10px #14f195; animation: hkBlink 1.4s steps(2, end) infinite; }
@keyframes hkBlink { 50% { opacity: 0.25; } }
.hk-title {
  font-family: var(--font-display);
  font-size: clamp(2.3rem, 5vw, 4.1rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 1.2rem;
}
.hk-title em {
  font-style: normal;
  background: linear-gradient(135deg, #ff7a8c 0%, #e0435d 50%, #9e1f37 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}
.hk-sub { max-width: 50ch; color: var(--beige-dim); font-size: clamp(1rem, 1.3vw, 1.1rem); line-height: 1.6; }
.hk-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem; }
.hk-chips span {
  padding: 0.38rem 0.7rem;
  border: 1px solid rgba(234, 227, 211, 0.18);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--beige);
  background: rgba(234, 227, 211, 0.04);
}
.hk-chips span::before { content: "■ "; color: #14f195; }

/* ============================================================
   DEEP DIVE
   ============================================================ */
.dive {
  position: relative; z-index: 4;
  align-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  margin-top: 1.6rem;
  padding: 0.4rem 1rem 0;
  color: var(--beige);
  text-decoration: none;
}
.dive__txt { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; }
.dive__txt b {
  padding: 0.5rem 1.1rem;
  border: 2px solid var(--cherry-bright);
  background: rgba(142, 31, 51, 0.25);
  font-family: "Silkscreen", var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  box-shadow: 0 0 0 0 rgba(224, 67, 93, 0.6);
  animation: divePulse 2.2s ease-out infinite;
  transition: background 0.25s, transform 0.25s var(--ease-out);
}
.dive:hover .dive__txt b { background: var(--cherry); transform: translateY(2px); }
@keyframes divePulse {
  0%   { box-shadow: 0 0 0 0 rgba(224, 67, 93, 0.55); }
  70%, 100% { box-shadow: 0 0 0 14px rgba(224, 67, 93, 0); }
}
.dive__txt small { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--beige-dim); }
.dive__shaft {                          /* pixel chevrons falling down a shaft */
  position: relative;
  width: 22px; height: 58px;
  background: repeating-linear-gradient(180deg, rgba(234, 227, 211, 0.16) 0 4px, transparent 4px 8px) center / 2px 100% no-repeat;
}
.dive__shaft i {
  position: absolute; left: 3px; top: 0;
  width: 16px; height: 8px;
  background:
    linear-gradient(var(--cherry-bright), var(--cherry-bright)) 0 0 / 4px 4px no-repeat,
    linear-gradient(var(--cherry-bright), var(--cherry-bright)) 4px 4px / 4px 4px no-repeat,
    linear-gradient(var(--cherry-bright), var(--cherry-bright)) 8px 4px / 4px 4px no-repeat,
    linear-gradient(var(--cherry-bright), var(--cherry-bright)) 12px 0 / 4px 4px no-repeat;
  filter: drop-shadow(0 0 4px rgba(224, 67, 93, 0.8));
  animation: diveDrop 1.5s cubic-bezier(0.55, 0, 0.8, 0.4) infinite;
  opacity: 0;
}
.dive__shaft i:nth-child(2) { animation-delay: 0.5s; }
.dive__shaft i:nth-child(3) { animation-delay: 1s; }
@keyframes diveDrop {
  0%   { transform: translateY(0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(50px); opacity: 0; }
}
.dive__layers { display: flex; gap: 0.9rem; font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.12em; color: #6f6759; }
.dive__layers span { animation: diveLayer 4s steps(1, end) infinite; }
.dive__layers span:nth-child(2) { animation-delay: 1s; }
.dive__layers span:nth-child(3) { animation-delay: 2s; }
.dive__layers span:nth-child(4) { animation-delay: 3s; }
@keyframes diveLayer { 0% { color: var(--cherry-bright); } 25%, 100% { color: #6f6759; } }

/* while diving: the hook sinks away and speed-lines rush upward */
.dive-rush {
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none;
  opacity: 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 46px, rgba(224, 67, 93, 0.18) 46px 50px),
    repeating-linear-gradient(180deg, transparent 0 17px, rgba(234, 227, 211, 0.06) 17px 19px);
}
.hook.is-diving .dive-rush { animation: diveRush var(--dive-dur, 1.6s) ease-in-out forwards; }
@keyframes diveRush {
  0%   { opacity: 0; background-position: 0 0, 0 0; }
  25%  { opacity: 1; }
  80%  { opacity: 0.6; }
  100% { opacity: 0; background-position: 0 -900px, 0 -400px; }
}

/* the big picture section now reads as the first stop of the dive */
.hiw-system--dive { padding-top: var(--section-pad); }
.hiw-system--dive .hiw-h1 { font-size: clamp(2.2rem, 4.8vw, 3.8rem); }

/* ============================================================
   THE STREET: a pixel street of ad spaces people book
   ============================================================ */
.hook[data-hook="5"] .hook__stage { align-items: flex-start; }
.street__copy { text-align: center; }
.street__copy .hk-title { max-width: 22ch; margin-left: auto; margin-right: auto; font-size: clamp(2.2rem, 4.6vw, 3.7rem); }
.street__copy .hk-sub { margin: 0 auto; max-width: 60ch; }
.street {
  display: none;
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 46%;
  pointer-events: none;
  animation: hkIn 1.2s var(--ease-out) both;
}
/* E: the dive sits between the copy and the street, so it never covers a screen */
.hook[data-hook="5"] .hook__stage { flex: 0 0 auto; }
.hook[data-hook="5"] .dive { margin-top: 1.2rem; }
.nw { white-space: nowrap; }
.hook[data-hook="5"] .street { display: block; }
.hook[data-hook="5"] .dive__txt b { background: rgba(29, 27, 25, 0.9); }
.hook[data-hook="5"] .dive__txt small, .hook[data-hook="5"] .dive__layers { text-shadow: 0 1px 0 #000, 0 0 8px #000; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 680px) {
  .hook { padding-top: 6rem; }
  .hk-eyebrow { font-size: 0.62rem; letter-spacing: 0.12em; }
  .street { height: 36%; }
  .dive__layers { gap: 0.55rem; font-size: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hook__grid, .hk-eyebrow__dot, .dive__txt b, .dive__shaft i, .dive__layers span { animation: none; }
  .dive__shaft i { opacity: 1; }
  .dive__shaft i:nth-child(2) { transform: translateY(18px); }
  .dive__shaft i:nth-child(3) { transform: translateY(36px); }
  .hook__v { animation: none !important; }
  .hook.is-diving .dive-rush { animation: none; }
}
