/* =========================================================
   Google Gemini-style photo booth microsite override
   Targets: .session-page, .header, .card, .card-body, .preview, .card-footer
   ========================================================= */

:root {
  --gem-bg: #000000;
  --gem-text: #f8fafd;
  --gem-muted: #d9dde6;
  --gem-blue: #4285f4;
  --gem-red: #ea4335;
  --gem-yellow: #fbbc04;
  --gem-green: #34a853;
  --gem-frame: #ffffff;
  --gem-button: #4285f4;
  --gem-button-hover: #5e97f6;
  --gem-button-text: #ffffff;
  --gem-shadow: 0 24px 54px rgba(0, 0, 0, 0.62);
  --gem-radius: 20px;
  --gem-frame-width: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -8rem, rgba(66, 133, 244, 0.2), transparent 24rem),
    var(--gem-bg);
  color: var(--gem-text);
  font-family: Google Sans, Product Sans, Inter, Avenir Next, Avenir, Helvetica Neue, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

.session-page {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 24px 18px 96px;
  overflow: visible;
}

.header {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin: 0 auto 34px;
  text-align: center;
}

.header img,
.header .logo,
.header svg {
  display: block;
  width: min(230px, 64vw);
  height: auto;
  margin: 0 auto 4px;
}

.header h1,
.header .title {
  margin: 0;
  color: var(--gem-text);
  font-size: clamp(28px, 6vw, 42px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.14;
}

.header p,
.header .subtitle,
.header .instructions {
  max-width: 560px;
  margin: 0;
  color: var(--gem-muted);
  font-size: clamp(17px, 3.8vw, 22px);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
}

.header p a,
.header .subtitle a,
.header .instructions a,
.header p strong,
.header .subtitle strong,
.header .instructions strong {
  color: var(--gem-blue);
  font-weight: 600;
  text-decoration: none;
}

.card {
  --gem-angle: -7deg;
  position: relative;
  width: min(88vw, 530px);
  margin: 0 auto 64px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: rotate(var(--gem-angle));
  transform-origin: center;
  overflow: visible;
}

.card:nth-of-type(even) {
  --gem-angle: 7deg;
}

.card:nth-of-type(3n) {
  --gem-angle: -4deg;
}

.card:nth-of-type(4n) {
  --gem-angle: 5deg;
}

.card-body {
  padding: var(--gem-frame-width);
  background: var(--gem-frame);
  border-radius: calc(var(--gem-radius) + var(--gem-frame-width));
  box-shadow: var(--gem-shadow);
}

.card-body figure,
figure {
  margin: 0;
  overflow: hidden;
  border-radius: var(--gem-radius);
  background: var(--gem-frame);
  line-height: 0;
}

.preview,
.card-body img,
.card-body video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 0;
  border-radius: inherit;
  background: var(--gem-frame);
}

.card-body video {
  object-fit: cover;
  transform: scale(1.012);
  transform-origin: center;
}

.card-footer {
  position: absolute;
  right: -10px;
  bottom: -26px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0;
  background: transparent;
  border: 0;
  transform: rotate(calc(-1 * var(--gem-angle)));
  transform-origin: center;
  cursor: pointer;
}

.card-footer a,
.card-footer button,
.card-footer [role="button"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 158px;
  min-height: 54px;
  padding: 15px 24px;
  color: var(--gem-button-text);
  background: var(--gem-button);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.card-footer a:hover,
.card-footer button:hover,
.card-footer [role="button"]:hover {
  background: var(--gem-button-hover);
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.5);
}

.card-footer a:active,
.card-footer button:active,
.card-footer [role="button"]:active {
  transform: translateY(0);
}

.card-footer a:focus-visible,
.card-footer button:focus-visible,
.card-footer [role="button"]:focus-visible {
  outline: 3px solid rgba(251, 188, 4, 0.9);
  outline-offset: 3px;
}

.card-footer i,
.card-footer svg {
  display: none;
}

.card-footer a::after,
.card-footer button::after,
.card-footer [role="button"]::after {
  content: "Download";
  display: block;
}

.card-footer:empty::after {
  content: "Download";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 158px;
  min-height: 54px;
  padding: 15px 24px;
  color: var(--gem-button-text);
  background: var(--gem-button);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
}

.card-footer:empty:hover::after {
  background: var(--gem-button-hover);
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(0, 0, 0, 0.5);
}

.footer {
  max-width: 560px;
  margin: 44px auto 0;
  padding-top: 24px;
  color: rgba(248, 250, 253, 0.68);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}

@media (min-width: 760px) {
  .session-page {
    width: min(100%, 820px);
    padding-top: 30px;
  }

  .card {
    margin-bottom: 82px;
  }

  .card:nth-of-type(odd) {
    margin-left: 5%;
  }

  .card:nth-of-type(even) {
    margin-right: 5%;
  }
}

@media (min-width: 1020px) {
  .session-page {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
    row-gap: 74px;
    width: min(100%, 1180px);
    padding: 34px 42px 110px;
    overflow: visible;
  }

  .header,
  .footer {
    grid-column: 1 / -1;
  }

  .header {
    margin-bottom: 6px;
  }

  .card {
    width: 100%;
    max-width: 500px;
    margin: 0;
    align-self: start;
    justify-self: center;
  }

  .card:nth-of-type(odd),
  .card:nth-of-type(even) {
    margin-left: 0;
    margin-right: 0;
  }

  .card:nth-of-type(odd) {
    justify-self: end;
  }

  .card:nth-of-type(even) {
    justify-self: start;
  }

  .card-footer {
    right: -16px;
    bottom: -28px;
  }
}

@media (max-width: 900px) {
  :root {
    --gem-radius: 17px;
    --gem-frame-width: 10px;
  }

  .session-page {
    padding: 20px 14px 78px;
  }

  .header {
    margin-bottom: 28px;
  }

  .card {
    width: min(86vw, 440px);
    margin-bottom: 72px;
    overflow: visible !important;
  }

  .card-footer {
    position: static !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 16px 0 0 !important;
    overflow: visible !important;
    transform: rotate(calc(-1 * var(--gem-angle))) !important;
  }

  .card-footer a,
  .card-footer button,
  .card-footer [role="button"],
  .card-footer:empty::after {
    position: relative !important;
    z-index: 5 !important;
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 136px !important;
    min-height: 48px !important;
    max-width: none !important;
    max-height: none !important;
    padding: 13px 20px !important;
    overflow: visible !important;
    font-size: 14px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
