/* pulatovelbek.uz — shared styles for every page (home, works, contact, projects).
   Pages are static HTML generated by tools/pages.py; assets/site.js only adds behaviour. */

:root {
  --bg: #0f0f0f;
  --fg: #fff;
  --muted: #a6a6a6;
  --line: rgba(255, 255, 255, 0.14);
  --card: #19191a;
  --field: #222224;
  --danger: #ff8a7a;
  --gutter: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 500 16px/1.3 Inter, system-ui, -apple-system, sans-serif;
  letter-spacing: -0.03em;
  -webkit-font-smoothing: antialiased;
}

/* Selected text: white with dark text instead of the default blue */
::selection { background: #fff; color: var(--bg); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
:focus-visible { outline: 1px solid var(--fg); outline-offset: 3px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: var(--gutter); top: -100px; z-index: 100;
  padding: 10px 16px; background: var(--fg); color: var(--bg); text-transform: uppercase; font-size: 14px;
}
.skip-link:focus { top: 10px; }

/* ---------------- Header ---------------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: var(--header-h); padding: 0 var(--gutter);
  font-size: 15px; line-height: 18px; letter-spacing: -0.04em; text-transform: uppercase;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
.site-header.is-solid, .page-plain .site-header {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
}
.site-logo { justify-self: start; font-weight: 600; }
.site-nav { display: flex; gap: 24px; }
.site-nav a, .site-logo { display: inline-flex; align-items: center; min-height: 44px; }
.site-nav a { font-weight: 400; opacity: 0.75; transition: opacity 0.2s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; }
.site-clock { justify-self: end; font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.menu-toggle {
  display: none; justify-self: end; min-height: 44px; padding: 0; border: 0; background: none;
  color: var(--fg); font: inherit; font-weight: 400; text-transform: uppercase; cursor: pointer;
}

/* Mobile menu: full-screen overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; gap: 32px;
  padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
  background: var(--bg);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-size: 48px; line-height: 1.2; letter-spacing: -0.06em; text-transform: uppercase;
}
.mobile-menu .site-clock { justify-self: auto; font-size: 15px; text-transform: uppercase; }

@media (max-width: 809.98px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header .site-nav, .site-header .site-clock { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .site-header { background: var(--bg); }
}

/* ---------------- Sections ---------------- */
.section { padding: 80px var(--gutter); }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 32px;
}
.h2 {
  margin: 0; font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -0.08em; text-transform: uppercase;
}
.link-underline {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; font-weight: 400; letter-spacing: -0.04em; text-transform: uppercase;
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px;
}
.link-underline:hover { opacity: 0.7; }
.page-title {
  margin: 0 0 40px; font-size: clamp(44px, 6vw, 64px); font-weight: 500; line-height: 1;
  letter-spacing: -0.08em; text-transform: uppercase;
}
.page-top { padding-top: calc(var(--header-h) + 100px); }

/* Entrance animation (only when JS runs: html.js is set in <head>) */
.js [data-reveal] {
  opacity: 0; transform: translateY(24px); filter: blur(10px);
  transition: opacity 1s var(--ease), transform 1s var(--ease), filter 1s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; }

