/* ================
   Grabbit Films Theme
   ================ */
:root {
  --brand-red: #e53935; /* legacy */
  --brand-accent: #E6B325; /* Primary Accent – Golden Amber */
  --brand-accent-2: #00A8E8; /* Secondary Accent – Teal Blue */
  --brand-error: #D72638; /* Error/Alert – Rich Red */
  --brand-ink: #111214;
  --brand-paper: #f5f7f9;
  --brand-muted: #8b9099;
  --radius: 14px;
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.25);
  --menu-surface: rgba(255, 255, 255, 0.98);

  /* Light defaults */
  --bg: #ffffff;
  --surface: rgba(255, 255, 255, 0.6);
  --text: #17181a;
  --text-soft: #4b4f56;
  --border: rgba(20, 20, 20, 0.08);
}

html[data-theme="dark"] {
  --bg: #0E0E0E; /* Primary Background */
  --surface: rgba(255, 255, 255, 0.06);
  --text: #F5F5F5; /* Body Text */
  --text-soft: #B3B3B3; /* Secondary Text */
  --border: rgba(255, 255, 255, 0.12);
  --menu-surface: rgba(14, 14, 14, 0.96);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Be Vietnam Pro", Inter, system-ui;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(230,179,37,0.10), transparent 50%),
    radial-gradient(1200px 800px at 100% 10%, rgba(0,168,232,0.10), transparent 50%),
    var(--bg);
  background-repeat: no-repeat, no-repeat, repeat;
  background-attachment: fixed, fixed, scroll;
  background-position: 5% -10%, 100% 0, 0 0;
  background-size: 1600px 1100px, 1600px 1100px, auto;
  line-height: 1.6;
}

[hidden] { display: none !important; }

img { max-width: 100%; display: block; }

.container { width: min(1160px, 92%); margin-inline: auto; }
.section { padding: 56px 0 72px; }
.section-title { margin: 28px 0 18px; font-size: 1.25rem; font-weight: 700; }
.page-title { font-family: "Be Vietnam Pro", Inter, system-ui; font-size: clamp(1.8rem, 1rem + 2.5vw, 2.6rem); margin: 8px 0 8px; }
.page-subtitle { margin: 0 0 20px; color: var(--text-soft); }
.display { font-family: "Be Vietnam Pro", Inter, system-ui; font-weight: 700; font-size: clamp(2.1rem, 1.2rem + 3.2vw, 3.2rem); margin: 0 0 8px; }
.lede { color: var(--text-soft); margin: 0 0 18px; }

/* Header/Nav */
.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(120%) blur(12px); background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent); }
html[data-theme="light"] .site-header { background: linear-gradient(to bottom, rgba(255,255,255,0.85), transparent); }

.nav-container { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand-text { font-weight: 700; letter-spacing: 0.2px; }

.nav { display: flex; gap: 18px; align-items: center; }
.nav a { color: var(--text-soft); text-decoration: none; padding: 8px 10px; border-radius: 10px; transition: color .2s, background .2s, border-color .2s; }
.nav a:hover { color: var(--text); background: rgba(230,179,37,0.08); }
.nav a.active { color: var(--text); background: linear-gradient(180deg, rgba(230,179,37,0.20), rgba(230,179,37,0.08)); border: 1px solid rgba(230,179,37,0.35); }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); color: var(--text); border-radius: 12px; padding: 8px 10px; cursor: pointer; }
.icon-button:hover { filter: brightness(1.06); }

/* Hamburger */
.hamburger { display: none; width: 42px; height: 38px; gap: 5px; justify-content: center; align-items: center; }
.hamburger span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; }

@media (max-width: 900px) {
  /* Sheet-style mobile menu, right aligned under header */
  .nav { position: absolute; top: 58px; right: 12px; left: auto; display: none; flex-direction: column; align-items: stretch; gap: 6px; padding: 10px; width: min(88vw, 360px); background: var(--menu-surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 18px 36px rgba(0,0,0,.35); }
  .nav a { color: var(--text); background: transparent; }
  .nav.open { display: flex; }
  .hamburger { display: inline-flex; }
}

/* Hero */
.hero { padding: 54px 0 36px; }
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 22px; padding: 24px; align-items: center; }
.hero-art img { border-radius: var(--radius); height: 100%; object-fit: cover; object-position: center; }
.hero-content { padding: 12px; }
.cta-row { display: flex; gap: 12px; }

