:root {
  --bg-deep: #130d0a;
  --bg-mid: #2a1a12;
  --bg-soft: #4a3020;
  --text-main: #f1e6d5;
  --text-soft: #d9c5a9;
  --accent: #d9a56a;
  --accent-2: #b77942;
  --glass: rgba(39, 24, 16, 0.56);
  --glass-border: rgba(223, 184, 132, 0.24);
  --shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 16% 12%, rgba(180, 121, 66, 0.25), transparent 34%),
    radial-gradient(circle at 88% 6%, rgba(217, 165, 106, 0.14), transparent 28%),
    linear-gradient(160deg, var(--bg-deep) 0%, #1c120d 34%, var(--bg-mid) 100%);
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: inherit;
}

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

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 1.08;
}

.container {
  width: min(1120px, calc(100% - 2.6rem));
  margin: 0 auto;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  opacity: 0.1;
  background-image: radial-gradient(rgba(255, 237, 210, 0.6) 0.45px, transparent 0.45px);
  background-size: 3px 3px;
}

.glow {
  position: fixed;
  z-index: -2;
  pointer-events: none;
  width: min(54vw, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(18px);
}

.glow-left {
  top: -15vw;
  left: -12vw;
  background: radial-gradient(circle, rgba(183, 121, 66, 0.55) 0%, rgba(183, 121, 66, 0) 70%);
}

.glow-right {
  right: -12vw;
  bottom: -18vw;
  background: radial-gradient(circle, rgba(217, 165, 106, 0.3) 0%, rgba(217, 165, 106, 0) 72%);
}

.hero {
  position: relative;
  overflow: clip;
  padding: 1.5rem 0 5rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(130deg, rgba(10, 8, 6, 0.74), rgba(35, 20, 12, 0.5)),
    url("assets/images/legendos-4406.jpg") center / cover no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0.42;
  z-index: -1;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 3.2rem;
}

.brand {
  text-decoration: none;
  letter-spacing: 0.03em;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.7rem, 2.6vw, 2.2rem);
  color: #f8ebd8;
}

.menu {
  display: flex;
  gap: 1.2rem;
}

.menu a {
  text-decoration: none;
  color: var(--text-soft);
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.menu a:hover {
  color: #fff;
  border-color: var(--accent);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.4rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 800;
}

h1 {
  font-size: clamp(2.3rem, 6.2vw, 4.8rem);
  max-width: 14ch;
}

.lead {
  margin-top: 1rem;
  max-width: 62ch;
  color: #eadac4;
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.76rem 1.28rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent-2), var(--accent));
  color: #1f1009;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
  transition: transform 0.22s ease, filter 0.22s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn.ghost {
  background: rgba(255, 232, 196, 0.08);
  border: 1px solid rgba(255, 232, 196, 0.3);
  color: #f8ebd8;
}

.hero-visual {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: rgba(0, 0, 0, 0.22);
  box-shadow: var(--shadow);
  position: relative;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(190deg, rgba(255, 216, 160, 0.08), rgba(24, 12, 8, 0.48));
}

.hero-visual img {
  width: 100%;
  height: min(60vh, 520px);
  object-fit: cover;
  filter: sepia(0.3) saturate(0.95) contrast(1.02);
  mix-blend-mode: screen;
}

.section {
  padding: 0.9rem 0 4.6rem;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  font-size: clamp(2rem, 4.8vw, 3.2rem);
}

.section-intro {
  margin: 0.75rem 0 0;
  max-width: 72ch;
  color: #e9d7bf;
}

.project-card {
  display: grid;
  grid-template-columns: 1fr 1.04fr;
  gap: 1.2rem;
  padding: 1.28rem;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 92% 8%, rgba(217, 165, 106, 0.16), transparent 36%);
  pointer-events: none;
}

.project-card.priority {
  border-color: rgba(255, 212, 154, 0.5);
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.4);
}

.project-card + .project-card {
  margin-top: 1.16rem;
}

.project-card.alt {
  grid-template-columns: 1.04fr 1fr;
}

.electro-card {
  grid-template-columns: 1fr;
}

.project-copy {
  position: relative;
  z-index: 1;
}

