/* =========================================================
   AAC Newsletter — animated sign-up panel
   ========================================================= */
.aac-news {
  --nw-green: #007d45;
  --nw-deep: #063a33;
  --nw-deeper: #04291f;
  --nw-gold: #ffcd00;
  --nw-ink: #10210f;
  --nw-panel: #0e7d4b;   /* single panel colour (from the chosen swatch) */
  --nw-ease: cubic-bezier(.22, 1, .36, 1);

  padding: clamp(40px, 5vw, 70px) 0 clamp(60px, 7vw, 100px);
  background: #fff;
}

/* ---------- Panel ---------- */
.aac-news__panel {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
  padding: clamp(36px, 5vw, 72px);
  border-radius: 32px;
  background: var(--nw-panel);
  color: #fff;
  box-shadow: 0 40px 80px -40px rgba(4, 41, 31, .8);
}

/* drifting light blobs */
.aac-news__blob { display: none; }   /* one solid colour: no colour glows */

.aac-news__blob {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  animation: aacNwBlob 16s ease-in-out infinite alternate;
}
.aac-news__blob--a { width: 380px; height: 380px; background: rgba(0, 160, 90, .55); top: -160px; left: -100px; }
.aac-news__blob--b { width: 340px; height: 340px; background: rgba(255, 205, 0, .35); bottom: -170px; right: -60px; animation-delay: -8s; }

@keyframes aacNwBlob {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(60px, 30px, 0) scale(1.15); }
  100% { transform: translate3d(-20px, -20px, 0) scale(.92); }
}

/* faint grid texture */
.aac-news__grid {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px) 0 0 / 44px 44px;
}

/* floating icons */
.aac-news__float {
  position: absolute;
  z-index: 0;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px);
  color: var(--nw-gold);
  pointer-events: none;
  animation: aacNwFloat 7s ease-in-out infinite;
}
.aac-news__float--1 { width: 54px; height: 54px; font-size: 1.5rem; top: 14%; right: 6%; }
.aac-news__float--2 { width: 42px; height: 42px; font-size: 1.15rem; bottom: 14%; left: 44%; animation-delay: -2.3s; color: #6fe3a5; }
.aac-news__float--3 { width: 46px; height: 46px; font-size: 1.25rem; top: 10%; left: 40%; animation-delay: -4.6s; }

@keyframes aacNwFloat {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-6deg); }
  50%      { transform: translate3d(0, -16px, 0) rotate(6deg); }
}

/* ---------- Copy ---------- */
.aac-news__copy { position: relative; z-index: 1; }

.aac-news__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: var(--nw-gold);
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.aac-news__eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--nw-gold);
  animation: aacNwPulse 2s ease-out infinite;
}

@keyframes aacNwPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 205, 0, .6); }
  100% { box-shadow: 0 0 0 12px rgba(255, 205, 0, 0); }
}

.aac-news__title {
  margin: 0 0 8px;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-weight: 800;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  color: #fff;
}

.aac-news__accent { color: var(--nw-gold); }

.aac-news__sub {
  margin: 0 0 10px;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-size: clamp(1.1rem, 1.6vw, 1.35rem);
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
}

.aac-news__text {
  margin: 0;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-size: 1rem;
  font-weight: 300;
  color: rgba(255, 255, 255, .72);
}

/* ---------- Form ---------- */
.aac-news__formwrap { position: relative; z-index: 1; }

.aac-news__form { transition: opacity .5s var(--nw-ease), transform .5s var(--nw-ease); }

.aac-news__field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 205, 0, 0), 0 20px 40px -20px rgba(0, 0, 0, .55);
  transition: box-shadow .5s var(--nw-ease), transform .5s var(--nw-ease);
}

.aac-news__field:focus-within {
  box-shadow: 0 0 0 5px rgba(255, 205, 0, .45), 0 24px 50px -20px rgba(0, 0, 0, .6);
  transform: translateY(-2px);
}

.aac-news__icon {
  font-size: 1.3rem;
  color: var(--nw-green);
  transition: transform .5s var(--nw-ease);
}
.aac-news__field:focus-within .aac-news__icon { transform: rotate(-12deg) scale(1.1); }

.aac-news__field input[type="email"] {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 12px 4px;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-size: 1rem;
  color: var(--nw-ink);
}
.aac-news__field input::placeholder { color: #8a9688; }

.aac-news__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.aac-news__btn {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--nw-gold);
  color: var(--nw-ink);
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-weight: 700;
  font-size: .98rem;
  cursor: pointer;
  overflow: hidden;
  transition: background-color .4s, transform .4s var(--nw-ease), box-shadow .4s var(--nw-ease);
}
.aac-news__btn:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(255, 205, 0, .9); }
.aac-news__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.aac-news__plane { display: inline-block; transition: transform .45s var(--nw-ease); }
.aac-news__btn:hover .aac-news__plane { transform: translate(3px, -3px) rotate(-8deg); }

