/* ============================================================
   josipapps.com design system
   ============================================================ */
:root {
  --bg: #0b0b10;
  --bg-raise: #13131b;
  --bg-card: #14141d;
  --line: rgba(255, 255, 255, 0.08);
  --text: #ecebe6;
  --text-dim: #9b9aa3;
  --accent: #cdea3a;           /* default; app cards override */
  --brand-a: #7c6cff;
  --brand-b: #ff7a1a;
  --radius: 24px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(124, 108, 255, 0.45); }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---------- ambient background ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(700px 500px at 85% -5%, rgba(124, 108, 255, 0.16), transparent 65%),
    radial-gradient(600px 450px at -10% 30%, rgba(255, 122, 26, 0.08), transparent 65%),
    radial-gradient(800px 600px at 50% 110%, rgba(124, 108, 255, 0.10), transparent 65%);
}

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(11, 11, 16, 0.65);
  border-bottom: 1px solid var(--line);
}
.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; letter-spacing: -0.01em;
}
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  font-size: 13px; font-weight: 800;
  color: #0b0b10;
  background: linear-gradient(135deg, #e6e2d5, #cdea3a);
}
.dim { color: var(--text-dim); }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 14.5px; font-weight: 500; }
.nav-links a { color: var(--text-dim); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta {
  color: var(--text) !important;
  border: 1px solid var(--line);
  padding: 7px 16px;
  border-radius: 99px;
  transition: border-color 0.2s, background 0.2s;
}
.nav-cta:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.05); }

/* ---------- shared ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 90px 24px 30px; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 14px;
}
h1, h2 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.06; }
h1 { font-size: clamp(44px, 6.5vw, 76px); }
h2 { font-size: clamp(30px, 4vw, 46px); }
h1 em, h2 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
  background: linear-gradient(100deg, #b7a8ff, #ff9d52);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-head { margin-bottom: 46px; }
.section-sub { color: var(--text-dim); margin-top: 16px; max-width: 560px; }

/* ---------- reveal animation (JS-gated so no-JS still sees content) ---------- */
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- hero ---------- */
.hero { max-width: 1120px; margin: 0 auto; padding: 150px 24px 20px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-sub { color: var(--text-dim); font-size: 18px; margin-top: 24px; max-width: 540px; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px;
  border-radius: 99px;
  font-weight: 600; font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font-sans);
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(120deg, #ece8db, #cdea3a);
  color: #101207;
  box-shadow: 0 6px 28px rgba(205, 234, 58, 0.18);
}
.btn-primary:hover { box-shadow: 0 8px 34px rgba(205, 234, 58, 0.32); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.04); }

.hero-links { display: flex; gap: 22px; margin-top: 34px; }
.hero-links a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-dim); font-size: 14px; font-weight: 500;
  transition: color 0.2s;
}
.hero-links a:hover { color: var(--text); }

.hero-photo { justify-self: center; position: relative; }
.hero-photo img {
  width: min(300px, 70vw);
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 32% 68% 62% 38% / 45% 42% 58% 55%;
  border: 1px solid var(--line);
  filter: saturate(0.92);
}
.hero-photo::before {
  content: "";
  position: absolute; inset: -22px;
  border-radius: 32% 68% 62% 38% / 45% 42% 58% 55%;
  background: conic-gradient(from 120deg, rgba(124,108,255,0.35), rgba(255,122,26,0.25), rgba(205,234,58,0.25), rgba(124,108,255,0.35));
  filter: blur(38px);
  z-index: -1;
  opacity: 0.6;
}

