/* ============================================================
   dialed.media — precision web design
   system: near-black canvas · one acid accent · hairline grid
   type: Clash Display (display) · General Sans (text) · JetBrains Mono (micro)
   ============================================================ */

:root {
  --bg: #070708;
  --bg-2: #0C0C0E;
  --ink: #EDEEE9;
  --mut: #83867D;
  --grn: #B6FF2E;
  --line: rgba(237, 238, 233, 0.13);
  --line-soft: rgba(237, 238, 233, 0.07);
  --font-d: 'Clash Display', 'Arial Narrow', sans-serif;
  --font-t: 'General Sans', 'Helvetica Neue', sans-serif;
  --font-m: 'JetBrains Mono', 'Consolas', monospace;
  --pad: clamp(1.25rem, 4vw, 4rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-t);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: var(--grn); color: #0A0A0A; }

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }

.mono {
  font-family: var(--font-m);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--mut);
}
.mono.grn { color: var(--grn); }

/* ---------- fixed chrome ---------- */

.chrome {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(rgba(7, 7, 8, 0.72), rgba(7, 7, 8, 0));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.chrome .wordmark {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}
.chrome .wordmark em { font-style: normal; color: var(--grn); }

.chrome .right { display: flex; align-items: center; gap: 1.5rem; }

.chrome .mail:hover { color: var(--grn); }
.chrome a { cursor: pointer; transition: color 180ms ease; }

/* the nav dial — rotates with page progress */
.dial {
  width: 30px;
  height: 30px;
  flex: none;
}
.dial svg { width: 100%; height: 100%; will-change: transform; }

/* ---------- hero ---------- */

.hero { height: 210vh; position: relative; }

.hero-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: clip;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-media {
  position: absolute;
  inset: -6% 0;
  z-index: 0;
  will-change: transform;
}
.hero-media video,
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82);
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(7,7,8,0.55) 0%, rgba(7,7,8,0.05) 34%, rgba(7,7,8,0.10) 70%, rgba(7,7,8,0.92) 100%);
}

.hero-meta {
  position: absolute;
  z-index: 2;
  top: 5.4rem;
  left: var(--pad);
  display: grid;
  gap: 0.4rem;
}

.hero-meta-r {
  position: absolute;
  z-index: 2;
  top: 5.4rem;
  right: var(--pad);
  text-align: right;
  display: grid;
  gap: 0.4rem;
}

.hero-word {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad) 0.5rem;
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(4.5rem, 17.5vw, 19rem);
  line-height: 0.86;
  letter-spacing: -0.015em;
  display: flex;
  justify-content: space-between;
  user-select: none;
}
.hero-word span { display: inline-block; will-change: transform; }

.hero-sub {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0 var(--pad) 1.4rem;
  border-bottom: 1px solid var(--line);
}

.scroll-cue {
  position: absolute;
  z-index: 2;
  bottom: 7rem;
  right: var(--pad);
  width: 1px;
  height: 72px;
  background: var(--line);
  overflow: hidden;
}
.scroll-cue::after {
  content: "";
  position: absolute;
  left: 0; top: -40%;
  width: 100%; height: 40%;
  background: var(--grn);
  animation: cue 2.1s cubic-bezier(0.7, 0, 0.3, 1) infinite;
}
@keyframes cue { to { top: 110%; } }

/* ---------- ticker ---------- */

.ticker {
  border-bottom: 1px solid var(--line);
  overflow: clip;
  padding: 0.85rem 0;
  background: var(--bg);
  position: relative;
  z-index: 3;
}
.ticker-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: tick 46s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-track .mono { color: var(--ink); opacity: 0.8; white-space: nowrap; }
.ticker-track .tickmark { color: var(--grn); }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- manifesto (scrubbed) ---------- */

