/* david.dropdev.co — main stylesheet (V2: WebGL media layer, atmosphere over spectacle) */

:root {
  --bg: #0b0b0c;
  --surface: #151517;
  --hairline: rgba(245, 245, 247, .12);
  --text: #f5f5f7;
  --text-secondary: #a4a4a9;
  --accent: #2D9FD9;

  --font-body: "Switzer", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* expo.out approximation for CSS fallback */
  --ease-power2-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --container-max: 1180px;
  --gutter: 24px;
}

@media (min-width: 768px) {
  :root { --gutter: 48px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); color-scheme: dark; overflow-x: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 12px 20px;
  z-index: 10001;
  border-radius: 6px;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ---------------- Stacking: canvas z1, page chrome z2+, persistent UI above that ---------------- */

/* Transparent so the fixed WebGL canvas (z1) shows through wherever a
   section doesn't paint its own opaque background. */
main, .site-footer {
  position: relative;
  z-index: 2;
}

.webgl-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

section {
  padding: 96px var(--gutter);
  max-width: var(--container-max);
  margin: 0 auto;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

h2 {
  font-size: clamp(28px, 4vw, 40px);
}

h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0; }

.section-head {
  margin-bottom: 48px;
  max-width: 640px;
}

.section-sub {
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 18px;
}

/* Line-mask reveal: SplitText's mask option wraps each line in its own
   overflow-hidden element and applies it inline — no CSS authored here so
   headings stay fully visible with JS absent. */

/* ---------------- Buttons ---------------- */
/* White bg / near-black text by default. Hover swaps via a wipe: a ::before
   layer scales up from the bottom while the label (mix-blend-mode: difference,
   isolated) inverts automatically against whatever is behind it. */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 100px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: border-color .25s var(--ease-out);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .35s var(--ease-power2-out);
  z-index: 0;
}

.btn span {
  position: relative;
  z-index: 1;
  color: #ffffff;
  mix-blend-mode: difference;
}

.btn:active { transform: scale(.985); }

.btn-primary {
  background: var(--text);
  border-color: var(--text);
}
.btn-primary::before { background: var(--bg); }
.btn-primary:hover::before,
.btn-primary:focus-visible::before { transform: scaleY(1); }
.btn-primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.btn-primary:disabled::before { transform: scaleY(0); }

.btn-ghost {
  background: transparent;
  border-color: var(--hairline);
}
.btn-ghost::before { background: var(--text); }
.btn-ghost:hover::before,
.btn-ghost:focus-visible::before { transform: scaleY(1); }
.btn-ghost:hover { border-color: var(--text); }

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  min-height: 100svh;
  max-width: none;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-scene {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100svh;
  display: flex;
  align-items: center;
}

.hero-layer { position: absolute; inset: 0; }

.hero-layer--back {
  z-index: 1;
}

.hero-photo {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 62%;
  object-fit: cover;
  object-position: center top;
  filter: saturate(.86) contrast(1.05);
}

@media (max-width: 767px) {
  .hero-photo {
    width: 100%;
    opacity: .35;
  }
}

.hero-photo-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, var(--bg) 28%, rgba(11,11,12,.75) 46%, rgba(11,11,12,.15) 68%, rgba(11,11,12,0) 85%);
}

@media (max-width: 767px) {
  .hero-photo-gradient {
    background: linear-gradient(180deg, rgba(11,11,12,.18) 0%, rgba(11,11,12,.6) 52%, var(--bg) 90%);
  }
}

.hero-layer--mid {
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 var(--gutter);
  max-width: 760px;
}

