/* Loops — custom styles beyond Tailwind */

html { scroll-behavior: smooth; }

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Hairline border colour standard */
.border-hair { border: 1px solid #ece8f3; }

/* Animated brand keyline — subtle, slow */
.keyline-gradient {
  background: linear-gradient(90deg, #4c52dd, #f53864, #fb9526, #4c52dd);
  background-size: 300% 100%;
  animation: gradientShift 18s ease-in-out infinite;
}

/* 1px animated gradient ring — uniform border via mask compositing */
.gradient-ring {
  position: relative;
  border-radius: 999px;
}
.gradient-ring::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, #4c52dd, #f53864, #fb9526, #4c52dd);
  background-size: 300% 100%;
  animation: gradientShift 18s ease-in-out infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Hero radial halo — calm, low chroma */
.hero-halo {
  background:
    radial-gradient(60% 50% at 20% 0%, rgba(76, 82, 221, 0.07) 0%, rgba(76, 82, 221, 0) 70%),
    radial-gradient(40% 40% at 90% 10%, rgba(245, 56, 100, 0.05) 0%, rgba(245, 56, 100, 0) 65%),
    radial-gradient(50% 50% at 60% 100%, rgba(251, 149, 38, 0.05) 0%, rgba(251, 149, 38, 0) 65%);
}

.soft-halo {
  background:
    radial-gradient(50% 40% at 50% 0%, rgba(76, 82, 221, 0.045) 0%, rgba(76, 82, 221, 0) 70%);
}

/* Focus ring helper */
.focus-ring:focus-visible {
  outline: 2px solid #4c52dd;
  outline-offset: 3px;
  border-radius: inherit;
}

/* Standard entrance */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp 0.5s ease forwards; opacity: 0; }
.fade-in-up.delay-1 { animation-delay: 0.08s; }
.fade-in-up.delay-2 { animation-delay: 0.16s; }
.fade-in-up.delay-3 { animation-delay: 0.24s; }
.fade-in-up.delay-4 { animation-delay: 0.32s; }

/* Nav blur backdrop */
.nav-blur {
  background: rgba(252, 251, 253, 0.72);
  backdrop-filter: saturate(1.2) blur(14px);
  -webkit-backdrop-filter: saturate(1.2) blur(14px);
}

/* Phone frame: subtle device shell */
.device-shell {
  background: linear-gradient(180deg, #ffffff 0%, #f7f5fa 100%);
  border: 1px solid #e9e4f5;
  box-shadow:
    0 30px 80px -20px rgba(28, 19, 45, 0.18),
    0 12px 40px -8px rgba(76, 82, 221, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

/* Card hover - very gentle */
.card-hover {
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.card-hover:hover {
  box-shadow: 0 8px 40px rgba(76, 82, 221, 0.10), 0 2px 8px rgba(28, 19, 45, 0.06);
  border-color: #d9d2ef;
}

/* Season ticker card — animated gradient ring on hover only */
.season-card { position: relative; }
.season-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(90deg, #4c52dd, #f53864, #fb9526, #4c52dd);
  background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}
.season-card:hover::before,
.season-card:focus-within::before {
  opacity: 1;
  animation: gradientShift 18s ease-in-out infinite;
}

/* Disable noisy effects for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}

/* Numeric proportional rendering for hero */
.tnum { font-variant-numeric: tabular-nums; }

/* Subtle dotted texture used in placeholder slots */
.dotted-grid {
  background-image: radial-gradient(rgba(28, 19, 45, 0.08) 1px, transparent 1px);
  background-size: 12px 12px;
}

/* Visually pleasing details */
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* Section heading kicker */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #5b39c5;
}

/* Accordion content transition */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* Gloss sweep — a soft gradient highlight wipes across text periodically,
   then the text returns fully to its original colour. */
.gloss-sweep {
  position: relative;
  display: inline-block;
}
.gloss-sweep::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 0%,
    transparent 38%,
    #4c52dd 45%,
    #f53864 50%,
    #fb9526 55%,
    transparent 62%,
    transparent 100%
  );
  background-size: 280% 100%;
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  opacity: 0;
  animation: glossSweep 6s ease-in-out infinite;
}
@keyframes glossSweep {
  0%        { background-position: 170% 0; opacity: 0; }
  6%        { opacity: 1; }
  76%       { opacity: 1; }
  83%       { background-position: -70% 0; opacity: 0; }
  100%      { background-position: -70% 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gloss-sweep::after { animation: none; opacity: 0; }
}
