/* ===== Variables ===== */
:root {
  --bg: #0a0a0f;
  --bg-alt: #12121a;
  --bg-card: #1a1a24;
  --text: #f0f0f5;
  --text-muted: #a0a0b0;
  --accent: #c9a227;
  --accent-hover: #e0b83a;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --font: "Manrope", system-ui, sans-serif;
  --header-h: 72px;
  --transition: 0.25s ease;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.container {
  width: min(1120px, 100% - 2rem);
  margin-inline: auto;
}

/* ===== Header ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
}

.nav__brand img {
  border-radius: 8px;
  object-fit: cover;
}

.nav__brand:hover {
  color: var(--text);
}

.nav__menu {
  display: flex;
  gap: 1.5rem;
}

.nav__menu a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.nav__menu a:hover {
  color: var(--text);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(201, 162, 39, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 50%, rgba(80, 60, 120, 0.12), transparent),
    var(--bg);
  pointer-events: none;
}

.hero__inner {
  position: relative;
  text-align: center;
}

.hero__logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.hero__eyebrow {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  max-width: 18ch;
  margin-inline: auto;
  margin-bottom: 1.25rem;
}

.hero__lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-muted);
  max-width: 52ch;
  margin-inline: auto 1.5rem;
}

.hero__tagline {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.btn--primary {
  background: var(--accent);
  color: #0a0a0f;
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #0a0a0f;
}

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== Sections ===== */
.section {
  padding: 5rem 0;
}

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

.section__header {
  margin-bottom: 2.5rem;
  max-width: 640px;
}

.section__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.section__header h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.section__subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-top: 0.25rem;
}

.section__hint {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose p {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ===== Founder ===== */
.founder-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 720px;
}

.founder-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.founder-card p:last-child {
  margin-bottom: 0;
}

.founder-card strong {
  color: var(--text);
}

/* ===== Service Cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color var(--transition), transform var(--transition);
}

.card:hover {
  border-color: rgba(201, 162, 39, 0.35);
  transform: translateY(-2px);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
}

/* ===== Projects List ===== */
.projects-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-group summary {
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background var(--transition);
}

.project-group summary::-webkit-details-marker {
  display: none;
}

.project-group summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

.project-group[open] summary::after {
  content: "−";
}

.project-group summary:hover {
  background: rgba(255, 255, 255, 0.03);
}

.project-group ul {
  padding: 0 1.5rem 1.25rem;
  border-top: 1px solid var(--border);
}

.project-group li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-group li:last-child {
  border-bottom: none;
}

.project-group li strong {
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}

.years {
  display: block;
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 0.25rem;
}

.media-list {
  padding: 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.media-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 1.5rem 1.25rem;
}

.media-tags li {
  background: rgba(201, 162, 39, 0.12);
  color: var(--accent);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ===== Carousel ===== */
.carousel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.carousel__viewport {
  flex: 1;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.carousel__track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  touch-action: pan-y pinch-zoom;
}

.carousel__item {
  flex: 0 0 100%;
  padding: 0 0.25rem;
  cursor: pointer;
}

.carousel__card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.carousel__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.carousel__item:hover .carousel__card img {
  transform: scale(1.05);
}

.carousel__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, transparent 55%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
}

.carousel__overlay h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.carousel__overlay p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.carousel__badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.carousel__btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

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

.carousel__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

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

.carousel__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.carousel__dot.is-active {
  background: var(--accent);
  transform: scale(1.25);
}

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
}

.lightbox__close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity var(--transition);
}

.lightbox__close:hover {
  opacity: 1;
}

.lightbox__header {
  margin-bottom: 1rem;
  text-align: center;
}

.lightbox__header h3 {
  font-size: 1.25rem;
}

.lightbox__meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lightbox__viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  max-height: 70vh;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
}

.lightbox__image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius);
  transition: opacity 0.2s ease;
}

.lightbox__image.is-fading {
  opacity: 0;
}

.lightbox__nav {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(26, 26, 36, 0.9);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox__nav:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.lightbox__nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.lightbox__counter {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 1rem 0 0;
}

body.lightbox-open {
  overflow: hidden;
}

/* ===== Contacts ===== */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.contact-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.contact-block--wide {
  grid-column: 1 / -1;
}

.contact-block h3,
.contact-block h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.contact-list li {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.contact-list a {
  color: var(--text);
  font-weight: 500;
}

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

.contact-address {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.bank-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.bank-card:last-child {
  margin-bottom: 0;
}

.bank-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.5rem;
  margin: 0;
  font-size: 0.9rem;
}

.bank-card dt {
  color: var(--text-muted);
  font-weight: 500;
}

.bank-card dd {
  margin: 0;
  color: var(--text);
  word-break: break-all;
}

/* ===== Footer ===== */
.site-footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    padding: 1rem;
    gap: 0;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }

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

  .nav__menu li {
    border-bottom: 1px solid var(--border);
  }

  .nav__menu a {
    display: block;
    padding: 0.85rem 0;
  }

  .nav.is-open .nav__toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav.is-open .nav__toggle span:nth-child(2) {
    opacity: 0;
  }

  .nav.is-open .nav__toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .section {
    padding: 3.5rem 0;
  }

  .carousel__btn {
    display: none;
  }

  .carousel__viewport {
    margin: 0 -0.5rem;
  }

  .lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }

  .lightbox__nav--prev {
    left: 0.25rem;
  }

  .lightbox__nav--next {
    right: 0.25rem;
  }

  .lightbox__close {
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 769px) {
  .carousel__item {
    flex: 0 0 calc(50% - 0.5rem);
    margin-right: 1rem;
  }

  .carousel__track {
    gap: 0;
  }
}

@media (min-width: 1024px) {
  .carousel__item {
    flex: 0 0 calc(33.333% - 0.67rem);
  }
}
