:root {
  --bg: #1a1a1a;
  --surface: #0f0f0f;
  --surface-light: #2a2a2a;
  --text: #ffffff;
  --muted: #cccccc;
  --brand: #ffd700;
  --brand-dark: #e6c200;
  --brand-light: #ffed4e;
  --border: #333333;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* Screen reader only - visually hidden but accessible to assistive technologies */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background: rgba(26, 26, 26, 0.95);
  border-bottom: 1px solid var(--border);
}


.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-left: 15%;
}

.logo-img {
  height: 90px;
  width: auto;
  display: block;
}

.nav-wrap {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  position: relative;
}

.nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-right: 20%;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--brand);
  background: rgba(255, 215, 0, 0.1);
}

/* Email icon - hidden on desktop, shown on mobile */
.email-icon {
  display: none;
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #000000;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 10;
}

.email-icon:hover,
.email-icon:active {
  background: var(--brand-light);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
}

.email-icon svg {
  width: 20px;
  height: 20px;
}

/* Phone icon - hidden on desktop, shown on mobile */
.phone-icon {
  display: none;
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #000000;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 10;
}

.phone-icon:hover,
.phone-icon:active {
  background: var(--brand-light);
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(255, 215, 0, 0.4);
}

.phone-icon svg {
  width: 20px;
  height: 20px;
}

.hero {
  padding: 3rem 0 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

.hero-copy h1 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(1.9rem, 3.3vw, 3rem);
  line-height: 1.15;
}

.hero-copy p {
  color: var(--muted);
  max-width: 60ch;
}

.eyebrow {
  display: inline-block;
  margin: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #000000;
  background: var(--brand);
}

.hero-projects {
  margin-top: 0;
}

.hero-slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.hero-slides {
  position: relative;
  min-height: 700px;
  touch-action: pan-y pinch-zoom; /* Allow vertical scrolling but optimize for horizontal swipes */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.hero-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 16px;
  overflow: visible;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(20px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.hero-images-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
}

.hero-card.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.hero-slider-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand);
  width: 50px;
  height: 50px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-slider-btn:hover {
  background: var(--brand);
  color: #000000;
  border-color: var(--brand);
}

.hero-dots {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.hero-main-image {
  width: 100%;
  height: 500px;
  overflow: hidden;
  background: var(--bg);
}

.hero-main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-side-images {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 500px;
}

.hero-side-image {
  width: 100%;
  flex: 1;
  overflow: hidden;
  background: var(--bg);
  min-height: 0;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.hero-side-image:hover {
  transform: scale(1.02);
  opacity: 0.9;
}

.hero-side-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-description {
  padding: 2rem 1.5rem;
  background: var(--surface);
  flex: 1;
  min-height: 150px;
}

.hero-description h3 {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 1.5rem;
}

.hero-description p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 1rem;
}

.section {
  padding: 3.2rem 0;
}

#services {
  padding-top: 2rem;
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

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

h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
}

.section-intro {
  margin-top: 0;
  color: var(--muted);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.service-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  transition: border-color 0.2s ease;
}

.service-card:hover {
  border-color: var(--brand);
}

.service-card h3 {
  margin-top: 0;
}

.service-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.slider {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  touch-action: pan-x pan-y; /* Better touch handling for iPhone */
}

.slides {
  position: relative;
  min-height: 210px;
  touch-action: pan-x pan-y; /* Allow both horizontal and vertical scrolling */
  -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(8px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 1.2rem;
}

.slide h3 {
  color: var(--text);
}

.slide p {
  color: var(--muted);
}

.slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.slider-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--brand);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.slider-btn:hover {
  background: var(--brand);
  color: #000000;
  border-color: var(--brand);
}

.dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: center;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: none;
  background: var(--surface-light);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dot:hover {
  background: var(--brand);
}

.dot.active {
  width: 26px;
  background: var(--brand);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  margin-top: 1rem;
}

.about-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.about-text h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.about-text p {
  margin: 0;
}

.about-image {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-image img {
  width: 50%;
  height: auto;
  border-radius: 14px;
  object-fit: cover;
  display: block;
}

.about-highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: 14px;
  padding: 1rem 1.2rem;
}

