/* ============================================
   Beachhead Studios — Stylesheet
   Dark Grayscale Luxury design system
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #0A0A0A;
  --surface: #1A1A1A;
  --alt: #0F0F0F;
  --white: #FFFFFF;
  --muted: rgba(255,255,255,0.6);
  --subtle: rgba(255,255,255,0.4);
  --border: rgba(255,255,255,0.1);
  --whatsapp: #16A34A;
  --max-width: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; }

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

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Focus visibility for accessibility */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

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

/* ============ NAVBAR ============ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(10,10,10,0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  letter-spacing: 0.05em;
  color: var(--white);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.25s ease;
  position: relative;
  padding: 6px 0;
}

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

.nav-links .has-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 200px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform-origin: top center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 200;
}

.has-dropdown.open .dropdown-panel {
  opacity: 1;
  visibility: visible;
}

.dropdown-panel a {
  display: block;
  padding: 10px 22px;
  font-size: 11px;
}

.dropdown-panel a:hover { background: rgba(255,255,255,0.04); }

.menu-toggle {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 6px;
}

.mobile-panel {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-top: 1px solid var(--border);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.mobile-panel.open {
  max-height: 1000px;
}

.mobile-panel a {
  padding: 16px 24px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.mobile-panel a.sub {
  padding-left: 40px;
  font-size: 11px;
  color: var(--subtle);
}

@media (min-width: 900px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }
  .mobile-panel { max-height: 0 !important; overflow: hidden; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: #0A0A0A;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 16px 32px;
  border: none;
  cursor: pointer;
  transition: background 0.25s ease;
}

.btn:hover { background: rgba(255,255,255,0.9); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--white); }

/* ============ HERO (page banners) ============ */
.page-hero {
  position: relative;
  height: 46vh;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.page-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}

.page-hero-content {
  position: relative;
  z-index: 1;
  padding: 0 24px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 14px;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.rating-badge .stars { color: var(--white); display: flex; gap: 2px; }

.page-hero h1 {
  font-size: clamp(36px, 6vw, 56px);
  color: var(--white);
}

/* ============ HOME HERO SLIDESHOW ============ */
.home-hero {
  position: relative;
  height: 100vh;
  min-height: 560px;
  overflow: hidden;
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.home-hero-slide.active { opacity: 1; }

.home-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.75) 100%);
}

.home-hero-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}

.home-hero-content h1 {
  font-size: clamp(40px, 8vw, 88px);
  color: var(--white);
  margin-bottom: 18px;
}

.home-hero-content .tagline {
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 36px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-dots {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.25s ease, transform 0.25s ease;
}

.hero-dot.active {
  background: var(--white);
  transform: scale(1.3);
}

/* ============ SECTIONS ============ */
section { padding: 96px 0; }
.section-alt { background: var(--alt); }

.section-heading {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-heading h2 {
  font-size: clamp(28px, 4vw, 34px);
  margin-bottom: 18px;
}

.section-heading p { color: var(--muted); font-size: 15px; }

/* ============ HOME PORTFOLIO GRID ============ */
.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 700px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid-3 { grid-template-columns: 1fr 1fr 1fr; } }

.portfolio-card {
  position: relative;
  height: 340px;
  overflow: hidden;
  display: block;
}

.portfolio-card img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-card:hover img { transform: scale(1.06); }

.portfolio-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.65) 100%);
}

.portfolio-card-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.portfolio-card-label h3 {
  font-size: 24px;
  color: var(--white);
  margin-bottom: 6px;
}

.portfolio-card-label span {
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--subtle);
}

.view-all {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.view-all a {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
  transition: border-color 0.25s ease;
}

.view-all a:hover { border-color: var(--white); }

/* ============ TWO COLUMN ============ */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .two-col { grid-template-columns: 1fr 1fr; gap: 72px; }
  .two-col.reverse .two-col-image { order: 2; }
  .two-col.reverse .two-col-text { order: 1; }
}

.two-col-image img { width: 100%; height: 100%; object-fit: cover; }

.two-col-text h2 { font-size: 30px; margin-bottom: 22px; }
.two-col-text p { color: var(--muted); font-size: 15px; }

/* ============ STATS ============ */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: center;
}

@media (min-width: 700px) { .stats-bar { grid-template-columns: repeat(4, 1fr); } }

.stat-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 36px;
  color: var(--white);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}

/* ============ EQUIPMENT ============ */
.equip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 700px) { .equip-grid { grid-template-columns: 1fr 1fr; } }

.equip-card { background: var(--surface); padding: 36px; }

.equip-card h3 {
  font-size: 13px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 16px;
}

.equip-card ul { list-style: none; padding: 0; margin: 0; }
.equip-card li {
  font-size: 15px;
  color: var(--white);
  padding: 8px 0;
  border-top: 1px solid var(--border);
}
.equip-card li:first-child { border-top: none; }

/* ============ SERVICES ============ */
.service-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--border);
}

.service-row:last-child { border-bottom: none; }

@media (min-width: 900px) {
  .service-row { grid-template-columns: 1fr 1fr; gap: 72px; }
  .service-row.reverse .service-image { order: 2; }
  .service-row.reverse .service-text { order: 1; }
}

