/* DP Innovations V2 - sleek black control centre. One screen per page; the dot field lives behind everything. */
:root {
  --bg: #030203;
  --ink: #f4ecee;
  --muted: #a99aa0;
  --faint: #6b5d63;
  --line: rgba(244, 236, 238, 0.08);
  --line-hi: rgba(244, 236, 238, 0.16);
  --glass: rgba(10, 6, 8, 0.55);
  --red: #ff2d46;
  --red-deep: #c9112f;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bar: 64px;
  --sub: 68px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, b { font-family: var(--display); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 6px; }

#field { position: fixed; inset: 0; z-index: 0; transition: opacity .25s; }
#flowfx { position: fixed; top: 0; left: 0; z-index: 11; pointer-events: none; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 70% 45%, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
              linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px) 0 0 / 100% 48px; }

/* ---------- status bar ---------- */
.bar { position: fixed; top: 0; left: 0; right: 0; height: var(--bar); z-index: 10; display: flex; align-items: center; gap: 24px;
  padding: 0 clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--line); background: linear-gradient(rgba(3, 2, 3, 0.85), rgba(3, 2, 3, 0.35));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.logo { display: flex; align-items: center; gap: 11px; }
.logo img { filter: drop-shadow(0 0 10px rgba(255, 45, 70, 0.35)); }
.word { font: 400 21px/1 var(--display); letter-spacing: -0.02em; white-space: nowrap; }
.word b { font-weight: 700; }
.status { display: flex; align-items: center; gap: 14px; margin-left: auto; font-size: 12px; }
.mono { font-family: var(--mono); letter-spacing: 0.06em; }
.dim { color: var(--faint); }
.live { display: inline-flex; align-items: center; gap: 7px; font: 500 11px var(--mono); letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #3ddc97; box-shadow: 0 0 10px #3ddc97; animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.greet { min-width: 15ch; font: 500 12px var(--mono); letter-spacing: 0.06em; color: var(--ink); white-space: nowrap; }
.greet::after { content: ""; display: inline-block; width: 7px; height: 13px; margin-left: 4px; vertical-align: -2px; background: var(--red);
  box-shadow: 0 0 8px rgba(255, 45, 70, 0.7); animation: caret 1.05s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.tag { margin: 0 0 0 18px; font: 500 11px var(--mono); letter-spacing: 0.24em; text-transform: uppercase; color: var(--red); white-space: nowrap; }
.tag i { font-style: normal; color: var(--faint); padding: 0 0.25em; }

/* ---------- pages ---------- */
main { position: relative; z-index: 2; }
.page { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); }
.js .page { position: fixed; inset: var(--bar) 0 0 0; padding: 0 clamp(16px, 4vw, 64px);
  opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; }
.js .page.on { opacity: 1; visibility: visible; transition: opacity .5s ease .15s, visibility 0s; }
.panel { overflow-y: auto; overscroll-behavior: contain; padding: clamp(22px, 4.5vh, 64px) 4px 28px 0; scrollbar-width: thin; scrollbar-color: var(--line-hi) transparent; }
.stage { min-height: 300px; }
.js .page.svc { top: calc(var(--bar) + var(--sub)); }
.page.svc .panel { padding-top: 14px; padding-bottom: 8px; }
.page.wide { grid-template-columns: 1fr; }
.page.wide .panel { max-width: 1240px; margin: 0 auto; width: 100%; }

.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font: 500 12px var(--mono); letter-spacing: 0.28em; text-transform: uppercase; color: var(--muted); }
.eyebrow span { color: var(--red); }
.eyebrow::after { content: ""; flex: 0 0 56px; height: 1px; background: linear-gradient(90deg, var(--red), transparent); }
h1 { font-size: clamp(32px, min(3.9vw, 6.2vh), 56px); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 18px; font-weight: 600; }
h1 em { font-style: normal; background: linear-gradient(100deg, #fff 0%, #ffd2d8 25%, var(--red) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: clamp(15.5px, 1.2vw, 18px); max-width: 560px; margin: 0 0 24px; }

/* the dashboard tiles: the dots trace their edges on desktop */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.tile { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 15px 16px 17px; border-radius: 14px;
  background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: border-color .25s, transform .25s, background .25s; }
a.tile:hover { border-color: rgba(255, 45, 70, 0.45); transform: translateY(-2px); background: rgba(24, 10, 14, 0.6); }
.tile .k { font: 500 10.5px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--red); }
.tile b { font-size: 17.5px; font-weight: 600; letter-spacing: -0.01em; }
.tile .d { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.tile.accent { border-color: rgba(255, 45, 70, 0.3); background: linear-gradient(150deg, rgba(255, 45, 70, 0.13), var(--glass) 70%); }
.js .page .tile, .js .page .cta, .js .page h1, .js .page .lede, .js .page .eyebrow { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
.js .page.on .eyebrow { opacity: 1; transform: none; transition-delay: .2s; }
.js .page.on h1 { opacity: 1; transform: none; transition-delay: .28s; }
.js .page.on .lede { opacity: 1; transform: none; transition-delay: .36s; }
.js .page.on .tile { opacity: 1; transform: none; }
.js .page.on .tile:nth-child(1) { transition-delay: .55s; } .js .page.on .tile:nth-child(2) { transition-delay: .63s; }
.js .page.on .tile:nth-child(3) { transition-delay: .71s; } .js .page.on .tile:nth-child(4) { transition-delay: .79s; }
.js .page.on .tile:nth-child(5) { transition-delay: .87s; } .js .page.on .tile:nth-child(6) { transition-delay: .95s; }
.js .page.on .cta { opacity: 1; transform: none; transition-delay: .9s; }

/* portfolio */
.tiles.work { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile.shot { padding: 10px 10px 14px; }
.tile.shot img { width: 100%; height: auto; border-radius: 9px; margin-bottom: 8px; aspect-ratio: 16 / 10; object-fit: cover; }
.tile.shot .k, .tile.shot b, .tile.shot .d { padding: 0 6px; }
.tile.shot .d { font-size: 13px; }

/* buttons */
.cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 12px; font: 600 15px var(--sans);
  border: 1px solid var(--line-hi); background: rgba(255, 255, 255, 0.05); color: var(--ink); cursor: pointer; transition: transform .2s, filter .2s, background .2s; }
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.1); }
.btn.primary { background: linear-gradient(135deg, var(--red), var(--red-deep)); border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 30px -10px rgba(255, 45, 70, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.btn.primary:hover { filter: brightness(1.08); background: linear-gradient(135deg, var(--red), var(--red-deep)); }

/* contact assistant */
.chat { max-width: 560px; height: clamp(380px, 56vh, 520px); padding: 0; gap: 0; overflow: hidden;
  background: rgba(8, 5, 7, 0.32); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.chat-head { display: flex; align-items: center; gap: 9px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.chat-head i { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: pulse 2.4s infinite; }
.chat-head b { font-weight: 600; white-space: nowrap; }
.chat-head span { margin-left: auto; white-space: nowrap; font: 500 10.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--faint); }
.chat .log { flex: 1; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding: 18px 18px 10px;
  scrollbar-width: thin; scrollbar-color: var(--line-hi) transparent; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.bot { align-self: flex-start; background: rgba(22, 15, 18, 0.72); border: 1px solid var(--line); border-bottom-left-radius: 4px; color: #e6dbde; }
.msg.me { align-self: flex-end; background: rgba(70, 14, 24, 0.72); border: 1px solid rgba(255, 45, 70, 0.25); border-bottom-right-radius: 4px; color: var(--ink); }
.msg.typing { display: flex; gap: 4px; padding: 13px 14px; }
.msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .15s; } .msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-2px); } }
.summary { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 10px 0 2px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, 0.3); }
.summary dt { font: 500 10.5px var(--mono); letter-spacing: 0.16em; text-transform: uppercase; color: var(--red); padding-top: 3px; }
.summary dd { margin: 0; font-size: 13.5px; color: var(--ink); white-space: pre-wrap; max-height: 7.5em; overflow-y: auto; }
.chat-input { border-top: 1px solid var(--line); padding: 10px 12px; min-height: 60px; display: flex; align-items: center; background: rgba(8, 5, 7, 0.55); }
.offer { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { border: 1px solid var(--line-hi); background: rgba(255, 255, 255, 0.03); color: var(--ink); border-radius: 999px; padding: 8px 14px;
  font: 500 13.5px var(--sans); cursor: pointer; transition: background .2s, border-color .2s; }
.choice:hover { border-color: rgba(255, 45, 70, 0.5); background: rgba(255, 45, 70, 0.1); }
.choice.primary { background: linear-gradient(135deg, var(--red), var(--red-deep)); border-color: transparent; }
.ask { flex: 1; display: flex; align-items: flex-end; gap: 8px; }
.ask input, .ask textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: transparent; color: var(--ink); font: 15px/1.45 var(--sans); padding: 8px 4px; }
.ask input::placeholder, .ask textarea::placeholder { color: var(--faint); }
/* iPhone Safari zooms into any text box under 16px and stays zoomed after, which shifts the whole fixed layout */
@media (hover: none), (max-width: 900px) { .ask input, .ask textarea { font-size: 16px; } }
.ask .send { flex: none; width: 38px; height: 38px; border-radius: 11px; border: 0; cursor: pointer; color: #fff; font: 600 18px var(--sans);
  background: linear-gradient(135deg, var(--red), var(--red-deep)); box-shadow: 0 8px 20px -8px rgba(255, 45, 70, 0.8); }
.ts:not(:empty) { padding: 0 18px 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.js .nojs { display: none; }
.note { margin: 0; color: var(--faint); font-size: 13px; }
.note a { color: var(--ink); border-bottom: 1px solid var(--red); }

/* ---------- menu: top bar, plus the Services sub-bar the dots trace ---------- */
.nav { position: relative; display: flex; gap: 2px; padding: 4px; margin-left: 12px; }
.nav a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 9px;
  font: 500 14px var(--sans); color: var(--muted); white-space: nowrap; transition: color .2s; }
.nav a:hover, .nav a.on, .nav a.contact { color: var(--ink); }
.nav a + a::before { content: ""; position: absolute; left: -1px; top: 32%; bottom: 32%; width: 1px; background: var(--line-hi); }   /* | between items */
.nav .has-sub i { width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); opacity: .6; transition: transform .3s; }
.svc .nav .has-sub i { transform: translateY(1px) rotate(225deg); opacity: 1; color: var(--red); }
.nav .pill { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: radial-gradient(closest-side, rgba(255, 45, 70, 0.34), rgba(255, 45, 70, 0.12) 60%, rgba(255, 45, 70, 0));
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), width .5s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 901px) { .nav { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; } }

