/* Deveci Labs — studio site
   Palette comes from the existing studio mark: ink, paper, lime full stop. Lime is reserved for
   the full stop, the live signal and keyboard focus. Each product brings its own accent colour. */
:root {
  --ink: #0E1116;
  --ink-2: #151922;
  --ink-3: #1C212C;
  --line: #262C38;
  --paper: #F4F1EA;
  --fog: #9AA1AD;
  --lime: #C6F432;
  --gutter: clamp(20px, 5vw, 56px);
  --max: 1240px;
  --wide: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body {
  margin: 0; background: var(--ink); color: var(--paper);
  font: 400 1.0625rem/1.6 var(--wide); font-stretch: 100%;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 800; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.stop { color: var(--lime); }

/* ——— Buttons ——— */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: .5em; min-height: 46px; padding: 0 1.35em;
  border-radius: 999px; border: 1px solid var(--paper); background: var(--paper); color: var(--ink);
  font: 600 .98rem/1 var(--wide); text-decoration: none; cursor: pointer;
}
.btn:hover { background: #fff; }
.btn--ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.btn--ghost:hover { background: var(--ink-3); border-color: #3A4252; }
.btn--big { min-height: 56px; font-size: 1.05rem; padding: 0 1.6em; }

/* ——— Nav ——— */
.nav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 28px;
  padding: 14px var(--gutter);
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 800; font-stretch: 112%; letter-spacing: -.01em; }
.brand svg { color: var(--paper); width: 34px; height: auto; }
.nav nav { display: flex; gap: 24px; margin-left: auto; }
.nav nav a, .lang { text-decoration: none; color: var(--fog); font-size: .95rem; }
.nav nav a:hover, .lang:hover { color: var(--paper); }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }

/* ——— Hero: the wall of screens ——— */
.hero {
  position: relative; overflow: hidden; min-height: calc(100svh - 64px);
  display: grid; align-items: center; padding: 10vh var(--gutter) 12vh;
  background-image:
    linear-gradient(var(--ink-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-2) 1px, transparent 1px);
  background-size: 56px 56px;
  border-bottom: 1px solid var(--line);
}
.wall {
  position: absolute; top: -18%; right: -6%; width: min(64vw, 980px); height: 136%;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 1.6vw, 24px);
  transform: rotate(-7deg);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%), linear-gradient(180deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent 0, #000 34%);
}
.wall-col { display: flex; flex-direction: column; gap: inherit; gap: clamp(14px, 1.6vw, 24px); animation: drift 38s ease-in-out infinite alternate; }
.wall-col--0 { margin-top: 18%; }
.wall-col--1 { margin-top: -4%; animation-duration: 46s; animation-direction: alternate-reverse; }
.wall-col--2 { margin-top: 30%; animation-duration: 42s; }
.wall-col--3 { margin-top: 8%; animation-duration: 50s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-16%); } }

.hero-copy { position: relative; z-index: 1; max-width: 46rem; }
.hero h1 {
  font-size: clamp(3rem, 8.2vw, 7.6rem); line-height: .9; letter-spacing: -.04em;
  font-stretch: 118%; font-weight: 850; max-width: 9.5em;
}
.hero .lead { margin: 28px 0 36px; max-width: 34rem; font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: #D7D4CC; }
.pulse { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; color: var(--fog); font-size: .95rem; }
.dot-live { width: 9px; height: 9px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 0 rgb(198 244 50 / .6); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgb(198 244 50 / 0); } 100% { box-shadow: 0 0 0 0 rgb(198 244 50 / 0); } }

