:root {
  --bg: #0f0b08;
  --bg-soft: #1a120c;
  --surface: #1c140f;
  --surface-soft: #2a1c11;
  --text: #f2f4fa;
  --muted: #c8ad93;
  --accent: #ff8c32;
  --accent-dark: #e8741d;
  --border: #4a2e1a;
  --shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  background:
    linear-gradient(rgba(124, 73, 28, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 73, 28, 0.16) 1px, transparent 1px),
    radial-gradient(circle at top right, #2e1b0f 0%, var(--bg) 45%, #090603 100%);
  background-size: 24px 24px, 24px 24px, auto;
  color: var(--text);
  line-height: 1.6;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(15, 11, 8, 0.88);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 48px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--text);
  background: rgba(58, 34, 20, 0.5);
  border-color: var(--border);
}

.hero {
  padding: 5.25rem 0 3.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.3rem;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin-bottom: 0.8rem;
}

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

.eyebrow {
  margin: 0;
  color: #ffb16f;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  font-size: 0.82rem;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.72rem 1.2rem;
  border-radius: 0.7rem;
  text-decoration: none;
  font-weight: 700;
}

.btn-primary {
  background: var(--accent);
  color: #15181f;
}

.btn-primary:hover {
  background: #ffa24f;
}

.btn-ghost {
  border: 1px solid var(--border);
  color: var(--text);
  background: rgba(58, 34, 20, 0.45);
}

.hero-card,
.card {
  background: linear-gradient(180deg, var(--surface) 0%, #120d09 100%);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}

.small-note {
  margin: 0.8rem 0 0;
  color: #ffd3ae;
}

.section {
  padding: 1.5rem 0 3.5rem;
}

.section-intro {
  max-width: 780px;
  color: var(--muted);
}

.cards {
  display: grid;
  gap: 1rem;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card .price {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.5rem 0 0.9rem;
  color: #ffb16f;
}

.featured {
  border-color: var(--accent);
  position: relative;
}

.tag {
  display: inline-block;
  margin: 0 0 0.75rem;
  background: #46270f;
  color: #ffcc9b;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.portfolio-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  perspective: 1200px;
}

.portfolio-card {
  position: relative;
  padding: 0;
  overflow: visible;
  cursor: pointer;
  transform-style: preserve-3d;
  width: 100%;
  margin-left: 0;
  transition:
    width 0.28s ease,
    margin-left 0.28s ease,
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
  transform-origin: center center;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

.portfolio-card:hover {
  z-index: 30;
  border-color: var(--accent);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55);
  width: calc(100% + 240px);
  margin-left: -120px;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}

.portfolio-media {
  background: #120d09;
  border-bottom: 1px solid var(--border);
  border-radius: 1rem 1rem 0 0;
  overflow: hidden;
}

.portfolio-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
  transition: transform 0.28s ease;
}

.portfolio-card:hover img {
  transform: translateZ(16px);
}

.portfolio-body {
  padding: 1rem;
  transform: translateZ(10px);
}

.portfolio-body h2 {
  margin-bottom: 0.35rem;
}

.portfolio-body p {
  margin: 0;
  color: var(--muted);
}

.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(10, 6, 4, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.portfolio-modal.open {
  display: flex;
}

.modal-frame {
  position: relative;
  width: min(1400px, 96vw);
  height: min(92vh, 1000px);
  background: #160f0a;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: rgba(15, 11, 8, 0.78);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

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

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0f0b08;
}

.modal-caption {
  position: absolute;
  left: 0;
  bottom: 0;
  right: 0;
  margin: 0;
  padding: 0.8rem 1rem;
  background: linear-gradient(180deg, transparent 0%, rgba(11, 7, 4, 0.92) 60%);
  color: #f3ddc6;
  font-size: 0.95rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #0d0906;
  padding: 1.2rem 0;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .hero-grid,
  .three-up,
  .two-up,
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3.8rem;
  }

  .portfolio-card:hover {
    width: calc(100% + 80px);
    margin-left: -40px;
  }
}
