:root {
  --text: #f7f3ec;
  --muted: #d4ccbf;
  --accent: #ecd6b2;
  --accent-strong: #ddb77f;
  --line: rgba(255, 255, 255, 0.44);
  --hero-photo: url("static/img_1.jpg");
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: #0a1017;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(120deg, rgba(8, 12, 18, 0.06) 0%, rgba(8, 12, 18, 0.82) 62%),
    radial-gradient(circle at 30% 45%, rgba(238, 198, 135, 0.24), transparent 35%);
}

body::after {
  content: "";
  position: fixed;
  inset: -12%;
  z-index: 121;
  opacity: 0;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 38%, rgba(246, 215, 164, 0.46) 50%, transparent 62%);
  transform: translateX(-45%) rotate(-8deg) scale(1.08);
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  display: grid;
  place-items: center;
  padding: 1rem;
  isolation: isolate;
  background: #0a1017;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-color: #10151c;
  background-image:
    linear-gradient(170deg, rgba(6, 9, 14, 0.2) 0%, rgba(6, 9, 14, 0.82) 78%),
    linear-gradient(120deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.15)),
    var(--hero-photo),
    url("static/img_1.jpg");
  background-size: cover, cover, cover, cover;
  background-position: center, center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  animation: heroPan 10s ease-out both;
  will-change: transform;
  transform: translateZ(0);
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(5, 8, 13, 0.72) 0%, rgba(5, 8, 13, 0.48) 26%, rgba(5, 8, 13, 0.12) 62%, rgba(5, 8, 13, 0.02) 100%),
    radial-gradient(circle at 18% 16%, rgba(229, 193, 140, 0.27), transparent 30%),
    radial-gradient(circle at 82% 78%, rgba(66, 121, 160, 0.24), transparent 32%),
    radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
  animation: fadeIn 1.8s ease-out both;
}

.site-logo {
  display: block;
  margin: 0 auto 0.45rem;
  width: clamp(110px, 32vw, 170px);
  height: auto;
  opacity: 0;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45));
  animation: riseIn 0.8s ease-out 0.18s forwards;
}

.content {
  width: min(560px, 100%);
  text-align: center;
  animation: contentIn 1.05s cubic-bezier(0.21, 1, 0.23, 1) 0.2s both;
}

.tag {
  margin: 0 0 0.8rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.64rem;
  color: #f0e8da;
  opacity: 0;
  animation: riseIn 0.6s ease-out 0.45s forwards;
}

h1 {
  margin: -0.12rem 0 0;
  font-family: "Allura", cursive;
  font-size: clamp(2.8rem, 15vw, 4.3rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
  position: relative;
  top: -1.56rem;
  text-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
  opacity: 0;
  animation: riseIn 0.85s ease-out 0.62s forwards;
}

.subtitle {
  margin: 0.85rem auto 1.65rem;
  max-width: 320px;
  color: var(--muted);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1rem, 4.3vw, 1.2rem);
  line-height: 1.35;
  letter-spacing: 0.025em;
  position: relative;
  top: -1.34rem;
  opacity: 0;
  animation: riseIn 0.8s ease-out 0.78s forwards;
}

.portfolio-btn {
  display: inline-block;
  min-width: min(330px, 90vw);
  padding: 0.95rem 2.25rem;
  border-radius: 999px;
  border: 1px solid rgba(235, 188, 112, 0.28);
  text-decoration: none;
  color: #f5e7d0;
  font-family: "Cormorant Garamond", serif;
  font-weight: 600;
  font-size: clamp(1.06rem, 3.6vw, 1.2rem);
  letter-spacing: 0.01em;
  background: rgba(12, 14, 18, 0.08);
  box-shadow:
    0 0 0 1px rgba(235, 188, 112, 0.08),
    0 0 0 rgba(235, 188, 112, 0),
    inset 0 0 0 rgba(255, 255, 255, 0);
  opacity: 0;
  transform: translateY(10px);
  animation:
    riseIn 0.75s ease-out 0.95s forwards,
    buttonNeonFlow 2.8s cubic-bezier(0.22, 0.61, 0.36, 1) 1.2s forwards;
  transition: box-shadow 0.46s ease, border-color 0.46s ease, color 0.46s ease;
  backface-visibility: hidden;
  will-change: transform, opacity;
  outline: none;
  pointer-events: none;
  cursor: default;
}

