/* =========================================
   Minimal custom CSS — only what Tailwind
   cannot express as utility classes
   ========================================= */

/* Input focus — Marente dark */
input:focus,
textarea:focus {
  outline: none;
  border-color: #792D46 !important;
  box-shadow: 0 0 0 2px rgba(121, 45, 70, 0.2);
}

/* Shared button */
.btn-primary {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  color: white;
  background: #792D46;
  border: none;
  border-radius: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 0.2s;
  box-shadow: 0 4px 12px rgba(144, 58, 78, 0.2);
}
.btn-primary:hover {
  opacity: 0.9;
}

/* Page show/hide system (needs !important to override inline styles on load) */
.page {
  display: none !important;
}
.page.active {
  display: flex !important;
}

/* Shared fade-in timing */
.animate-fadeIn {
  animation-delay: 220ms;
  animation-fill-mode: both;
}

@keyframes heartbeatBounce {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }
  12% {
    transform: scale(1.12) translateY(-1px);
  }
  24% {
    transform: scale(0.96) translateY(0);
  }
  38% {
    transform: scale(1.08) translateY(-2px);
  }
  52% {
    transform: scale(1) translateY(0);
  }
  70% {
    transform: scale(1.03) translateY(-3px);
  }
}

.heartbeat-bounce {
  transform-origin: center center;
  animation: heartbeatBounce 1.5s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .heartbeat-bounce {
    animation: none;
  }
}

/* Envelope send animation */
.envelope-send {
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.envelope-icon {
  width: 80px;
  height: 60px;
  animation: envelopeFly 2s ease-in-out forwards;
}
@keyframes envelopeFly {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  30% {
    transform: translateY(-20px) scale(1.05);
    opacity: 1;
  }
  70% {
    transform: translateY(-60px) scale(0.9);
    opacity: 0.9;
  }
  100% {
    transform: translateY(-120px) scale(0.6);
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .envelope-icon {
    animation: none;
  }
  .contact-success-text {
    animation: none;
    opacity: 1;
  }
}
.contact-success-text {
  animation: contactSuccessFadeIn 0.6s ease-out 0.8s forwards;
  opacity: 0;
}
@keyframes contactSuccessFadeIn {
  to {
    opacity: 1;
  }
}

/* Intro card glow shadow (too complex for Tailwind arbitrary values) */
.card-shadow {
  box-shadow:
    8px 36px 400px 0px rgba(244, 117, 33, 0.4),
    100px -3px 400px 0px rgba(121, 45, 70, 0.4);
}

/* Page 2 (gauge) layout */
.page-gauge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 44px 24px;
  isolation: isolate;
}
.gauge-logo {
  position: absolute;
  top: 34px;
  right: 52px;
  width: 158px;
  height: auto;
  z-index: 6;
}

.gauge-bloom-warm {
  width: min(1020px, 94vw);
  top: 67%;
  background: radial-gradient(circle at 50% 40%, rgba(236, 149, 92, 0.38) 0%, rgba(236, 149, 92, 0) 72%);
}
.gauge-status {
  font-size: 0.95rem;
  font-weight: 600;
  color: #792D46;
  margin-bottom: 28px;
  z-index: 4;
}
.gauge-row {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.gauge-name {
  font-size: 4.5rem;
  line-height: 1;
  font-weight: 800;
  color: #792D46;
  white-space: nowrap;
}
.gauge-name-left {
  text-align: center;
}
.gauge-name-right {
  text-align: center;
  margin-top: -100px;
  z-index:999;
}
.gauge-stack {
  position: relative;
  width: 422px;
  max-width: 44vw;
  aspect-ratio: 1 / 1;
}
.gauge-disc {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(255, 243, 237, 0.5);
  backdrop-filter: blur(0.5px);
  z-index: 1;
}
.gauge-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid rgba(255, 243, 237, 0.55);
  z-index: 2;
}
.gauge-ring-outer {
  width: 192px;
  height: 192px;
}
.gauge-ring-inner {
  width: 138px;
  height: 138px;
  border-color: rgba(255, 243, 237, 0.35);
}
.gauge-arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  overflow: visible;
}
.gauge-needle-rotor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 206px;
  height: 68px;
  z-index: 5;
  transform-origin: 31px 50%;
  transform: translate(-31px, -50%) rotate(-180deg);
  transition: transform 2.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}
.gauge-needle-svg {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gauge-percent {
  position: absolute;
  top: 12%;
  left: 50%;
  transform: translate(-40%, -50%);
  color: #fef8f5;
  font-weight: 800;
  font-size: 2.8rem;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(122, 64, 34, 0.2);
  z-index: 4;
  opacity: 0;
  transition: opacity 400ms ease;
  transition-delay:1s;
}
.gauge-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 84px;
  height: 84px;
  background: #d0d0d2;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(90, 59, 57, 0.17);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
}
.gauge-center::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: #fff;
}
.gauge-center img {
  width: 38px;
  height: auto;
  display: block;
  position: relative;
  z-index: 1;
}

/* SVG stroke properties (no Tailwind equivalents) */
.gauge-track {
  fill: none;
  stroke: rgba(246, 183, 143, 0.48);
  stroke-width: 64;
  stroke-linecap: butt;
}
.gauge-fill {
  fill: none;
  stroke: url(#arc-grad);
  stroke-width: 64;
  stroke-linecap: butt;
  stroke-dasharray: 496.4;
  stroke-dashoffset: 496.4;
  transition: stroke-dashoffset .2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (max-width: 1240px) {
  .gauge-logo {
    width: 132px;
  }
  .gauge-name {
    font-size: 3.6rem;
  }
  .gauge-stack {
    max-width: 46vw;
  }
}

/* Gauge responsive: names wrap on small screens */
@media (max-width: 860px) {
  .page-gauge {
    padding: 28px 16px;
  }
  .gauge-row {
    gap: 12px;
  }
  .gauge-name {
    font-size: 2.2rem;
    width: 100%;
    text-align: center;
  }
  .gauge-stack {
    width: min(92vw, 422px);
    max-width: none;
  }
  .gauge-logo {
    right: 18px;
    top: 20px;
    width: 100px;
  }
  .gauge-status {
    margin-bottom: 14px;
    font-size: 0.9rem;
  }
  .gauge-percent {
    font-size: 2.8rem;
  }

}
