/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
  --bg-primary: #0B0B0B;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-elevated: #1C1C1C;

  --text-primary: #F2EDE8;
  --text-secondary: #9A948E;
  --text-muted: #6B6660;

  --accent: #C4986A;
  --accent-hover: #D4A87A;
  --accent-muted: rgba(196, 152, 106, 0.12);

  --border: rgba(242, 237, 232, 0.07);
  --border-strong: rgba(242, 237, 232, 0.12);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-16: 128px;

  --max-width: 1280px;

  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --header-height: 64px;
}


/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input, select, textarea, button {
  font: inherit;
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}


/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
}

p {
  max-width: 65ch;
}


/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}


/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-full);
  padding: 12px 24px;
  white-space: nowrap;
  transition: all var(--transition-base);
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  border-color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}


/* ==========================================================================
   Header & Navigation
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  transition: background var(--transition-base), border-color var(--transition-base);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.nav-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.nav-brand-name {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  max-width: 180px;
  line-height: 1.25;
}

/* Mobile menu */
.nav-menu {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  padding: var(--space-4) var(--space-3);
  transform: translateY(-110%);
  opacity: 0;
  visibility: hidden;
  transition: transform var(--transition-base), opacity var(--transition-base), visibility var(--transition-base);
  z-index: 99;
}

.nav-menu.open {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.nav-link {
  display: block;
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-cta {
  display: none;
}

.nav-cta-mobile {
  margin-top: var(--space-3);
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  padding: 0;
  margin-left: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all var(--transition-base);
  transform-origin: center;
}

.nav-toggle.active .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle.active .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(11, 11, 11, 0.97) 0%,
    rgba(11, 11, 11, 0.88) 35%,
    rgba(11, 11, 11, 0.72) 65%,
    rgba(11, 11, 11, 0.58) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: calc(var(--header-height) + var(--space-5));
  padding-bottom: var(--space-5);
}

.hero-text {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.hero h1 {
  margin-bottom: var(--space-3);
}

.hero-subtitle {
  color: rgba(242, 237, 232, 0.75);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  margin-bottom: var(--space-5);
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.trust-item svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.trust-divider {
  width: 1px;
  height: 16px;
  background: rgba(242, 237, 232, 0.15);
}


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

.section {
  padding: var(--space-10) 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

.section-header h2 {
  margin-bottom: var(--space-2);
}

.section-desc {
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto;
  font-size: 0.9375rem;
}


/* ==========================================================================
   Carousel & Pagination (mobile-first)
   ========================================================================== */

.carousel {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-1);
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel > .carousel-item {
  flex: 0 0 85%;
  scroll-snap-align: start;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: var(--space-4);
}

.pagination-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--border-strong);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all var(--transition-base);
  min-width: 8px;
  min-height: 8px;
}

.pagination-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}


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

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: border-color var(--transition-base);
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.service-card h3 {
  margin-bottom: var(--space-1);
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.65;
}


/* ==========================================================================
   Works / Portfolio
   ========================================================================== */

.work-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin: 0;
}

.work-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.work-card figcaption {
  padding: var(--space-2) var(--space-3);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}


/* ==========================================================================
   About
   ========================================================================== */

.about-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

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

.about-content .section-label {
  text-align: left;
}

.about-content h2 {
  margin-bottom: var(--space-3);
}

.about-content p {
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  line-height: 1.7;
}

.about-content p:last-of-type {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}


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

.contact-layout {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.contact-item {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-3);
  transition: border-color var(--transition-base), transform var(--transition-base);
}

.contact-item:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--accent-muted);
  color: var(--accent);
}

.contact-item h3 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.4;
}

.contact-item p,
.contact-item a {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color var(--transition-fast);
}

.contact-item a:hover {
  color: var(--accent);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-1);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%2212%22%20viewBox%3D%220%200%2012%2012%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3%204.5L6%207.5L9%204.5%22%20stroke%3D%22%239A948E%22%20stroke-width%3D%221.5%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 48px;
}

