/* Base reset and tokens */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #fff; background: #000; line-height: 1.5; }

:root{
  --bg-dim: 1;           /* video at natural brightness */
  --text-primary: #ffffff;
  --text-muted: rgba(255,255,255,0.7);
  --accent: #c28b68;        /* chocolate accent */
  --header-bg: rgba(0,0,0,0.25);
  --header-border: rgba(255,255,255,0.12);
  --maxw: 1200px;
}
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

/* Hero as main video */
.hero{ position: relative; min-height: 100vh; }
#bg-video{ position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(var(--bg-dim)); }

/* Scrim disabled (video should be clean) */
.scrim{ display: none; }

/* Header / Nav */
.site-header{ position: fixed; top: 0; left: 0; right: 0; z-index: 10; backdrop-filter: none; background: transparent; }
.nav-wrap{ max-width: var(--maxw); margin: 0 auto; padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; background: transparent; border: none; border-radius: 0; }
.brand img{ display: block; height: 120px; width: auto; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }
.primary-nav ul{ list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; }
.primary-nav a{ position: relative; text-decoration: none; color: var(--text-primary); font-weight: 500; letter-spacing: 0.02em; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.primary-nav a::after{ content:""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0; background: currentColor; transition: width .25s ease; opacity: .85; }
.primary-nav a:hover::after, .primary-nav a:focus-visible::after{ width: 100%; }

/* Overlay headline hidden for now (we'll add small labels later) */
.headline{ display: none; }

/* Side vertical text */
.side-text{ display: none; }

/* Social icons */
.social{ position: fixed; left: 24px; bottom: 20px; display: flex; align-items: center; gap: 12px; z-index: 5; }
.icon{ display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: #ffffff; background: rgba(0,0,0,0.35); border: 1px solid rgba(255,255,255,0.14); border-radius: 50%; transition: transform .2s ease, background .2s ease, color .2s ease; }
.icon:hover{ transform: translateY(-2px); background: rgba(0,0,0,0.55); color: var(--accent); }

/* Accessibility helpers */
.sr-only{ position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Responsive */
@media (max-width: 900px){
  .nav-wrap{ padding: 14px 18px; }
  .brand img{ height: 88px; }
  .primary-nav ul{ gap: 18px; }
  .headline{ grid-auto-flow: row; text-align: center; }
}

@media (max-width: 560px){
  .side-text{ display: none; }
  .icon{ width: 32px; height: 32px; }
}

/* Sections (below video) */
.section{ position: relative; padding: 96px 24px; }
.section .container{ max-width: var(--maxw); margin: 0 auto; }
.section h2{ margin: 0 0 16px; font-size: clamp(24px, 4.5vw, 40px); font-weight: 600; }
.section p{ max-width: 800px; color: var(--text-muted); font-size: 18px; }
.section--light{ background: rgba(0,0,0,0.2); }
.section--dark{ background: rgba(0,0,0,0.35); }

/* Features list */
.features{ list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; padding: 0; margin: 24px 0 0; }
.features li{ background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 20px; }
.features h3{ margin: 0 0 8px; font-size: 18px; color: #fff; }
.features p{ margin: 0; color: var(--text-muted); font-size: 15px; }

/* Work grid */
.grid{ display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; margin-top: 16px; }
.card{ background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; height: 160px; display: grid; place-items: center; color: #fff; font-weight: 600; }

@media (max-width: 900px){
  .features, .grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px){
  .features, .grid{ grid-template-columns: 1fr; }
}

/* Panels (Portfolio/About/Contact) */
.panel{ position: fixed; inset: 0; background: rgba(0,0,0,0.82); color: #fff; display: none; z-index: 20; overflow: auto; }
.panel:target{ display: block; }
.panel-inner{ max-width: var(--maxw); margin: 96px auto 48px; padding: 0 24px; }
.panel h2{ margin: 0 0 16px; font-size: clamp(26px, 5vw, 44px); }
.panel p{ color: var(--text-muted); font-size: 18px; }

/* When panel is open, optionally lock scroll of page under it */
body:has(.panel:target){ overflow: hidden; }

/* Portfolio grid: square, edge-to-edge tiles */
.portfolio-grid{ display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.tile{ aspect-ratio: 1 / 1; overflow: hidden; }
.tile video{ width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 900px){
  .portfolio-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px){
  .portfolio-grid{ grid-template-columns: 1fr; }
}

/* Lightweight modals (About/Contact) */
.modal{ position: fixed; inset: 0; display: none; z-index: 30; }
.modal:target{ display: flex; align-items: center; justify-content: center; }
.modal-overlay{ position: absolute; inset: 0; background: rgba(0,0,0,0.18); backdrop-filter: blur(1.5px); }
.modal-card{ position: relative; z-index: 1; width: min(520px, 92vw); padding: 24px 24px; border-radius: 14px; background: rgba(15,15,16,0.9); color: #fff; border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 10px 30px rgba(0,0,0,0.4); }
.modal-card h2{ margin: 0 0 8px; font-size: clamp(22px, 4vw, 32px); }
.modal-card p{ margin: 0; color: var(--text-secondary); font-size: 16px; }
.modal-close{ position: absolute; top: 8px; right: 12px; font-size: 22px; text-decoration: none; color: #fff; opacity: .7; }
.modal-close:hover{ opacity: 1; }

/* Lock page scroll when a modal is open */
body:has(.modal:target){ overflow: hidden; }
