/* Keepitcity — keepit.city */

:root {
  --bg: #0a0a0a;
  --bg-2: #101010;
  --ink: #f5f5f5;
  --ink-2: rgba(245, 245, 245, 0.62);
  --ink-3: rgba(245, 245, 245, 0.38);
  --line: rgba(255, 255, 255, 0.08);
  --accent: #c46a3a;
  --accent-2: #e07b45;
  --display: 'Bebas Neue', Impact, sans-serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #000; }

/* Film grain */
.grain {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

/* Type */
.display {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 0.92;
}
.label {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.42em;
  color: var(--accent);
  text-transform: uppercase;
}
.accent { color: var(--accent); }
.muted { color: var(--ink-2); }

/* Nav */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--pad);
  transition: background 0.4s, padding 0.4s;
}
.nav.scrolled {
  background: linear-gradient(to bottom, rgba(10,10,10,0.92), rgba(10,10,10,0.75));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 14px var(--pad);
}
.wordmark {
  font-family: var(--display);
  font-size: 26px;
  letter-spacing: 0.18em;
  line-height: 1;
}
.wordmark span { color: var(--accent); }
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a {
  font-family: var(--display);
  font-size: 15px;
  letter-spacing: 0.28em;
  color: var(--ink-2);
  transition: color 0.25s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%; bottom: -6px;
  height: 1px; background: var(--accent);
  transition: right 0.3s var(--ease);
}
.nav-links a:hover::after { right: 0; }
.nav-burger {
  display: none;
  background: none; border: 0; color: var(--ink);
  width: 40px; height: 40px; cursor: pointer;
}
.nav-burger span {
  display: block; height: 1px; background: var(--ink);
  margin: 7px 8px; transition: transform 0.3s, opacity 0.3s;
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: 0;
    background: rgba(10,10,10,0.97);
    flex-direction: column; justify-content: center;
    gap: 28px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
  }
  .nav-links a { font-size: 34px; letter-spacing: 0.22em; }
  .nav.open .nav-links { opacity: 1; pointer-events: auto; }
  .nav-burger { display: block; position: relative; z-index: 2; }
  .nav.open .nav-burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav.open .nav-burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  padding: 0 var(--pad) clamp(48px, 8vh, 96px);
  overflow: hidden;
  isolation: isolate;
}
.hero-media {
  position: absolute; inset: 0; z-index: -2;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 68% 22%;
  filter: saturate(0.85) contrast(1.05);
  transform: scale(1.08);
  animation: heroIn 2.4s var(--ease) forwards;
}
@keyframes heroIn { to { transform: scale(1); } }
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 50%;
  opacity: 0; transition: opacity 1.6s ease;
  filter: saturate(0.9) contrast(1.05);
}
.hero-video.on { opacity: 1; }
.hero.has-video .hero-media img { animation: none; transform: none; }
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(10,10,10,1) 0%, rgba(10,10,10,0.6) 32%, rgba(10,10,10,0.15) 60%, rgba(10,10,10,0.35) 100%),
    linear-gradient(to right, rgba(10,10,10,0.55), rgba(10,10,10,0) 60%);
}
.hero-inner { width: 100%; max-width: 1400px; margin: 0 auto; }
.hero-label { margin-bottom: 22px; opacity: 0; animation: up 1s var(--ease) 0.3s forwards; }
.hero-title {
  font-size: clamp(42px, 11.5vw, 190px);
  letter-spacing: 0.01em;
  line-height: 0.86;
  text-wrap: balance;
}
.hero-title .line { display: block; overflow: hidden; }
.hero-title .line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 1.1s var(--ease) forwards;
}
.hero-title .line:nth-child(1) > span { animation-delay: 0.45s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.58s; }
.hero-title .line:nth-child(3) > span { animation-delay: 0.71s; }
@keyframes rise { to { transform: translateY(0); } }
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-row {
  display: flex; justify-content: flex-end; align-items: flex-end; gap: 32px;
  margin-top: 36px;
  opacity: 0; animation: up 1s var(--ease) 1.1s forwards;
}
.hero-sub { max-width: 440px; color: var(--ink-2); font-size: 15px; line-height: 1.7; }
.hero-scroll {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  color: var(--ink-3); font-family: var(--display); letter-spacing: 0.3em; font-size: 12px;
}
.hero-scroll i {
  display: block; width: 1px; height: 56px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.4; transform: scaleY(0.7); transform-origin: top; } 50% { opacity: 1; transform: scaleY(1); } }
@media (max-width: 760px) {
  .hero-row { flex-direction: column; align-items: flex-start; }
  .hero-scroll { display: none; }
  .hero-media img { object-position: 72% 18%; }
  .hero-label { font-size: 11px; letter-spacing: 0.3em; line-height: 1.8; }
}

/* Marquee */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 18px 0;
  background: var(--bg);
}
.marquee-track {
  display: flex; gap: 0;
  width: max-content;
  animation: scroll 42s linear infinite;
}
.marquee-track span {
  font-family: var(--display);
  font-size: 20px; letter-spacing: 0.32em;
  color: var(--ink-3);
  padding: 0 28px;
  white-space: nowrap;
}
.marquee-track span::after {
  content: '·'; color: var(--accent); margin-left: 56px;
}
@keyframes scroll { to { transform: translateX(-50%); } }

