/* ==========================================================================
   Morbezza — Coming Soon landing page
   ========================================================================== */

:root{
  --ink: #6b4a4a;
  --ink-soft: #8a6a68;
  --ink-faint: #a98988;
}

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

html, body{
  height:100%;
  width:100%;
}

body{
  position:relative;
  min-height:100vh;
  min-height:100dvh;
  background-image: url('../images/bg-texture.webp');
  background-size: 460px auto;
  background-position: center;
  background-repeat: repeat;
  background-color:#f1dedb;
  font-family:'Cormorant Garamond', serif;
  color: var(--ink);
  overflow-x:hidden;
}

/* soft vignette to unify the texture and add depth */
body::before{
  content:"";
  position:fixed;
  inset:0;
  background:
    radial-gradient(ellipse at 50% 42%, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 45%),
    radial-gradient(ellipse at 50% 100%, rgba(90,50,50,0.10) 0%, rgba(90,50,50,0) 55%),
    radial-gradient(ellipse at 50% 0%, rgba(90,50,50,0.06) 0%, rgba(90,50,50,0) 45%);
  pointer-events:none;
  z-index:1;
}

.page{
  position:relative;
  z-index:2;
  min-height:100vh;
  min-height:100dvh;
  /* JS fallback for browsers without dvh support (see js/main.js) */
  min-height: calc(var(--vh, 1vh) * 100);
  display:flex;
  flex-direction:column;
  align-items:stretch;
}

.stage{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding: clamp(28px, 8vh, 90px) clamp(20px, 6vw, 64px);
  min-height: 0;
}

.seal-wrap{
  position:relative;
  opacity:0;
  transform: translateY(-16px) scale(1.16) rotate(-4deg);
  filter: blur(4px);
  animation: stamp 0.95s cubic-bezier(0.16,1,0.3,1) 0.1s forwards;
  flex-shrink:0;
}

/* impression ring: the wax "landing" as the stamp settles */
.seal-wrap::after{
  content:"";
  position:absolute;
  inset: 6%;
  border-radius:50%;
  border:1px solid var(--ink-faint);
  opacity:0;
  transform: scale(0.72);
  animation: ring-pulse 0.9s cubic-bezier(0.25,1,0.5,1) 0.62s forwards;
  pointer-events:none;
}

.seal{
  width: clamp(108px, 24vw, 230px);
  height:auto;
  display:block;
  filter: drop-shadow(0 18px 30px rgba(96, 55, 55, 0.18));
  animation: breathe 7s ease-in-out 1.3s infinite;
  transition: transform 0.5s cubic-bezier(0.25,1,0.5,1);
}

/* breathe only touches filter; hover only touches transform — no property conflict */
.seal-wrap:hover .seal{
  transform: scale(1.015);
}

.est{
  margin-top: clamp(14px, 3vh, 30px);
  font-family:'Cormorant Garamond', serif;
  font-weight:400;
  font-style:italic;
  font-size: clamp(14px, 1.6vw, 19px);
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  opacity:0;
  animation: fade 1.4s ease 0.65s forwards;
}

.divider{
  width:34px;
  height:1px;
  margin: clamp(16px, 3.4vh, 34px) auto;
  background: linear-gradient(90deg, transparent, var(--ink-faint), transparent);
  opacity:0;
  transform: scaleX(0);
  transform-origin:center;
  animation: draw-line 0.8s cubic-bezier(0.16,1,0.3,1) 0.85s forwards;
}

.season{
  --tracking-end: clamp(0.08em, 0.24em, 0.24em);
  font-family:'Marcellus', serif;
  font-weight:400;
  font-size: clamp(26px, 6.4vw, 54px);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  opacity:0;
  filter: blur(3px);
  animation: track-in 1s cubic-bezier(0.16,1,0.3,1) 1.05s forwards;
  line-height:1.1;
}

.tagline{
  margin-top: clamp(10px, 2.2vh, 20px);
  font-family:'Cormorant Garamond', serif;
  font-weight:300;
  font-size: clamp(11px, 1.2vw, 14px);
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-faint);
  opacity:0;
  animation: fade 1.6s ease 1.5s forwards;
}

/* Slogan: modern sans, snappier per-word rhythm — a deliberate contrast
   beat against the slow serif reveals above it. */
.slogan{
  margin-top: clamp(22px, 4vh, 40px);
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap: 0.55em;
  max-width: min(90vw, 60ch);
}