.hero-name {
  font-weight: 600;
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hero-headline {
  font-size: clamp(44px, 8vw, 96px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 24px;
}

.hero-sub {
  max-width: 52ch;
  color: var(--text-secondary);
  font-size: 19px;
  margin-bottom: 40px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  z-index: 3;
  padding: 8px;
  animation: hint-bob 2s ease-in-out infinite;
}

@keyframes hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.scroll-hint.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s var(--ease-out);
}

/* ---------------- Proof strip ---------------- */

.proof {
  display: flex;
  flex-wrap: wrap;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding-top: 56px;
  padding-bottom: 56px;
}

.proof-item {
  flex: 1 1 200px;
  padding: 0 32px;
  border-left: 1px solid var(--hairline);
}
.proof-item:first-child { border-left: none; padding-left: 0; }

@media (max-width: 767px) {
  .proof-item {
    flex: 1 1 100%;
    border-left: none;
    border-top: 1px solid var(--hairline);
    padding: 32px 0 0;
    margin-top: 32px;
  }
  .proof-item:first-child { border-top: none; margin-top: 0; padding-top: 0; }
}

.proof-number {
  display: block;
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}

.proof-label {
  display: block;
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 26ch;
}

/* ---------------- Paths ---------------- */

.paths-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (max-width: 767px) {
  .paths-grid { grid-template-columns: 1fr; }
}

.path-card {
  border-top: 1px solid var(--hairline);
  padding-top: 32px;
  perspective: 800px;
  transition: box-shadow .3s var(--ease-out);
}

.path-card:hover {
  box-shadow: 0 24px 48px rgba(0, 0, 0, .35);
}

.path-card-photo {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 24px;
}

.path-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.86) contrast(1.05);
}

.path-card-body h3 {
  margin-bottom: 14px;
}

.path-card-body p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.path-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
}

.path-link::after {
  content: "\2192";
  display: inline-block;
  transition: transform .2s var(--ease-out);
}

.path-link:hover::after {
  transform: translateX(4px);
}

/* ---------------- Logo wall ---------------- */

.logo-row {
  margin-bottom: 40px;
}
.logo-row:last-child { margin-bottom: 0; }

.logo-row-label {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.logo-row-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}

.logo-item {
  height: 28px;
  width: auto;
  filter: grayscale(1);
  opacity: .55;
  transition: opacity .3s var(--ease-out), filter .3s var(--ease-out);
}

/* Optical balance: uniform pixel height reads uneven across marks of
   different density, so each mark gets a tuned height. */
.logo-item[src*="ti."]          { height: 36px; }
.logo-item[src*="intel"]        { height: 32px; }
.logo-item[src*="equinix"]      { height: 26px; }
.logo-item[src*="veeam"]        { height: 22px; }
.logo-item[src*="massmutual"]   { height: 22px; }
.logo-item[src*="utep"]         { height: 36px; }
.logo-item[src*="mca"]          { height: 44px; }
.logo-item[src*="pioneers21"]   { height: 30px; }
.logo-item[src*="dropdev"]      { height: 30px; }
.logo-item[src*="healthatlas"]  { height: 30px; }

.logo-item:hover {
  opacity: 1;
  filter: grayscale(0);
}

/* ---------------- Gallery: draggable WebGL track, DOM row is the fallback ---------------- */

.gallery {
  position: relative;
}

/* Base state (no JS / no WebGL / reduced motion): horizontal scroll-snap row,
   images fully visible. This is the whole fallback — no extra markup needed. */
.gallery-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.gallery-item {
  flex: 0 0 78%;
  max-width: 520px;
  scroll-snap-align: center;
  margin: 0;
}

@media (min-width: 768px) {
  .gallery-item { flex-basis: 46%; }
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 8px;
  filter: saturate(.86) contrast(1.05);
  background: var(--surface);
}

.gallery-item-caption {
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 15px;
}

/* JS-enhanced (WebGL gallery active): DOM row becomes a positioning/interaction
   surface only — visuals come from the canvas, so the flex row is neutralized
   and a single crossfading caption + progress bar take over. */
.gallery[data-enhanced] .gallery-track {
  overflow: hidden;
  scroll-snap-type: none;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}
.gallery[data-enhanced] .gallery-track:active { cursor: grabbing; }

.gallery[data-enhanced] .gallery-item-caption {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.gallery-caption {
  display: none;
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 15px;
  min-height: 1.5em;
}

.gallery[data-enhanced] .gallery-caption {
  display: block;
}

.gallery-progress {
  display: none;
  height: 1px;
  background: var(--hairline);
  margin-top: 16px;
  overflow: hidden;
}

.gallery[data-enhanced] .gallery-progress {
  display: block;
}

.gallery-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--text-secondary);
}

/* ---------------- Notes ---------------- */

.notes-list {
  border-top: 1px solid var(--hairline);
}

.note {
  border-bottom: 1px solid var(--hairline);
}

.note-row { margin: 0; font-weight: 400; }

.note-trigger {
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  background: none;
  border: none;
  color: var(--text);
  text-align: left;
  padding: 28px 0;
  cursor: pointer;
  font-family: inherit;
}