/* Buttons */
.button { display: inline-block; padding: 10px 16px; border-radius: 12px; text-decoration: none; font-weight: 600; border: 1px solid var(--border); }
.button.primary { background: linear-gradient(180deg, rgba(230,179,37,0.92), rgba(230,179,37,0.78)); color: #0E0E0E; border: 1px solid rgba(230,179,37,0.9); box-shadow: 0 10px 22px rgba(230,179,37,0.28); }
.button.ghost { background: rgba(0,168,232,0.10); color: #00A8E8; border: 1px solid rgba(0,168,232,0.35); }

/* Cards / Glass */
.glass { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); backdrop-filter: blur(12px) saturate(115%); box-shadow: var(--shadow-sm); }
.card { padding: 18px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cards-gap { gap: 18px; }

@media (max-width: 1200px) { .grid-5 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-5 { grid-template-columns: repeat(2, 1fr); } .hero-inner { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .container { width: 100%; padding-left: 16px; padding-right: 16px; } }
@media (max-width: 520px) { .grid-5 { grid-template-columns: 1fr; } }

/* Project cards */
.project-card { overflow: hidden; display: flex; flex-direction: column; }
.project-card img { aspect-ratio: 16/9; object-fit: cover; object-position: center; }
.project-body { padding: 14px 14px 16px; }
.link { color: var(--brand-accent); text-decoration: none; font-weight: 600; }
.link:hover { text-decoration: underline; }
.badge { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 4px 8px; border-radius: 999px; color: #0E0E0E; background: linear-gradient(180deg, rgba(230,179,37,.95), rgba(230,179,37,.75)); margin-bottom: 6px; }
.project-meta { margin: 6px 0; color: var(--text-soft); }
.project-actions { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }

/* Projects tabs */
.projects-header { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
/* Segmented tabs (Projects / About) — larger touch-friendly style */
.projects-tabs { position: relative; display: inline-flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; box-shadow: var(--shadow-sm); }
.projects-tab { position: relative; appearance: none; background: transparent; border: 0; color: var(--text-soft); padding: 7px 14px; border-radius: 8px; cursor: pointer; font-weight: 800; z-index: 1; min-width: 80px; font-size: clamp(0.9rem, 0.7rem + 0.4vw, 1.1rem); letter-spacing: 0.2px; }
.projects-tab:hover { color: var(--text); }
.projects-tab.is-active { color: var(--text); }
.projects-thumb { position: absolute; top: 4px; bottom: 4px; left: 4px; width: 80px; border-radius: 8px; background: linear-gradient(180deg, rgba(230,179,37,0.95), rgba(230,179,37,0.85)); border: 1px solid rgba(0,0,0,0.2); box-shadow: 0 2px 8px rgba(0,0,0,0.15); transition: transform .28s cubic-bezier(.2,.8,.2,1), width .28s cubic-bezier(.2,.8,.2,1); }
.projects-title { margin: 0; color: var(--text); letter-spacing: 1px; }
/* Provide spacing under tabs when used standalone (About page) */
.projects-tabs { margin-bottom: 14px; }
.projects-header .projects-tabs { margin-bottom: 0; }

/* Hover overlay cards for Projects */
.portfolio-grid { margin-top: 10px; }
.project-card { position: relative; overflow: hidden; border-radius: var(--radius); }
.project-card img { aspect-ratio: 4/3; object-fit: contain; object-position: center; display: block; width: 100%; height: auto; }
.project-card .hover-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; padding: 16px; text-align: center; color: #0E0E0E; background: rgba(230,179,37,0.92); opacity: 0; transition: opacity .25s ease; }
.project-card:hover .hover-overlay { opacity: 1; }
.project-card .hover-overlay h3 { margin: 0; font-weight: 800; }
.project-card .hover-overlay p { margin: 0; color: #0E0E0E; }

/* Video modal */
.video-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.72); display: none; align-items: center; justify-content: center; z-index: 50; }
.video-modal.open { display: flex; }
.video-frame-wrap { width: min(960px, 92%); aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.6); border: 1px solid var(--border); }
.video-close { position: absolute; top: 18px; right: 18px; background: rgba(0,168,232,0.10); border: 1px solid rgba(0,168,232,0.35); color: #00A8E8; border-radius: 10px; padding: 8px 10px; cursor: pointer; }

/* Info modal (Team details) */
.info-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.72); display: none; align-items: center; justify-content: center; z-index: 60; padding: 12px; overflow-y: auto; }
.info-modal.open { display: flex; }
.info-content { width: min(860px, 92%); max-height: calc(100vh - 48px); background: var(--bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.6); display: grid; grid-template-columns: 1fr 1.2fr; gap: 0; }
.info-image-wrap { background: #000; }
.info-image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.info-body { padding: 18px; overflow-y: auto; }
.info-body h3 { margin: 0 0 10px; }
.info-close { position: absolute; top: 18px; right: 18px; background: rgba(230,179,37,0.10); border: 1px solid rgba(230,179,37,0.35); color: var(--text); border-radius: 10px; padding: 8px 10px; cursor: pointer; }

@media (max-width: 900px) {
  .info-content { grid-template-columns: 1fr; max-height: calc(100vh - 48px); }
  .info-image-wrap { max-height: 42vh; }
}

/* Thumb cards (Explore) */
.thumb-card { padding: 10px; overflow: hidden; }
.thumb-card img { border-radius: 10px; margin-bottom: 10px; aspect-ratio: 3/4; object-fit: cover; object-position: center; }
.thumb-card h4 { margin: 2px 0 6px; }
.thumb-card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }

/* Table (removed — not used) */

/* Forms */
.contact-form { padding: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
label span { display: block; font-weight: 600; margin-bottom: 6px; }
input, textarea { width: 100%; padding: 12px 12px; border-radius: 12px; border: 1px solid var(--border); background: rgba(255,255,255,0.04); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--text-soft); }
.form-note { color: var(--text-soft); font-size: 0.9rem; }

/* Form validation styles */
.error-message { 
  display: none; 
  color: var(--brand-error); 
  font-size: 0.85rem; 
  margin-top: 4px; 
  font-weight: 500; 
}

/* Only show red border when there's an actual error message */
input.error, textarea.error { 
  border-color: var(--brand-error); 
}

input:focus, textarea:focus { 
  outline: none; 
  border-color: var(--brand-accent); 
  box-shadow: 0 0 0 2px rgba(230,179,37,0.2); 
}

/* Form status messages */
#form-status { 
  margin-top: 12px; 
  padding: 8px 12px; 
  border-radius: 8px; 
  font-weight: 500; 
}

#form-status.success { 
  background: rgba(0,255,0,0.1); 
  color: #00aa00; 
  border: 1px solid rgba(0,255,0,0.3); 
}

