﻿/* Enhancements: motion, typography, accents, interactions */

 :root{
  --fade-ms: 420ms;
}

/* Thematic accents */
body.theme-vocation { --accent: var(--accent); --accent-soft: var(--accent-soft); }
body.theme-formation{ --accent: var(--accent); --accent-soft: var(--accent-soft); }
body.theme-household{ --accent: var(--accent); --accent-soft: var(--accent-soft); }
body.theme-community{ --accent: var(--accent); --accent-soft: var(--accent-soft); }
body.theme-rest     { --accent: var(--accent); --accent-soft: var(--accent-soft); }

/* Slow underline on links */
a:not(.info-link):not(.button){
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 320ms ease;
}
a:not(.info-link):not(.button):hover,
a:not(.info-link):not(.button):focus-visible{
  background-size: 100% 2px;
}

/* Link shimmer (menus + inline links) */
a:not(.info-link):not(.button){
  position: relative;
}
a:not(.info-link):not(.button)::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, color-mix(in srgb, var(--surface) 50%, transparent) 50%, transparent 100%);
  transform: translateX(-120%);
  transition: transform 500ms ease;
  pointer-events: none;
}
a:not(.info-link):not(.button):hover::after,
a:not(.info-link):not(.button):focus-visible::after{
  transform: translateX(120%);
}

/* Global shimmer for buttons and images */
@keyframes shimmerSweep{
  0%{ background-position: -220% 0; }
  100%{ background-position: 220% 0; }
}

@keyframes shimmerGlow{
  0%, 100%{ filter: brightness(1) drop-shadow(0 0 0 color-mix(in srgb, var(--accent) 0%, transparent)); }
  50%{ filter: brightness(1.08) drop-shadow(0 10px 18px color-mix(in srgb, var(--accent) 18%, transparent)); }
}

button,
.btn,
.btn-primary,
.cta-primary,
.wl-button,
input[type="submit"],
input[type="button"],
a.button{
  position: relative;
  overflow: hidden;
}

button::after,
.btn::after,
.btn-primary::after,
.cta-primary::after,
.wl-button::after,
input[type="submit"]::after,
input[type="button"]::after,
a.button::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, color-mix(in srgb, var(--surface) 40%, transparent) 50%, transparent 100%);
  background-size: 220% 220%;
  animation: shimmerSweep 3.2s ease-in-out infinite;
  pointer-events: none;
}

img{
  animation: shimmerGlow 4.2s ease-in-out infinite;
}

/* Page-load fade/slide */
main{
  animation: mainFade var(--fade-ms) ease both;
}

@keyframes mainFade{
  from{ opacity: 0; transform: translateY(4px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  main{
    animation: none !important;
  }
  .divider::before,
  .reveal-on-scroll,
  a::after,
  button::after,
  .btn::after,
  .btn-primary::after,
  .cta-primary::after,
  .wl-button::after,
  input[type="submit"]::after,
  input[type="button"]::after,
  a.button::after,
  img,
  .table--practical::after{
    transition: none !important;
    animation: none !important;
  }
  .reveal-on-scroll{
    opacity: 1;
    transform: none;
  }
  a::after,
  .table--practical::after{
    opacity: 0;
    transform: none;
  }
}


/* Divider draw from centre */
.divider{
  position: relative;
  height: 1px;
  background: transparent;
  margin: 2rem 0;
}
.divider::before{
  content:"";
  position:absolute;
  left: 50%;
  top: 0;
  height: 1px;
  width: 0;
  background: color-mix(in srgb, var(--accent) 30%, transparent);
  transform: translateX(-50%);
  animation: dividerDraw 520ms ease forwards;
}

@keyframes dividerDraw{
  from{ width: 0; }
  to{ width: 100%; }
}

/* Scroll reveal for quotes (class only) */
.reveal-on-scroll{
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 420ms ease, transform 420ms ease;
}
.reveal-on-scroll.is-visible{
  opacity: 1;
  transform: translateY(0);
}

/* Collapsibles styling */
details.collapse{
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--text) 2%, transparent);
}
details.collapse > summary{
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}
details.collapse > summary::-webkit-details-marker{ display:none; }
details.collapse[open]{ background: var(--accent-soft); }

/* Practical tables */
.table--practical{
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.table--practical::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, color-mix(in srgb, var(--surface) 50%, transparent) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform 600ms ease;
  pointer-events: none;
}
.table--practical:hover::after{
  transform: translateX(100%);
}

/* Feature page structure */
.page-header{
  padding: 6px 0 10px;
}
.section-kicker{
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.deck{
  font-size: 1.05rem;
  color: var(--muted);
  margin: 8px 0 0;
}
.callout{
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface-soft);
}
.callout__title{
  margin: 0 0 6px;
  font-size: 1rem;
}
.callout__text{
  margin: 0;
}
.article{
  margin-top: 18px;
}
.article__section{
  margin: 22px 0;
}
.lead{
  font-size: 1.05rem;
}
.quote{
  margin: 18px 0;
  padding: 12px 16px;
  border-left: 1px solid var(--stroke);
  background: color-mix(in srgb, var(--text) 3%, transparent);
}
.quote cite{
  display: block;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}
.note{
  background: color-mix(in srgb, var(--text) 3%, transparent);
  border: 1px dashed color-mix(in srgb, var(--text) 18%, transparent);
  padding: 10px 12px;
  border-radius: 10px;
}
.closing{
  margin-top: 14px;
}
.fineprint{
  font-size: 0.9rem;
  color: var(--muted);
}
.support-note{
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: color-mix(in srgb, var(--text) 2%, transparent);
  margin-bottom: 16px;
}
.table--practical th,
.table--practical td{
  padding: 8px 10px;
  text-align: center;
  border-bottom: 1px solid var(--stroke);
}
.table--practical tr:last-child th,
.table--practical tr:last-child td{
  border-bottom: 0;
}
