/* Just Call BV — visitekaartje
   Eén scherm: het logo, de contactgegevens en de baan uit het logo op paginaformaat. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --purple: #5D0F68;        /* logo */
  --purple-deep: #3A0842;   /* tekst en randen */
  --purple-muted: #6B4A72;  /* adres, 6.7:1 op de ondergrond */
  --yellow: #FEBE10;        /* logo; alleen als vlak of lijn, nooit als tekst op licht */
  --ground: #F7F3F8;
  --ground-edge: #EDE4F0;

  --font: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-pop: cubic-bezier(0.19, 1, 0.22, 1);  /* expo-out, geen terugvering */
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow-x: hidden;
  background:
    radial-gradient(120% 90% at 50% 45%, var(--ground) 55%, var(--ground-edge) 100%);
  background-color: var(--ground);
  color: var(--purple-deep);
  font-family: var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--yellow); color: var(--purple-deep); }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 6px;
  border-radius: 999px;
}

/* ---------------------------------------------------------------------------
   Baan op de achtergrond
   --------------------------------------------------------------------------- */
.orbit {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}

.orbit__ring {
  fill: none;
  stroke: var(--yellow);
  stroke-width: clamp(10px, 1.6vw, 22px);
  stroke-linecap: round;
}

.orbit__ring--echo {
  stroke: var(--purple);
  stroke-width: 1.5px;
  opacity: 0.18;
}

.orbit__dots ellipse {
  fill: var(--purple);
  stroke: var(--ground);
  stroke-width: 3px;
  transform-box: fill-box;
  transform-origin: center;
}

/* ---------------------------------------------------------------------------
   Inhoud
   --------------------------------------------------------------------------- */
.card {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: clamp(2rem, 5vh, 3.5rem);
  padding: clamp(2rem, 6vh, 4rem) 1.25rem;
  text-align: center;
}

.logo {
  margin: 0;
  width: clamp(250px, 40vw, 560px);
  line-height: 0;
}

.logo svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.contact {
  display: grid;
  justify-items: center;
  gap: clamp(0.9rem, 2.2vh, 1.4rem);
}

/* Telefoon: de hoofdzaak van de pagina */
.contact__phone {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  padding: 0.35rem 0.5rem;
  border-radius: 999px;
}

.contact__ring {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(3rem, 5vw, 4.25rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--purple);
  color: var(--yellow);
  box-shadow: 0 10px 24px -10px rgb(58 8 66 / 0.55);
  transition: transform 300ms var(--ease-pop);
}

.contact__ring svg { width: 46%; height: auto; }

/* Uitdijende ringen: de telefoon gaat over */
.contact__ring::before,
.contact__ring::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--purple);
  opacity: 0;
  animation: ring 2.8s var(--ease-out) infinite;
  animation-delay: 2.4s;
}

.contact__ring::after { animation-delay: 3.1s; }

@keyframes ring {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(1.9); opacity: 0; }
  100% { transform: scale(1.9); opacity: 0; }
}

.contact__number {
  font-size: clamp(2.1rem, 5.4vw, 5rem);
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--purple);
  /* Gele streep die bij hover/focus volloopt */
  background: linear-gradient(var(--yellow), var(--yellow)) no-repeat 0 92% / 0% 0.22em;
  transition: background-size 450ms var(--ease-out);
  padding-bottom: 0.06em;
}

.contact__phone:hover .contact__number,
.contact__phone:focus-visible .contact__number { background-size: 100% 0.22em; }

.contact__phone:hover .contact__ring,
.contact__phone:focus-visible .contact__ring { transform: rotate(-14deg) scale(1.06); }

.contact__phone:active .contact__ring { transform: scale(0.96); }

/* E-mail */
.contact__mail {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 560;
  letter-spacing: -0.01em;
  color: var(--purple-deep);
  border: 1.5px solid rgb(93 15 104 / 0.22);
  background: rgb(255 255 255 / 0.55);
  transition: background-color 250ms ease, border-color 250ms ease, color 250ms ease;
}

.contact__mail svg { color: var(--purple); flex: none; }

.contact__mail:hover,
.contact__mail:focus-visible {
  background: var(--yellow);
  border-color: var(--yellow);
}

/* Postadres */
.contact__post {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem 0;
  font-style: normal;
  font-size: clamp(0.95rem, 1.2vw, 1.075rem);
  font-weight: 450;
  color: var(--purple-muted);
  line-height: 1.5;
}

.contact__post span + span::before {
  content: "";
  display: inline-block;
  width: 0.36em;
  height: 0.24em;
  margin: 0 0.7em;
  border-radius: 50%;
  background: var(--purple);
  opacity: 0.55;
  vertical-align: 0.2em;
}

@media (max-width: 560px) {
  .logo { width: min(78vw, 340px); }
  /* Belknop boven het nummer, zodat het nummer de volle breedte krijgt */
  .contact__phone { flex-direction: column; gap: 1rem; }
  .contact__number { font-size: clamp(2rem, 9.4vw, 3rem); }
  .contact__post { flex-direction: column; align-items: center; }
  .contact__post span + span::before { display: none; }
}

/* ---------------------------------------------------------------------------
   Binnenkomst. Alleen met JS (html.js) en zonder 'minder beweging';
   anders staat alles direct in zijn eindstand.
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .js .logo .jc-orbit,
  .js .logo .jc-tip {
    clip-path: inset(0 100% 0 0);
    animation: wipe 1100ms var(--ease-out) 150ms forwards;
  }

  .js .logo .jc-pill {
    transform-box: fill-box;
    transform-origin: center;
    transform: scaleX(0.2) scaleY(0.6);
    opacity: 0;
    animation: pill 800ms var(--ease-pop) 450ms forwards;
  }

  .js .logo .jc-word {
    opacity: 0;
    animation: fade 600ms var(--ease-out) 850ms forwards;
  }

  .js .logo .jc-dot,
  .js .logo .jc-dot-edge {
    transform-box: fill-box;
    transform-origin: center;
    transform: scale(0);
    animation: pop 450ms var(--ease-pop) forwards;
    animation-delay: calc(700ms + var(--i, 0) * 70ms);
  }

  /* Contactgegevens zijn vrijwel meteen leesbaar: kort, vanuit een al zichtbare stand. */
  .js .contact > * {
    opacity: 0.35;
    transform: translateY(10px);
    animation: rise 600ms var(--ease-out) both;
  }
  .js .contact > :nth-child(1) { animation-delay: 200ms; }
  .js .contact > :nth-child(2) { animation-delay: 280ms; }
  .js .contact > :nth-child(3) { animation-delay: 360ms; }

  .js .orbit__ring {
    stroke-dasharray: var(--len, 4000);
    stroke-dashoffset: var(--len, 4000);
    animation: draw 1800ms var(--ease-out) 100ms forwards;
  }
  .js .orbit__ring--echo { animation-delay: 350ms; animation-duration: 2200ms; }
}

@keyframes wipe  { to { clip-path: inset(0 0 0 0); } }
@keyframes pill  { to { transform: none; opacity: 1; } }
@keyframes fade  { to { opacity: 1; } }
@keyframes pop   { to { transform: scale(1); } }
@keyframes rise  { to { opacity: 1; transform: none; } }
@keyframes draw  { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  /* Geen binnenkomst; alleen de doorlopende ringen en overgangen uitzetten */
  .contact__ring::before, .contact__ring::after { animation: none; }
  .contact__ring, .contact__number, .contact__mail { transition: none; }
}
