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

:root {
  /* colour tokens */
  --maroon:     #900000;
  --maroon-dim: #c04040;
  --black:      #faf5ee;
  --cream:      #1a0a02;
  --muted:      #7a5a48;

  /* theme-switched internals */
  --blob-a:       rgba(144,0,0,.08);
  --blob-b:       rgba(180,60,0,.06);
  --foot-name:    rgba(60,20,5,.65);
  --foot-sep:     rgba(144,0,0,.60);
  --foot-copy:    rgba(80,40,20,.45);
  --foot-border:  rgba(144,0,0,.15);
  --toggle-bg:    rgba(144,0,0,.06);
  --toggle-border:rgba(144,0,0,.22);
  --toggle-hover: rgba(144,0,0,.13);
}

html[data-theme="dark"] {
  --maroon-dim: #5c0000;
  --black:      #080808;
  --cream:      #f0e6d3;
  --muted:      #806050;
  --blob-a:       rgba(144,0,0,.18);
  --blob-b:       rgba(100,0,0,.13);
  --foot-name:    rgba(200,160,120,.80);
  --foot-sep:     rgba(144,0,0,.65);
  --foot-copy:    rgba(180,140,110,.55);
  --foot-border:  rgba(144,0,0,.12);
  --toggle-bg:    rgba(240,210,170,.06);
  --toggle-border:rgba(240,210,170,.22);
  --toggle-hover: rgba(240,210,170,.12);
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  background: var(--black);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: 'Cormorant Garamond', Georgia, serif;
  padding-bottom: 3.5rem;
  transition: background-color .5s ease, color .5s ease;
}

/* ── background blobs ── */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg::before,
.bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  transition: background .5s ease;
}

.bg::before {
  width: 55vmax;
  height: 55vmax;
  top: -15vmax;
  left: -15vmax;
  background: radial-gradient(circle, var(--blob-a) 0%, transparent 65%);
  animation: blobA 20s ease-in-out infinite alternate;
}

.bg::after {
  width: 45vmax;
  height: 45vmax;
  bottom: -12vmax;
  right: -12vmax;
  background: radial-gradient(circle, var(--blob-b) 0%, transparent 65%);
  animation: blobB 25s ease-in-out infinite alternate;
}

@keyframes blobA {
  to { transform: translate(12vw, 8vh) scale(1.15); }
}
@keyframes blobB {
  to { transform: translate(-10vw, -7vh) scale(1.2); }
}

/* ── particle canvas ── */
canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── theme toggle button ── */
.theme-toggle {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  z-index: 10;
  background: var(--toggle-bg);
  border: 1px solid var(--toggle-border);
  border-radius: 50%;
  width: 3.4rem;
  height: 3.4rem;
  cursor: pointer;
  /* stack both icons on top of each other */
  display: grid;
  place-items: center;
  color: var(--maroon);
  padding: 0;
  opacity: 0;
  animation: fadeIn .8s ease forwards 2.3s;
  transition: background .4s ease, border-color .4s ease, color .6s ease;
}

.theme-toggle:hover {
  background: var(--toggle-hover);
  border-color: var(--maroon);
}

.theme-toggle svg {
  width: 1.7rem;
  height: 1.7rem;
  /* both occupy the same grid cell */
  grid-area: 1 / 1;
  transition: opacity .45s ease, transform .45s cubic-bezier(.4,0,.2,1);
}

/* ── light mode (default): show moon, hide sun ── */
.icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
  pointer-events: none;
}
.icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* ── dark mode: show sun, hide moon ── */
html[data-theme="dark"] .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
  pointer-events: auto;
}
html[data-theme="dark"] .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
  pointer-events: none;
}

/* ── main content ── */
.content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── ornament ── */
.ornament {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeIn .8s ease forwards .2s;
}

.orn-line {
  width: 64px;
  height: 1px;
}

.orn-line:first-child {
  background: linear-gradient(90deg, transparent, var(--maroon));
}

