:root {
  --gold: #c5b38a;
  --gold-bright: #ddd0b0;
  --gold-dim: #8a7354;
  --gold-line: rgba(197, 179, 138, 0.45);
  --bg: #050505;
  --ink: #0a0a0b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--gold);
  font-family: "Cormorant Garamond", Georgia, serif;
}

.page-frame {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.1rem clamp(1.2rem, 6.5vw, 5.5rem) 1.2rem;
  background-color: var(--ink);
  background-image: url("../assets/frame-ornate.png");
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  overflow: hidden;
}

.side-skull {
  display: none;
  position: absolute;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  min-height: 5.4rem;
  z-index: 2;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
}

.nav-links a,
.footer-right a {
  font-family: "Cinzel", serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.footer-right a:hover,
.header-tools .icon-btn:hover {
  color: var(--gold-bright);
}

.brand {
  justify-self: center;
}

.brand img {
  display: block;
  height: clamp(3.6rem, 8vw, 5.4rem);
  width: auto;
  filter: drop-shadow(0 0 18px rgba(197, 179, 138, 0.18));
}

.header-tools {
  justify-self: end;
  display: flex;
  gap: 0.85rem;
}

.icon-btn {
  background: transparent;
  border: 0;
  color: var(--gold);
  font-size: 1.15rem;
  line-height: 1;
  padding: 0.15rem;
}

.site-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.2rem 0 0.6rem;
  z-index: 2;
}

.hero-title {
  font-family: "Cinzel", serif;
  font-weight: 700;
  font-size: clamp(2rem, 5.2vw, 3.35rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold);
  margin: 0.15rem 0 0.45rem;
  text-indent: 0.42em;
  text-shadow: 0 0 24px rgba(197, 179, 138, 0.18);
}

.hero-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  width: min(42rem, 100%);
  margin: 0 0 1.1rem;
  font-family: "Cinzel", serif;
  font-size: clamp(0.58rem, 1.3vw, 0.72rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold);
}

.hero-sub-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
  position: relative;
}

.hero-sub-line::after {
  content: "◆";
  position: absolute;
  top: 50%;
  font-size: 0.45rem;
  color: var(--gold-dim);
  transform: translate(-50%, -54%);
}

.hero-sub-line:first-child::after {
  right: -0.15rem;
  left: auto;
  transform: translate(50%, -54%);
}

.dropzone {
  width: min(46rem, 100%);
  min-height: 13.5rem;
  padding: 1.4rem 1.4rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  background-image: url("../assets/dropzone-frame.png");
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  transition: filter 0.2s ease;
}

.dropzone.is-dragover {
  filter: brightness(1.18) saturate(1.1);
}

.dropzone-icon {
  width: 3.4rem;
  height: auto;
  margin-bottom: 0.45rem;
  pointer-events: none;
}

.dropzone-lead,
.dropzone-or,
.dropzone-meta,
.dropzone-file {
  margin: 0;
  font-family: "Cinzel", serif;
  text-transform: uppercase;
}

.dropzone-lead {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
}

.dropzone-or {
  margin: 0.35rem 0 0.55rem;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  color: var(--gold-dim);
}

.btn-select {
  background: transparent;
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.48rem 1.35rem;
  border: 1px solid var(--gold-dim);
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px var(--gold-dim);
  transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-select:hover {
  color: var(--gold-bright);
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--ink), 0 0 0 4px var(--gold);
}

.dropzone-file {
  margin-top: 0.7rem;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--gold-bright);
}

.dropzone-meta {
  margin-top: 0.75rem;
  font-size: 0.52rem;
  letter-spacing: 0.16em;
  color: var(--gold-dim);
}

.btn-convert {
  display: block;
  width: min(38rem, 100%);
  height: 4.6rem;
  margin: 0.55rem auto 0;
  padding: 0 3.5rem;
  border: 0;
  background-color: transparent;
  background-image: url("../assets/btn-convert-frame.png");
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.btn-convert:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-convert:not(:disabled):hover {
  filter: brightness(1.16);
  color: var(--gold-bright);
}

.convert-status {
  min-height: 1.2rem;
  margin: 0.25rem 0 0.15rem;
  font-family: "Cinzel", serif;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-dim);
  text-align: center;
}