.note-title {
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  flex: 1 1 auto;
}

.note-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex: 0 0 auto;
  text-align: right;
}

.note-teaser {
  color: var(--text-secondary);
  font-size: 15px;
  max-width: 32ch;
}

.note-time {
  color: var(--text-secondary);
  font-size: 13px;
  display: inline-block;
  transition: transform .2s var(--ease-out);
}

.note-trigger:hover .note-time {
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .note-trigger { flex-direction: column; align-items: flex-start; gap: 8px; }
  .note-meta { align-items: flex-start; text-align: left; }
}

.note-panel {
  overflow: hidden;
  height: 0;
}

.note-panel-inner {
  padding-bottom: 32px;
  max-width: 68ch;
}

.note-panel-inner p {
  color: var(--text-secondary);
}

/* ---------------- Pinned statement (benefits ask) ---------------- */

.benefits-ask {
  max-width: none;
  background: var(--surface);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.benefits-ask-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}

.benefits-ask-statement {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  max-width: 20ch;
}

/* Word spans are only introduced by JS (SplitText); this plain paragraph is
   the fully-readable fallback for no-JS / reduced-motion / JS-failure. */
.benefits-ask-statement .word {
  display: inline-block;
}

/* ---------------- Contact ---------------- */

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 64px;
}

@media (max-width: 900px) {
  .contact-inner { grid-template-columns: 1fr; }
}

.contact-form {
  margin-top: 8px;
  max-width: 560px;
}

.form-row {
  margin-bottom: 24px;
}

.form-row label {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  transition: border-color .2s var(--ease-out);
  cursor: auto;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--accent);
}

.form-row textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row--honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.char-counter {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}

.form-status {
  margin-top: 20px;
  font-size: 15px;
  color: var(--text-secondary);
  min-height: 1.6em;
}

.form-status.is-error {
  color: #ff8a8a;
}

.form-success {
  max-width: 560px;
}

.form-success p {
  font-size: 19px;
  margin-bottom: 20px;
}

.form-noscript {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 15px;
}
.form-noscript a { color: var(--accent); }

.contact-aside {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}

@media (min-width: 901px) {
  .contact-aside {
    border-top: none;
    border-left: 1px solid var(--hairline);
    padding-top: 0;
    padding-left: 40px;
  }
}

.contact-aside-label {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.contact-aside-link {
  display: block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 12px;
}

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 40px var(--gutter);
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 14px;
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  text-decoration: none;
  color: var(--text-secondary);
}
.footer-links a:hover { color: var(--text); }

/* ---------------- Loader ---------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.loader-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  overflow: hidden;
}

.loader-bar {
  width: 120px;
  height: 1px;
  background: rgba(245, 245, 247, .18);
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--text);
}

.loader[hidden] { display: none; }

/* ---------------- Scroll progress line (the one persistent chrome element) ---------------- */

.progress-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  z-index: 9998;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* ---------------- Custom cursor (desktop fine-pointer only, JS-activated) ---------------- */

.cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
}

html.has-custom-cursor .cursor { opacity: 1; }
html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor button,
html.has-custom-cursor [role="button"] {
  cursor: none;
}
html.has-custom-cursor input,
html.has-custom-cursor textarea,
html.has-custom-cursor select,
html.has-custom-cursor [contenteditable] {
  cursor: auto;
}

/* The dot is a DropDev droplet: it leans into its direction of travel and
   stretches slightly with speed (JS drives rotation/scale on the inner svg). */
.cursor-dot {
  position: absolute;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
}

.cursor-drop {
  display: block;
  width: 100%;
  height: 100%;
  fill: var(--accent);
  opacity: .95;
}

.cursor-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 1px solid rgba(245, 245, 247, .7);
  mix-blend-mode: difference;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width .3s var(--ease-out), height .3s var(--ease-out), margin .3s var(--ease-out), border-color .3s var(--ease-out);
}

.cursor-ring-label {
  opacity: 0;
  font-size: 11px;
  color: #f5f5f7;
  text-transform: none;
  transition: opacity .2s var(--ease-out);
}

.cursor.state-drag .cursor-ring {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
}
.cursor.state-drag .cursor-ring-label { opacity: 1; }

.cursor.state-link .cursor-ring {
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border-color: rgba(245, 245, 247, .9);
}

@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
}