.slogan .phrase{
  font-family:'Manrope', sans-serif;
  font-weight:600;
  font-size: clamp(11.5px, 1.5vw, 14px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity:0;
  transform: translateY(10px);
  animation: phrase-in 0.6s cubic-bezier(0.16,1,0.3,1) forwards;
  animation-delay: calc(1.65s + var(--i, 0) * 0.1s);
}

.slogan .dot{
  flex-shrink:0;
  width:4px;
  height:4px;
  border-radius:50%;
  background: var(--ink-faint);
  opacity:0;
  transform: scale(0);
  animation: dot-in 0.4s cubic-bezier(0.16,1,0.3,1) forwards;
  animation-delay: calc(1.65s + var(--i, 0) * 0.1s);
}

@keyframes phrase-in{
  to{ opacity:1; transform: translateY(0); }
}
@keyframes dot-in{
  to{ opacity:1; transform: scale(1); }
}

@keyframes stamp{
  to{ opacity:1; transform:translateY(0) scale(1) rotate(0deg); filter: blur(0); }
}
@keyframes ring-pulse{
  0%{ opacity:0.45; transform: scale(0.72); }
  100%{ opacity:0; transform: scale(1.5); }
}
@keyframes breathe{
  0%, 100%{ filter: drop-shadow(0 18px 30px rgba(96, 55, 55, 0.18)); }
  50%{ filter: drop-shadow(0 22px 36px rgba(96, 55, 55, 0.23)); }
}
@keyframes draw-line{
  to{ opacity:1; transform: scaleX(1); }
}
@keyframes track-in{
  to{ opacity:1; letter-spacing: var(--tracking-end); filter: blur(0); }
}
@keyframes fade{
  to{ opacity:1; }
}

footer{
  position:relative;
  z-index:3;
  flex-shrink:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  padding: clamp(18px, 4vh, 40px) clamp(20px, 6vw, 64px);
  padding-bottom: calc(clamp(18px, 4vh, 40px) + env(safe-area-inset-bottom));
  padding-left: calc(clamp(20px, 6vw, 64px) + env(safe-area-inset-left));
  padding-right: calc(clamp(20px, 6vw, 64px) + env(safe-area-inset-right));
  opacity:0;
  animation: fade 1.4s ease 2.1s forwards;
}

footer a{
  position:relative;
  color: var(--ink-soft);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  gap:8px;
  letter-spacing:0.08em;
  font-family:'Cormorant Garamond', serif;
  font-size: clamp(12px, 1.3vw, 15px);
  white-space: nowrap;
  transition: color 0.3s ease, opacity 0.3s ease;
  opacity:0.85;
}

footer a:hover,
footer a:focus-visible{
  color: var(--ink);
  opacity:1;
}

/* email link: underline draws in from the left on hover/focus */
.email-link::after{
  content:"";
  position:absolute;
  left:0; right:100%;
  bottom:-3px;
  height:1px;
  background: currentColor;
  transition: right 0.35s cubic-bezier(0.16,1,0.3,1);
}
.email-link:hover::after,
.email-link:focus-visible::after{
  right:0;
}

.ig-icon{
  width: clamp(17px, 2.4vw, 20px);
  height: clamp(17px, 2.4vw, 20px);
  display:block;
  flex-shrink:0;
  transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.ig-icon path, .ig-icon rect, .ig-icon circle{
  stroke: currentColor;
  fill:none;
}
footer a:hover .ig-icon,
footer a:focus-visible .ig-icon{
  transform: scale(1.1) rotate(-8deg);
}

/* Narrow phones */
@media (max-width: 380px){
  .season{ --tracking-end: 0.10em; }
  footer{ gap:10px; }
  footer a{ font-size: 11.5px; }
  .slogan{ gap: 0.45em 0.9em; max-width: 88vw; }
  .slogan .dot{ display:none; }
}

/* Short / landscape viewports (phones rotated, small laptops) */
@media (max-height: 480px){
  .stage{ padding-top: clamp(14px, 5vh, 30px); padding-bottom: clamp(14px, 5vh, 30px); }
  .seal{ width: clamp(78px, 14vh, 140px); }
  .est{ margin-top: 10px; }
  .divider{ margin: 10px auto; }
  .season{ font-size: clamp(20px, 5vh, 34px); }
  .tagline{ margin-top: 8px; }
  .slogan{ margin-top: 12px; }
  footer{ padding-top: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
}

/* Large desktop / wide screens: keep the composition from over-growing */
@media (min-width: 1600px){
  .stage{ max-width: 1400px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce){
  .seal-wrap, .seal, .est, .divider, .season, .tagline, footer{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    letter-spacing: var(--tracking-end, 0.24em);
  }
  .slogan .phrase{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .seal-wrap::after{
    animation: none !important;
    display:none;
  }
  /* the dots are functional separators, not decorative — keep them visible,
     just skip the pop-in animation */
  .slogan .dot{
    animation: none !important;
    opacity: 1 !important;
    transform: scale(1) !important;
  }
  .seal-wrap:hover .seal{
    transform:none;
  }
  .ig-icon, .email-link::after{
    transition-duration: 0.01ms !important;
  }
}

@media print{
  .seal-wrap, .seal, .est, .divider, .season, .tagline, .slogan .phrase, .slogan .dot, footer{
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .seal-wrap::after{ display:none; }
}