.orn-line:last-child {
  background: linear-gradient(90deg, var(--maroon), transparent);
}

.orn-diamond {
  width: 7px;
  height: 7px;
  background: var(--maroon);
  transform: rotate(45deg);
  box-shadow: 0 0 12px var(--maroon);
  animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 8px var(--maroon); }
  50%       { box-shadow: 0 0 22px var(--maroon), 0 0 42px var(--maroon-dim); }
}

/* ── brand ── */
.brand {
  font-size: clamp(3.2rem, 11vw, 6.4rem);
  font-weight: 400;
  letter-spacing: .09em;
  word-spacing: .45em;
  text-transform: uppercase;
  line-height: 1;
  opacity: 0;
  transform: translateY(28px);
  animation: riseIn 1.1s cubic-bezier(.22,.61,.36,1) forwards .4s;
  transition: color .5s ease;
}

.brand em {
  font-style: italic;
  color: var(--maroon);
  font-weight: 500;
}

@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ── tagline ── */
.tagline {
  font-size: clamp(1.1rem, 2.8vw, 1.45rem);
  font-weight: 400;
  font-style: italic;
  letter-spacing: .25em;
  color: var(--muted);
  margin-top: .8rem;
  opacity: 0;
  animation: fadeIn .9s ease forwards .9s;
  transition: color .5s ease;
}

/* ── coming-soon stage ── */
.stage {
  position: relative;
  height: clamp(3.6rem, 9vw, 5.6rem);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
}

.phrase {
  position: absolute;
  font-size: clamp(1.7rem, 5.4vw, 3rem);
  font-weight: 400;
  letter-spacing: .1em;
  color: var(--cream);
  opacity: 0;
  transform: translateY(10px);
  filter: blur(8px);
  transition:
    opacity   1s cubic-bezier(.4, 0, .2, 1),
    transform 1s cubic-bezier(.4, 0, .2, 1),
    filter    1s cubic-bezier(.4, 0, .2, 1),
    color     .5s ease;
  white-space: nowrap;
}

/* Bengali — Noto Serif Bengali */
#p0 {
  font-family: 'Noto Serif Bengali', serif;
  font-weight: 300;
  letter-spacing: .04em;
}

/* Hindi — Noto Serif Devanagari */
#p1 {
  font-family: 'Noto Serif Devanagari', serif;
  font-weight: 300;
  letter-spacing: .04em;
}

/* English — italic Cormorant */
#p2 {
  font-style: italic;
  font-weight: 300;
}

.phrase.active {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.phrase.leaving {
  opacity: 0;
  transform: translateY(-10px);
  filter: blur(8px);
}

/* ── footer ── */
.foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: .9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--foot-border);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn .8s ease forwards 2s;
  transition: border-color .5s ease;
}

.foot-name {
  color: var(--foot-name);
  font-weight: 500;
  letter-spacing: .3em;
  transition: color .5s ease;
}

.foot-sep {
  color: var(--foot-sep);
  transition: color .5s ease;
}

.foot-copy {
  color: var(--foot-copy);
  transition: color .5s ease;
}

/* ── shared keyframes ── */
@keyframes fadeIn {
  to { opacity: 1; }
}

/* ── mobile ── */
@media (max-width: 480px) {
  body {
    justify-content: space-evenly;
    padding-bottom: 4rem;
  }

  .content {
    gap: 1rem;
    padding: 2.5rem 1.5rem;
  }

  .ornament {
    margin-bottom: 0;
  }

  .tagline {
    margin-top: 1rem;
  }

  .stage {
    margin-top: 2.4rem;
    height: clamp(5rem, 14vw, 7rem);
  }

  .phrase {
    font-size: clamp(2.2rem, 8vw, 3.8rem);
  }

  .orn-line { width: 40px; }

  .foot {
    padding: .75rem 1rem;
    font-size: .68rem;
    gap: .6rem;
    letter-spacing: .18em;
  }
}