/* sending: the paper plane takes off, label fades */
.aac-news__form.is-sending .aac-news__btn { pointer-events: none; }
.aac-news__form.is-sending .aac-news__btn-label { opacity: .4; }
.aac-news__form.is-sending .aac-news__plane { animation: aacNwFly 1s var(--nw-ease) infinite; }

@keyframes aacNwFly {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  45%  { transform: translate(40px, -30px) rotate(-20deg); opacity: 0; }
  46%  { transform: translate(-30px, 20px) rotate(0); opacity: 0; }
  100% { transform: translate(0, 0) rotate(0); opacity: 1; }
}

/* error: shake + message */
.aac-news__form.has-error .aac-news__field { animation: aacNwShake .5s; box-shadow: 0 0 0 4px rgba(255, 99, 99, .6), 0 20px 40px -20px rgba(0, 0, 0, .55); }
@keyframes aacNwShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-10px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}

.aac-news__msg {
  min-height: 1.4em;
  margin: 12px 0 0 22px;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-size: .9rem;
  color: #ffb3b3;
}

.aac-news__note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0 22px;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-size: .85rem;
  color: rgba(255, 255, 255, .62);
}
.aac-news__note i { color: #6fe3a5; font-size: 1rem; }

/* ---------- Success state ---------- */
.aac-news__success {
  position: absolute;
  left: 0; right: 0; top: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .2);
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(.96);
  pointer-events: none;
  transition: opacity .6s var(--nw-ease) .15s, transform .6s var(--nw-ease) .15s;
}

.aac-news__check { width: 44px; height: 44px; flex-shrink: 0; }
.aac-news__check circle { fill: var(--nw-gold); stroke: none; transform-origin: center; transform: scale(0); transition: transform .6s cubic-bezier(.34, 1.56, .64, 1) .25s; }
.aac-news__check path { fill: none; stroke: var(--nw-ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; transition: stroke-dashoffset .5s ease .7s; }

.aac-news__success-text {
  margin: 0;
  font-family: var(--font-secondary, "Poppins", sans-serif);
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

.aac-news__formwrap.is-done .aac-news__form { opacity: 0; transform: translate3d(0, -10px, 0); pointer-events: none; }
.aac-news__formwrap.is-done .aac-news__success { opacity: 1; transform: none; pointer-events: auto; }
.aac-news__formwrap.is-done .aac-news__check circle { transform: scale(1); }
.aac-news__formwrap.is-done .aac-news__check path { stroke-dashoffset: 0; }

/* confetti pieces (created by JS) */
.aac-news__confetti {
  position: absolute;
  top: 30px;
  left: 44px;
  width: 8px;
  height: 12px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 3;
  animation: aacNwConfetti 1.1s cubic-bezier(.2, .7, .3, 1) forwards;
}
@keyframes aacNwConfetti {
  0%   { transform: translate(0, 0) rotate(0); opacity: 1; }
  100% { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 0; }
}

/* ---------- Scroll-in ---------- */
.aac-news.is-ready .aac-news__panel { clip-path: inset(10% 6% 10% 6% round 32px); opacity: 0; transition: clip-path 1.2s var(--nw-ease), opacity .8s var(--nw-ease); }
.aac-news.is-ready .aac-nw-reveal { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .8s var(--nw-ease), transform .8s var(--nw-ease); }
.aac-news.is-ready [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.aac-news.is-ready [data-split] .w-in { display: inline-block; transform: translate3d(0, 105%, 0); transition: transform .9s var(--nw-ease); }

.aac-news.is-ready.is-in .aac-news__panel { clip-path: inset(0 0 0 0 round 32px); opacity: 1; }
.aac-news.is-ready.is-in .aac-nw-reveal { opacity: 1; transform: none; }
.aac-news.is-ready.is-in .aac-news__eyebrow { transition-delay: .35s; }
.aac-news.is-ready.is-in [data-split] .w-in { transform: none; transition-delay: calc(.45s + var(--i) * 90ms); }
.aac-news.is-ready.is-in .aac-news__sub { transition-delay: .65s; }
.aac-news.is-ready.is-in .aac-news__text { transition-delay: .75s; }
.aac-news.is-ready.is-in .aac-news__formwrap { transition-delay: .85s; }
.aac-news.is-ready.is-in .aac-news__note { transition-delay: 1.05s; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .aac-news__panel { grid-template-columns: 1fr; text-align: center; }
  .aac-news__eyebrow { margin-left: auto; margin-right: auto; }
  .aac-news__note { justify-content: center; margin-left: 0; }
  .aac-news__msg { margin-left: 0; text-align: center; }
  .aac-news__float--2 { left: 8%; }
  .aac-news__float--3 { left: 6%; top: 8%; }
}

@media (max-width: 575.98px) {
  .aac-news__panel { border-radius: 24px; padding: 32px 18px; }
  .aac-news__field { flex-wrap: wrap; border-radius: 22px; padding: 8px; }
  .aac-news__icon { margin-left: 10px; }
  .aac-news__btn { width: 100%; justify-content: center; }
  .aac-news__success { border-radius: 22px; }
  .aac-news__float { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .aac-news *, .aac-news *::before, .aac-news *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}
