/* ========================================
   ZLAB Studio — Styles (harrygeorge-inspired)
   ======================================== */

:root {
  --bg: #1a1a1a;
  --bg-elevated: #222222;
  --bg-card: #1e1e1e;
  --text: #d4d4d4;
  --text-muted: #777777;
  --accent: #d4d4d4;
  --border: #2a2a2a;
  --white: #ffffff;
  --font-body: 'General Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'General Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-height: 56px;
  --page-pad: clamp(24px, 4vw, 80px);
  --content-max: 1440px;
}

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

::selection {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* ========================================
   Preloader
   ======================================== */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

#preloader.done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-logo {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--white);
  animation: preloaderPulse 1.5s ease-in-out infinite;
}

.preloader-bar {
  width: 120px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.preloader-fill {
  width: 0%;
  height: 100%;
  background: var(--white);
  border-radius: 2px;
  animation: preloaderFill 2.5s var(--ease) forwards;
}

@keyframes preloaderPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

@keyframes preloaderFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ========================================
   Navigation
   ======================================== */

#navbar {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: var(--content-max);
  padding: 0 24px;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}

#navbar.scrolled {
  background: rgba(26, 26, 26, 0.95);
  border-color: #333;
}

.nav-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: var(--white);
}

.accent {
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 32px;
}

.nav-links a {
  font-size: 0.813rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.3s;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--white);
}

.nav-sep {
  color: var(--border);
  font-size: 0.75rem;
  user-select: none;
}

.nav-right {
  margin-left: auto;
}

/* Outline button (main CTA style) */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: transparent;
  color: var(--white);
  font-size: 0.813rem;
  font-weight: 500;
  font-family: var(--font-body);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.3s, background 0.3s, transform 0.3s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.btn-outline:hover {
  border-color: #555;
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(-1px);
}

.btn-arrow {
  font-size: 0.875rem;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.3s;
}

.btn-outline:hover .btn-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.btn-large {
  padding: 12px 28px;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 80px;
  left: 16px;
  right: 16px;
  z-index: 999;
  background: var(--bg-elevated);
  padding: 32px;
  display: none;
  flex-direction: column;
  gap: 24px;
  transform: translateY(-20px);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.mobile-menu.open {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.mobile-link {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}

.mobile-link:hover {
  color: var(--white);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.menu-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

/* ========================================
   Hero
   ======================================== */

#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-height) + 48px) var(--page-pad) 60px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.hero-top {
  max-width: 700px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

.hero-title .word {
  display: inline-block;
  margin-right: 0.2em;
}

.accent-word {
  color: var(--text-muted);
  font-weight: 300;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
}

.hero-left {
}

.hero-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.875rem;
}

.status-label {
  color: var(--text-muted);
  font-size: 0.813rem;
}

.status-time {
  color: var(--white);
  font-weight: 600;
  font-size: 0.875rem;
}

.hero-desc {
  font-size: 0.938rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 440px;
  margin-bottom: 28px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.hero-case {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-case-image {
  border-radius: 12px;
  overflow: hidden;
}

.hero-case-image .case-placeholder {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: transform 0.6s var(--ease);
}

.hero-case:hover .case-placeholder {
  transform: scale(1.03);
}

.placeholder-icon {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.12);
  letter-spacing: 0.1em;
}

.hero-case-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.35;
}

.hero-case-desc {
  font-size: 0.813rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.813rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}

.case-link:hover {
  color: var(--white);
}

.case-link .btn-arrow {
  font-size: 0.75rem;
}

/* ========================================
   Sections Common
   ======================================== */

section {
  padding: 100px var(--page-pad);
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 48px;
}

.section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--white);
}

.section-title em {
  font-style: normal;
  color: var(--text-muted);
  font-weight: 300;
}

/* ========================================
   Case Studies (More Work)
   ======================================== */

#work {
  border-top: 1px solid var(--border);
}

