/* Shared styles for priymak.com: tokens, the grid frame, bands, buttons,
   experience rows, project pages, the phone prototype and the lightbox. */
:root {
  --bg: #f4f3f1;
  --fg: #141414;
  --dim: #8b8b8b;
  --body: #5f5f5f;
  --line: rgba(0, 0, 0, .1);
  --dot: rgba(0, 0, 0, .35);
  --raised: rgba(0, 0, 0, .035);
  --stage: #e9e7e3;
  --accent: #ea5a0c;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111111; --fg: #f2f2f2; --dim: #7c7c7c; --body: #9a9a9a;
    --line: rgba(255, 255, 255, .1); --dot: rgba(255, 255, 255, .4); --raised: rgba(255, 255, 255, .04);
    --stage: #181818; --accent: #ff6a1a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111111; --fg: #f2f2f2; --dim: #7c7c7c; --body: #9a9a9a;
  --line: rgba(255, 255, 255, .1); --dot: rgba(255, 255, 255, .4); --raised: rgba(255, 255, 255, .04);
  --stage: #181818; --accent: #ff6a1a; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 15px/1.55 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
:focus-visible { outline: 1.5px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* The frame: two vertical rules, bands split by full-bleed horizontal rules
   with a small node at every crossing */
.page { overflow: hidden; overflow: clip; } /* keeps the full-bleed rules from widening the viewport on phones */
.frame { max-width: 1200px; margin: 0 auto; border-left: 1px solid var(--line); border-right: 1px solid var(--line); min-height: 100vh; }
.band { position: relative; padding: 72px 56px; }
.band::before { content: ""; position: absolute; top: -1px; left: -100vw; right: -100vw; height: 1px; background: var(--line); }
.band::after {
  content: ""; position: absolute; top: -4px; left: -4px; right: -4px; height: 7px; pointer-events: none;
  background:
    radial-gradient(circle, var(--dot) 1.6px, transparent 2px) left center / 7px 7px no-repeat,
    radial-gradient(circle, var(--dot) 1.6px, transparent 2px) right center / 7px 7px no-repeat;
}

/* Top bar */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 56px; }
.who { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 500; }
.who img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.who span { color: var(--dim); font-weight: 400; }
.bar nav { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.bar nav a { color: var(--dim); padding: 6px 10px; border-radius: 6px; }
.bar nav a:hover, .bar nav a[aria-current] { color: var(--fg); }
.theme {
  width: 32px; height: 32px; margin-left: 6px; border: 1px solid var(--line); border-radius: 50%;
  background: transparent; color: var(--dim); cursor: pointer; display: grid; place-items: center;
}
.theme:hover { color: var(--fg); }
.theme svg { width: 14px; height: 14px; }

.eyebrow { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 22px; }
.eyebrow::before { content: ""; width: 6px; height: 6px; background: var(--accent); flex: none; }
.two { font-weight: 400; letter-spacing: -.025em; margin: 0; color: var(--fg); }
.two .g { color: var(--dim); }
h1.two { font-size: clamp(32px, 3.4vw, 44px); line-height: 1.12; }
h2.two { font-size: clamp(26px, 2.6vw, 32px); line-height: 1.18; }
.lead { color: var(--body); font-size: 16px; line-height: 1.6; margin: 18px 0 0; max-width: 520px; }

/* Columns of short facts with vertical dividers */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.fact { padding: 0 24px; border-left: 1px solid var(--line); }
.fact h3 { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; margin: 0 0 12px; }
.fact h3::before { content: ""; width: 11px; height: 11px; border-radius: 2px; background: linear-gradient(135deg, var(--accent), #ffb27a); flex: none; }
.fact p { margin: 0; color: var(--body); font-size: 14px; line-height: 1.5; }
.fact p + p { margin-top: 4px; }

.split { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--raised); font: inherit; font-size: 14px; color: inherit;
  white-space: nowrap; cursor: pointer; transition: border-color .15s ease;
}
.btn:hover { border-color: var(--dim); }
.btn.solid { background: var(--fg); color: var(--bg); border-color: transparent; }
.btn.solid:hover { opacity: .85; }
.btn.small { min-height: 34px; padding: 0 14px; font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }

/* Hairline list (features, steps) */
.rows { list-style: none; padding: 0; margin: 28px 0 0; border-top: 1px solid var(--line); }
.rows li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rows li b { font-weight: 500; }
.rows li span { display: block; color: var(--body); margin-top: 2px; }

/* Media screen with a warm haze behind it */
.media { position: relative; display: flex; flex-direction: column; gap: 14px; }
.media::before {
  content: ""; position: absolute; inset: 10% 6% 22%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 35%, transparent), transparent);
  filter: blur(50px); opacity: .55;
}
.screen { position: relative; border-radius: 10px; overflow: hidden; background: #0b0b0b; border: 1px solid var(--line); }
.screen video, .screen > img { width: 100%; height: auto; }
.caption { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.caption p { margin: 0; color: var(--body); font-size: 14px; max-width: 420px; }

/* Tags */
.scope { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 14px 0 0; }
.scope li { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; background: var(--raised); }

/* Experience rows: text left, preview right */
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 8px; }
.sec-head p { margin: 0; color: var(--dim); font-size: 14px; }
.jobs { list-style: none; padding: 0; margin: 32px 0 0; }
.job { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: center; padding: 40px 0; border-top: 1px solid var(--line); }
.job:last-child { border-bottom: 1px solid var(--line); }
.job.text { padding: 28px 0; }
.job .head { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
.job h3 { font-size: 20px; font-weight: 500; margin: 0; letter-spacing: -.02em; }
.job .y { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.job .role { font-size: 13px; color: var(--dim); margin: 4px 0 0; }
.job .role b { color: var(--accent); font-weight: 500; }
.job .d { margin: 12px 0 0; color: var(--body); font-size: 14px; line-height: 1.55; }
.job .actions { margin-top: 18px; }

/* Preview tile */
.pv {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 100%, color-mix(in srgb, var(--accent) 16%, var(--stage)), var(--stage));
  border: 1px solid var(--line); transition: transform .3s ease, border-color .3s ease;
}
.pv:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.pv .label {
  position: absolute; left: 14px; bottom: 14px; font-size: 12px; padding: 5px 10px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); color: #fff; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.pv.wide img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.pv.phones { display: flex; justify-content: center; align-items: flex-end; gap: 4%; padding: 7% 6% 0; }
.pv.phones img {
  width: 26%; aspect-ratio: 375 / 760; object-fit: cover; object-position: top; border-radius: 12px 12px 0 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .08); border-bottom: 0;
}
.pv.phones img:nth-child(2) { width: 30%; margin-bottom: 0; transform: translateY(-4%); }

/* Project page */
.back { font-size: 13px; color: var(--dim); }
.back:hover { color: var(--fg); }
.prose h3 { font-size: 15px; font-weight: 500; margin: 32px 0 8px; }
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--body); margin: 0 0 10px; }
.prose ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.prose li { color: var(--body); padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sticky { position: sticky; top: 32px; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 28px; }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.gallery button {
  padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--stage);
  cursor: zoom-in; aspect-ratio: 9 / 16;
}
.gallery.wide button { aspect-ratio: 16 / 10; }
.gallery img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s ease; }
.gallery button:hover img { transform: scale(1.03); }
.videos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.videos video { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #000; aspect-ratio: 1; object-fit: cover; }

.next { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.next a.big { font-size: 26px; letter-spacing: -.02em; }
.next a.big:hover { color: var(--accent); }

/* Phone prototype: tap the right half for the next screen, the left half to go back */
.proto { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.phone {
  position: relative; width: min(320px, 100%); aspect-ratio: 9 / 19.5; border-radius: 44px; padding: 12px;
  background: #0c0c0c; border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35), inset 0 0 0 2px #1d1d1d;
}
.phone .scr { position: relative; width: 100%; height: 100%; border-radius: 33px; overflow: hidden auto; background: #fff; scrollbar-width: none; }
.phone .scr::-webkit-scrollbar { display: none; }
.phone .scr img { width: 100%; height: auto; }
.phone .tap { position: absolute; top: 12px; bottom: 12px; width: 40%; border: 0; background: transparent; cursor: pointer; z-index: 2; }
.phone .tap.prev { left: 12px; cursor: w-resize; }
.phone .tap.next { right: 12px; cursor: e-resize; }
.proto .ctl { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.proto .ctl button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--raised); color: var(--fg); cursor: pointer; font: inherit; }
.proto .ctl button:hover { border-color: var(--dim); }
.proto .hint { font-size: 12px; color: var(--dim); margin: 0; text-align: center; }

/* Lightbox */
dialog.lb { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.lb::backdrop { background: rgba(0, 0, 0, .86); }
dialog.lb .wrap { width: 100%; height: 100%; display: grid; place-items: center; padding: 48px 64px; overflow: auto; }
dialog.lb img { max-width: 100%; max-height: calc(100vh - 96px); width: auto; border-radius: 8px; }
dialog.lb img.tall { max-height: none; max-width: min(520px, 100%); }
dialog.lb .x, dialog.lb .nav {
  position: fixed; border: 1px solid rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .5); color: #fff;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font: 18px/1 var(--font);
}
dialog.lb .x { top: 16px; right: 16px; }
dialog.lb .nav.p { left: 16px; top: 50%; }
dialog.lb .nav.n { right: 16px; top: 50%; }

footer { position: relative; padding: 24px 56px 40px; color: var(--dim); font-size: 12px; }
footer::before { content: ""; position: absolute; top: -1px; left: -100vw; right: -100vw; height: 1px; background: var(--line); }

@media (max-width: 1000px) {
  .split, .job { grid-template-columns: 1fr; gap: 32px; }
  .facts .fact:first-child { padding-left: 0; border-left: 0; }
  .sticky { position: static; }
  .videos { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .frame { margin: 0 10px; }
  .band { padding: 48px 20px; }
  .bar, footer { padding-left: 20px; padding-right: 20px; }
  .bar nav a.hide-sm { display: none; }
  .who span { display: none; }
  .facts { grid-template-columns: 1fr; gap: 24px; }
  .fact, .facts .fact:first-child { padding: 0 0 0 16px; border-left: 1px solid var(--line); }
  .sec-head { flex-direction: column; align-items: start; gap: 8px; }
  .job { padding: 32px 0; }
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery.wide { grid-template-columns: 1fr; }
  .videos { grid-template-columns: 1fr; }
  dialog.lb .wrap { padding: 64px 12px; }
  dialog.lb .nav { top: auto; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .pv, .gallery img { transition: none; }
}
.prose .scope { border: 0; }
.prose .scope li { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--fg); font-size: 12px; }
.phone[style*="aspect-ratio"] { border-radius: 36px; padding: 14px; }
.phone[style*="aspect-ratio"] .scr { border-radius: 24px; }

/* --- Revisions: phone screen fits its own ratio, no white edges */
.phone { aspect-ratio: auto; height: auto; }
.phone .scr { height: auto; aspect-ratio: 9 / 19.5; background: #0c0c0c; }
.phone .scr img { min-height: 100%; object-fit: cover; object-position: top; }
.phone[style*="aspect-ratio"] { border-radius: 44px; padding: 12px; }

/* Tall screens in a row, uncropped, no frames */
.gallery:not(.wide) { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; }
.gallery:not(.wide) button { aspect-ratio: auto; border: 0; background: none; border-radius: 18px; }
.gallery:not(.wide) img { height: auto; object-fit: contain; }

/* Home: compact rows, preview about as tall as the text */
.job { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; padding: 32px 0; }
.job .d { max-width: 620px; }

/* Partner logos */
.logos { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.logos li { width: 76px; height: 76px; border-radius: 16px; background: #000; display: grid; place-items: center; border: 1px solid var(--line); }
.logos img { max-width: 56px; max-height: 56px; object-fit: contain; }

@media (max-width: 1000px) {
  .job { grid-template-columns: 1fr; gap: 20px; }
  .job .pv { max-width: 420px; }
  .gallery:not(.wide) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .gallery:not(.wide) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .logos li { width: 60px; height: 60px; }
  .logos img { max-width: 44px; max-height: 44px; }
}

/* Logos sit straight on the page, no tiles */
.logos { gap: 28px 36px; align-items: center; }
.logos li { width: auto; height: 64px; border: 0; background: none; border-radius: 0; }
.logos img { max-width: 72px; max-height: 64px; }
:root[data-theme="light"] .logos li.white img { filter: invert(1); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .logos li.white img { filter: invert(1); } }
@media (max-width: 680px) { .logos li { width: auto; height: 48px; } .logos img { max-width: 54px; max-height: 48px; } }
:root[data-theme="light"] .logos li.outline img { filter: drop-shadow(0 0 1px rgba(0, 0, 0, .9)); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .logos li.outline img { filter: drop-shadow(0 0 1px rgba(0, 0, 0, .9)); } }