.how-section {
  width: min(58rem, 100%);
  margin-top: 0.35rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.4rem 0 1.1rem;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-align: center;
}

.section-title span {
  flex: 0 0 auto;
}

.section-title::before,
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}

.how-row {
  --bs-gutter-x: 1.2rem;
}

.how-step {
  position: relative;
  text-align: center;
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

.step-icon {
  width: 3.15rem;
  height: 3.15rem;
  margin: 0 auto 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.2rem;
  border: 1px solid var(--gold-dim);
  border-radius: 50%;
  position: relative;
}

.step-icon::before,
.step-icon::after {
  content: "";
  position: absolute;
  background: var(--gold-dim);
}

.step-icon::before {
  width: 1px;
  height: 0.42rem;
  top: -0.42rem;
  box-shadow: 0 3.55rem 0 var(--gold-dim);
}

.step-icon::after {
  height: 1px;
  width: 0.42rem;
  left: -0.42rem;
  box-shadow: 3.55rem 0 0 var(--gold-dim);
}

.how-step h3 {
  margin: 0 0 0.3rem;
  font-family: "Cinzel", serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.how-step p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.35;
  color: #b7a784;
}

.step-arrow {
  position: absolute;
  top: 1.05rem;
  right: -0.35rem;
  color: var(--gold-dim);
  font-size: 0.85rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.4rem;
  z-index: 2;
}

.footer-copy {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.55;
  color: var(--gold-dim);
}

.footer-skull {
  width: 2.7rem;
  height: auto;
  justify-self: center;
  opacity: 0.92;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.8));
}

.footer-right {
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem 1rem;
}

.socials {
  display: flex;
  gap: 0.65rem;
}

.socials a {
  color: var(--gold);
  font-size: 0.9rem;
  display: inline-flex;
}

.ritual-modal {
  background: #0c0c0d;
  color: var(--gold);
  border: 1px solid var(--gold-dim);
  border-radius: 0;
}

.ritual-modal .modal-header,
.ritual-modal .modal-footer {
  border-color: rgba(197, 179, 138, 0.18);
}

.ritual-modal .modal-title {
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.ritual-modal .modal-body {
  font-size: 1.05rem;
}

.ritual-modal a {
  color: var(--gold-bright);
}

.ritual-input {
  background: #111;
  border: 1px solid var(--gold-dim);
  color: var(--gold);
  border-radius: 0;
}

.ritual-input:focus {
  background: #151515;
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: none;
}

@media (max-width: 991.98px) {
  .page-frame {
    background-size: cover;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 1.5rem;
  }

  .side-skull {
    display: block;
    top: 4.6rem;
    height: min(48vh, 26rem);
    width: auto;
    opacity: 0.95;
    filter: drop-shadow(0 0 14px rgba(0, 0, 0, 0.85));
  }

  .side-skull-left {
    left: 0;
    transform: translateX(-32%);
  }

  .side-skull-right {
    right: 0;
    transform: translateX(32%);
  }

  .hero-title {
    letter-spacing: 0.22em;
    text-indent: 0.22em;
  }

  .btn-convert {
    height: 3.8rem;
    padding: 0 2.4rem;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
  }
}

@media (max-width: 767.98px) {
  .site-header,
  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .nav-links,
  .header-tools,
  .footer-right,
  .brand {
    justify-content: center;
    justify-self: center;
  }

  .footer-copy,
  .footer-right {
    justify-self: center;
    text-align: center;
  }

  .dropzone {
    min-height: 15rem;
    background-size: cover;
  }

  .side-skull {
    top: 5.2rem;
    height: min(44vh, 20rem);
  }

  .side-skull-left {
    transform: translateX(-38%);
  }

  .side-skull-right {
    transform: translateX(38%);
  }
}