.about-highlight h3 {
  color: var(--brand);
}

.about-highlight h3 {
  margin-top: 0;
}

.about-highlight ul {
  margin: 0;
  padding-left: 1.2rem;
}

.cta {
  background: var(--brand);
  color: #000000;
}

.cta-wrap {
  text-align: center;
}

.cta-wrap p {
  margin-top: 0.2rem;
  opacity: 0.92;
}

.btn {
  display: inline-block;
  margin-top: 0.8rem;
  background: var(--brand);
  color: #000000;
  text-decoration: none;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.8rem 1.3rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  background: var(--brand-light);
  transform: translateY(-2px);
}

.btn-light {
  background: #000000;
  color: var(--brand);
  border: 2px solid var(--brand);
}

.btn-light:hover {
  background: var(--brand);
  color: #000000;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
}

.site-footer .container {
  min-height: 72px;
  display: grid;
  place-items: center;
}

@media (max-width: 850px) {
  .hero-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .about-image {
    order: 1;
  }

  .hero-slider {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }

  .hero-slider-btn {
    display: none;
  }

  .hero-slides {
    min-height: 650px;
  }

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

  .hero-main-image {
    height: 400px;
  }

  .hero-side-images {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hero-side-image {
    height: 150px;
    flex: 1 1 calc(50% - 0.5rem);
    min-width: calc(50% - 0.5rem);
  }
  
  .hero-side-image:nth-child(3) {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .hero-description {
    padding: 1.2rem;
  }

  .hero-description h3 {
    font-size: 1.3rem;
  }

  .slides {
    min-height: 240px;
  }
}

@media (max-width: 640px) {
  .email-icon,
  .phone-icon {
    display: flex;
  }

  .logo {
    margin-left: 0;
  }

  .nav {
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-right: 0;
  }

  .nav a {
    padding: 0.5rem 0.65rem;
    font-size: 0.85rem;
  }

  .logo-img {
    height: 60px;
  }

  .nav-wrap {
    min-height: 80px;
    padding: 0.5rem 0;
    flex-wrap: wrap;
  }

  .slider {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .slider-btn {
    display: none;
  }
}

/* iPhone 14 Pro Max and similar large phones (430px width) */
@media (max-width: 430px) {
  .nav-wrap {
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
    min-height: 100px;
  }

  .logo {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .logo-img {
    height: 70px;
  }

  .nav {
    width: 100%;
    justify-content: center;
    gap: 0.3rem;
    margin-right: 0;
  }

  .nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* iPhone 10 specific optimizations (375px width) */
@media (max-width: 390px) {
  .container {
    width: 95%;
    padding: 0 1rem;
  }

  /* Topbar improvements */
  .nav-wrap {
    min-height: 90px;
    padding: 0.5rem 0;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
  }

  .logo {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .logo-img {
    height: 55px;
  }

  .nav {
    gap: 0.3rem;
    justify-content: center;
    width: 100%;
  }

  .nav a {
    padding: 0.45rem 0.55rem;
    font-size: 0.8rem;
  }

  /* Hero slider improvements */
  .hero {
    padding: 2rem 0 2rem;
  }

  .hero-slides {
    min-height: 600px;
  }

  .hero-main-image {
    height: 300px;
  }

  .hero-side-images {
    height: 300px;
    gap: 0.75rem;
  }

  .hero-side-image {
    height: auto;
    flex: 1;
    min-height: 90px;
  }

  .hero-side-image:nth-child(3) {
    flex: 1 1 100%;
  }

  /* Description improvements */
  .hero-description {
    padding: 1.5rem 1rem;
    min-height: auto;
  }

  .hero-description h3 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
    line-height: 1.3;
  }

  .hero-description p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* Feedback slider improvements */
  .slides {
    min-height: 200px;
    padding: 1rem;
  }

  .slide h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .slide p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  /* Section spacing */
  .section {
    padding: 2rem 0;
  }

  h2 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
  }

  .section-intro {
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }

  /* Service cards */
  .service-card {
    padding: 1rem;
  }

  .service-card h3 {
    font-size: 1.1rem;
  }

  .service-card ul {
    font-size: 0.9rem;
  }
}