/* ——— Devices ——— */
.phone {
  position: relative; aspect-ratio: 9 / 16; border-radius: clamp(22px, 2.6vw, 38px);
  padding: clamp(5px, .6vw, 9px); background: #05070A;
  box-shadow: 0 0 0 1px #2B313D, 0 50px 120px -40px var(--accent, #000);
}
.phone video { width: 100%; height: 100%; object-fit: cover; border-radius: calc(clamp(22px, 2.6vw, 38px) - clamp(5px, .6vw, 9px)); background: var(--ink-2); }
.phone--wall { box-shadow: 0 0 0 1px #262B36, 0 30px 80px -30px var(--accent, #000); }

.browser { border-radius: 14px; overflow: hidden; background: #05070A; box-shadow: 0 0 0 1px #2B313D, 0 60px 140px -50px var(--accent, #000); }
.browser-bar { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: #10141B; border-bottom: 1px solid #222834; }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2B313D; }
.browser-bar span { margin: 0 auto; padding: 3px 14px; border-radius: 6px; background: var(--ink-2); color: var(--fog); font-size: .8rem; }
.browser video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ——— Section shell ——— */
.index, .lab, .how, .team, .contact { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 12vh, 140px) var(--gutter); }
.index h2, .lab h2, .how h2, .team h2 { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1; letter-spacing: -.03em; font-stretch: 114%; }
.section-lead { margin-top: 18px; max-width: 38rem; color: var(--fog); font-size: 1.15rem; }

/* ——— Portfolio ledger ——— */
.index-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.filters { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.filters button { font: 600 .92rem/1 var(--wide); color: var(--fog); background: none; border: 0; border-radius: 999px; padding: 10px 16px; cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.ledger { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.row a {
  display: grid; grid-template-columns: 40px minmax(10rem, 15rem) 1fr 8.5rem 8.5rem; align-items: center; gap: 22px;
  padding: 16px 8px; border-top: 1px solid var(--line); text-decoration: none;
}
.row a:hover { background: var(--ink-2); }
.row[hidden] { display: none; }
.icon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.icon--mono { display: grid; place-items: center; background: var(--ink-3); font-weight: 800; font-stretch: 120%; color: var(--paper); }
.row-name { font-weight: 700; font-size: 1.12rem; font-stretch: 108%; }
.row-line { color: var(--fog); font-size: .98rem; }
.row-by { color: var(--fog); font-size: .9rem; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--fog); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #5B6372; }
.status--live { color: var(--paper); }
.status--live::before { background: var(--lime); }

/* ——— Product showcases ——— */
.shows { border-top: 1px solid var(--line); }
.show {
  position: relative; max-width: var(--max); margin: 0 auto; padding: clamp(80px, 14vh, 160px) var(--gutter);
  display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 clamp(20px, 3vw, 48px); align-items: center;
}
.show + .show::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: var(--line); }
.show > * { min-width: 0; }
.show-media { margin: 0; grid-column: 1 / span 5; position: relative; }
.show-media::before {
  content: ""; position: absolute; inset: 10% -10%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent), transparent);
  filter: blur(30px);
}
.show--portrait .phone { width: min(360px, 100%); margin: 0 auto; }
.show-text { grid-column: 7 / span 6; }
.show--flip .show-media { grid-column: 8 / span 5; grid-row: 1; }
.show--flip .show-text { grid-column: 1 / span 6; grid-row: 1; }
.show-kind { display: flex; align-items: center; gap: 12px; color: var(--fog); font-size: 1rem; }
.show-kind img { width: 28px; height: 28px; border-radius: 7px; }
.show-name { margin-top: 18px; font-size: clamp(2.8rem, 6.4vw, 5.4rem); line-height: .92; letter-spacing: -.04em; font-stretch: 120%; }
.show-tag { margin-top: 20px; font-size: clamp(1.25rem, 2vw, 1.6rem); line-height: 1.3; font-weight: 600; font-stretch: 104%; max-width: 30rem; }
.show-body { margin-top: 18px; color: #C9C6BF; max-width: 34rem; }
.facts { margin: 28px 0 32px; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 16px 28px; max-width: 34rem; }
.facts div { border-top: 1px solid var(--line); padding-top: 10px; }
.facts dt { color: var(--fog); font-size: .88rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; }

/* Landscape flagship: screen across the top, text in two columns beneath. */
.show--landscape .show-media { grid-column: 1 / -1; margin-bottom: clamp(40px, 6vh, 72px); }
.show--landscape .show-media::before { inset: 0 8%; }
.show--landscape .show-text { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 4vw, 64px); }
.show--landscape .show-kind, .show--landscape .show-name, .show--landscape .show-tag { grid-column: 1; }
.show--landscape .show-body, .show--landscape .facts, .show--landscape .actions { grid-column: 2; }
.show--landscape .show-body { grid-row: 1 / span 2; margin-top: 0; align-self: end; }
.show--landscape .facts { grid-row: 3; margin-bottom: 28px; }
.show--landscape .actions { grid-row: 4; }
.show--landscape .show-tag { grid-row: 3 / span 2; }

/* ——— Lab ——— */
.lab { border-top: 1px solid var(--line); max-width: none; }
.lab > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.cards { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; text-decoration: none; background: var(--ink-2); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
a.card:hover { border-color: #3A4252; }
.card-img { aspect-ratio: 1200 / 630; background: var(--ink-3); overflow: hidden; }
.card-img > img { width: 100%; height: 100%; object-fit: cover; }
.card-art { height: 100%; display: grid; place-items: center; }
.card-art img { width: 88px; height: 88px; border-radius: 20px; }
.card-art span { font-size: 4rem; font-weight: 900; font-stretch: 125%; color: var(--fog); }
.card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { font-size: 1.25rem; font-stretch: 110%; }
.card-body p { color: var(--fog); }
.card-meta { margin-top: auto; padding-top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }

/* ——— How ——— */
.how { border-top: 1px solid var(--line); max-width: none; }
.how > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.how-grid { margin-top: 56px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 44px clamp(32px, 6vw, 96px); }
.how-grid h3 { font-size: 1.35rem; font-stretch: 108%; letter-spacing: -.01em; }
.how-grid p { margin-top: 10px; color: var(--fog); max-width: 32rem; }

/* ——— Team ——— */
.team { border-top: 1px solid var(--line); max-width: none; }
.team > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.people { margin-top: 56px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.person { background: var(--ink-2); border: 1px solid var(--line); border-radius: 22px; padding: clamp(24px, 3vw, 40px); }
.monogram { width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center; background: var(--paper); color: var(--ink); font-size: 1.7rem; font-weight: 900; font-stretch: 125%; letter-spacing: -.04em; }
.person h3 { margin-top: 26px; font-size: 1.8rem; font-stretch: 114%; letter-spacing: -.02em; }
.role { color: var(--fog); margin-top: 4px; }
.person > p:not(.role) { margin-top: 18px; color: #C9C6BF; }
.built span { display: block; color: var(--fog); font-size: .9rem; margin-bottom: 4px; }
.built a, .links a { color: var(--paper); text-decoration-color: #4A5262; text-underline-offset: 3px; }
.built a:hover, .links a:hover { text-decoration-color: var(--lime); }
.links { display: flex; gap: 18px; }

/* ——— Contact ——— */
.contact { border-top: 1px solid var(--line); max-width: none; padding-bottom: clamp(96px, 16vh, 180px); }
.contact > * { max-width: calc(var(--max) - 2 * var(--gutter)); margin-left: auto; margin-right: auto; }
.contact h2 { font-size: clamp(3.4rem, 11vw, 9.5rem); line-height: .88; letter-spacing: -.05em; font-stretch: 125%; }
.contact .section-lead { margin-top: 28px; margin-bottom: 36px; font-size: clamp(1.15rem, 1.7vw, 1.35rem); color: #D7D4CC; }

.foot { display: flex; justify-content: space-between; gap: 16px; padding: 28px var(--gutter); border-top: 1px solid var(--line); color: var(--fog); font-size: .92rem; }
.foot a { color: var(--fog); }

/* ——— Film dialog ——— */
.film { width: min(1100px, 94vw); padding: 0; border: 0; border-radius: 16px; background: #000; color: var(--paper); overflow: visible; }
.film::backdrop { background: rgb(5 7 10 / .86); backdrop-filter: blur(6px); }
.film video { width: 100%; border-radius: 16px; aspect-ratio: 16 / 9; background: #000; }
.film-close { position: absolute; right: 0; top: -48px; background: none; border: 1px solid var(--line); color: var(--paper); border-radius: 999px; padding: 8px 16px; font: 600 .9rem var(--wide); cursor: pointer; }

/* Drafts only appear in local preview. */
[data-draft] { outline: 1px dashed var(--lime); outline-offset: -1px; }

/* ——— Responsive ——— */
@media (max-width: 1020px) {
  .nav nav { display: none; }
  .lang { margin-left: auto; }
  .row a { grid-template-columns: 40px 1fr auto; gap: 4px 16px; }
  .row-name { grid-column: 2; }
  .row-line { grid-column: 2 / -1; grid-row: 2; }
  .row-by { display: none; }
  .row .status { grid-column: 3; grid-row: 1; }
  .row .icon { grid-row: 1 / span 2; align-self: start; }
}
@media (max-width: 820px) {
  .hero { align-items: end; min-height: 92svh; padding-top: 30vh; }
  .wall { width: 120vw; right: -30vw; top: -10%; height: 90%; grid-template-columns: repeat(3, 1fr); opacity: .55;
    -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 58%); mask-image: linear-gradient(180deg, #000 20%, transparent 58%); }
  .hero { padding-top: 38vh; }
  .wall-col--3 { display: none; }
  .show, .show--flip { grid-template-columns: 1fr; gap: 44px; }
  .show .show-media, .show .show-text, .show--flip .show-media, .show--flip .show-text { grid-column: 1; grid-row: auto; }
  .show--portrait .phone { width: min(300px, 78vw); }
  .show--landscape .show-text { display: block; }
  .show--landscape .show-body { margin-top: 18px; }
  .how-grid, .people { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wall-col, .dot-live { animation: none; }
}
