:root {
  color-scheme: light;
  --bg-dark: #100e09;
  --bg-warm: #ecd29a;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --ink: #2c2217;
  --muted: #8b6f4a;
  --gold: #f7b23b;
  --gold-deep: #e08d10;
  --gold-light: #ffd77a;
  --shadow: 0 28px 60px rgba(106, 72, 8, 0.18);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top center, rgba(0, 0, 0, 0.86), transparent 28%),
    radial-gradient(circle at top left, rgba(255, 226, 144, 0.48), transparent 26%),
    radial-gradient(circle at top right, rgba(255, 215, 94, 0.3), transparent 28%),
    linear-gradient(180deg, var(--bg-dark) 0%, #20170d 22%, var(--bg-warm) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 80%);
  pointer-events: none;
}

.page-shell {
  width: min(820px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: center;
}

.customer-page {
  justify-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32);
  color: #f4cd6e;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.customer-intro {
  text-align: center;
  padding: 4px 12px 6px;
  animation: floatIn 700ms ease both;
}

.customer-intro h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  max-width: 13ch;
  margin-left: auto;
  margin-right: auto;
  color: #fff5dd;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.32), 0 12px 30px rgba(0, 0, 0, 0.28);
}

.customer-intro p {
  margin: 0;
  max-width: 42ch;
  font-size: 1.08rem;
  line-height: 1.65;
  color: rgba(255, 244, 214, 0.74);
  margin-left: auto;
  margin-right: auto;
}

.phone {
  border-radius: 42px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(255, 250, 239, 0.52), rgba(255, 244, 220, 0.18));
  box-shadow: var(--shadow);
  min-height: auto;
  backdrop-filter: blur(16px);
}

.phone-center {
  transform: none;
  z-index: 2;
  width: min(440px, 100%);
}

.phone-chrome {
  height: 100%;
  border-radius: 32px;
  padding: 18px 16px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(246, 218, 167, 0.28));
  position: relative;
  overflow: hidden;
}

.phone-chrome::after {
  content: "";
  position: absolute;
  inset: auto 14px 14px 14px;
  height: 90px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
  pointer-events: none;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(44, 34, 23, 0.72);
  margin-bottom: 18px;
}

.glass-panel,
.claim-panel {
  width: min(440px, 100%);
  margin-inline: auto;
  border-radius: var(--radius-xl);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.46), 0 22px 55px rgba(121, 76, 8, 0.12);
}

.claim-panel {
  padding: 26px 18px 18px;
  text-align: center;
  min-height: auto;

  background:
    linear-gradient(
      180deg,
      rgba(25,25,25,.95),
      rgba(12,12,12,.92)
    );

  border: 1px solid rgba(247,178,59,.25);

  color: white;
}

.logo-placeholder {
  width: 120px;
  aspect-ratio: 1;

  margin: 0 auto 30px;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;
  border-radius: 28px;

  background: #111;

  border: 2px solid rgba(247, 178, 59, 0.25);

  box-shadow:
    0 15px 40px rgba(0, 0, 0, 0.35),
    0 0 18px rgba(247, 178, 59, 0.18);
}

.logo-image {
  width: 100%;
  height: 100%;
  display: block;

  object-fit: cover;
}

.claim-panel h2,
.panel-title,
.brand-name {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: none;
}

.claim-panel h2,
.flip-front .brand-name {
  color: #FFD15A;
}

.flip-back .brand-name {
  color: var(--ink);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.claim-panel p,
.card-subtitle,
.card-hint,
.sync-status,
.progress-header .card-subtitle {
  color: var(--muted);
}

.claim-panel p {
  margin: 10px auto 16px;
  max-width: 21ch;
  line-height: 1.55;
  color: #b8b8b8;
}

.field-label {
  display: block;
  text-align: left;
  margin: 0 8px 10px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
  color: #FFD15A;
}

input {
  width: calc(100% - 16px);
  margin: 0 8px;
  padding: 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(247,178,59,.25);
  outline: none;
  font: inherit;
  color: white;
  background: #191919;
  box-shadow: inset 0 1px 6px rgba(182, 139, 44, 0.08);
}

input::placeholder {
  color: #777;
}

input.is-typing {
  animation: phoneShake .22s ease;
}

input:focus {
  border-color: rgba(224, 141, 16, 0.72);
  box-shadow: 0 0 0 4px rgba(247, 178, 59, 0.18);
}

.cta-button,
.ghost-button {
  width: calc(100% - 16px);
  margin: 12px 8px 0;
  padding: 16px 18px;
  border-radius: 18px;
  cursor: pointer;
  font-weight: 700;
  border: 1px solid transparent;
}

.cta-button {
  color: white;
  background: linear-gradient(
  135deg,
  #FFC63B,
  #E08D10
);
  box-shadow: 0 16px 28px rgba(226, 145, 21, 0.24);
}

.ghost-button {
  color: rgba(91, 69, 39, 0.88);
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(130, 94, 35, 0.08);
}

.sync-status {
  margin: 12px 12px 0;
  padding: 10px 14px;
  border-radius: 14px;
  background: #171717;
  border: 1px solid rgba(247,178,59,.15);
  color: #d8d8d8;
  font-size: 0.84rem;
  line-height: 1.45;
}

.card-stage {
  width: min(440px, 100%);
  margin-inline: auto;
  min-height: auto;
  display: grid;
  align-content: center;
  gap: 16px;
  margin-top: 16px;
}

.card-stage.expanded {
  position: fixed;
  inset: 10px;
  margin: 0;
  z-index: 50;
  padding: 0;
  border-radius: 34px;
  background: rgba(19, 15, 10, 0.78);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.28);
}