.manifesto { height: 320vh; position: relative; }
.manifesto-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 3vh, 2.2rem);
  padding: 0 var(--pad);
}
.manifesto-pin .mono { margin-bottom: 2.5vh; }
.m-line {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(2rem, 5.9vw, 6.2rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  max-width: 18ch;
}
.m-line .w { opacity: 0.13; display: inline-block; transition: none; will-change: opacity; }
.m-line .grn-w { color: var(--grn); }

/* ---------- work (horizontal scrub) ---------- */

.work { height: 480vh; position: relative; }
.work-pin {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: clip;
  display: flex;
  flex-direction: column;
  /* header sits in flow at the top; the track centers in the space below,
     so the two can never overlap regardless of font metrics */
  justify-content: flex-start;
  padding: 5.2rem 0 3rem;
}
.work-head {
  position: relative;
  padding: 1rem var(--pad) 0;
  margin-bottom: clamp(1.75rem, 5vh, 3.5rem);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  z-index: 3;
}
/* center the card track in the leftover vertical space */
.work-track { margin-top: auto; margin-bottom: auto; }
.work-head h2 {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  letter-spacing: -0.01em;
}
.work-track {
  display: flex;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: 0 var(--pad);
  width: max-content;
  will-change: transform;
  align-items: center;
}
.panel {
  width: min(62vw, 580px);
  flex: none;
}
.panel .idx {
  font-family: var(--font-m);
  font-size: 0.6875rem;
  color: var(--mut);
  letter-spacing: 0.14em;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}
.panel .idx .live { color: var(--grn); }
.browser {
  border: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 10.4;
}
.browser-bar {
  height: 2.1rem;
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  gap: 0.6rem;
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--font-m);
  font-size: 0.625rem;
  letter-spacing: 0.08em;
  color: var(--mut);
}
.browser-bar i {
  width: 7px; height: 7px;
  border: 1px solid var(--mut);
  border-radius: 50%;
  display: inline-block;
}
.browser-view {
  position: absolute;
  inset: 2.1rem 0 0 0;
  overflow: hidden;
  background: #101013;
}
.browser-view iframe {
  width: 1366px;
  height: 1900px;
  border: 0;
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 600ms ease 150ms;
}
.browser-view iframe.on { opacity: 1; }
.panel h3 {
  margin-top: 1rem;
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  letter-spacing: -0.005em;
}
.panel .niche { color: var(--mut); font-size: 0.95rem; margin-top: 0.15rem; }

.work-progress {
  position: absolute;
  bottom: 3.2rem;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: var(--line-soft);
}
.work-progress i {
  position: absolute;
  left: 0; top: -0.5px;
  height: 2px;
  width: 0;
  background: var(--grn);
}

/* ---------- numbers ---------- */