#form-status.error { 
  background: rgba(215,38,56,0.1); 
  color: var(--brand-error); 
  border: 1px solid rgba(215,38,56,0.3); 
}

#form-status.info { 
  background: rgba(0,168,232,0.1); 
  color: var(--brand-accent-2); 
  border: 1px solid rgba(0,168,232,0.3); 
}

/* Submit button states */
.button:disabled { 
  opacity: 0.6; 
  cursor: not-allowed; 
}

/* Contact info block */
.contact-info { padding: 16px 18px; margin-top: 18px; }
.contact-info h3 { margin: 4px 0 8px; }
.contact-info p { margin: 6px 0; color: var(--text-soft); }

/* Prose */
.prose { padding: 16px 18px; }
.prose ul { margin: 0; padding-left: 18px; }

/* Footer */
.site-footer { padding: 28px 0; opacity: 0.95; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.footer-nav { display: flex; gap: 14px; }
.footer-nav a { color: var(--text-soft); text-decoration: none; padding: 6px 8px; border-radius: 10px; }
.footer-nav a:hover { color: var(--text); background: rgba(230,179,37,0.08); }

@media (max-width: 760px) {
  .footer-inner { flex-direction: column; gap: 10px; align-items: center; text-align: center; }
  .footer-nav { flex-wrap: wrap; justify-content: center; gap: 10px 16px; }
}

/* Leadership (removed — not used) */

/* Utility */
.hero .glass { background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03)); }
.footer-inner .copyright { color: var(--text-soft); }

