/*
 * AAM Thanksgiving popup - test build, 2 November 2026.
 * Brand palette only: bright orange #ff9000 and AAM teals. No browns.
 * Element rules are scoped under .aam-tg so theme/Elementor kit rules
 * such as `button:hover` or `.elementor-kit-N h2` cannot override them.
 */

.aam-tg {
  --tg-teal: #004c66;
  --tg-ink: #003e50;
  --tg-teal-mid: #0b6a85;
  --tg-cyan: #00bcd4;
  --tg-cyan-tint: #dff5f9;
  --tg-orange: #ff9000;
  --tg-orange-tint: #ffe3bd;
  --tg-cream: #fff8ef;
  --tg-white: #ffffff;
  --tg-body: #2c4a55;
  --tg-on-dark: #d9eef3;
  --tg-width: 520px;
  --tg-pad: clamp(22px, 4vw, 40px);
  --tg-display: Montserrat, "Helvetica Neue", Arial, sans-serif;
  --tg-text: "Helvetica Neue", Arial, sans-serif;

  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: min(var(--tg-width), 100% - 32px);
  max-width: none;
  max-height: calc(100% - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  color: var(--tg-body);
  background: var(--tg-white);
  box-shadow: 0 32px 80px -24px rgb(0 38 50 / 0.6), 0 0 0 1px rgb(0 62 80 / 0.06);
  font-family: var(--tg-text);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

.aam-tg:is(dialog:not([open]), [hidden]) {
  display: none;
}

.aam-tg *,
.aam-tg *::before,
.aam-tg *::after {
  box-sizing: inherit;
}

.aam-tg::backdrop {
  background: rgb(0 38 50 / 0.58);
  backdrop-filter: blur(4px);
}

html:has(.aam-tg:modal) {
  overflow: hidden;
}

/* ---------- Shared parts ---------- */

.aam-tg .aam-tg__art svg {
  display: block;
  width: 100%;
  height: 100%;
}

.aam-tg .aam-tg__copy {
  grid-area: copy;
  padding: var(--tg-pad);
}

.aam-tg .aam-tg__eyebrow {
  width: fit-content;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--tg-orange);
  color: var(--tg-ink);
  font: 800 12px/1.2 var(--tg-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.aam-tg .aam-tg__copy .aam-tg__title {
  margin: 0 0 12px;
  color: var(--tg-teal);
  font: 800 clamp(26px, 1.4vw + 19px, 34px)/1.12 var(--tg-display);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.aam-tg .aam-tg__title:focus {
  outline: none;
}

.aam-tg .aam-tg__title mark {
  padding: 0 0.06em;
  color: inherit;
  background: linear-gradient(transparent 60%, var(--tg-orange) 60% 92%, transparent 92%);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.aam-tg .aam-tg__text {
  margin: 0 0 24px;
  color: inherit;
  font-size: 17px;
  line-height: 1.55;
  text-wrap: pretty;
}

.aam-tg .aam-tg__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}

.aam-tg .aam-tg__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 26px;
  border: 0;
  border-radius: 999px;
  background: var(--tg-orange);
  color: var(--tg-ink);
  font: 800 16px/1.2 var(--tg-display);
  text-decoration: none;
  box-shadow: 0 10px 22px -10px rgb(255 144 0 / 0.9);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.aam-tg .aam-tg__cta:is(:hover, :focus-visible) {
  color: var(--tg-ink);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -10px rgb(255 144 0 / 0.95);
}

.aam-tg .aam-tg__cta svg {
  width: 20px;
  height: 20px;
  transition: transform 0.15s ease;
}

.aam-tg .aam-tg__cta:hover svg {
  transform: translateX(3px);
}

.aam-tg button.aam-tg__later {
  min-height: 44px;
  padding: 8px 4px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--tg-teal);
  font: 600 15px/1.2 var(--tg-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: normal;
  cursor: pointer;
}

.aam-tg button.aam-tg__later:is(:hover, :focus) {
  background: none;
  color: var(--tg-teal);
  text-decoration-thickness: 2px;
}

.aam-tg button.aam-tg__close {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--tg-white);
  color: var(--tg-teal);
  box-shadow: 0 4px 14px -4px rgb(0 62 80 / 0.35);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.aam-tg button.aam-tg__close:is(:hover, :focus) {
  background: var(--tg-white);
  color: var(--tg-teal);
  transform: rotate(90deg);
}

.aam-tg button.aam-tg__close svg {
  width: 20px;
  height: 20px;
}

.aam-tg button.aam-tg__close svg,
.aam-tg .aam-tg__cta svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.aam-tg :focus-visible {
  outline: 3px solid var(--tg-ink);
  outline-offset: 3px;
}

/* ---------- 1. Turkey: split card ---------- */

.aam-tg--turkey {
  --tg-width: 780px;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "art close" "art copy";
}

.aam-tg--turkey .aam-tg__art {
  grid-area: art;
  display: grid;
  place-items: center;
  padding: 28px 20px;
  background: var(--tg-cyan-tint);
}

.aam-tg--turkey button.aam-tg__close {
  grid-area: close;
  justify-self: end;
  margin-bottom: 0;
}

.aam-tg--turkey .aam-tg__copy {
  align-self: center;
  padding: 0 40px 40px;
}

/* ---------- 2. Pie: bold orange card ---------- */

.aam-tg--pie {
  --tg-width: 460px;
  grid-template-areas: "art" "copy";
  color: var(--tg-ink);
  background: var(--tg-orange);
  text-align: center;
}

.aam-tg--pie .aam-tg__art {
  grid-area: art;
  padding: 40px 28px 0;
}

/* No dark shadows on orange: teal mixed into orange reads as brown. */
.aam-tg--pie button.aam-tg__close {
  grid-area: art;
  justify-self: end;
  align-self: start;
  background: var(--tg-ink);
  color: var(--tg-white);
  box-shadow: none;
}

.aam-tg--pie button.aam-tg__close:is(:hover, :focus) {
  background: var(--tg-ink);
  color: var(--tg-white);
}

.aam-tg--pie .aam-tg__copy {
  padding-top: 18px;
}

.aam-tg--pie .aam-tg__eyebrow {
  margin-inline: auto;
  background: var(--tg-white);
}

.aam-tg--pie .aam-tg__copy .aam-tg__title {
  color: var(--tg-ink);
}

.aam-tg--pie .aam-tg__actions {
  flex-direction: column;
  align-items: stretch;
}

.aam-tg--pie .aam-tg__cta,
.aam-tg--pie .aam-tg__cta:is(:hover, :focus-visible) {
  background: var(--tg-ink);
  color: var(--tg-white);
  box-shadow: none;
}

.aam-tg--pie button.aam-tg__later,
.aam-tg--pie button.aam-tg__later:is(:hover, :focus) {
  align-self: center;
  color: var(--tg-ink);
}

/* ---------- 3. Leaves: dark teal card with falling leaves ---------- */

.aam-tg--leaves {
  --tg-width: 600px;
  grid-template-areas: "copy";
  color: var(--tg-on-dark);
  background: radial-gradient(120% 90% at 50% 0%, #0a5c78 0%, var(--tg-ink) 62%);
  text-align: center;
}

.aam-tg--leaves .aam-tg__fall {
  grid-area: copy;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.aam-tg--leaves button.aam-tg__close {
  grid-area: copy;
  justify-self: end;
  align-self: start;
  background: rgb(255 255 255 / 0.12);
  color: var(--tg-white);
  box-shadow: none;
}

.aam-tg--leaves button.aam-tg__close:is(:hover, :focus) {
  background: rgb(255 255 255 / 0.2);
  color: var(--tg-white);
}

.aam-tg--leaves .aam-tg__copy {
  padding: 72px clamp(24px, 6vw, 56px) 52px;
}

.aam-tg--leaves .aam-tg__eyebrow {
  margin-inline: auto;
}

.aam-tg--leaves .aam-tg__copy .aam-tg__title {
  color: var(--tg-white);
  font-size: clamp(28px, 2vw + 18px, 40px);
}

.aam-tg--leaves .aam-tg__title mark {
  display: block;
  padding: 0;
  background: none;
  color: var(--tg-orange);
}

.aam-tg--leaves .aam-tg__actions {
  justify-content: center;
}

/* No orange glow on dark teal: the blend reads as brown. */
.aam-tg--leaves .aam-tg__cta,
.aam-tg--leaves .aam-tg__cta:is(:hover, :focus-visible) {
  box-shadow: none;
}

.aam-tg--leaves button.aam-tg__later,
.aam-tg--leaves button.aam-tg__later:is(:hover, :focus) {
  color: var(--tg-white);
}

.aam-tg--leaves :focus-visible {
  outline-color: var(--tg-orange);
}

.aam-tg-leaf {
  --dur: 12s;
  --delay: 0s;
  --drift: 30px;
  --spin: 220deg;
  --rest: 40px;
  transform-box: fill-box;
  transform-origin: center;
  animation: aam-tg-fall var(--dur) linear var(--delay) infinite;
}

.aam-tg__fall > svg:nth-of-type(1) > .aam-tg-leaf { --dur: 13s; --delay: -2s; --drift: 36px; --spin: 260deg; --rest: 120px; }
.aam-tg__fall > svg:nth-of-type(2) > .aam-tg-leaf { --dur: 16s; --delay: -9s; --drift: -24px; --spin: -200deg; --rest: 330px; }
.aam-tg__fall > svg:nth-of-type(3) > .aam-tg-leaf { --dur: 11s; --delay: -5s; --drift: 28px; --spin: 300deg; --rest: 18px; }
.aam-tg__fall > svg:nth-of-type(4) > .aam-tg-leaf { --dur: 15s; --delay: -12s; --drift: -30px; --spin: 180deg; --rest: 20px; }
.aam-tg__fall > svg:nth-of-type(5) > .aam-tg-leaf { --dur: 14s; --delay: -3s; --drift: 22px; --spin: -240deg; --rest: 26px; }
.aam-tg__fall > svg:nth-of-type(6) > .aam-tg-leaf { --dur: 12s; --delay: -7s; --drift: -34px; --spin: 280deg; --rest: 14px; }
.aam-tg__fall > svg:nth-of-type(7) > .aam-tg-leaf { --dur: 17s; --delay: -1s; --drift: 26px; --spin: -220deg; --rest: 30px; }
.aam-tg__fall > svg:nth-of-type(8) > .aam-tg-leaf { --dur: 13s; --delay: -10s; --drift: -22px; --spin: 240deg; --rest: 370px; }
.aam-tg__fall > svg:nth-of-type(9) > .aam-tg-leaf { --dur: 15s; --delay: -6s; --drift: 20px; --spin: 200deg; --rest: 380px; }
.aam-tg__fall > svg:nth-of-type(10) > .aam-tg-leaf { --dur: 18s; --delay: -14s; --drift: -18px; --spin: -260deg; --rest: 6px; }

/* ---------- 4. Calendar: cream card, art on the right ---------- */

.aam-tg--calendar {
  --tg-width: 800px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 330px);
  grid-template-areas: "copy art";
  background: var(--tg-cream);
}

.aam-tg--calendar .aam-tg__art {
  grid-area: art;
  display: grid;
  place-items: center;
  padding: 36px 24px;
  background-color: var(--tg-cyan-tint);
  background-image: radial-gradient(rgb(0 188 212 / 0.28) 1.5px, transparent 1.6px);
  background-size: 18px 18px;
}

.aam-tg--calendar button.aam-tg__close {
  grid-area: art;
  justify-self: end;
  align-self: start;
}

.aam-tg--calendar .aam-tg__copy {
  align-self: center;
  padding: 48px 40px 44px 44px;
}

/* ---------- 5. Tropical: poster card ---------- */

.aam-tg--tropical {
  --tg-width: 500px;
  grid-template-areas: "art" "copy";
}

.aam-tg--tropical .aam-tg__art {
  grid-area: art;
  aspect-ratio: 480 / 250;
}

.aam-tg--tropical button.aam-tg__close {
  grid-area: art;
  justify-self: end;
  align-self: start;
}

.aam-tg--tropical .aam-tg__copy {
  padding-top: 28px;
}

.aam-tg--tropical .aam-tg__eyebrow {
  background: var(--tg-cyan-tint);
  color: var(--tg-teal);
}

/* ---------- 6. Toast: small corner card, does not block the page ---------- */

.aam-tg--toast {
  --tg-width: 400px;
  position: fixed;
  inset: auto 24px 24px auto;
  z-index: 99999;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  grid-template-areas: "art copy close";
  align-items: start;
  column-gap: 14px;
  margin: 0;
  padding: 18px 12px 18px 18px;
  border-top: 5px solid var(--tg-orange);
  border-radius: 18px;
  box-shadow: 0 24px 60px -18px rgb(0 38 50 / 0.5), 0 0 0 1px rgb(0 62 80 / 0.08);
}

.aam-tg--toast .aam-tg__art {
  grid-area: art;
  width: 64px;
  height: 64px;
}

.aam-tg--toast button.aam-tg__close {
  grid-area: close;
  width: 36px;
  height: 36px;
  margin: 0;
  background: none;
  box-shadow: none;
}

.aam-tg--toast button.aam-tg__close:is(:hover, :focus) {
  background: var(--tg-cyan-tint);
}

.aam-tg--toast .aam-tg__copy {
  padding: 2px 0 0;
}

.aam-tg--toast .aam-tg__title {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.25;
}

.aam-tg--toast .aam-tg__text {
  margin-bottom: 14px;
  font-size: 15px;
}

.aam-tg--toast .aam-tg__cta {
  min-height: 44px;
  padding: 10px 20px;
  font-size: 15px;
}

/* ---------- Small screens ---------- */

@media (max-width: 720px) {
  .aam-tg--turkey,
  .aam-tg--calendar {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto;
    grid-template-areas: "art" "copy";
  }

  .aam-tg--turkey .aam-tg__art,
  .aam-tg--calendar .aam-tg__art {
    height: 210px;
    padding: 18px;
  }

  .aam-tg--turkey button.aam-tg__close {
    grid-area: art;
    align-self: start;
    margin-bottom: 14px;
  }

  .aam-tg--turkey .aam-tg__copy,
  .aam-tg--calendar .aam-tg__copy {
    padding: 26px var(--tg-pad) var(--tg-pad);
  }
}

@media (max-width: 520px) {
  .aam-tg {
    --tg-pad: 22px;
  }

  .aam-tg .aam-tg__text {
    margin-bottom: 20px;
    font-size: 16px;
  }

  .aam-tg .aam-tg__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .aam-tg button.aam-tg__later {
    align-self: center;
  }

  .aam-tg--pie .aam-tg__art {
    padding: 34px 18px 0;
  }

  .aam-tg--leaves .aam-tg__copy {
    padding: 64px 22px 30px;
  }

  .aam-tg--toast {
    width: auto;
    inset: auto 12px 12px;
  }

  .aam-tg--toast .aam-tg__actions {
    align-items: flex-start;
  }
}

@media (max-height: 640px) {
  .aam-tg--turkey .aam-tg__art,
  .aam-tg--calendar .aam-tg__art {
    height: 150px;
  }
}

/* ---------- Motion ---------- */

.aam-tg[open],
.aam-tg--toast:not([hidden]) {
  animation: aam-tg-in 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.aam-tg[open]::backdrop {
  animation: aam-tg-fade 0.4s ease both;
}

.aam-tg.is-closing {
  animation: aam-tg-out 0.22s ease-in both;
}

.aam-tg.is-closing::backdrop {
  animation: aam-tg-fade 0.22s ease-in reverse both;
}

.aam-tg-fan {
  transform-origin: 160px 178px;
  animation: aam-tg-sway 3.4s ease-in-out infinite;
}

.aam-tg-twinkle {
  animation: aam-tg-twinkle 2.4s ease-in-out infinite;
}

.aam-tg-glow {
  transform-box: fill-box;
  transform-origin: center;
  animation: aam-tg-glow 4s ease-in-out infinite;
}

.aam-tg-pop {
  transform-box: fill-box;
  transform-origin: center;
  animation: aam-tg-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 0.45s both;
}

@keyframes aam-tg-in {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
}

@keyframes aam-tg-out {
  to { opacity: 0; transform: translateY(12px) scale(0.98); }
}

@keyframes aam-tg-fade {
  from { opacity: 0; }
}

@keyframes aam-tg-sway {
  0%, 100% { transform: rotate(-2.5deg); }
  50% { transform: rotate(2.5deg); }
}

@keyframes aam-tg-twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

@keyframes aam-tg-glow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes aam-tg-pop {
  from { transform: scale(0); }
}

@keyframes aam-tg-fall {
  0% { transform: translate(0, -60px) rotate(0deg); }
  50% { transform: translate(var(--drift), 300px) rotate(calc(var(--spin) / 2)); }
  100% { transform: translate(0, 660px) rotate(var(--spin)); }
}

@media (prefers-reduced-motion: reduce) {
  .aam-tg[open],
  .aam-tg--toast:not([hidden]),
  .aam-tg[open]::backdrop,
  .aam-tg.is-closing,
  .aam-tg.is-closing::backdrop,
  .aam-tg-fan,
  .aam-tg-twinkle,
  .aam-tg-glow,
  .aam-tg-pop {
    animation: none;
  }

  .aam-tg-leaf {
    animation: none;
    transform: translate(0, var(--rest)) rotate(var(--spin));
  }

  .aam-tg .aam-tg__cta,
  .aam-tg .aam-tg__cta svg,
  .aam-tg button.aam-tg__close {
    transition: none;
  }
}