.service-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }

.service-text .num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 14px;
  color: var(--subtle);
  margin-bottom: 14px;
  display: block;
}

.service-text h2 { font-size: 28px; margin-bottom: 16px; }
.service-text p { color: var(--muted); font-size: 15px; }

/* ============ PROCESS TIMELINE ============ */
.process-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 700px) { .process-grid { grid-template-columns: repeat(4, 1fr); } }

.process-step { position: relative; padding-top: 24px; border-top: 1px solid var(--border); }
.process-step .step-num {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 28px;
  color: var(--subtle);
  display: block;
  margin-bottom: 14px;
}
.process-step h3 { font-size: 16px; margin-bottom: 10px; }
.process-step p { color: var(--muted); font-size: 14px; margin: 0; }

/* ============ PORTFOLIO CATEGORY NAV ============ */
.cat-nav {
  position: sticky;
  top: 76px;
  z-index: 50;
  background: rgba(10,10,10,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.cat-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 32px;
  white-space: nowrap;
}

.cat-nav a {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--subtle);
  padding: 20px 0;
  border-bottom: 2px solid transparent;
}

.cat-nav a:hover { color: var(--muted); }
.cat-nav a.active { color: var(--white); border-bottom-color: var(--white); }

.portfolio-meta {
  text-align: center;
  padding: 56px 24px 24px;
}

.portfolio-meta h1 { font-size: clamp(32px, 5vw, 48px); margin-bottom: 10px; }
.portfolio-meta p { color: var(--subtle); font-size: 13px; letter-spacing: 0.08em; }

/* ============ MASONRY GALLERY ============ */
.masonry {
  column-count: 1;
  column-gap: 16px;
}

@media (min-width: 700px) { .masonry { column-count: 2; } }
@media (min-width: 1100px) { .masonry { column-count: 3; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  overflow: hidden;
  cursor: pointer;
}

.masonry-item img {
  width: 100%;
  transition: transform 0.5s ease;
}

.masonry-item:hover img { transform: scale(1.05); }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  display: none;
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 12px;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { opacity: 1; }

.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }

@media (min-width: 700px) {
  .lightbox-prev { left: 28px; }
  .lightbox-next { right: 28px; }
}

/* ============ CONTACT ============ */
.contact-info {
  max-width: 640px;
  margin: 0 auto;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}

.contact-row:last-child { border-bottom: none; }

.contact-icon {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-row .label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 4px;
}

.contact-row .value { font-size: 17px; color: var(--white); }
.contact-row a.value:hover { color: var(--muted); }

/* ============ WHATSAPP BUTTON ============ */
.whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: transform 0.25s ease;
}

.whatsapp-btn:hover { transform: scale(1.08); }

/* ============ FOOTER ============ */
footer {
  background: var(--alt);
  border-top: 1px solid var(--border);
  padding: 72px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-bottom: 56px;
}

@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; } }

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 20px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
}

.footer-col .logo { display: block; margin-bottom: 14px; }
.footer-col p { color: var(--subtle); font-size: 14px; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: var(--muted); font-size: 14px; }
.footer-links a:hover { color: var(--white); }

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

/* ============================================
   CHAT WIDGET
   ============================================ */
.chat-launcher {
  position: fixed;
  bottom: 28px;
  left: 28px;
  z-index: 90;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--white);
  color: #0A0A0A;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  transition: transform 0.25s ease;
}

.chat-launcher:hover { transform: scale(1.08); }

.chat-launcher .badge-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--whatsapp);
  border: 2px solid var(--bg);
}

.chat-panel {
  position: fixed;
  bottom: 98px;
  left: 28px;
  z-index: 91;
  width: 330px;
  max-width: calc(100vw - 40px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: var(--surface);
  border: 1px solid var(--border);
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.chat-panel.open { display: flex; }

.chat-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-title { font-family: 'Playfair Display', Georgia, serif; font-size: 16px; }
.chat-header-sub { font-size: 11px; color: var(--subtle); letter-spacing: 0.05em; margin-top: 2px; }
.chat-close { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  font-size: 13.5px;
  line-height: 1.5;
  max-width: 88%;
  padding: 10px 14px;
}

.chat-msg.bot {
  background: var(--alt);
  border: 1px solid var(--border);
  align-self: flex-start;
  border-radius: 2px 12px 12px 12px;
}

.chat-msg.user {
  background: var(--white);
  color: #0A0A0A;
  align-self: flex-end;
  border-radius: 12px 2px 12px 12px;
}

.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.chat-quick-replies button {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  padding: 7px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.chat-quick-replies button:hover { border-color: var(--white); color: var(--white); }

.chat-input-row {
  border-top: 1px solid var(--border);
  padding: 12px;
  display: flex;
  gap: 8px;
}

.chat-input-row input {
  flex: 1;
  background: var(--alt);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 10px 12px;
}

.chat-input-row input:focus { outline: none; border-color: rgba(255,255,255,0.3); }

.chat-input-row button {
  background: var(--white);
  border: none;
  color: #0A0A0A;
  padding: 0 16px;
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ============ UTILITIES ============ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