.subnav { position: fixed; z-index: 9; top: var(--bar); left: 50%; height: var(--sub); display: flex; align-items: flex-end; gap: 12px; padding-bottom: 10px; }
.subnav a { padding: 8px 18px; font: 500 14px var(--sans); color: var(--muted); white-space: nowrap; transition: color .2s, background .3s; }
.subnav a:hover { color: var(--ink); }
.subnav a.on { color: var(--ink); background: radial-gradient(closest-side, rgba(255, 45, 70, 0.34), rgba(255, 45, 70, 0.12) 60%, rgba(255, 45, 70, 0)); }
.js .subnav { opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.js.svc .subnav { opacity: 1; visibility: visible; transition: opacity .5s .25s, visibility 0s; }
html:not(.js) .subnav { left: 0; right: 0; justify-content: center; border-bottom: 1px solid var(--line); background: var(--bg); }
html:not(.js) .nav .pill { display: none; }

.fine { position: fixed; z-index: 3; right: clamp(16px, 3vw, 40px); bottom: 34px; font: 11px var(--mono); color: var(--faint); letter-spacing: 0.05em; }

/* ---------- no JavaScript: show everything stacked ---------- */
html:not(.js) body { overflow: auto; }
html:not(.js) #field, html:not(.js) #flowfx { display: none; }
html:not(.js) main { padding: calc(var(--bar) + var(--sub) + 20px) 20px 60px; }
html:not(.js) .stage { display: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 1200px) { .greet { display: none; } }
@media (max-width: 1060px) { .status { display: none; } }
@media (max-width: 1720px) { .fine { display: none; } }
@media (max-width: 900px) {
  :root { --bar: 56px; --sub: 62px; }
  .bar { gap: 12px; }
  .nav { margin-left: auto; }
  .nav a { padding: 8px 11px; font-size: 13.5px; }
  .subnav { gap: 6px; padding-bottom: 8px; }
  .subnav a { padding: 7px 13px; font-size: 13.5px; }
  .js .page.svc .stage { top: calc(var(--bar) + var(--sub)); }
  .page.svc .panel { padding-top: calc(30vh + 8px); padding-bottom: 24px; }
  .status .dim:last-child { display: none; }
  .js .page { grid-template-columns: 1fr; grid-template-rows: 1fr; padding: 0 16px; }
  .stage { position: fixed; top: var(--bar); left: 0; right: 0; height: 30vh; min-height: 0; pointer-events: none; }
  .page.wide .stage { display: none; }
  .panel { padding: calc(30vh + 8px) 0 24px; }
  .page.wide .panel { padding-top: 28px; }
  .tiles, .tiles.work { grid-template-columns: 1fr; }
  .tile { background: rgba(10, 6, 8, 0.82); }
  .chat { background: rgba(8, 5, 7, 0.45); }
  .chat-head span { font-size: 9.5px; letter-spacing: 0.08em; }
  h1 { font-size: clamp(30px, 8.4vw, 44px); }
}
@media (max-width: 560px) {
  .nav a.home, .word { display: none; }          /* the logo takes you home on phones */
  .nav a.home + a::before { display: none; }
  .nav { padding: 3px; }
  .nav a { padding: 8px 9px; font-size: 13px; gap: 5px; }
  .subnav a { padding: 7px 10px; font-size: 13px; }
  .status { gap: 10px; }
  .status .live { display: none; }
  .word { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .page, .js .page *, .nav .pill, .subnav { transition: none !important; animation: none !important; }
}

/* portfolio lightbox */
div.tile.shot { cursor: zoom-in; }
div.tile.shot:hover { border-color: rgba(255, 45, 70, 0.45); }
.lightbox { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; background: rgba(3, 2, 3, 0.86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 110px); width: auto; height: auto; border-radius: 12px;
  border: 1px solid var(--line-hi); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); cursor: default; }
.lightbox p { margin: 0; font: 500 12px var(--mono); letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.lb-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-hi);
  background: rgba(20, 12, 15, 0.9); color: var(--ink); font-size: 22px; cursor: pointer; }