.flip-card {
  width: min(360px, 100%);
  margin: 0 auto;
  aspect-ratio: 1 / 1.12;
  perspective: 1800px;
  border-radius: 28px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  --shine-x: 50%;
  --shine-y: 40%;
  --shine-opacity: 0.16;
}

.flip-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: var(--shine-opacity);
  background:
    radial-gradient(circle at var(--shine-x) var(--shine-y), rgba(255, 255, 255, 0.45), transparent 22%),
    linear-gradient(115deg, transparent 36%, rgba(255, 255, 255, 0.42) 48%, transparent 60%);
  mix-blend-mode: screen;
  transform: translateZ(1px);
}

.flip-card.card-ready::after {
  animation: cardShine 4.8s ease-in-out infinite;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 860ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-face {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  padding: 18px;
  backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.flip-front {
  color: white;
  background:
radial-gradient(
circle at top left,
rgba(255,255,255,.18),
transparent 26%
),

linear-gradient(
160deg,
#FFE08A 0%,
#F4B63B 18%,
#D89218 55%,
#8E5606 100%
);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  overflow: hidden;
}

.flip-front::before{
content:"";

position:absolute;

inset:0;

background:

linear-gradient(
120deg,
transparent 20%,
rgba(255,255,255,.08) 48%,
transparent 70%
);

pointer-events:none;
}

.flip-back {
  transform: rotateY(180deg);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  padding: 24px;
  justify-content: flex-start;
  gap: 22px;
}

.card-top,
.progress-header,
.card-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.progress-header {
  padding-bottom: 4px;
}

.card-chip {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;

  background: linear-gradient(
    145deg,
    #FDE7A2,
    #E2A323,
    #B97809
  );

  color: #4a3205;
  font-weight: 800;

  box-shadow:
    inset 0 1px 2px rgba(255,255,255,.45),
    0 6px 18px rgba(226,163,35,.28);
}

.close-pill {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;

  background: rgba(255,255,255,.95);
  color: #666;
  font-weight: 700;

  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

.card-subtitle {
  font-size: 0.82rem;
}

.flip-front .card-subtitle {
  color: rgba(255, 255, 255, 0.75);
}

.card-owner {
  font-size: clamp(2.2rem,5vw,2.8rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-top: 6px;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.2), 0 12px 24px rgba(0, 0, 0, 0.12);
}

.mini-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.74;
}

.mini-value {
  font-size: 0.92rem;
  font-weight: 700;
  margin-top: 4px;
}

.stamps-count {
  text-align: right;
}

.count-number {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 0.95;
}

.progress-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.progress-stats div {
  padding: 16px 8px;
  border-radius: 20px;
  background: #faf7f0;
  border: 1px solid rgba(149, 113, 49, 0.12);
  text-align: center;
}

.progress-stats strong {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.progress-stats span {
  display: block;
  margin-top: 8px;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stamp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  padding: 20px;
  border-radius: 24px;
  background: #faf7f0;
}

.stamp-circle {
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ececec;
  box-shadow:
    inset 0 3px 5px rgba(0,0,0,0.08),
    0 2px 5px rgba(0,0,0,0.05);
}

.stamp-circle.filled {
  background:
    radial-gradient(
      circle at 30% 25%,
      #fff8d8,
      #ffd15a 35%,
      #f4a000 75%
    );

  box-shadow:
    0 10px 18px rgba(224,141,16,0.22),
    inset 0 2px 0 rgba(255,255,255,0.5);
}

.card-hint {
  font-size: 0.92rem;
  line-height: 1.5;
  text-align: center;
}

.card-stage.expanded .card-hint {
  display: none;
}

.card-stage.expanded .flip-card {
    width: 100%;
    min-height: 610px; /* adjust if needed */
    aspect-ratio: auto;
}

.card-stage.expanded .flip-card-inner,
.card-stage.expanded .flip-face {
  height: auto;
  min-height: 620px;
}

.card-stage.expanded .flip-face {
  border-radius: 32px;
  padding: 20px;
}

.card-stage.expanded .stamp-grid {
  gap: 12px;
}

#redeemButton {
  margin-top: 14px;
}

@keyframes phoneShake {

  0% {
    transform: translateX(0);
  }

  15% {
    transform: translateX(-3px);
  }

  30% {
    transform: translateX(3px);
  }

  45% {
    transform: translateX(-2px);
  }

  60% {
    transform: translateX(2px);
  }

  75% {
    transform: translateX(-1px);
  }

  100% {
    transform: translateX(0);
  }

}

@keyframes cardShine {
  0%,
  100% {
    opacity: 0.12;
    transform: translateX(-2%);
  }
  50% {
    opacity: 0.42;
    transform: translateX(2%);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1260px) {
  .page-shell {
    grid-template-columns: 1fr;
    width: min(560px, calc(100% - 20px));
  }

  .phone,
  .phone-center {
    transform: none;
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: calc(100% - 20px);
    padding-top: 18px;
  }

  .customer-intro h1 {
    max-width: 100%;
    font-size: clamp(2.5rem, 12vw, 4rem);
  }

  .claim-panel,
  .card-stage,
  .phone {
    min-height: auto;
  }

  .claim-panel {
    padding: 20px 14px 16px;
  }

  .flip-face {
    padding: 14px;
  }

  .progress-stats {
    grid-template-columns: 1fr;
  }

  .card-stage.expanded {
    inset: 8px;
    padding: 10px;
  }

  .card-stage.expanded .flip-card {
    height: 100%;
  }
}

@media (hover: hover) and (pointer: fine) {
  .flip-card:hover::after,
  .flip-card:focus-visible::after {
    --shine-opacity: 0.34;
  }
}


#claimStampButton,
#redeemButton,
#refreshButton {
  display:none;
}
