/* ==========================================================================
   IGNARA — House of Dual Flame
   Holding page · dark editorial / molten gold
   ========================================================================== */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url("../fonts/cormorant-garamond-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("../fonts/montserrat-latin.woff2") format("woff2");
}

:root {
  --bg: #0b0907;
  --bg-deep: #070605;
  --panel: #181310;
  --gold: #cba158;
  --gold-bright: #f2ca50;
  --gold-soft: #ebd6b0;
  --ink: #a49c95;
  --ink-dim: #8c837b;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(1.5rem, 4.6vw, 6rem);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 90% 70% at 82% 34%, rgba(83, 55, 26, 0.26) 0%, rgba(20, 15, 12, 0.4) 46%, transparent 72%),
    radial-gradient(ellipse 70% 55% at 4% 2%, rgba(58, 41, 24, 0.16) 0%, transparent 62%);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

::selection {
  background: rgba(203, 161, 88, 0.24);
  color: var(--gold-soft);
}

a {
  color: inherit;
}

:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 6px;
}

/* --------------------------------------------------------------- ambience */

.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.ambient__glow {
  position: absolute;
  top: 50%;
  right: 3%;
  width: min(72vw, 880px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.3) 0%,
    rgba(203, 161, 88, 0.17) 34%,
    rgba(122, 72, 30, 0.1) 60%,
    transparent 78%
  );
  filter: blur(46px);
  opacity: 0.9;
  transform: translate3d(var(--gx, 0px), calc(-50% + var(--gy, 0px)), 0);
  animation: glowPulse 15s ease-in-out infinite alternate;
}

.ambient__visual {
  position: absolute;
  inset: 0 0 0 auto;
  width: 64%;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  will-change: transform;
}

.ambient__frame {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ambient__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 66% 50%;
  opacity: 0.9;
  mix-blend-mode: lighten;
  filter: brightness(0.92) contrast(1.07) saturate(0.92);
  transform-origin: 62% 50%;
  -webkit-mask-image: radial-gradient(
    ellipse 66% 74% at 62% 50%,
    #000 14%,
    rgba(0, 0, 0, 0.84) 40%,
    rgba(0, 0, 0, 0.36) 62%,
    transparent 81%
  );
  mask-image: radial-gradient(
    ellipse 66% 74% at 62% 50%,
    #000 14%,
    rgba(0, 0, 0, 0.84) 40%,
    rgba(0, 0, 0, 0.36) 62%,
    transparent 81%
  );
  animation: breathe 26s ease-in-out infinite alternate;
}

.ambient__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      var(--bg) 0%,
      rgba(11, 9, 7, 0.95) 24%,
      rgba(11, 9, 7, 0.62) 46%,
      rgba(11, 9, 7, 0.12) 64%,
      transparent 74%
    ),
    linear-gradient(0deg, rgba(7, 6, 5, 0.8) 0%, rgba(7, 6, 5, 0) 32%);
}

.ambient__grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

.ambient__embers span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 8px 2px rgba(203, 161, 88, 0.32);
  opacity: 0;
  animation: ember var(--d, 20s) linear var(--delay, 0s) infinite;
}

.ambient__embers span:nth-child(1) {
  --x: 58%;
  --y: 62%;
  --d: 19s;
  --delay: -3s;
}

.ambient__embers span:nth-child(2) {
  --x: 71%;
  --y: 48%;
  --s: 3px;
  --d: 26s;
  --delay: -11s;
}

.ambient__embers span:nth-child(3) {
  --x: 84%;
  --y: 70%;
  --d: 22s;
  --delay: -7s;
}

.ambient__embers span:nth-child(4) {
  --x: 47%;
  --y: 36%;
  --s: 1.5px;
  --d: 30s;
  --delay: -17s;
}

.ambient__embers span:nth-child(5) {
  --x: 92%;
  --y: 30%;
  --s: 2.5px;
  --d: 24s;
  --delay: -14s;
}

.ambient__embers span:nth-child(6) {
  --x: 66%;
  --y: 84%;
  --s: 1.5px;
  --d: 28s;
  --delay: -5s;
}

/* ------------------------------------------------------------------ page */

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding-top: clamp(1.5rem, 3.2vw, 3.4rem);
  padding-right: var(--pad);
  padding-bottom: calc(clamp(1.4rem, 2.8vw, 2.6rem) + env(safe-area-inset-bottom));
  padding-left: var(--pad);
}

/* ----------------------------------------------------------------- brand */

.brand {
  display: flex;
  animation: brandIn 1.6s var(--ease) 0.05s both;
}

.brand__link {
  display: inline-flex;
  border-radius: 3px;
  transition:
    transform 0.6s var(--ease),
    filter 0.6s var(--ease);
}

.brand__link img {
  display: block;
  width: auto;
  height: clamp(110px, 24vmin, 238px);
  filter: drop-shadow(0 6px 22px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 28px rgba(203, 161, 88, 0.16));
}