/* ---------------- Hero ---------------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; }
.hero-slides { position: absolute; inset: 0; background: var(--bg); }
.hero-slide {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.08); transition: opacity 2s ease, transform 8s linear;
}
.hero-slide.is-on { opacity: 1; transform: scale(1); }
.hero-shade {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15, 15, 15, 0.92) 0%, rgba(15, 15, 15, 0.45) 45%, rgba(15, 15, 15, 0.55) 100%),
    rgba(15, 15, 15, 0.25);
}
.hero-content {
  position: absolute; inset: auto var(--gutter) 40px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px;
}
.hero-title { margin: 0; font-weight: 500; }
.hero-name {
  display: block; overflow: hidden; padding-bottom: 0.06em;
  font-size: clamp(44px, 7vw, 112px); line-height: 0.9; letter-spacing: -0.065em; text-transform: uppercase;
}
.hero-name > span { display: block; }
.js .hero-name > span { transform: translateY(105%); transition: transform 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.15s; }
.js .hero.is-in .hero-name > span { transform: none; }
@media (max-width: 809.98px) {
  .hero-content { bottom: 32px; }
  .hero-name { font-size: clamp(40px, 13vw, 64px); }
}

/* ---------------- Works grid ---------------- */
.works-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 12px; margin: 0; padding: 0; list-style: none; }
.work-card { display: flex; flex-direction: column; gap: 20px; }
.work-media { position: relative; margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: #1a1a1a; }
.work-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.work-card:hover .work-media img { transform: scale(1.03); }
.work-title { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.1; letter-spacing: -0.06em; text-transform: uppercase; }
.work-details { display: flex; flex-direction: column; gap: 8px; }
.work-type { color: var(--muted); font-size: 13px; line-height: 1; letter-spacing: 0.02em; text-transform: uppercase; }

@media (max-width: 1199.98px) { .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 809.98px) {
  .works-grid { grid-template-columns: 1fr; gap: 28px; }
  .work-type { font-size: 14px; }
  .h2 { font-size: 32px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------------- Info ---------------- */
.info { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 12px; align-items: end; }
.info-photo { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: #1a1a1a; }
.info-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.js .info-photo img {
  filter: saturate(0.18) contrast(0.68) brightness(1.12); transform: scale(1.06);
  transition: filter 2.2s cubic-bezier(0.4, 0, 0.2, 1) 0.2s, transform 2.6s var(--ease);
}
.js .info.is-in .info-photo img { filter: none; transform: none; }
.info-tag {
  position: absolute; left: 16px; bottom: 16px; display: grid; padding: 6px 10px;
  background: rgba(15, 15, 15, 0.7); backdrop-filter: blur(8px);
  font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
}
.info-tag span { grid-area: 1 / 1; transition: opacity 0.6s, transform 0.6s; }
.info-tag .tag-graded { opacity: 0; transform: translateY(6px); }
.info.is-in .tag-log { opacity: 0; transform: translateY(-6px); transition-delay: 1.4s; }
.info.is-in .tag-graded { opacity: 1; transform: none; transition-delay: 1.4s; }
.no-js .tag-log { display: none; }

.info-body { display: flex; flex-direction: column; gap: 32px; padding-left: clamp(0px, 4vw, 80px); }
.info-quote { margin: 0; max-width: 16ch; font-size: clamp(32px, 4.2vw, 64px); line-height: 0.98; letter-spacing: -0.06em; }
.info-lead { margin: 0; max-width: 460px; color: var(--muted); font-size: 16px; line-height: 1.35; }
.info-lead + .info-lead { margin-top: -20px; }
.info-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; border-top: 1px solid var(--line); }
.info-stats div { padding: 16px 16px 0 0; }
.info-stats div + div { padding-left: 16px; border-left: 1px solid var(--line); }
.info-stats dt { font-size: clamp(32px, 3.4vw, 48px); line-height: 1; letter-spacing: -0.06em; }
.info-stats dd { margin: 8px 0 0; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.02em; }
.info-genres { margin: 0; color: var(--muted); font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; }
.js .info-body > * { opacity: 0; transform: translateY(16px); transition: opacity 0.8s, transform 0.8s var(--ease); }
.js .info.is-in .info-body > * { opacity: 1; transform: none; }
.js .info.is-in .info-body > :nth-child(2) { transition-delay: 0.1s; }
.js .info.is-in .info-body > :nth-child(3) { transition-delay: 0.2s; }
.js .info.is-in .info-body > :nth-child(4) { transition-delay: 0.3s; }
.js .info.is-in .info-body > :nth-child(5) { transition-delay: 0.4s; }
.js .info.is-in .info-body > :nth-child(6) { transition-delay: 0.5s; }

@media (max-width: 809.98px) {
  .info { grid-template-columns: 1fr; gap: 32px; }
  .info-body { padding-left: 0; gap: 24px; }
  .info-lead + .info-lead { margin-top: -12px; }
  .info-photo { order: 2; }
  .info-stats div { padding-right: 8px; }
  .info-stats div + div { padding-left: 10px; }
  .info-stats dd { font-size: 12px; letter-spacing: 0; }
  .info-genres { font-size: 14px; }
}

/* ---------------- Contact page ---------------- */
.contact { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.contact-body { display: flex; flex-direction: column; gap: 32px; }
.contact-lead { margin: 0; color: var(--muted); font-size: 16px; }
.contact-mail { font-size: clamp(28px, 4.4vw, 72px); line-height: 1; letter-spacing: -0.06em; overflow-wrap: anywhere; }
.contact-cols {
  display: grid; grid-template-columns: repeat(2, minmax(0, 240px)); gap: 40px;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.contact-cols ul { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.contact-cols a { display: inline-flex; align-items: center; min-height: 40px; font-size: 16px; }
.label { margin: 0 0 6px; color: var(--muted); font-size: 13px; letter-spacing: 0.02em; text-transform: uppercase; }
.contact-photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: #1a1a1a; }
.contact-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.contact a:hover, .brief-direct a:hover { opacity: 0.6; }
@media (max-width: 809.98px) {
  .contact { grid-template-columns: 1fr; }
  .contact-cols { grid-template-columns: 1fr 1fr; gap: 20px; }
  .contact-cols a { min-height: 44px; }
}

/* ---------------- Project request form ---------------- */
.brief { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 40px; align-items: end; }
.brief-aside { display: flex; flex-direction: column; gap: 32px; padding-bottom: 20px; }
.brief-title { margin: 0; font-size: clamp(36px, 4.4vw, 64px); font-weight: 500; line-height: 0.95; letter-spacing: -0.07em; text-transform: uppercase; }
.brief-direct { display: flex; flex-direction: column; max-width: 380px; padding-top: 20px; border-top: 1px solid var(--line); }
.brief-direct a { display: inline-flex; align-items: center; min-height: 40px; font-size: 16px; }
@media (max-width: 809.98px) {
  .brief { grid-template-columns: 1fr; gap: 32px; }
  .brief-aside { padding-bottom: 0; }
  .brief-direct a { min-height: 44px; }
}

.form {
  display: flex; flex-direction: column; gap: 20px; width: 100%;
  padding: 20px; border-radius: 16px; background: var(--card); color-scheme: dark;
}
.field { position: relative; display: flex; flex-direction: column; gap: 10px; }
.field label { font-size: 15px; letter-spacing: -0.02em; }
.form input, .form textarea {
  width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 8px;
  background: var(--field); color: var(--fg); font: 400 15px/1.4 Inter, system-ui, sans-serif; letter-spacing: -0.01em;
  outline: none; transition: border-color 0.2s;
}
.form textarea { min-height: 110px; resize: vertical; }
.form ::placeholder { color: rgba(255, 255, 255, 0.5); }
.form input:focus, .form textarea:focus { border-color: rgba(255, 255, 255, 0.45); background: var(--field); color: var(--fg); }
.form [aria-invalid="true"] { border-color: rgba(255, 138, 122, 0.7); }
/* Chrome paints autofilled fields light — keep them dark */
.form input:-webkit-autofill, .form input:-webkit-autofill:hover, .form input:-webkit-autofill:focus, .form textarea:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px var(--field) inset; -webkit-text-fill-color: var(--fg); caret-color: var(--fg);
  transition: background-color 600000s 0s;
}
.field-error { margin: -2px 0 0; color: var(--danger); font-size: 13px; }
.field-error:empty { display: none; }
.honeypot { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-submit {
  min-height: 44px; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 22px; background: transparent;
  color: var(--fg); font: 500 15px Inter, system-ui, sans-serif; cursor: pointer; transition: background 0.2s, color 0.2s;
}
.form-submit:hover { background: var(--fg); color: var(--bg); }
.form-submit:disabled { opacity: 0.6; cursor: progress; }
.form-note { margin: 0; color: var(--muted); font-size: 14px; }
.form-note:empty { display: none; }
.form-note a { color: var(--fg); text-decoration: underline; }
.form-done { display: flex; flex-direction: column; gap: 8px; padding: 40px 0; text-align: center; color: var(--muted); font-size: 15px; }
.form-done p { margin: 0; }
.form-done .form-done-title { color: var(--fg); font-size: 28px; letter-spacing: -0.04em; }

/* ---------------- Footer ---------------- */
.site-footer { padding: 40px var(--gutter) 24px; }
.footer-cta { margin: 0 0 24px; font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -0.08em; text-transform: uppercase; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 0; padding: 0; list-style: none; }
.footer-links a, .footer-copy {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 15px; font-weight: 400; letter-spacing: -0.04em; text-transform: uppercase;
}
.footer-links a:hover { opacity: 0.6; }
@media (max-width: 809.98px) {
  .footer-cta { font-size: 32px; }
  .footer-row { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-links { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .hero-slide, .js .hero-name > span, .js .info-photo img, .js .info-body > * {
    opacity: 1; transform: none; filter: none; transition: none;
  }
}
