:root {
  --bg: #050505;
  --surface: #0b0b0b;
  --surface-2: #111;
  --text: #f4f1e9;
  --muted: #96938c;
  --line: rgba(255,255,255,.12);
  --accent: #d8ff3e;
  --ease: cubic-bezier(.2,.75,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Inter, "Helvetica Neue", Arial, sans-serif; overflow-x: hidden; }
body::before { content: ""; position: fixed; z-index: 0; inset: 0; pointer-events: none; background: radial-gradient(520px circle at var(--pointer-x,50%) var(--pointer-y,50%), rgba(216,255,62,.055), transparent 68%); transition: opacity .3s; }
main, .site-footer { position: relative; z-index: 1; }
body.modal-open { overflow: hidden; }
button, a { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.noise { position: fixed; inset: 0; z-index: 99; pointer-events: none; opacity: .035; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px clamp(20px,4vw,64px); mix-blend-mode: difference; font-size: 12px; letter-spacing: .08em; }
.brand-home { border: 0; padding: 0; background: transparent; color: var(--text); font-weight: 800; letter-spacing: .06em; cursor: pointer; }
.header-contact { display: flex; align-items: center; gap: 24px; }
.contact-label { text-transform: uppercase; color: var(--muted); }
.contact-email { border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 3px; }

.hero { position: relative; min-height: 92svh; display: grid; place-items: center; padding: 100px 24px 72px; overflow: hidden; }
.hero[hidden], .portfolio[hidden], .category-view[hidden] { display: none !important; }
.hero-glow { position: absolute; width: 55vw; height: 55vw; border-radius: 50%; background: radial-gradient(circle, rgba(216,255,62,.10), transparent 64%); filter: blur(20px); animation: breathe 6s ease-in-out infinite; }
.hero-title { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; font-size: clamp(68px,14vw,190px); line-height: .76; letter-spacing: -.075em; font-weight: 800; text-align: center; }
.hero-title span { display: block; transform: translateY(130%); opacity: 0; animation: titleIn 1.2s var(--ease) forwards; will-change: transform; transition: text-shadow .35s ease; }
.hero-title:hover span:first-child { text-shadow: 18px 16px 42px rgba(216,255,62,.16); }
.hero-title span:nth-child(2) { color: transparent; -webkit-text-stroke: 1.5px rgba(244,241,233,.72); animation-delay: .14s; }
.primary-button { position: absolute; bottom: 10vh; display: inline-flex; align-items: center; gap: 22px; border: 1px solid var(--line); background: rgba(9,9,9,.72); backdrop-filter: blur(12px); border-radius: 999px; padding: 15px 18px 15px 24px; cursor: pointer; opacity: 0; transform: translateY(20px); animation: fadeUp .8s 1s var(--ease) forwards; transition: background .3s, color .3s, transform .3s; }
.primary-button i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #050505; font-style: normal; }
.primary-button:hover { background: var(--text); color: #050505; transform: translateY(-3px); }
.scroll-mark { position: absolute; left: 4vw; bottom: 8vh; height: 72px; width: 1px; background: var(--line); overflow: hidden; }
.scroll-mark span { display: block; height: 28px; background: var(--text); animation: scrollLine 2s ease-in-out infinite; }
.portfolio-hint { position: absolute; z-index: 2; right: clamp(20px,4vw,64px); bottom: 7vh; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: var(--muted); font-size: 10px; letter-spacing: .16em; cursor: pointer; animation: hintFloat 1.8s ease-in-out infinite; }
.portfolio-hint i { color: var(--accent); font-size: 20px; font-style: normal; }

.portfolio { padding: 110px clamp(20px,5vw,80px) 150px; max-width: 1600px; margin: 0 auto; }
.section-kicker { color: var(--accent); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 18px; }
.section-title { margin: 0 0 48px; font-size: clamp(38px,6vw,82px); line-height: .95; letter-spacing: -.045em; }
.category-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border-top: 1px solid var(--line); }
.category-card { position: relative; min-height: 230px; display: grid; grid-template-columns: minmax(120px, .8fr) 1.4fr; gap: 26px; align-items: center; padding: 30px; border-bottom: 1px solid var(--line); cursor: pointer; overflow: hidden; transform-style: preserve-3d; will-change: transform; transition: background .4s var(--ease), transform .18s ease-out; }
.category-card:nth-child(odd) { border-right: 1px solid var(--line); }
.category-card::after { content: "↗"; position: absolute; right: 24px; top: 22px; font-size: 20px; opacity: 0; transform: translate(-8px,8px); transition: .35s var(--ease); }
.category-card:hover { background: var(--surface-2); }
.category-card:hover::after { opacity: 1; transform: none; }
.logo-plate { height: 128px; display: grid; place-items: center; padding: 22px; background: #f7f7f3; border-radius: 3px; }
.logo-plate img { display: block; max-width: 100%; max-height: 80px; object-fit: contain; }
.logo-fallback { color: #111; font-size: 19px; font-weight: 800; letter-spacing: -.02em; text-align: center; }
.category-card h3 { margin: 0; font-size: clamp(20px,2.2vw,34px); letter-spacing: -.035em; line-height: 1.05; }
.category-card p { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.category-count { display: block; margin-top: 20px; color: var(--accent); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }

.category-view { min-height: 100svh; padding: 96px clamp(20px,5vw,80px) 140px; max-width: 1600px; margin: 0 auto; }
.category-view.entering .category-heading-wrap { animation: pageReveal .72s var(--ease) both; }
.category-view.entering .video-card { animation: cardReveal .66s var(--ease) both; animation-delay: calc(var(--card-index,0) * 55ms + 110ms); }
.back-button { position: sticky; top: 78px; z-index: 12; width: max-content; border: 1px solid var(--line); border-radius: 999px; background: rgba(8,8,8,.88); backdrop-filter: blur(12px); color: var(--text); padding: 12px 18px; cursor: pointer; margin-bottom: 52px; transition: color .2s, background .2s; }
.back-button:hover { background: var(--text); color: #050505; }
.category-heading-wrap { display: grid; grid-template-columns: 180px minmax(0,760px); align-items: center; gap: 40px; margin-bottom: 70px; }
.category-logo-large { min-height: 145px; display: grid; place-items: center; background: #f7f7f3; border-radius: 3px; padding: 24px; color: #111; font-weight: 800; text-align: center; }
.category-logo-large img { max-width: 100%; max-height: 96px; object-fit: contain; }
.category-title { margin: 0; font-size: clamp(38px,6vw,76px); line-height: .98; letter-spacing: -.05em; }
.category-description { max-width: 760px; margin: 18px 0 0; color: #bbb8b1; font-size: clamp(14px,1.4vw,17px); line-height: 1.7; }
.video-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 34px 18px; }
.video-card { border: 0; padding: 0; background: transparent; text-align: left; cursor: pointer; transform-style: preserve-3d; will-change: transform; transition: transform .18s ease-out; }
.poster-wrap { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #151515; }
.poster-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .65s var(--ease), filter .45s; }
.video-card:hover .poster-wrap img { transform: scale(1.045); filter: brightness(.78); }
.play-badge { position: absolute; inset: 0; display: grid; place-items: center; }
.play-badge span { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: rgba(5,5,5,.72); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.22); font-size: 16px; transition: transform .35s var(--ease), background .35s; }
.video-card:hover .play-badge span { transform: scale(1.12); background: var(--accent); color: #050505; }
.video-info { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; padding-top: 15px; }
.video-info h3 { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 600; }
.video-info time { color: var(--muted); font-size: 11px; white-space: nowrap; }
.video-credit { display: block; color: var(--muted); font-size: 11px; margin-top: 7px; }
.legal-note { color: #77746d; font-size: 10px; line-height: 1.45; margin: 9px 0 0; }
.empty-state { grid-column: 1/-1; padding: 70px 0; border-top: 1px solid var(--line); color: var(--muted); }

.video-modal { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.96); padding: 42px clamp(16px,4vw,64px); }
.video-modal[hidden] { display: none; }
.modal-stage { height: 100%; display: grid; grid-template-rows: minmax(0,1fr) auto; gap: 18px; }
.modal-stage video { width: 100%; height: 100%; max-height: calc(100svh - 130px); object-fit: contain; background: #000; }
.modal-meta { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; }
.modal-meta h2 { margin: 0; font-size: clamp(17px,2vw,25px); }
.modal-meta span { color: var(--muted); font-size: 12px; }
.modal-close { position: absolute; z-index: 2; top: 18px; right: 22px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: #0c0c0c; cursor: pointer; font-size: 27px; line-height: 1; }

.editor-toggle { position: fixed; right: 18px; bottom: 18px; z-index: 55; border: 1px solid var(--line); border-radius: 999px; background: rgba(10,10,10,.9); color: var(--text); padding: 11px 16px; cursor: pointer; box-shadow: 0 12px 40px rgba(0,0,0,.34); }
.editor-toggle:hover { background: var(--accent); color: #050505; }
.editor-panel { position: fixed; z-index: 90; top: 0; right: 0; width: min(410px,100vw); height: 100svh; background: #0d0d0d; border-left: 1px solid var(--line); box-shadow: -24px 0 80px rgba(0,0,0,.48); overflow-y: auto; animation: editorIn .35s var(--ease); }
.editor-panel[hidden] { display: none; }
.editor-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px; background: rgba(13,13,13,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.editor-head span { display: block; font-size: 18px; font-weight: 700; }
.editor-head small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.editor-head button { border: 0; background: transparent; color: var(--text); font-size: 25px; cursor: pointer; }
.editor-body { display: grid; gap: 15px; padding: 22px; }
.editor-body label { display: grid; gap: 7px; color: #bbb8b1; font-size: 11px; letter-spacing: .04em; }
.editor-body input, .editor-body textarea, .editor-body select { width: 100%; border: 1px solid var(--line); border-radius: 4px; background: #171717; color: var(--text); padding: 11px 12px; font: inherit; font-size: 13px; resize: vertical; }
.editor-body input:focus, .editor-body textarea:focus, .editor-body select:focus { outline: 1px solid var(--accent); border-color: var(--accent); }
.editor-body hr { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 5px 0; }
.editor-save { border: 0; border-radius: 4px; background: var(--accent); color: #050505; padding: 13px; font-weight: 700; cursor: pointer; }
.editor-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.editor-tools button, .import-label { display: grid; place-items: center; min-height: 38px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); padding: 8px; font-size: 10px; cursor: pointer; text-align: center; }
.editor-tools button:last-child { grid-column: 1/-1; }
.import-label input { display: none; }
.editor-status { min-height: 18px; margin: 0; color: var(--accent); font-size: 11px; }

.page-transition { position: fixed; z-index: 70; inset: 0; background: var(--accent); color: #050505; display: grid; place-items: center; transform: translateY(101%); pointer-events: none; }
.page-transition.is-active { animation: transitionSweep .46s var(--ease); }
.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 36px clamp(20px,5vw,80px); border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

@keyframes titleIn { to { transform: none; opacity: 1; } }
@keyframes fadeUp { to { opacity: 1; transform: none; } }
@keyframes breathe { 50% { transform: scale(1.13); opacity: .65; } }
@keyframes scrollLine { 0% { transform: translateY(-120%); } 60%,100% { transform: translateY(270%); } }
@keyframes hintFloat { 50% { transform: translateY(7px); color: var(--text); } }
@keyframes transitionSweep { 0% { transform: translateY(101%); } 48% { transform: translateY(0); } 52% { transform: translateY(0); } 100% { transform: translateY(-101%); } }
@keyframes pageReveal { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes cardReveal { from { opacity: 0; transform: translateY(32px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes editorIn { from { transform: translateX(100%); } to { transform: none; } }

@media (max-width: 900px) {
  .category-grid { grid-template-columns: 1fr; }
  .category-card:nth-child(odd) { border-right: 0; }
  .video-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .category-heading-wrap { grid-template-columns: 140px minmax(0,1fr); gap: 28px; }
}

@media (max-width: 620px) {
  .site-header { justify-content: space-between; gap: 12px; padding: 18px 16px; }
  .contact-label { display: none; }
  .contact-email { margin-left: auto; font-size: 11px; }
  .header-contact { gap: 10px; }
  .brand-home { font-size: 10px; }
  .hero-title { font-size: clamp(66px,24vw,112px); }
  .scroll-mark { display: none; }
  .portfolio-hint { right: 16px; bottom: 3vh; }
  .portfolio { padding-top: 85px; }
  .category-card { grid-template-columns: 104px 1fr; min-height: 170px; padding: 20px 10px 20px 0; }
  .logo-plate { height: 100px; padding: 16px; }
  .category-heading-wrap { grid-template-columns: 1fr; gap: 24px; margin-bottom: 46px; }
  .category-logo-large { width: 150px; min-height: 110px; }
  .video-grid { grid-template-columns: 1fr; gap-bottom: 30px; }
  .modal-meta { display: block; }
  .modal-meta span { display: block; margin-top: 7px; }
  .video-modal { padding: 58px 10px 20px; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