.brand__link:hover {
  transform: scale(1.012);
  filter: brightness(1.06);
}

/* ------------------------------------------------------------------ main */

.main {
  max-width: 36rem;
  margin-top: clamp(1.25rem, 4.5vh, 3.25rem);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 clamp(0.9rem, 2vh, 1.25rem);
  color: var(--gold);
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  line-height: 1;
  text-transform: uppercase;
  animation: rise 1s var(--ease) 0.3s both;
}

.eyebrow__dot {
  position: relative;
  display: inline-block;
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-bright);
  animation: pulseDot 2.6s ease-in-out infinite;
}

.headline {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(3.15rem, 6.6vw, 5.7rem);
  font-weight: 400;
  letter-spacing: -0.012em;
  line-height: 0.94;
}

.headline__line {
  display: block;
  overflow: hidden;
  padding-block: 0.03em;
}

.headline__line + .headline__line {
  margin-top: -0.03em;
}

.headline__text {
  display: inline-block;
  color: transparent;
  background-image:
    linear-gradient(
      100deg,
      rgba(255, 255, 255, 0) 38%,
      rgba(255, 251, 235, 0.5) 48%,
      rgba(255, 255, 255, 0) 58%
    ),
    linear-gradient(180deg, #f9ecc9 0%, #f0d496 30%, #e2b765 58%, #cfa253 80%, #b68a40 100%);
  background-size:
    260% 100%,
    100% 100%;
  background-position:
    -80% 0,
    0 0;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 8px 26px rgba(0, 0, 0, 0.55));
  animation:
    lineIn 1.3s var(--ease) both,
    shimmer 11s ease-in-out infinite alternate;
}

.headline__line:nth-child(1) .headline__text {
  animation-delay: 0.24s, 3.4s;
}

.headline__line:nth-child(2) .headline__text {
  animation-delay: 0.36s, 3.4s;
}

.rule {
  width: 5.5rem;
  height: 2px;
  margin: clamp(1.4rem, 3vh, 2.2rem) 0 clamp(1.2rem, 2.6vh, 1.9rem);
  background: linear-gradient(90deg, var(--gold-bright), var(--gold) 55%, rgba(203, 161, 88, 0));
  box-shadow:
    0 0 12px rgba(242, 202, 80, 0.45),
    0 0 30px rgba(203, 161, 88, 0.18);
  transform-origin: left center;
  animation: ruleIn 1s var(--ease) 0.72s both;
}

.lede {
  max-width: 27rem;
  margin: 0;
  color: var(--ink);
  font-size: clamp(0.92rem, 1.05vw, 1rem);
  font-weight: 300;
  letter-spacing: 0.012em;
  line-height: 1.85;
  text-wrap: pretty;
  animation: rise 1s var(--ease) 0.9s both;
}

/* ---------------------------------------------------------------- footer */

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  margin-top: auto;
  padding-top: clamp(2rem, 5vh, 3.5rem);
  color: var(--ink-dim);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  line-height: 1.4;
  text-transform: uppercase;
  animation: fadeIn 1.3s var(--ease) 1.15s both;
}

.footer p {
  margin: 0;
}

.footer__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--gold);
}

.footer__tag::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
}

/* ------------------------------------------------------------- 404 page */

.is-404 .main {
  max-width: 34rem;
}

.is-404 .headline {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
}

.is-404 .lede {
  margin-bottom: clamp(1.6rem, 4vh, 2.4rem);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid rgba(203, 161, 88, 0.4);
  background: rgba(203, 161, 88, 0.06);
  color: var(--gold-soft);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-decoration: none;
  text-transform: uppercase;
  transition:
    background 0.45s var(--ease),
    border-color 0.45s var(--ease),
    color 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
  animation: rise 1s var(--ease) 1s both;
}

.cta::after {
  content: "→";
  font-family: var(--sans);
  transition: transform 0.45s var(--ease);
}

.cta:hover {
  border-color: rgba(242, 202, 80, 0.75);
  background: rgba(203, 161, 88, 0.12);
  color: #fff4de;
  box-shadow: 0 8px 34px -8px rgba(203, 161, 88, 0.35);
}

.cta:hover::after {
  transform: translateX(4px);
}

/* -------------------------------------------------------------- keyframes */