.portfolio-btn.is-ready {
  animation: none;
  opacity: 1;
  transform: translateY(0);
  color: #f5e7d0;
  border-color: rgba(241, 202, 145, 0.72);
  background: rgba(12, 14, 18, 0.08);
  box-shadow:
    0 0 0 1px rgba(235, 188, 112, 0.24),
    0 0 14px rgba(235, 188, 112, 0.5),
    0 0 30px rgba(235, 188, 112, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body.btn-hover-ready .portfolio-btn {
  pointer-events: auto;
  cursor: pointer;
}

body.btn-hover-ready .portfolio-btn:hover {
  border-color: rgba(255, 228, 182, 1);
  box-shadow:
    0 0 0 1px rgba(255, 228, 182, 0.45),
    0 0 22px rgba(235, 188, 112, 0.74),
    0 0 40px rgba(235, 188, 112, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.portfolio-btn:focus,
.portfolio-btn:active {
  outline: none;
}

body.btn-hover-ready .portfolio-btn:focus-visible {
  border-color: rgba(255, 228, 182, 1);
  box-shadow:
    0 0 0 2px rgba(255, 228, 182, 0.45),
    0 0 24px rgba(235, 188, 112, 0.8);
}

body.btn-hover-ready .portfolio-btn:active {
  border-color: rgba(255, 228, 182, 0.96);
  box-shadow:
    0 0 0 1px rgba(255, 228, 182, 0.38),
    0 0 18px rgba(235, 188, 112, 0.68),
    0 0 34px rgba(235, 188, 112, 0.3);
}

.portfolio-btn.is-clicking {
  animation: buttonClickFade 0.72s ease forwards;
}

body.route-wow-out::before {
  animation: wowDim 0.86s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

body.route-wow-out::after {
  animation: wowSweep 0.86s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

body.route-wow-out .content {
  animation: wowContentOut 0.78s cubic-bezier(0.2, 0.72, 0.24, 1) forwards;
}

body.route-wow-out .hero::before {
  animation: wowBgOut 0.84s ease forwards;
}

.socials {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
  gap: 0.72rem;
  opacity: 0;
  animation: riseIn 0.8s ease-out 1.1s forwards;
}

.socials a {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(4px);
  transition: transform 0.22s ease, background-color 0.22s ease, border-color 0.22s ease;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.socials a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(241, 202, 145, 0.95);
  box-shadow:
    0 0 0 1px rgba(235, 188, 112, 0.32),
    0 0 16px rgba(235, 188, 112, 0.42);
}

.socials svg {
  width: 20px;
  height: 20px;
  fill: #f7f4ef;
}

@keyframes heroPan {
  from {
    transform: scale(1.07);
  }
  to {
    transform: scale(1);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes contentIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes buttonNeonFlow {
  0% {
    color: #f5e7d0;
    border-color: rgba(235, 188, 112, 0.28);
    background: rgba(12, 14, 18, 0.08);
    box-shadow:
      0 0 0 1px rgba(235, 188, 112, 0.08),
      0 0 0 rgba(235, 188, 112, 0);
  }
  62% {
    color: #f5e7d0;
    border-color: rgba(248, 218, 168, 1);
    box-shadow:
      0 0 0 1px rgba(235, 188, 112, 0.52),
      0 0 34px rgba(235, 188, 112, 1),
      0 0 60px rgba(235, 188, 112, 0.62),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  }
  100% {
    color: #f5e7d0;
    border-color: rgba(241, 202, 145, 0.72);
    background: rgba(12, 14, 18, 0.08);
    box-shadow:
      0 0 0 1px rgba(235, 188, 112, 0.24),
      0 0 14px rgba(235, 188, 112, 0.5),
      0 0 30px rgba(235, 188, 112, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
}

@keyframes buttonClickFade {
  from {
    filter: brightness(1) saturate(1);
    border-color: rgba(241, 202, 145, 0.72);
    color: #f5e7d0;
    box-shadow:
      0 0 0 1px rgba(235, 188, 112, 0.24),
      0 0 14px rgba(235, 188, 112, 0.5),
      0 0 30px rgba(235, 188, 112, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
  to {
    filter: brightness(0.9) saturate(0.86);
    border-color: rgba(241, 202, 145, 0.18);
    color: rgba(245, 231, 208, 0.68);
    box-shadow:
      0 0 0 1px rgba(235, 188, 112, 0.06),
      0 0 4px rgba(235, 188, 112, 0.1),
      0 0 10px rgba(235, 188, 112, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
}

@keyframes transitionWipe {
  from {
    opacity: 0;
    transform: translateX(12%) scale(1.03);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes wowContentOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.984);
    filter: blur(2px);
  }
}

@keyframes wowBgOut {
  from {
    transform: translateZ(0) scale(1);
    filter: brightness(1);
  }
  to {
    transform: translateZ(0) scale(1.025);
    filter: brightness(0.56);
  }
}

@keyframes wowDim {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes wowSweep {
  0% {
    opacity: 0;
    transform: translateX(-45%) rotate(-8deg) scale(1.08);
  }
  28% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translateX(45%) rotate(-8deg) scale(1.08);
  }
}

@media (min-width: 768px) {
  .hero {
    place-items: center;
    padding: 1rem;
  }

  .hero::before {
    background-position: center, center, center;
  }

  .content {
    width: min(760px, 92vw);
  }

  h1 {
    font-size: clamp(2.7rem, 5.2vw, 4.3rem);
  }

  .subtitle {
    max-width: 560px;
    font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  }

  .portfolio-btn {
    min-width: 320px;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: clamp(2.1rem, 10.5vw, 2.9rem);
    white-space: nowrap;
    letter-spacing: 0;
  }

  .subtitle {
    max-width: none;
    font-size: clamp(0.88rem, 3.8vw, 1.02rem);
    white-space: nowrap;
    line-height: 1.2;
    letter-spacing: 0.01em;
  }

  .portfolio-btn {
    min-width: min(270px, 84vw);
    padding: 0.78rem 1.8rem;
    font-size: 1rem;
    letter-spacing: 0.01em;
  }

  .socials {
    margin-top: 1.35rem;
    gap: 0.55rem;
  }

  .socials a {
    width: 40px;
    height: 40px;
  }

  .socials svg {
    width: 17px;
    height: 17px;
  }

  .portfolio-btn.tap-animate,
  .socials a.tap-animate {
    animation: mobileTapPulse 0.5s ease both !important;
  }
}

@keyframes mobileTapPulse {
  0% {
    transform: translateY(0) scale(1);
    border-color: rgba(241, 202, 145, 0.72);
    box-shadow:
      0 0 0 1px rgba(235, 188, 112, 0.24),
      0 0 14px rgba(235, 188, 112, 0.5),
      0 0 30px rgba(235, 188, 112, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
  45% {
    transform: translateY(-3px) scale(1.035);
    border-color: rgba(255, 228, 182, 1);
    box-shadow:
      0 0 0 1px rgba(255, 228, 182, 0.45),
      0 0 24px rgba(235, 188, 112, 0.78),
      0 0 44px rgba(235, 188, 112, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
  }
  100% {
    transform: translateY(0) scale(1);
    border-color: rgba(241, 202, 145, 0.72);
    box-shadow:
      0 0 0 1px rgba(235, 188, 112, 0.24),
      0 0 14px rgba(235, 188, 112, 0.5),
      0 0 30px rgba(235, 188, 112, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.18);
  }
}
