:root {
  --bg: #ede9e9;
  --ink: #3a3a3a;
  --ink-soft: #7a7676;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  /* only hide horizontal overflow; vertical scroll stays available on short screens */
  overflow-x: hidden;
}

.announcement {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 960px;
  padding: clamp(1rem, 4vw, 2rem);
}

/* Logo: fade in, then float gently */
.announcement__logo {
  /* scale with width AND height so it fits in landscape phones */
  width: min(420px, 80vw, 55vh);
  width: min(420px, 80vw, 55dvh);
  height: auto;
  opacity: 0;
  animation:
    fade-up 1.4s ease-out forwards,
    float 6s ease-in-out 1.4s infinite;
}

/* "Próximamente": letters appear one by one, then breathe */
.announcement__title {
  --tracking: 0.35em;
  margin-top: clamp(0.75rem, 3vh, 1.5rem);
  font-family: "Cormorant Garamond", serif;
  font-weight: 300;
  /* sized from viewport width so the 12 letters always fit on one line */
  font-size: clamp(1.25rem, 5.5vw, 3.5rem);
  letter-spacing: var(--tracking);
  text-transform: uppercase;
  white-space: nowrap;
  /* compensate trailing letter-spacing so the word stays centered */
  margin-right: calc(var(--tracking) * -1);
}

.announcement__title span {
  display: inline-block;
  opacity: 0;
  animation:
    letter-in 0.8s ease-out forwards,
    breathe 3s ease-in-out infinite;
  animation-delay:
    calc(1.2s + var(--i) * 0.08s),
    calc(2.6s + var(--i) * 0.12s);
}

/* Decorative line that draws itself */
.announcement__line {
  display: block;
  width: 0;
  height: 1px;
  margin: clamp(0.75rem, 3vh, 1.5rem) 0 clamp(0.75rem, 2.5vh, 1.25rem);
  background: var(--ink);
  animation: draw-line 1.2s ease-out 2.4s forwards;
}

.announcement__subtitle {
  font-size: clamp(0.75rem, 2vw, 0.9rem);
  font-weight: 300;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--ink-soft);
  opacity: 0;
  animation: fade-up 1s ease-out 3s forwards;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

@keyframes letter-in {
  from { opacity: 0; transform: translateY(15px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0); filter: blur(0); }
}

@keyframes breathe {
  0%, 100% { color: var(--ink); }
  50%      { color: var(--ink-soft); }
}

@keyframes draw-line {
  to { width: min(180px, 40vw); }
}

/* Small phones: tighter letter spacing */
@media (max-width: 480px) {
  .announcement__title {
    --tracking: 0.2em;
  }

  .announcement__subtitle {
    letter-spacing: 0.15em;
  }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .announcement__logo,
  .announcement__title span,
  .announcement__subtitle {
    opacity: 1;
    animation: none;
  }

  .announcement__line {
    width: min(180px, 40vw);
    animation: none;
  }
}