/* Sections */
.section { padding: clamp(80px, 12vw, 160px) var(--pad); }
.wrap { max-width: 1400px; margin: 0 auto; }
.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 32px; margin-bottom: clamp(36px, 5vw, 64px);
}
.section-title { font-size: clamp(44px, 7vw, 104px); }
.section-head .label { margin-bottom: 14px; display: block; }
.link-arrow {
  font-family: var(--display); font-size: 15px; letter-spacing: 0.3em;
  color: var(--ink-2); display: inline-flex; align-items: center; gap: 12px;
  white-space: nowrap; transition: color 0.25s;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.link-arrow:hover { color: var(--ink); }
.link-arrow:hover svg { transform: translateX(6px); }
@media (max-width: 760px) {
  .section-head { flex-direction: column; align-items: flex-start; gap: 18px; }
}

/* Work grid */
.work-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.work-card {
  position: relative; overflow: hidden; cursor: pointer;
  background: var(--bg-2);
  grid-column: span 4;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
}
.work-card.featured { grid-column: span 8; grid-row: span 2; aspect-ratio: auto; }
.work-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease), filter 0.6s;
  filter: saturate(0.8);
}
.work-card:hover img { transform: scale(1.04); filter: saturate(1); }
.work-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.97) 0%, rgba(10,10,10,0.82) 28%, rgba(10,10,10,0.25) 60%, transparent 100%);
}
.work-meta {
  position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 2;
}
.work-meta .label { font-size: 11px; margin-bottom: 8px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-meta h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(20px, 2vw, 28px); letter-spacing: 0.03em; line-height: 1;
}
.work-card.featured .work-meta h3 { font-size: clamp(30px, 3.4vw, 54px); }
.play {
  position: absolute; top: 50%; left: 50%; z-index: 2;
  width: 64px; height: 64px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  display: grid; place-items: center;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0; transition: opacity 0.3s, transform 0.4s var(--ease), background 0.3s;
  backdrop-filter: blur(6px);
}
.play svg { width: 18px; height: 18px; margin-left: 3px; fill: #fff; }
.work-card:hover .play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.work-card:hover .play:hover { background: var(--accent); border-color: var(--accent); }
@media (max-width: 960px) {
  .work-card { grid-column: span 6; }
  .work-card.featured { grid-column: span 12; grid-row: auto; aspect-ratio: 16/9; }
}
@media (max-width: 560px) {
  .work-card { grid-column: span 12; }
}

/* Pillars */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}
.pillar {
  padding: 40px 28px 44px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.pillar + .pillar { padding-left: 28px; border-left: 1px solid var(--line); }
.pillar .num {
  font-family: var(--display); font-size: 13px; letter-spacing: 0.3em; color: var(--accent);
  margin-bottom: 36px; display: block;
}
.pillar h3 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 4.4vw, 64px); line-height: 0.9; margin-bottom: 18px;
}
.pillar p { color: var(--ink-2); font-size: 15px; line-height: 1.7; max-width: 300px; }
@media (max-width: 900px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillar:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 520px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar + .pillar { padding-left: 0; border-left: 0; }
}

/* Stills strip */
.stills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 56px;
}
.still {
  overflow: hidden; aspect-ratio: 3 / 4; background: var(--bg-2);
}
.still img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(0.35) saturate(0.9);
  transition: filter 0.6s, transform 1.2s var(--ease);
}
.still:hover img { filter: none; transform: scale(1.05); }
.still:nth-child(2) { transform: translateY(40px); }
.still:nth-child(4) { transform: translateY(40px); }
@media (max-width: 760px) {
  .stills { grid-template-columns: repeat(2, 1fr); }
  .still:nth-child(2), .still:nth-child(4) { transform: none; }
  .still:nth-child(5) { display: none; }
}