@keyframes brandIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lineIn {
  from {
    opacity: 0;
    transform: translate3d(0, 112%, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes ruleIn {
  from {
    opacity: 0;
    transform: scaleX(0);
  }
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes shimmer {
  from {
    background-position:
      -80% 0,
      0 0;
  }
  to {
    background-position:
      180% 0,
      0 0;
  }
}

@keyframes breathe {
  from {
    transform: scale(1.015) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.06) translate3d(0, -1.2%, 0);
  }
}

@keyframes glowPulse {
  from {
    opacity: 0.68;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulseDot {
  0%,
  100% {
    opacity: 1;
    box-shadow:
      0 0 10px rgba(242, 202, 80, 0.8),
      0 0 4px rgba(242, 202, 80, 0.9);
  }
  50% {
    opacity: 0.5;
    box-shadow: 0 0 4px rgba(242, 202, 80, 0.35);
  }
}

@keyframes ember {
  0% {
    opacity: 0;
    transform: translate3d(0, 24px, 0) scale(0.5);
  }
  12% {
    opacity: 0.75;
  }
  60% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translate3d(14px, -170px, 0) scale(1);
  }
}

/* ------------------------------------------------------------ responsive */

@media (min-width: 768px) and (max-width: 1023px) {
  .ambient__visual {
    inset: auto 0 0 auto;
    width: 74%;
    height: 60vh;
  }

  .ambient__frame img {
    object-position: 68% 52%;
    opacity: 0.68;
  }

  .brand__link img {
    height: 172px;
  }

  .main {
    max-width: 27rem;
  }
}

@media (max-width: 767px) {
  .ambient__visual {
    inset: auto 0 0 0;
    width: 100%;
    height: 58vh;
  }

  .ambient__frame img {
    object-position: 68% 55%;
    opacity: 0.3;
    -webkit-mask-image: radial-gradient(
      ellipse 82% 72% at 62% 58%,
      #000 6%,
      rgba(0, 0, 0, 0.72) 36%,
      rgba(0, 0, 0, 0.24) 64%,
      transparent 86%
    );
    mask-image: radial-gradient(
      ellipse 82% 72% at 62% 58%,
      #000 6%,
      rgba(0, 0, 0, 0.72) 36%,
      rgba(0, 0, 0, 0.24) 64%,
      transparent 86%
    );
  }

  .ambient__glow {
    top: 76%;
    right: -34%;
    width: 128vw;
    opacity: 0.45;
  }

  .ambient__scrim {
    background: linear-gradient(
      180deg,
      rgba(11, 9, 7, 0.4) 0%,
      rgba(11, 9, 7, 0.42) 26%,
      rgba(11, 9, 7, 0.78) 58%,
      rgba(11, 9, 7, 0.94) 82%,
      var(--bg) 100%
    );
  }

  .ambient__embers span:nth-child(n + 5) {
    display: none;
  }

  .page {
    padding-top: calc(1.5rem + env(safe-area-inset-top));
  }

  .brand {
    justify-content: center;
  }

  .brand__link img {
    height: 130px;
  }

  .main {
    margin-top: clamp(1.9rem, 5.5vh, 3rem);
  }

  .eyebrow {
    font-size: 0.6rem;
    letter-spacing: 0.3em;
  }

  .headline {
    font-size: clamp(2.9rem, 14.5vw, 4.5rem);
    line-height: 0.96;
  }

  .lede {
    max-width: 23rem;
    font-size: 0.92rem;
    line-height: 1.8;
  }

  .footer {
    font-size: 0.54rem;
    letter-spacing: 0.24em;
  }
}

@media (max-width: 360px) {
  .headline {
    font-size: clamp(2.6rem, 14vw, 3.4rem);
  }

  .lede {
    font-size: 0.86rem;
  }

  .brand__link img {
    height: 112px;
  }
}

/* keep the composition usable on short landscape screens */
@media (max-height: 620px) and (min-width: 768px) {
  .brand__link img {
    height: 108px;
  }

  .main {
    margin-top: 1rem;
  }

  .headline {
    font-size: clamp(2.8rem, 5.2vw, 4rem);
  }

  .rule {
    margin-block: 1rem;
  }

  .footer {
    padding-top: 1.2rem;
  }
}

@media (max-height: 560px) and (max-width: 767px) {
  .brand__link img {
    height: 88px;
  }

  .main {
    margin-top: 1.1rem;
  }

  .headline {
    font-size: clamp(2.2rem, 11vw, 3rem);
  }

  .eyebrow {
    margin-bottom: 0.55rem;
  }

  .rule {
    margin-block: 0.85rem;
  }

  .footer {
    padding-top: 1rem;
  }
}

/* very short landscape phones: compress everything so the page fits */
@media (max-height: 460px) and (max-width: 767px) {
  .page {
    padding-top: calc(0.9rem + env(safe-area-inset-top));
    padding-bottom: calc(0.8rem + env(safe-area-inset-bottom));
  }

  .brand__link img {
    height: 64px;
  }

  .main {
    margin-top: 0.7rem;
  }

  .eyebrow {
    margin-bottom: 0.4rem;
    font-size: 0.54rem;
  }

  .headline {
    font-size: clamp(1.85rem, 9vw, 2.6rem);
    line-height: 1;
  }

  .rule {
    margin-block: 0.65rem;
  }

  .lede {
    max-width: 24rem;
    font-size: 0.8rem;
    line-height: 1.55;
  }

  .footer {
    padding-top: 0.8rem;
    font-size: 0.5rem;
  }
}

/* ------------------------------------------------------------- a11y prefs */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ambient__embers {
    display: none;
  }

  .ambient__frame img {
    transform: scale(1.02);
  }
}