.numbers {
  position: relative;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: clip;
}
.numbers-bg {
  position: absolute;
  inset: -18% 0;
  z-index: 0;
  will-change: transform;
}
.numbers-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
}
.numbers-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(rgba(7,7,8,0.88), rgba(7,7,8,0.55) 50%, rgba(7,7,8,0.88));
}
.numbers-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: 62vh;
  align-content: center;
}
.num {
  padding: clamp(2rem, 6vh, 4.5rem) var(--pad);
  border-left: 1px solid var(--line-soft);
  display: grid;
  align-content: center;
  gap: 0.8rem;
}
.num:first-child { border-left: 0; }
.num b {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.num b sup { font-size: 0.4em; color: var(--grn); font-weight: 600; }

/* ---------- process (readable stacked panels) ---------- */

.process { position: relative; }
.step {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  overflow: clip;
  display: grid;
  grid-template-columns: minmax(0, 44%) minmax(0, 56%);
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.step-copy {
  padding: clamp(5rem, 14vh, 9rem) var(--pad);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.step-copy .ghost {
  position: absolute;
  bottom: -0.18em;
  left: var(--pad);
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(9rem, 24vh, 16rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(237, 238, 233, 0.10);
  user-select: none;
  pointer-events: none;
}
.step-copy h3 {
  font-family: var(--font-d);
  font-weight: 600;
  font-size: clamp(2rem, 4.4vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 12ch;
  margin-top: 1.4rem;
}
.step-copy p {
  color: var(--mut);
  max-width: 34ch;
  font-size: clamp(1rem, 1.35vw, 1.2rem);
}
.step-copy .k { color: var(--ink); }
.step-media {
  position: relative;
  overflow: clip;
  border-left: 1px solid var(--line-soft);
}
.step-media img {
  position: absolute;
  inset: -7% 0;
  width: 100%;
  height: 114%;
  object-fit: cover;
  will-change: transform;
}

/* ---------- cta ---------- */

.cta {
  position: relative;
  min-height: 130vh;
  display: grid;
  place-items: center;
  text-align: center;
  overflow: clip;
  border-top: 1px solid var(--line);
}
.cta-dial {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(120vmin, 900px);
  height: min(120vmin, 900px);
  translate: -50% -50%;
  opacity: 0.35;
  will-change: transform;
  pointer-events: none;
}
.cta-inner { position: relative; z-index: 1; padding: 20vh var(--pad); display: grid; gap: 1.6rem; justify-items: center; }
.cta h2 {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(2.6rem, 7.5vw, 7.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 14ch;
}
.cta h2 em { font-style: normal; color: var(--grn); }
.cta p { color: var(--mut); max-width: 44ch; font-size: clamp(1rem, 1.4vw, 1.25rem); }
.cta-btn {
  margin-top: 1.4rem;
  font-family: var(--font-m);
  font-size: 0.8125rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #0A0A0A;
  background: var(--grn);
  padding: 1.25rem 2.6rem;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}
.cta-btn:hover { background: var(--ink); color: #0A0A0A; }
.cta .alt { color: var(--mut); font-size: 0.85rem; }
.cta .alt a { border-bottom: 1px solid var(--line); transition: color 180ms ease, border-color 180ms ease; white-space: nowrap; }
.cta .alt a:hover { color: var(--grn); border-color: var(--grn); }

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem var(--pad) 2rem;
  position: relative;
  overflow: clip;
}
.foot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: clamp(3rem, 9vh, 6rem);
}
.foot-grid .mono { display: block; margin-bottom: 0.7rem; }
.foot-grid p, .foot-grid a { font-size: 0.95rem; color: var(--ink); }
.foot-grid a:hover { color: var(--grn); }
.foot-word {
  font-family: var(--font-d);
  font-weight: 700;
  font-size: clamp(3rem, 12vw, 13rem);
  line-height: 0.78;
  letter-spacing: -0.02em;
  white-space: nowrap;
  user-select: none;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(237, 238, 233, 0.34);
  transition: color 600ms ease;
}
.foot-word:hover { color: var(--grn); -webkit-text-stroke-color: transparent; }
.foot-legal {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero { height: 160vh; }
  .hero-meta-r { display: none; }

  /* stack the hero sub-line: on narrow screens the paragraph and the
     right-hand mono label collide when kept side by side */
  .hero-sub {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.9rem;
    padding-bottom: 1.7rem;
  }
  .scroll-cue { display: none; }

  .manifesto { height: 240vh; }

  .work { height: auto; }
  .work-pin { position: static; height: auto; overflow: visible; padding: 7rem 0 4rem; }
  .work-head { position: static; padding: 0 var(--pad); margin: 0 0 2rem; }
  .work-track {
    overflow-x: auto;
    width: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
    scrollbar-width: none;
    margin: 0;
  }
  .work-track::-webkit-scrollbar { display: none; }
  .panel { scroll-snap-align: center; width: 84vw; }
  .work-progress { display: none; }

  .numbers-grid { grid-template-columns: 1fr 1fr; }
  .num { border-top: 1px solid var(--line-soft); }
  .num:nth-child(odd) { border-left: 0; }
  .num:nth-child(-n + 2) { border-top: 0; }

  /* process steps flow naturally on mobile — the sticky 100vh stack
     clips the copy and the imagery once the text outgrows the viewport */
  .step {
    position: static;
    height: auto;
    min-height: 0;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .step-copy { padding: 4.5rem var(--pad) 6.5rem; gap: 2rem; }
  .step-copy .ghost { font-size: 7rem; }
  .step-media {
    border-left: 0;
    border-top: 1px solid var(--line-soft);
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .cta { min-height: 100svh; }
  .cta-dial { opacity: 0.25; }

  .foot-grid { grid-template-columns: 1fr; }
  .foot-word { font-size: 12.5vw; }
  .foot-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
  }
}

/* very narrow phones: keep the fixed header on one uncrowded line */
@media (max-width: 480px) {
  .chrome .right { gap: 1rem; }
}
@media (max-width: 340px) {
  .chrome .mail { display: none; }
}

/* short viewports: keep the work header clear of the cards */
@media (max-height: 700px) and (min-width: 901px) {
  .work-head { top: 3.6rem; }
  .work-head h2 { font-size: 1.3rem; }
  .panel { width: min(52vw, 460px); }
}


/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .scroll-cue::after { animation: none; }
  .m-line .w { opacity: 1 !important; }
  [data-speed], .hero-media, .work-track, .step-media img, .cta-dial { transform: none !important; }
}