.cases-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.case-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.case-image {
  border-radius: 12px;
  overflow: hidden;
}

.case-image .case-placeholder {
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: transform 0.6s var(--ease);
}

.case-card:hover .case-placeholder {
  transform: scale(1.03);
}

.case-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-tag {
  font-size: 0.688rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.case-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--white);
  line-height: 1.35;
}

.case-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ========================================
   Approach
   ======================================== */

#approach {
  border-top: 1px solid var(--border);
  padding-bottom: 60px;
}

.approach-hero {
  margin-bottom: 80px;
}

.approach-big-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--white);
  max-width: 1100px;
}

.approach-big-text em {
  font-style: normal;
  color: var(--text-muted);
  font-weight: 300;
}

.approach-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.approach-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
}

.approach-left .btn-outline {
  margin-top: 12px;
}

/* ========================================
   Accordion / Services
   ======================================== */

.accordion {
  border-top: 1px solid var(--border);
}

.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 1rem;
  transition: color 0.3s;
}

.accordion-trigger:hover {
  color: var(--white);
}

.accordion-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  text-align: left;
}

.accordion-icon {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.4s var(--ease);
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s var(--ease), padding 0.5s var(--ease);
}

.accordion-item.active .accordion-content {
  max-height: 200px;
}

.accordion-content p {
  padding: 0 0 20px 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.7;
}

/* ========================================
   Logo Wall / Tech Stack
   ======================================== */

#stack {
  border-top: 1px solid var(--border);
}

.logo-wall {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.logo-item {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.05em;
  opacity: 0.5;
  transition: opacity 0.3s;
}

.logo-item:hover {
  opacity: 1;
}

/* ========================================
   Contact Section
   ======================================== */

#contact {
  border-top: 1px solid var(--border);
  text-align: center;
}

.contact-content {
  max-width: 600px;
  margin: 0 auto;
}

.contact-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 16px 0 32px;
}

/* ========================================
   Modal
   ======================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  width: 100%;
  max-width: 560px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  position: relative;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.4s var(--ease);
}

.modal-overlay.open .modal-content {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: color 0.3s;
  line-height: 1;
}

.modal-close:hover {
  color: var(--white);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.req {
  color: var(--text-muted);
  opacity: 0.5;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #555;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23777' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ========================================
   Footer
   ======================================== */

#footer {
  border-top: 1px solid var(--border);
  padding: 60px var(--page-pad) 40px;
  max-width: var(--content-max);
  margin: 0 auto;
  overflow: hidden;
}

.footer-inner {
  width: 100%;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 80px;
  gap: 40px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
}

.footer-hours {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.813rem;
  color: var(--text-muted);
}

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  font-size: 0.813rem;
  color: var(--text-muted);
}

.footer-watermark {
  position: relative;
  width: 100%;
  text-align: center;
  margin-bottom: 40px;
}

.footer-watermark span {
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 18rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--border);
  line-height: 1;
  user-select: none;
}

.footer-bottom {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ========================================
   Scroll Reveal (CSS-based)
   ======================================== */

.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal.reveal-delay-1 { transition-delay: 0.1s; }
.reveal.reveal-delay-2 { transition-delay: 0.2s; }
.reveal.reveal-delay-3 { transition-delay: 0.3s; }

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 960px) {
  .nav-links {
    display: none;
  }

  .nav-right {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-right {
    grid-template-columns: 1fr 1fr;
  }

  .cases-grid {
    grid-template-columns: 1fr;
  }

  .approach-split {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 1.75rem;
  }

  section {
    padding: 64px 20px;
  }

  .hero-right {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 28px 20px;
  }

  .footer-top {
    flex-direction: column;
  }

  .footer-right {
    align-items: flex-start;
  }

  .hero-actions {
    flex-direction: column;
  }

  .logo-wall {
    justify-content: center;
  }

  .footer-watermark span {
    font-size: 4rem;
  }
}
