/* Test version with motion (5 Nov 2026): styles used by animatii.js. Nothing here changes the layout. */

/* Above-the-fold elements stay hidden until animatii.js has set their start state (max 2.5 s, see the head snippet). */
.a-wait main h1, .a-wait .statement, .a-wait .logo-crop, .a-wait .lead, .a-wait main .cards > a.card, .a-wait .big-name { visibility: hidden; }

/* reading progress, logo red */
.a-progress { position: fixed; inset: 0 0 auto 0; height: 3px; background: #e30f13; transform-origin: 0 50%; transform: scaleX(0); z-index: 50; pointer-events: none; }

/* split headings: each line is a mask; a little room so descenders (g, ț, ș) are not cut */
.a-line { padding-bottom: .1em; margin-bottom: -.1em; }

/* spotlight that follows the pointer on the calculator cards, and the arrow that nudges forward;
   only for visitors who have not asked for less motion */
@media (prefers-reduced-motion: no-preference) {
  a.card { position: relative; overflow: hidden; isolation: isolate; }
  a.card::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .35s;
    background: radial-gradient(440px circle at var(--mx, 50%) var(--my, 50%), rgba(227, 15, 19, .10), transparent 62%); }
  a.card:hover::before { opacity: 1; }
  a.card .go { display: inline-block; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
  a.card:hover .go { transform: translateX(6px); }
}

/* the red slab behind the portrait grows in from the left */
.portrait::before { transform-origin: 0 100%; transform: scaleX(var(--slab, 1)); }

/* printing never waits for the scripts: everything that may still be hidden is shown */
@media print {
  .a-progress { display: none; }
  .a-wait main h1, .a-wait .statement, .a-wait .logo-crop, .a-wait .lead, .a-wait main .cards > a.card, .a-wait .big-name { visibility: visible; }
  .portrait::before { transform: none; }
}

/* Contact page buttons (7 Nov 2026, asked by Mario). Only for visitors who have not asked for less motion.
   Press feedback uses the `scale`/`translate` properties, not `transform`, so it adds to the magnetic pull GSAP puts on "Trimite mesajul". */
@media (prefers-reduced-motion: no-preference) {
  /* "Trimite mesajul" / "Trimite cererea": the dark fill sweeps in from the left; the button gives a little when pressed;
     while sending, a light band runs across it */
  .send { position: relative; overflow: hidden; isolation: isolate; transition: scale .15s ease; }
  .send::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .45s cubic-bezier(.7, 0, .2, 1); }
  .send:active:not([disabled]) { scale: .97; }
  .send[disabled]::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%); animation: a-sweep 1.1s linear infinite; }
  @keyframes a-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

  /* the three boxes (Programează, Calculatoare, Verificare): red spotlight under the pointer, a small step to the right */
  .calc-link { position: relative; overflow: hidden; isolation: isolate; transition: translate .35s cubic-bezier(.2, .8, .2, 1), border-color .25s, background-color .25s, scale .12s ease; }
  .calc-link::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity .35s;
    background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(227, 15, 19, .13), transparent 65%); }
  .calc-link:active { scale: .985; }

  /* "Politica de confidențialitate", "Termeni și condiții", "Schimbă ora": the underline moves closer on hover */
  .doc-open, .link-btn { transition: color .2s, text-underline-offset .2s; }

  /* calendar: days, arrows and hours */
  .bk-day.free, .bk-nav { transition: translate .2s ease, border-color .2s, scale .12s ease; }
  .bk-day.free:active, .bk-nav:active:not([disabled]) { scale: .92; }
  .bk-day.sel { animation: a-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
  @keyframes a-pop { from { scale: .8; } to { scale: 1; } }
  .bk-slot { position: relative; overflow: hidden; isolation: isolate; transition: color .3s, scale .12s ease; }
  .bk-slot::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .3s cubic-bezier(.7, 0, .2, 1); }
  .bk-slot:active { scale: .95; }

  /* hover effects only where there is a real pointer (on phones a tap would leave them stuck) */
  @media (hover: hover) {
    .send:hover { background: var(--peach); }
    .send:hover:not([disabled])::before { transform: scaleX(1); transform-origin: 0 50%; }
    .calc-link:hover { translate: 4px 0; }
    .calc-link:hover::before { opacity: 1; }
    .doc-open:hover, .link-btn:hover { text-underline-offset: 1px; }
    .bk-day.free:hover { translate: 0 -2px; }
    .bk-slot:hover { background: var(--bg); color: #ffffff; }
    .bk-slot:hover::before { transform: scaleY(1); }
  }
}
