/* =========================================
   BRIDGE DIGITAL
   Cleaned and organized stylesheet
========================================= */

:root {
  --maroon: #4b1720;
  --maroon-dark: #2b0d13;
  --gold: #c49a4a;
  --cream: #f6ead3;
  --tan: #d6b777;
  --white: #fffaf0;
  --gray: #6b5f57;
}

/* =========================================
   BASE
========================================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--maroon-dark);
  font-family: Inter, Arial, sans-serif;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

section {
  max-width: 1100px;
  margin: auto;
  padding: 96px 24px;
}

.section-title {
  max-width: 760px;
  margin: 0 auto 18px;
  text-align: center;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-intro {
  max-width: 700px;
  margin: 0 auto 48px;
  color: var(--gray);
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.75;
}

/* =========================================
   HEADER + NAVIGATION
========================================= */

header {
  min-height: 90vh;
  padding: 24px;
  color: var(--white);
  background:
    linear-gradient(rgba(43, 13, 19, 0.92), rgba(43, 13, 19, 0.92)),
    radial-gradient(circle at top, #6b2430, #2b0d13);
}

nav {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.logo span {
  color: var(--gold);
}

.nav-links a {
  position: relative;
  margin-left: 24px;
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  opacity: 0.9;
  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 2px;
  border-radius: 999px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

.nav-links a:hover {
  color: var(--tan);
  opacity: 1;
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* =========================================
   HERO
========================================= */

.hero {
  max-width: 1200px;
  margin: 130px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 54px;
  align-items: center;
}

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

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.055em;
  text-wrap: balance;
}

.hero p {
  max-width: 620px;
  margin-bottom: 32px;
  color: #dbeafe;
  font-size: 1.2rem;
  line-height: 1.75;
}

.hero-card {
  max-width: 700px;
  margin: 0 auto;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease,
    border-color 0.4s ease;
}

.hero-card:hover {
  transform: translateY(-8px);
  border-color: rgba(214, 183, 119, 0.38);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.hero-card img {
  width: 100%;
  display: block;
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.browser-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.browser-bar span:nth-child(1) {
  background: #ff5f57;
}

.browser-bar span:nth-child(2) {
  background: #febc2e;
}

.browser-bar span:nth-child(3) {
  background: #28c840;
}

/* =========================================
   BUTTONS
========================================= */

.btn {
  display: inline-block;
  margin: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    border-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}

.btn-primary {
  background: var(--tan);
  color: var(--maroon-dark);
}

.btn-primary:hover {
  background: var(--gold);
  box-shadow: 0 14px 30px rgba(196, 154, 74, 0.28);
}

.btn-secondary {
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-secondary:hover {
  border-color: var(--tan);
  background: rgba(255, 255, 255, 0.08);
  color: var(--tan);
}

/* =========================================
   SERVICES
========================================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.service-card {
  position: relative;
  min-height: 245px;
  overflow: hidden;
  padding: 32px;
  border: 1px solid rgba(75, 23, 32, 0.1);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(43, 13, 19, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.service-card::after {
  content: "";
  position: absolute;
  right: -50px;
  bottom: -60px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(196, 154, 74, 0.12);
  transition: transform 0.3s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(196, 154, 74, 0.45);
  box-shadow: 0 20px 42px rgba(43, 13, 19, 0.14);
}

.service-card:hover::after {
  transform: scale(1.2);
}

.service-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  border-radius: 16px;
  background: var(--maroon);
  font-size: 1.5rem;
  box-shadow: 0 8px 20px rgba(43, 13, 19, 0.2);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.service-card:hover .service-icon {
  transform: rotate(-6deg) scale(1.07);
  box-shadow: 0 12px 26px rgba(43, 13, 19, 0.28);
}

.service-card h3 {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: var(--maroon-dark);
  font-size: 1.35rem;
}

.service-card p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--gray);
}

/* =========================================
   PACKAGES
========================================= */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}

.card {
  height: 100%;
  padding: 28px;
  border: 1px solid rgba(75, 23, 32, 0.08);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.card:hover {
  transform: translateY(-7px);
  border-color: rgba(196, 154, 74, 0.38);
  box-shadow: 0 22px 46px rgba(43, 13, 19, 0.14);
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.card p {
  color: var(--gray);
}

.card strong {
  color: var(--maroon);
  font-size: 1.35rem;
}

/* =========================================
   PORTFOLIO
========================================= */

.portfolio {
  max-width: none;
  padding-right: max(24px, calc((100vw - 1100px) / 2));
  padding-left: max(24px, calc((100vw - 1100px) / 2));
  background: var(--maroon);
  color: var(--white);
}

.portfolio .section-intro {
  color: #cbd5e1;
}

.portfolio .card {
  background: #5a1d28;
  color: var(--white);
}

.portfolio .card p {
  color: #cbd5e1;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  align-items: stretch;
}

.portfolio-preview {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: #5a1d28;
  box-shadow: 0 18px 45px rgba(20, 4, 8, 0.3);
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    border-color 0.35s ease;
}

.portfolio-preview:hover {
  transform: translateY(-6px);
  border-color: rgba(214, 183, 119, 0.32);
  box-shadow: 0 28px 58px rgba(20, 4, 8, 0.45);
}

.portfolio-browser {
  overflow: hidden;
  background: #321017;
}

.portfolio-browser-bar {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #321017;
}

.browser-dots {
  display: flex;
  flex-shrink: 0;
  gap: 7px;
}

.browser-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0.9;
}

.browser-dots span:nth-child(1) {
  background: #ff5f57;
}

.browser-dots span:nth-child(2) {
  background: #febc2e;
}

.browser-dots span:nth-child(3) {
  background: #28c840;
}

.browser-address {
  flex: 1;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.portfolio-frame {
  position: relative;
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: var(--white);
}

.preview-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.preview-scroll iframe {
  position: absolute;
  top: var(--preview-top, 0px);
  left: 50%;
  width: 1440px;
  height: 1200px;
  border: 0;
  transform:
    translateX(var(--preview-x, -50%))
    scale(var(--preview-scale, 0.285));
  transform-origin: top center;
  transition:
    transform 0.45s ease,
    filter 0.45s ease;
}

.portfolio-frame:hover .preview-scroll iframe {
  transform:
    translateX(var(--preview-x, -50%))
    scale(calc(var(--preview-scale, 0.285) + 0.012));
  filter: brightness(0.72);
}

.preview-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: rgba(43, 13, 19, 0.78);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.preview-overlay::before,
.preview-overlay::after {
  content: "";
  width: 72px;
  height: 1px;
  margin: 8px 0;
  background: rgba(214, 183, 119, 0.7);
}

.preview-overlay-label {
  color: var(--tan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.preview-overlay strong {
  font-size: 1rem;
}

.portfolio-frame:hover .preview-overlay,
.preview-overlay:focus-visible {
  opacity: 1;
  visibility: visible;
}

/* Individual preview positioning */
.paradise-frame {
  --preview-scale: 0.285;
  --preview-top: -20px;
  --preview-x: -50%;
}

.command-center-frame {
  --preview-scale: 0.35;
  --preview-top: 0px;
  --preview-x: -50%;
}

.valley-frame {
  --preview-scale: 0.46;
  --preview-top: -10px;
  --preview-x: -48%;
}

/* Portfolio details */
.portfolio-preview-content {
  min-height: 170px;
  padding: 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
}

.portfolio-preview-content > div {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.portfolio-preview-content h3 {
  min-height: 60px;
  margin: 0;
  display: flex;
  align-items: flex-start;
  color: var(--white);
  font-size: 1.2rem;
  line-height: 1.25;
}

.portfolio-label {
  margin: 0 0 4px;
  color: var(--tan) !important;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.portfolio-tech span {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border: 1px solid rgba(214, 183, 119, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--tan);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.portfolio-link {
  align-self: end;
  justify-self: end;
  flex-shrink: 0;
  padding-bottom: 3px;
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color 0.25s ease,
    transform 0.25s ease;
}

.portfolio-link:hover {
  color: var(--tan);
}

a.portfolio-link:hover {
  transform: translateX(4px);
}

.portfolio-link-disabled {
  opacity: 0.65;
  cursor: default;
}

/* Private project placeholder */
.portfolio-placeholder {
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(
      circle at top right,
      rgba(196, 154, 74, 0.2),
      transparent 45%
    ),
    linear-gradient(135deg, #4b1720, #2b0d13);
  color: var(--white);
  text-align: center;
}

.placeholder-content {
  max-width: 240px;
}

.placeholder-content span {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--tan);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.placeholder-content h4 {
  margin: 0 0 8px;
  font-size: 2rem;
}

.placeholder-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.portfolio-note {
  max-width: 620px;
  margin: 48px auto 0;
  color: rgba(255, 255, 255, 0.75);
  text-align: center;
  font-size: 0.95rem;
  font-style: italic;
  letter-spacing: 0.02em;
}

/* =========================================
   CONTACT + FOOTER
========================================= */

.cta {
  padding: 60px 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 32px;
  background: var(--maroon);
  color: var(--white);
  text-align: center;
  box-shadow: 0 22px 55px rgba(43, 13, 19, 0.18);
}

.cta .section-title {
  color: var(--white);
}

.cta p {
  max-width: 650px;
  margin: 0 auto 24px;
  color: #dbeafe;
}

footer {
  padding: 32px;
  border-top: 1px solid rgba(75, 23, 32, 0.15);
  background: var(--cream);
  color: var(--gray);
  text-align: center;
}

/* =========================================
   ACCESSIBILITY
========================================= */

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}

/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 800px) {
  header {
    min-height: auto;
    padding-bottom: 72px;
  }

  nav {
    flex-direction: column;
    gap: 18px;
  }

  .nav-links a {
    margin: 0 8px;
  }

  section {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    margin-top: 70px;
    text-align: center;
  }

  .hero-text {
    text-align: center;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 3.7rem);
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .services-grid,
  .cards,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: auto;
    padding: 26px;
  }

  .portfolio-frame {
    height: 360px;
  }

  .portfolio-preview-content {
    min-height: auto;
    padding: 20px;
  }

  .cta {
    padding: 48px 22px;
  }
}

@media (max-width: 560px) {
  .portfolio-preview-content {
    grid-template-columns: 1fr;
  }

  .portfolio-link {
    justify-self: start;
    margin-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


  