/* jdw.social — dash identity: dark moving water, hand-drawn marks, minimal. */

:root {
  --deep: #0a0e1a;
  --surface: #0f1629;
  --accent: #6FB1B5;
  --white: #f0f0f0;
  --muted: #64748b;
  --line: rgba(240, 240, 240, 0.08);
  --padx: clamp(22px, 5vw, 72px); /* one shared gutter so the header mark aligns with the first card */
}

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

html, body { height: 100%; }

body {
  background: var(--deep);
  color: var(--white);
  font-family: 'Outfit', system-ui, sans-serif;
  overflow: hidden; /* splash state: no scroll until the dive */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.dived { overflow: hidden; } /* single-viewport site; strip scrolls horizontally */

::selection { background: rgba(111, 177, 181, 0.35); }

/* ---------- the water (whole-site fixed backdrop) ---------- */

.water {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: var(--deep);
}

.water video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 2s cubic-bezier(0.22, 1, 0.36, 1), filter 2s cubic-bezier(0.22, 1, 0.36, 1);
  filter: brightness(0.55) contrast(1.08);
}

/* dive: plunge into the water */
body.diving .water video { transform: scale(2.4); filter: brightness(0.3) contrast(1.1); }
body.dived .water video { transform: scale(1.12); filter: brightness(0.42) contrast(1.1); }

.water .veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 14, 26, 0.25) 0%, rgba(10, 14, 26, 0.55) 100%);
  pointer-events: none;
}

/* ---------- splash ---------- */

.splash {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 1.1s ease 0.5s;
}

.splash .stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 1.6s cubic-bezier(0.55, 0, 0.85, 0.4), opacity 1.2s ease 0.2s;
}

body.diving .splash { opacity: 0; }
body.diving .splash .stack { transform: scale(5.5); opacity: 0; }

.splash .jdw {
  width: clamp(230px, 38vw, 500px);
  display: block;
  animation: settle 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
  filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.45));
}

.splash .hyphen {
  width: clamp(30px, 4.5vw, 56px);
  margin-top: clamp(8px, 1.6vh, 16px);
  display: block;
  opacity: 0.3;
  animation: settleHyphen 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

.splash .swim {
  width: clamp(84px, 13vw, 150px);
  margin-top: clamp(18px, 3.5vh, 36px);
  display: block;
  opacity: 0.92;
  animation: settleSwim 1.4s cubic-bezier(0.22, 1, 0.36, 1) 1.1s both;
  filter: drop-shadow(0 3px 20px rgba(0, 0, 0, 0.45));
}

.splash .cue {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, rgba(240, 240, 240, 0.4), transparent);
  animation: bob 2.6s ease-in-out 3s infinite both;
  opacity: 0;
}