/* About teaser */
.about-teaser {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.about-photo { position: relative; }
.about-photo img {
  aspect-ratio: 1; object-fit: cover; width: 100%;
  filter: sepia(0.25) contrast(1.05);
}
.about-photo::before {
  content: '';
  position: absolute; inset: -14px 14px 14px -14px;
  border: 1px solid var(--accent); opacity: 0.45; z-index: -1;
}
.about-copy h2 { font-size: clamp(44px, 6.5vw, 96px); margin: 14px 0 28px; }
.about-copy p { color: var(--ink-2); font-size: 17px; line-height: 1.75; max-width: 560px; margin-bottom: 18px; }
.about-copy p strong { color: var(--ink); font-weight: 500; }
@media (max-width: 860px) {
  .about-teaser { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
}

/* Contact */
.contact {
  text-align: center;
  border-top: 1px solid var(--line);
  padding-bottom: clamp(60px, 10vw, 120px);
}
.contact h2 { font-size: clamp(40px, 7vw, 110px); margin: 16px auto 36px; max-width: 1100px; }
.contact .email {
  font-family: var(--display);
  font-size: clamp(22px, 3.6vw, 48px);
  letter-spacing: 0.08em;
  display: inline-block;
  position: relative;
  padding-bottom: 6px;
}
.contact .email::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--accent); transform: scaleX(0.25); transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.contact .email:hover::after { transform: scaleX(1); }
.contact-note { color: var(--ink-3); font-size: 14px; margin-top: 26px; }
.socials { display: flex; justify-content: center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }
.socials a.primary { color: #000; background: var(--ink); border-color: var(--ink); }
.socials a.primary:hover { background: var(--accent); border-color: var(--accent); }
.socials a {
  font-family: var(--display); letter-spacing: 0.3em; font-size: 14px;
  color: var(--ink-2); padding: 14px 26px; border: 1px solid var(--line);
  transition: border-color 0.3s, color 0.3s, background 0.3s;
}
.socials a:hover { color: #000; background: var(--ink); border-color: var(--ink); }

/* Footer */
.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 26px var(--pad);
  border-top: 1px solid var(--line);
  font-family: var(--display); letter-spacing: 0.22em; font-size: 12px; color: var(--ink-3);
}
.footer a:hover { color: var(--ink); }
@media (max-width: 600px) { .footer { flex-direction: column; text-align: center; } }

/* Video lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.92);
  display: grid; place-items: center;
  padding: var(--pad);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox-frame {
  width: min(1200px, 100%); aspect-ratio: 16/9;
  background: #000; border: 1px solid var(--line);
  transform: scale(0.96); transition: transform 0.4s var(--ease);
}
.lightbox.open .lightbox-frame { transform: scale(1); }
.lightbox-frame iframe { width: 100%; height: 100%; border: 0; }
.lightbox-close {
  position: absolute; top: 22px; right: var(--pad);
  background: none; border: 0; color: var(--ink);
  font-family: var(--display); letter-spacing: 0.3em; font-size: 14px; cursor: pointer;
}
.lightbox-close:hover { color: var(--accent); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }

/* ===== About page ===== */
.page-hero {
  min-height: 92svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 140px var(--pad) 80px; position: relative;
}
.page-hero h1 { font-size: clamp(68px, 14vw, 220px); line-height: 0.86; }
.page-hero .sub { margin-top: 28px; color: var(--ink-3); font-family: var(--display); letter-spacing: 0.3em; font-size: 15px; }
.page-hero::after {
  content: ''; position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%);
  width: 1px; height: 80px; background: linear-gradient(to bottom, var(--accent), transparent);
}

.chapters { max-width: 1240px; margin: 0 auto; padding: 0 var(--pad) clamp(80px, 12vw, 160px); }
.chapter {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 6vw, 96px); align-items: center;
  padding: clamp(56px, 8vw, 120px) 0;
  border-top: 1px solid var(--line);
}
.chapter.flip .chapter-media { order: 2; }
.chapter-media { position: relative; }
.chapter-media img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  filter: grayscale(0.3) saturate(0.9); transition: filter 0.6s, transform 1s var(--ease);
}
.chapter:hover .chapter-media img { filter: none; transform: scale(1.015); }
.chapter-media::before {
  content: ''; position: absolute; inset: -12px 12px 12px -12px;
  border: 1px solid var(--accent); opacity: 0.4; z-index: -1;
}
.chapter-media.playable { cursor: pointer; }
.chapter-media.playable .play { opacity: 0.85; transform: translate(-50%, -50%) scale(1); }
.chapter-media.playable:hover .play { background: var(--accent); border-color: var(--accent); }
.chapter-media.type {
  aspect-ratio: 4 / 5; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--bg-2);
}
.chapter-media.type::before { display: none; }
.chapter-media.type span {
  font-family: var(--display); font-size: clamp(120px, 22vw, 320px); line-height: 1;
  color: var(--accent); opacity: 0.9;
}
.chapter-era { display: block; margin-bottom: 18px; }
.chapter h2 { font-size: clamp(36px, 4.6vw, 68px); margin-bottom: 22px; }
.chapter p { color: var(--ink-2); font-size: 17px; line-height: 1.75; max-width: 520px; margin-bottom: 16px; }
.chapter p strong { color: var(--ink); font-weight: 500; }
@media (max-width: 820px) {
  .chapter { grid-template-columns: 1fr; }
  .chapter.flip .chapter-media { order: 0; }
  .chapter-media img, .chapter-media.type { aspect-ratio: 4 / 3; }
}

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  margin-top: clamp(40px, 6vw, 80px);
}
.fact { background: var(--bg); padding: 36px 28px; }
.fact b { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 4.5vw, 64px); line-height: 1; display: block; color: var(--ink); }
.fact span { color: var(--ink-3); font-family: var(--display); letter-spacing: 0.28em; font-size: 12px; }
@media (max-width: 760px) { .facts { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-title .line > span { transform: none; }
  .hero-label, .hero-row { opacity: 1; }
  .reveal { opacity: 1; transform: none; }
}
