/* DUBIC TECH — portfolio
   Brand: black, white, blood red, steel. Editorial, solid colours, almost no motion. */

:root {
  --ink: #0b0b0c;
  --paper: #f2f0eb;
  --white: #ffffff;
  --blood: #c4141f;
  --steel: #9fb9b5;
  --line: rgba(11, 11, 12, 0.18);

  --display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1440px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; padding: 0; }
ol, ul { list-style: none; }

.eyebrow {
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 18px;
}

/* ---------- 1. Logo intro ---------- */
.intro {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  background: var(--white);
  padding: var(--gutter);
}
.intro__logo { width: min(88vw, 1180px); }
.intro__logo img { width: 100%; }
.intro__cue {
  position: absolute;
  left: 50%;
  bottom: clamp(20px, 4vh, 40px);
  transform: translateX(-50%);
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.6;
}
.intro__cue:hover { opacity: 1; }

/* opening animation (skipped for reduced motion; the plain logo shows instead) */
.intro__logo { position: relative; }
.logo-anim { display: none; position: absolute; inset: 0; }
.logo-anim img { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro-anim .logo-final { opacity: 0; }
.intro-anim .logo-anim { display: block; }
.intro-anim .l-letters { opacity: 0; }
.intro-anim .l-spike { opacity: 0; transform: translateY(-75%); }
.intro-anim .l-blood { clip-path: inset(0 58.7% 42% 41.3%); }
.intro-anim .intro__cue { opacity: 0; transition: opacity 0.6s ease; }

.intro-play .l-letters { animation: logo-letters 0.75s cubic-bezier(0.2, 0.7, 0.2, 1) forwards; }
.intro-play .l-spike   { animation: logo-spike 0.42s cubic-bezier(0.7, 0, 1, 0.6) 0.75s forwards; }
.intro-play .logo-anim { animation: logo-impact 0.3s ease-out 1.17s; }
.intro-play .l-blood   { animation: logo-pool 0.28s ease-out 1.17s forwards, logo-drip 1.05s cubic-bezier(0.3, 0, 0.5, 1) 1.45s forwards; }

.intro-done .logo-final { opacity: 1; }
.intro-done .logo-anim { display: none; }
.intro-done .intro__cue { opacity: 0.6; }
.intro-done .intro__cue:hover { opacity: 1; }

@keyframes logo-letters { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes logo-spike   { from { opacity: 1; transform: translateY(-75%); } to { opacity: 1; transform: none; } }
@keyframes logo-impact  { 0% { transform: none; } 35% { transform: translateY(0.9%); } 100% { transform: none; } }
/* the pool spreads out from the spike, then the drips run down */
@keyframes logo-pool { from { clip-path: inset(0 58.7% 42% 41.3%); } to { clip-path: inset(0 50% 33.5% 33%); } }
@keyframes logo-drip { from { clip-path: inset(0 50% 33.5% 33%); } to { clip-path: inset(0 50% 17% 33%); } }

/* ---------- 2. Cover: MacBook behind the headline, scroll opens the app ---------- */
.cover {
  position: relative;
  background: #08090a;
  color: #fff;
}
.cover__pin {
  position: relative;
  min-height: 100svh;
  padding: var(--gutter);
  overflow: hidden;
  isolation: isolate;
  display: flex;
  flex-direction: column;
}
/* with JS and motion allowed, the cover becomes a pinned scroll scene */
.scene .cover { height: 460svh; }
.scene .cover__pin { position: sticky; top: 0; height: 100svh; min-height: 0; }

.cover__mast {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
}
.cover__title {
  position: relative;
  z-index: 3;
  margin-top: auto;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  font-size: clamp(96px, min(21vw, 26svh), 340px);
  line-height: 0.8;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}
.cover__title span { display: block; }
.cover__title em { font-style: normal; color: #e21b28; }
.cover__deck {
  position: relative;
  z-index: 3;
  max-width: 30ch;
  margin-top: clamp(24px, 4vh, 40px);
  font: 400 clamp(20px, 2vw, 26px)/1.3 var(--serif);
}

/* the MacBook */
.mac {
  --w: min(74vw, 132svh);
  position: absolute;
  z-index: 1;
  width: var(--w);
  right: 4vw;
  top: 13svh;
  will-change: transform;
}
.mac__lid {
  padding: 1.5% 1.3% 1.7%;
  background: #0a0a0b;
  border-radius: calc(var(--w) * 0.017);
  box-shadow: 0 0 0 1px #3b3d42, 0 0 0 2.5px #17181a, 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}
.mac__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: calc(var(--w) * 0.004);
  background: #000;
}
.scr { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.scr--home { opacity: 1; }
.mac__dim { position: absolute; inset: 0; background: #08090a; opacity: 0.56; }
.mac__base {
  position: relative;
  width: 116%;
  margin-left: -8%;
  height: calc(var(--w) * 0.021);
  background: linear-gradient(180deg, #e3e5e8 0%, #c2c5ca 30%, #9a9da3 78%, #6f7277 100%);
  border-radius: 0 0 calc(var(--w) * 0.02) calc(var(--w) * 0.02);
  box-shadow: 0 30px 50px -18px rgba(0, 0, 0, 0.9);
}
.mac__base::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 13%;
  height: 38%;
  transform: translateX(-50%);
  background: #a9acb2;
  border-radius: 0 0 999px 999px;
}

.cover__caption {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(18px, 3.4svh, 34px);
  margin: 0;
  font: 600 12px/1.3 var(--sans);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  display: none;
}
.scene .cover__caption { display: block; }
.cover__caption span { position: absolute; left: 0; bottom: 0; opacity: 0; transition: opacity 0.3s ease; }
.cover__caption span.is-on { opacity: 0.85; }

@media (min-width: 900px) {
  .cover__deck {
    position: absolute;
    top: calc(var(--gutter) + 56px);
    left: var(--gutter);
    margin: 0;
  }
}
/* short screens (landscape phones, small panes): drop the paragraph so the headline fits */
@media (max-height: 520px) {
  .cover__deck { display: none; }
}
@media (max-width: 899px) {
  .cover__pin { padding-bottom: calc(var(--gutter) + 8px); }
  .cover__deck { order: 1; margin-top: 22px; }
  .cover__title { order: 2; margin-top: auto; padding-top: 6svh; font-size: min(27vw, 23svh); }
  .mac { --w: 118vw; right: auto; left: 10vw; top: auto; bottom: 16svh; }
}

/* ---------- 3. Contents ---------- */
.contents {
  background: var(--paper);
  padding: clamp(48px, 8vw, 110px) var(--gutter);
  border-top: 1px solid var(--line);
}
.contents > * { max-width: var(--max); margin-inline: auto; }
.contents__list { border-top: 1px solid var(--ink); }
.contents__list a {
  display: grid;
  grid-template-columns: auto 3.5ch minmax(0, 1.15fr) minmax(0, 1.2fr) minmax(0, 0.75fr);
  align-items: center;
  gap: 4px 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.contents__list .n { font: 600 13px/1 var(--sans); opacity: 0.55; }
.contents__list .name {
  font: 800 clamp(28px, 4.2vw, 56px)/1 var(--display);
  font-stretch: 70%;
  font-variation-settings: "wdth" 70;
  text-transform: uppercase;
}
.contents__list .what { font: italic 400 clamp(19px, 1.8vw, 24px)/1.2 var(--serif); }
.contents__list .where { font: 500 13px/1.3 var(--sans); opacity: 0.65; text-align: right; }
.contents__list a:hover .name { color: var(--blood); }
/* app icons: one tile shape for all six, each in its app's own colours */
.logo {
  --size: clamp(54px, 5.6vw, 80px);
  width: var(--size);
  height: var(--size);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 23%;
  background: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 0 1px rgba(11, 11, 12, 0.1),
    0 1px 2px rgba(11, 11, 12, 0.12),
    0 16px 26px -16px rgba(11, 11, 12, 0.55);
  transition: transform 0.2s ease;
}
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo--vayro { background: #050506; }
.logo--konvo { background: #1a3a8f; }
.logo--mixing { background: linear-gradient(180deg, #ffffff, #e4e7eb); }
.logo--mixing img { transform: scale(1.22); }
.logo--deboradent { background: #f7f1e6; }
.logo--dentvault { background: #142f4b; }
.logo--nika { background: #fff; }
.logo--nika img { transform: scale(1.2); }
.contents__list a:hover .logo { transform: translateY(-2px) scale(1.04); }
@media (prefers-reduced-motion: reduce) { .logo { transition: none; } }

@media (max-width: 720px) {
  .contents__list a { grid-template-columns: auto 1fr; gap: 2px 16px; }
  .contents__list .logo { grid-row: 1 / span 4; align-self: start; margin-top: 4px; }
  .contents__list .n, .contents__list .name, .contents__list .what, .contents__list .where { grid-column: 2; }
  .contents__list .where { text-align: left; }
}

/* ---------- 4. App sections ---------- */
.app {
  --bg: #fff; --fg: var(--ink); --accent: var(--blood); --rule: rgba(0,0,0,.16);
  background: var(--bg);
  color: var(--fg);
  padding: clamp(64px, 10vw, 140px) var(--gutter);
}
.app > * { max-width: var(--max); margin-inline: auto; }

.app__head {
  display: grid;
  grid-template-columns: auto auto 1fr;
  grid-template-areas: "n icon ." "name name name" "line line line" "link link link";
  align-items: center;
  gap: 0 16px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.app__n { grid-area: n; font: 600 13px/1 var(--sans); letter-spacing: 0.1em; padding: 8px 12px; border: 1px solid currentColor; border-radius: 999px; }
.app__icon { grid-area: icon; width: 44px; height: 44px; border-radius: 11px; object-fit: contain; }
.app__name {
  grid-area: name;
  margin-top: 18px;
  font-family: var(--display);
  font-weight: 900;
  font-stretch: 62%;
  font-variation-settings: "wdth" 62;
  text-transform: uppercase;
  font-size: clamp(72px, 13vw, 210px);
  line-height: 0.82;
  letter-spacing: -0.01em;
}
.app__line {
  grid-area: line;
  margin-top: 14px;
  font: italic 400 clamp(24px, 3vw, 40px)/1.15 var(--serif);
  color: var(--accent);
}

.app__link {
  grid-area: link;
  justify-self: start;
  margin-top: 22px;
  padding: 12px 20px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font: 600 15px/1 var(--sans);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.app__link:hover, .app__link:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.meta a { text-underline-offset: 3px; }

.app__body {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 0.9fr;
  gap: clamp(28px, 4vw, 64px);
  margin-top: clamp(40px, 6vw, 80px);
  padding-top: 28px;
  border-top: 1px solid var(--fg);
}
.app__about p { font: 400 clamp(19px, 1.6vw, 22px)/1.45 var(--serif); }
.feat li { padding: 10px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; line-height: 1.45; }
.feat li:first-child { padding-top: 0; }
.meta div { padding: 0 0 14px; margin-bottom: 14px; border-bottom: 1px solid var(--rule); }
.meta dt { font: 600 11px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.6; margin-bottom: 6px; }
.meta dd { font-size: 15.5px; line-height: 1.4; }
@media (max-width: 1000px) { .app__body { grid-template-columns: 1fr 1fr; } .app__about { grid-column: 1 / -1; } }
@media (max-width: 640px)  { .app__body { grid-template-columns: 1fr; } }

/* phone rows (VAYRO, Konvo) */
.demo-phones {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: clamp(14px, 1.6vw, 24px);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.phone { scroll-snap-align: start; }
.phone img, .phone video {
  width: 100%;
  aspect-ratio: 1 / 2;
  object-fit: cover;
  object-position: top;
  border-radius: 26px;
  border: 7px solid #141416;
  background: #141416;
}
.phone video { aspect-ratio: 1 / 2; }
.phone figcaption, .phone .step {
  display: block;
  margin-top: 12px;
  font: 500 13px/1.2 var(--sans);
  letter-spacing: 0.02em;
}
.step b {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; margin-right: 6px;
  border-radius: 50%;
  background: var(--accent); color: var(--bg);
  font-size: 12px;
}
@media (max-width: 720px) { .demo-phones { grid-auto-columns: 62vw; } }

/* screen switcher (desktop / tablet apps) */
.demo__stage { position: relative; display: grid; }
.demo__stage img { grid-area: 1 / 1; width: 100%; opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; }
.demo__stage img.is-active { opacity: 1; visibility: visible; transition: opacity .25s ease; }
@media (prefers-reduced-motion: reduce) { .demo__stage img { transition: none; } }

.frame { overflow: hidden; background: #fff; box-shadow: 0 30px 60px -30px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.08); }
.frame--window { border-radius: 12px; }
.frame__bar {
  display: flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 14px;
  background: #ececec; border-bottom: 1px solid #d6d6d6;
  font: 500 12px/1 var(--sans); color: #555;
}
.frame__bar i { width: 11px; height: 11px; border-radius: 50%; background: #cfcfcf; }
.frame__bar span { margin-left: 10px; }
.frame--tablet { border: clamp(8px, 1.3vw, 16px) solid #1a1a1a; border-radius: clamp(18px, 2.4vw, 34px); }

.demo__steps {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 22px;
}
.demo__steps button {
  font: 500 14px/1 var(--sans);
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  opacity: 0.7;
}
.demo__steps button:hover { opacity: 1; }
.demo__steps button[aria-selected="true"] { opacity: 1; background: var(--accent); border-color: var(--accent); color: var(--on-accent, #fff); }
.demo__steps button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- per-app palettes (taken from each app's own brand) ---------- */
.app--vayro      { --bg: #050506; --fg: #f4f6f5; --accent: #dc1626; --rule: rgba(255,255,255,.16); }
.app--vayro .phone img, .app--vayro .phone video { border-color: #26272a; }
.app--vayro .app__icon { box-shadow: 0 0 0 1px rgba(255,255,255,.2); }

.app--konvo      { --bg: #1a3a8f; --fg: #ffffff; --accent: #95d13c; --rule: rgba(255,255,255,.2); }
.app--konvo .phone img { border-color: #0e2463; }
.app--konvo .step b { color: #14234f; }
.app--konvo .app__icon { box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); }

.app--mixing     { --bg: #e8ebee; --fg: #1d1f22; --accent: #0a7d8c; --rule: rgba(0,0,0,.14); border-bottom: 14px solid #8a4f2d; }

.app--deboradent { --bg: #f7f1e6; --fg: #26292b; --accent: #2f5d62; --rule: #ddd0ba; }
.app--deboradent .app__line { color: #c4673f; }
.app--deboradent .app__icon { box-shadow: 0 0 0 1px #ddd0ba; }

.app--dentvault  { --bg: #ffffff; --fg: #142f4b; --accent: #235987; --rule: #e3e7ec; border-top: 1px solid #e3e7ec; }

.app--nika       { --bg: #ee1010; --fg: #ffffff; --accent: #dfbf7d; --on-accent: #242424; --rule: rgba(255,255,255,.3); }
.app--nika .app__line { color: #ffe7b0; }
.app--nika .app__icon { background: #fff; padding: 4px; }
.app--nika .frame { box-shadow: 0 30px 60px -28px rgba(60,0,0,.6); }

/* ---------- Footer ---------- */
.foot {
  background: #000;
  color: #fff;
  padding: clamp(48px, 8vw, 100px) var(--gutter) 32px;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 28px;
}
.foot__logo { width: min(560px, 86vw); }
.foot__credit p { font-size: 13px; line-height: 1.7; opacity: 0.75; }
.foot__top { font: 600 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; opacity: 0.6; }
.foot__top:hover { opacity: 1; }