.form-group select option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

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

.form-success {
  text-align: center;
  padding: var(--space-4);
  color: var(--accent);
  font-weight: 500;
}


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

.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-8) 0 var(--space-4);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid var(--border);
  text-align: center;
  align-items: center;
}

.footer-brand a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-2);
}

.footer-brand-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: 320px;
  line-height: 1.6;
}

.footer-nav h4,
.footer-contact h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.footer-nav li,
.footer-contact li {
  margin-bottom: var(--space-1);
}

.footer-nav a,
.footer-contact a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-nav a:hover,
.footer-contact a:hover {
  color: var(--accent);
}

.footer-contact li {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-bottom {
  padding-top: var(--space-4);
  text-align: center;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.8125rem;
  max-width: none;
}


/* ==========================================================================
   Reveal Animations
   ========================================================================== */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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


/* ==========================================================================
   Tablet (min-width: 768px)
   ========================================================================== */

@media (min-width: 768px) {

  :root {
    --header-height: 72px;
  }

  .container {
    padding: 0 var(--space-5);
  }

  .section {
    padding: var(--space-12) 0;
  }

  .section-header {
    margin-bottom: var(--space-8);
  }

  /* Carousel → Grid */
  .carousel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    overflow: visible;
    scroll-snap-type: none;
  }

  .carousel > .carousel-item {
    flex: none;
    width: auto;
  }

  .pagination {
    display: none;
  }

  /* About */
  .about-layout {
    flex-direction: row;
    align-items: center;
    gap: var(--space-8);
  }

  .about-image {
    flex: 0 0 45%;
  }

  .about-content {
    flex: 1;
  }

  /* Contact */
  .contact-layout {
    flex-direction: row;
    gap: var(--space-8);
  }

  .contact-info {
    flex: 0 0 38%;
  }

  .contact-form {
    flex: 1;
    padding: var(--space-5);
  }

  /* Footer */
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
  }

  .footer-brand {
    flex: 0 0 40%;
  }

  .footer-brand a {
    align-items: flex-start;
  }
}


/* ==========================================================================
   Desktop (min-width: 1024px)
   ========================================================================== */

@media (min-width: 1024px) {

  :root {
    --header-height: 80px;
  }

  .container {
    padding: 0 var(--space-6);
  }

  .section {
    padding: var(--space-16) 0;
  }

  /* Navigation inline */
  .nav-menu {
    position: static;
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
  }

  .nav-links {
    flex-direction: row;
    gap: var(--space-4);
  }

  .nav-link {
    font-size: 0.875rem;
    padding: 8px 0;
    position: relative;
  }

  .nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-base);
  }

  .nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }

  .nav-cta {
    display: inline-flex;
    flex-shrink: 0;
  }

  .nav-cta-mobile {
    display: none;
  }

  .nav-brand-name {
    display: none;
  }

  .nav-toggle {
    display: none;
  }

  /* Hero */
  .hero {
    align-items: center;
  }

  .hero-overlay {
    background: linear-gradient(
      to right,
      rgba(11, 11, 11, 0.95) 0%,
      rgba(11, 11, 11, 0.82) 40%,
      rgba(11, 11, 11, 0.58) 70%,
      rgba(11, 11, 11, 0.45) 100%
    );
  }

  .hero-content {
    padding-top: 0;
    padding-bottom: 0;
  }

  .hero-text {
    margin: 0;
    text-align: left;
  }

  .hero-actions,
  .hero-trust {
    justify-content: flex-start;
  }

  .hero-media img {
    object-position: 70% center;
  }

  /* Grid 3-col */
  .carousel {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
  }

  /* Service card hover */
  .service-card:hover {
    border-color: var(--border-strong);
  }

  /* Work card hover */
  .work-card:hover .work-image img {
    transform: scale(1.03);
  }

  /* Contact form */
  .contact-form {
    padding: var(--space-6);
  }
}