/* about: the founder's letter, floating over the dots in the right-hand column */
.page.about .stage, .page.about .letter { grid-column: 2; grid-row: 1; }
.letter { align-self: center; justify-self: center; width: min(100%, 560px); max-height: calc(100% - 32px); overflow-y: auto; scrollbar-width: none;
  gap: 0; padding: clamp(18px, 2.6vh, 26px) 26px clamp(16px, 2.2vh, 22px); background: rgba(8, 5, 7, 0.42); border-color: var(--line-hi);
  backdrop-filter: blur(1.5px); -webkit-backdrop-filter: blur(1.5px); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35); }
.letter .k { margin-bottom: 12px; }
.letter p { margin: 0 0 clamp(8px, 1.3vh, 12px); color: #e6dbde; font-size: clamp(13px, 1.62vh, 14.5px); line-height: 1.6; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }
.letter p.big { color: var(--ink); font: 600 clamp(15px, 1.95vh, 17.5px)/1.3 var(--display); }
.letter .sign { display: flex; align-items: center; gap: 11px; margin-top: 4px; padding-top: clamp(10px, 1.6vh, 14px); border-top: 1px solid var(--line-hi); }
.letter .sign span { display: flex; flex-direction: column; font: 500 11px var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.letter .sign b { font: 600 16px var(--display); letter-spacing: -0.01em; text-transform: none; color: var(--ink); }
.js .page.on .letter { transition-delay: .6s; }
@media (max-width: 900px) {
  /* phones: the letter follows the panel, so the whole page scrolls */
  .js .page.about { display: block; overflow-y: auto; overscroll-behavior: contain; }
  .page.about .panel { overflow: visible; padding-bottom: 18px; }
  .letter { width: 100%; max-height: none; overflow: visible; margin-bottom: 24px; padding: 20px 18px 18px; background: rgba(10, 6, 8, 0.82); }
  .letter p { font-size: 15px; }
  .letter p.big { font-size: 17.5px; }
}