@keyframes settle { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes settleHyphen { from { opacity: 0; transform: translateY(14px); } to { opacity: 0.3; transform: translateY(0); } }
@keyframes settleSwim { from { opacity: 0; transform: translateY(18px); } to { opacity: 0.92; transform: translateY(0); } }
@keyframes bob { 0% { opacity: 0; } 12% { opacity: 1; } 50% { transform: translateX(-50%) translateY(8px); } 100% { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ---------- after the dive: the strip ---------- */

.site {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: none;
  flex-direction: column;
  opacity: 0;
}

body.dived .site {
  display: flex;
  animation: surface 1.4s ease 0.15s both;
}

@keyframes surface { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.strip-head {
  padding: clamp(22px, 4vh, 44px) var(--padx) 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.strip-head .mark { width: 130px; opacity: 0.9; display: block; }

.strip-head .kicker {
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  color: rgba(240, 240, 240, 0.5);
  font-weight: 300;
}

.strip {
  flex: 1;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  gap: clamp(28px, 4vw, 64px);
  padding: 0 var(--padx);
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.strip::-webkit-scrollbar { display: none; }

.panel {
  scroll-snap-align: center;
  flex: 0 0 auto;
  width: clamp(250px, 40vh, 420px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  user-select: none;
}

/* ---------- ?edit mode ---------- */

body.editing .cap { height: auto; min-height: 84px; overflow: visible; }
body.editing [contenteditable="true"] { outline: 1px dashed rgba(111, 177, 181, 0.45); outline-offset: 4px; border-radius: 2px; }
body.editing [contenteditable="true"]:focus { outline: 1px dashed #6FB1B5; }
body.editing [contenteditable="true"]:empty { display: inline-block; min-width: 150px; min-height: 1.2em; }

.save-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--deep);
  background: var(--white);
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  cursor: pointer;
}

.save-btn:hover { background: #6FB1B5; }

.panel .frame {
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(15, 22, 41, 0.75) 0%, rgba(10, 14, 26, 0.75) 100%);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel .frame img.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(0.92) contrast(1.04);
}

.panel .frame img.name-fallback { width: 70%; opacity: 0.85; }

/* fixed slot keeps every frame on the same line; max-height (not width)
   normalises the handwriting so short names don't render giant */
.panel .name-slot {
  height: 60px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel img.name {
  max-height: 42px;
  max-width: 88%;
  width: auto;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.5));
}

/* the caption: description line(s), client on its own line */
.panel .cap {
  height: 84px;
  font-size: 0.84rem;
  line-height: 1.55;
  font-weight: 300;
  letter-spacing: 0.015em;
  color: rgba(240, 240, 240, 0.82);
  text-align: center;
  overflow: hidden;
  margin: 0;
  max-width: 92%;
}

.panel .cap .cap-desc {
  display: block;
  text-align: center;
}

.panel .cap .cap-client {
  display: block;
  margin-top: 3px;
  text-align: center;
  color: rgba(240, 240, 240, 0.6);
}

/* JD's caption may run longer: paint past the fixed box without moving the layout */
.panel.contact .cap { overflow: visible; }

/* soft divider before JD's own panel */
.strip-divider {
  flex: 0 0 1px;
  align-self: center;
  height: min(52vh, 500px);
  background: linear-gradient(to bottom, transparent, rgba(240, 240, 240, 0.16) 18%, rgba(240, 240, 240, 0.16) 82%, transparent);
  margin: 0 clamp(18px, 3.5vw, 56px);
}

/* typographic fallback while a name SVG / photo is missing */
.panel .name-text {
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--white);
  text-align: center;
}

.panel .name-text.under { font-size: 1.05rem; opacity: 0.9; }

/* JD's panel at the end of the strip: photo with the button in the bottom eighth */
.panel.contact .frame { position: relative; }

.hello-btn.overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6%;
  margin: 0 auto;
  width: max-content;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.hello-btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1.02rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--deep);
  background: var(--white);
  border: none;
  border-radius: 999px;
  padding: 14px 26px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.35s ease;
}

.hello-btn:hover { transform: translateY(-2px); background: var(--accent); color: var(--deep); }

.strip-foot {
  padding: 0 var(--padx) clamp(18px, 3vh, 30px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.strip-foot, .strip-foot a {
  font-size: 0.68rem;
  color: rgba(100, 116, 139, 0.85);
  font-weight: 300;
  text-decoration: none;
}

.strip-foot a:hover { color: var(--accent); }
.strip-foot .links { display: flex; gap: 20px; }

/* ---------- legal pages (shared) ---------- */

body.legal-page { overflow: auto; }

.legal {
  position: relative;
  z-index: 5;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 100px) 24px 80px;
}

.legal .home-link {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.legal .home-link:hover { color: var(--accent); }
.legal h1 { margin-top: 26px; font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 600; letter-spacing: -0.02em; }
.legal .updated { margin-top: 8px; font-size: 0.82rem; color: var(--muted); }
.legal h2 { margin-top: 40px; font-size: 1.08rem; font-weight: 600; }
.legal p { margin-top: 12px; font-size: 0.94rem; line-height: 1.65; color: rgba(240, 240, 240, 0.78); font-weight: 300; }
.legal a { color: var(--white); border-bottom: 1px solid rgba(111, 177, 181, 0.5); text-decoration: none; }
.legal a:hover { color: var(--accent); }

@media (max-width: 640px) {
  .strip-head .kicker { font-size: 0.72rem; }
  .panel { width: min(72vw, 300px); }
  .panel .cap { height: 112px; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .splash .stack, .water video, .splash, .site { transition: none; animation: none; }
  .splash .jdw, .splash .hyphen, .splash .swim, .splash .cue { animation: none; opacity: 1; }
  .splash .swim { opacity: 0.55; }
  body.dived .site { animation: none; opacity: 1; }
}