.project-tag {
  display: inline-flex;
  margin: 0 0 0.52rem;
  padding: 0.2rem 0.64rem;
  border-radius: 999px;
  background: rgba(217, 165, 106, 0.18);
  border: 1px solid rgba(217, 165, 106, 0.32);
  color: #f2dfc4;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.project-tag.priority {
  background: rgba(255, 214, 160, 0.28);
  border-color: rgba(255, 214, 160, 0.5);
  color: #fff0d9;
}

.project-copy h3 {
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  margin-bottom: 0.5rem;
}

.project-copy h4 {
  margin: 1rem 0 0.4rem;
  font-size: 1.45rem;
}

.feature-list {
  margin: 0.1rem 0 0;
  padding-left: 1.15rem;
}

.feature-list li {
  margin-bottom: 0.3rem;
  color: #f1dfc7;
}

.narrative {
  margin-top: 0.9rem;
  border-left: 1px solid rgba(255, 214, 162, 0.36);
  padding-left: 0.9rem;
}

.narrative p {
  margin: 0.55rem 0;
  color: #f3e0c6;
}

.more-text {
  margin-top: 0.95rem;
  border: 1px solid rgba(255, 212, 154, 0.26);
  border-radius: 12px;
  background: rgba(21, 12, 8, 0.44);
  padding: 0.6rem 0.8rem;
}

.more-text summary {
  cursor: pointer;
  font-weight: 700;
  color: #ffd8a9;
  list-style: none;
}

.more-text summary::-webkit-details-marker {
  display: none;
}

.more-text summary::before {
  content: "+";
  margin-right: 0.5rem;
}

.more-text[open] summary::before {
  content: "−";
}

.more-text .narrative {
  margin-top: 0.65rem;
}

.video-wrap {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  min-height: 280px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.45);
}

.video-wrap.tall {
  min-height: 420px;
}

.video-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(42, 28, 19, 0.56), rgba(13, 8, 6, 0.35)),
    url("assets/images/legendos-4372.jpg") center / cover no-repeat;
  mix-blend-mode: multiply;
  z-index: 0;
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}

.gallery-wrap {
  position: relative;
}

.gallery-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(170deg, rgba(217, 165, 106, 0.06), rgba(25, 14, 9, 0.24)),
    url("assets/images/legendos-4473.jpg") center / cover no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0.45;
  z-index: -1;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.gallery figure {
  margin: 0;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(223, 184, 132, 0.18);
  box-shadow: var(--shadow);
}

.gallery figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(241, 209, 167, 0.08), rgba(18, 10, 7, 0.58));
}

.gallery img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  filter: sepia(0.36) saturate(0.96) contrast(1.03);
  transition: transform 0.45s ease;
}

.gallery figure:hover img {
  transform: scale(1.06);
}

.contact-section {
  padding-top: 0.4rem;
}

.contact-card {
  border-radius: var(--radius);
  padding: 1.25rem;
  background: rgba(35, 21, 14, 0.68);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  max-width: 720px;
}

.contact-card p {
  margin: 0.45rem 0;
}

.contact-card a {
  color: #ffd7a7;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 215, 167, 0.42);
}

.footer {
  padding: 2rem 0 3.8rem;
  text-align: center;
}

.footer h2 {
  font-size: clamp(1.9rem, 4.8vw, 2.8rem);
}

.footer p {
  margin: 0.45rem auto;
  max-width: 66ch;
  color: var(--text-soft);
}

.copyright {
  margin-top: 1rem;
  opacity: 0.82;
}

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

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

@media (max-width: 980px) {
  .hero-grid,
  .project-card,
  .project-card.alt {
    grid-template-columns: 1fr;
  }

  .hero-visual img {
    height: 320px;
  }

  .video-wrap {
    min-height: 230px;
  }

  .video-wrap.tall {
    min-height: 260px;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(1120px, calc(100% - 1.4rem));
  }

  .hero {
    padding-top: 1rem;
  }

  .nav {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2.4rem;
  }

  .menu {
    width: 100%;
    justify-content: space-between;
    font-size: 0.95rem;
  }

  h1 {
    max-width: 100%;
  }

  .hero-actions {
    gap: 0.62rem;
  }

  .section {
    padding: 0.7rem 0 3.1rem;
  }

  .video-wrap {
    min-height: 200px;
  }

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

  .gallery img {
    height: 260px;
  }
}