/* ---------- dock ---------- */
.dock-wrap { margin-top: 76px; text-align: center; }
.dock-label {
  font-family: var(--font-mono);
  font-size: 12px; letter-spacing: 0.12em;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.dock {
  display: inline-flex;
  align-items: flex-end;
  gap: 14px;
  padding: 14px 22px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.dock a {
  display: block;
  width: 56px; height: 56px;
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.12s ease-out;
  transform-origin: bottom center;
  will-change: transform;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
.dock img { width: 100%; height: 100%; object-fit: cover; }
.dock .tile {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  background: linear-gradient(145deg, color-mix(in srgb, var(--tile) 90%, white 10%), color-mix(in srgb, var(--tile) 75%, black 25%));
  color: #fff; font-weight: 800; font-size: 15px;
  letter-spacing: -0.02em;
}

/* ---------- stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 70px;
  padding: 26px 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats div { text-align: center; }
.stats strong {
  display: block;
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(120deg, #ecebe6, #9b9aa3);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stats span { font-size: 13.5px; color: var(--text-dim); }

/* ---------- app cards ---------- */
.app-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 7%, var(--bg-card)) 0%, var(--bg-card) 55%);
  padding: 34px 34px 0;
  margin-bottom: 34px;
  overflow: hidden;
}
.app-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 65%, transparent), transparent);
}
.app-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.app-icon {
  width: 74px; height: 74px;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.app-title { flex: 1; min-width: 200px; }
.app-title h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-tag { color: var(--text-dim); font-size: 15px; margin-top: 2px; }
.badge {
  font-size: 11px; font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 99px;
  white-space: nowrap;
}
.badge-live {
  color: color-mix(in srgb, var(--accent) 85%, white);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.store-link {
  font-weight: 600; font-size: 14.5px;
  padding: 10px 20px;
  border-radius: 99px;
  border: 1px solid var(--line);
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.store-link:hover {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.app-desc { margin-top: 22px; max-width: 720px; color: #cfced6; }
.app-desc .quote {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
  margin-bottom: 10px;
}
.app-points {
  display: flex; flex-wrap: wrap; gap: 10px;
  list-style: none;
  margin-top: 18px;
}
.app-points li {
  font-size: 13.5px; color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 6px 14px;
  background: rgba(255,255,255,0.02);
}
.shots {
  display: flex; gap: 16px;
  margin-top: 28px;
  padding-bottom: 34px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.shots img {
  height: 350px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.12);
  scroll-snap-align: start;
  box-shadow: 0 10px 30px rgba(0,0,0,0.45);
  flex-shrink: 0;
}

/* ---------- earlier work ---------- */
.earlier-head { margin-top: 90px; }
.earlier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 6%, var(--bg-card)), var(--bg-card) 60%);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-media {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 12px;
  aspect-ratio: 16 / 11;
  background: #0e0e14;
}
.mini-media img { width: 100%; height: 100%; object-fit: cover; }
.mini-media-split { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mini-shots {
  display: flex; gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.mini-shots img {
  height: 240px;
  border-radius: 12px;
  border: 1px solid var(--line);
  scroll-snap-align: start;
  flex-shrink: 0;
}
.mini-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.mini-card p { font-size: 14.5px; color: var(--text-dim); }
.mini-card .app-tag { color: color-mix(in srgb, var(--accent) 80%, white); font-size: 13px; margin: 0; }
.award {
  margin-top: auto;
  padding-top: 10px;
  font-size: 13px !important;
  color: #e9ce77 !important;
}

/* ---------- about ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: start;
}
.about-text p + p { margin-top: 18px; }
.about-text { color: #cfced6; }
.chips { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.chips span {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-dim);
  border: 1px solid var(--line);
  padding: 6px 13px;
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}

/* ---------- experience ---------- */
.timeline { border-left: 1px solid var(--line); margin-left: 6px; }
.t-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 26px;
  padding: 0 0 46px 34px;
}
.t-item::before {
  content: "";
  position: absolute;
  left: -5.5px; top: 8px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid #8f86d8;
}
.t-when {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-dim);
  padding-top: 3px;
  white-space: nowrap;
}
.t-what h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.t-what p, .t-what li { color: #b9b8c1; font-size: 15px; }
.t-what ul { list-style: none; display: grid; gap: 7px; margin-top: 4px; }
.t-what li::before { content: "·"; color: #6f6d78; margin-right: 8px; }
.t-what strong { color: var(--text); font-weight: 600; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-links { margin-top: 30px; }
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  padding: 30px;
  display: grid;
  gap: 18px;
}
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 600; color: var(--text-dim); }
.field input, .field textarea {
  background: #0e0e15;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  padding: 12px 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: rgba(124, 108, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.15);
}
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-submit { width: 100%; padding: 14px; font-size: 16px; }
.btn-submit[disabled] { opacity: 0.55; cursor: wait; }
.form-status { font-size: 14px; min-height: 20px; color: var(--text-dim); text-align: center; }
.form-status.ok { color: #a7e06a; }
.form-status.err { color: #ff8f7a; }

/* ---------- footer ---------- */
.site-footer {
  max-width: 1120px;
  margin: 90px auto 0;
  padding: 30px 24px 44px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero { padding-top: 120px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { order: -1; justify-self: start; }
  .hero-photo img { width: 180px; }
  .hero-photo::before { inset: -14px; filter: blur(26px); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 34px; }
  .earlier-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 26px 10px; }
  .t-item { grid-template-columns: 1fr; gap: 6px; padding-left: 26px; }
  .app-card { padding: 24px 20px 0; }
  .shots img { height: 280px; }
  .nav-links a:not(.nav-cta) { display: none; }
  .dock { gap: 10px; padding: 12px 16px; }
  .dock a { width: 46px; height: 46px; border-radius: 12px; }
  .dock .tile { font-size: 12px; }
}

@media (max-width: 480px) {
  .dock { gap: 7px; padding: 10px 12px; }
  .dock a { width: 34px; height: 34px; border-radius: 9px; }
  .dock .tile { font-size: 9px; }
}