/* =========================
   Home (index.html) — Landing video layout
   Moved from inline <style> in index.html
   ========================= */

/* Misc Projects list (left image, right title) */
.misc-list { padding: 8px; }
.misc-item { display: grid; grid-template-columns: 56px 1fr; align-items: center; gap: 12px; padding: 10px; border-bottom: 1px solid var(--border); }
.misc-item:last-child { border-bottom: 0; }
.misc-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.misc-item span { font-weight: 700; }

/* Page scope */
.home * { margin: 0; padding: 0; box-sizing: border-box; }
.home { font-family: "Be Vietnam Pro", Inter, system-ui; overflow-x: hidden; }

/* Container */
#home-landing { position: relative; height: 100vh; width: 100%; }

/* Video Background */
#home-landing .video-background { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
#home-landing .video-background video { width: 100%; height: 100%; object-fit: cover; }
#home-landing .video-background img { width: 100%; height: 100%; object-fit: cover; }

/* Overlay for better text readability */
#home-landing .overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%); z-index: 1; }

/* Container for logo and navigation - grouped together */
#home-landing .header-nav-container {
    position: absolute;
    left: 50px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    padding-top: env(safe-area-inset-top);
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Header with logo - now relative positioning */
#home-landing .header { 
    position: relative; 
    margin-bottom: 80px; /* Space between logo and nav */
}
#home-landing .logo { color: white; font-size: 24px; font-weight: bold; letter-spacing: 2px; }
#home-landing .logo-subtitle { font-size: 12px; letter-spacing: 4px; margin-top: -5px; opacity: 0.8; }
/* Responsive logo image sizing */
#home-landing .logo img { display: block; width: clamp(100px, 20vw, 170px); height: auto; border-radius: 20px; opacity: 0.7;}

/* Navigation Menu - now relative positioning */
#home-landing .nav-menu { position: relative; }
#home-landing .nav-item { display: block; color: white; font-size: clamp(1.5rem, 7vw, 3rem); font-weight: 900; line-height: 0.95; text-decoration: none; margin-bottom: 10px; padding: 8px 2px; transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); cursor: pointer; position: relative; }
#home-landing .nav-item:focus-visible { outline: 3px solid rgba(255,255,255,0.85); outline-offset: 2px; border-radius: 6px; }
#home-landing .nav-item:hover { color: #f0f0f0; transform: translateX(20px); text-shadow: 4px 4px 8px rgba(0,0,0,0.5); }
#home-landing .nav-item::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 3px; background: linear-gradient(90deg, var(--brand-accent), var(--brand-accent-2)); transition: width 0.3s ease; }
#home-landing .nav-item:hover::after { width: 100%; }

/* Mobile responsiveness */
@media (max-width: 768px) {
  #home-landing .header-nav-container { left: 20px; }
  #home-landing .header { margin-bottom: 80px; }
  #home-landing .logo img { width: clamp(110px, 28vw, 200px); }
  #home-landing .nav-item { margin-bottom: 5px; }
  #home-landing .logo { font-size: 20px; }
  #home-landing .logo-subtitle { font-size: 10px; }
}

@media (max-width: 480px) {
  #home-landing .header { margin-bottom: 80px; }
  #home-landing .nav-item { line-height: 1; }
}

/* Touch devices: avoid jumpy hover transforms */
@media (hover: none) {
  #home-landing .nav-item:hover { transform: none; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  #home-landing .nav-item { transition: none; }
}

/* Loading animation */
.home .loading { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: #000; z-index: 1000; display: flex; justify-content: center; align-items: center; opacity: 1; transition: opacity 0.5s ease; }
.home .loading.fade-out { opacity: 0; pointer-events: none; }
.home .loading-image { max-width: 300px; max-height: 300px; opacity: 0.8; }