/* ======================================================
   LOCAL FONT — ALEX BRUSH
====================================================== */

@font-face {
  font-family: "Alex Brush";
  src: url("./fonts/alex-brush.regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}



/* ======================================================
   RESET
====================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


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


body {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Helvetica Neue",
    Arial,
    sans-serif;

  background: #111111;
  color: #f8f1e7;

  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}



/* ======================================================
   PAGE
====================================================== */

.guest-page {
  width: 100%;
  min-height: 100dvh;

  display: flex;
  justify-content: center;

  background: #111111;
}



/* ======================================================
   MAIN CARD
====================================================== */

.souvenir-card {
  position: relative;

  width: 100%;
  max-width: 430px;

  min-height: 100dvh;

  overflow: hidden;

  background: #111111;
}



/* ======================================================
   BACKGROUND
====================================================== */

.background-image {
  position: absolute;
  inset: 0;

  z-index: 0;

  background-image: url("wp.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}



/* ======================================================
   OVERLAY
====================================================== */

.background-overlay {
  position: absolute;
  inset: 0;

  z-index: 1;

  background:
    linear-gradient(
      180deg,
      rgba(5, 5, 5, 0.45) 0%,
      rgba(5, 5, 5, 0.52) 35%,
      rgba(5, 5, 5, 0.72) 70%,
      rgba(5, 5, 5, 0.88) 100%
    );
}



/* ======================================================
   CONTENT
====================================================== */

.card-inner {
  position: relative;

  z-index: 2;

  width: 100%;
  min-height: 100dvh;

  display: flex;
  flex-direction: column;

  padding:
    calc(42px + env(safe-area-inset-top))
    24px
    calc(28px + env(safe-area-inset-bottom));
}



/* ======================================================
   HEADER
====================================================== */

.card-header {
  width: 100%;
  text-align: center;
}



/* THE WEDDING OF */

.wedding-label {
  font-size: 9px;
  font-weight: 600;

  letter-spacing: 3.4px;

  color: rgba(248, 241, 231, 0.82);
}



/* ======================================================
   COUPLE NAME
====================================================== */

.couple-name {
  width: 100%;

  margin-top: 10px;

  font-family: "Alex Brush", cursive;

  /*
    penting:
    supaya Tassya & Arif selalu satu baris
  */
  white-space: nowrap;

  font-size: clamp(38px, 11vw, 48px);

  font-weight: 400;
  font-style: normal;

  line-height: 1;

  letter-spacing: 0;

  color: #f8edde;

  text-align: center;

  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.32),
    0 6px 20px rgba(0, 0, 0, 0.24);
}


.couple-name span {
  display: inline;

  margin: 0 2px;

  font-family: "Alex Brush", cursive;

  font-size: 0.83em;

  font-weight: 400;

  color: #d8b979;
}



/* ======================================================
   DATE
====================================================== */

.wedding-date {
  margin-top: 14px;

  font-size: 10px;
  font-weight: 500;

  letter-spacing: 3.2px;

  color: #e0c99d;
}



/* ======================================================
   DIVIDER
====================================================== */

.divider {
  width: 36px;
  height: 1px;

  margin: 22px auto 24px;

  background: rgba(224, 201, 157, 0.7);
}



/* ======================================================
   CONTENT BODY
====================================================== */

.card-content {
  flex: 1;

  display: flex;
  flex-direction: column;
  justify-content: center;
}



/* ======================================================
   STATE
====================================================== */

.state-panel {
  width: 100%;

  padding: 38px 12px;

  text-align: center;
}


.state-panel p {
  max-width: 280px;

  margin: 14px auto 0;

  font-size: 12px;

  line-height: 1.7;

  color: rgba(248, 241, 231, 0.72);
}



/* ======================================================
   LOADING
====================================================== */

.loading-ring {
  width: 30px;
  height: 30px;

  margin: auto;

  border-radius: 50%;

  border:
    2px solid
    rgba(255, 255, 255, 0.15);

  border-top-color: #dfc99f;

  animation: loading 0.8s linear infinite;
}


@keyframes loading {
  to {
    transform: rotate(360deg);
  }
}



/* ======================================================
   ERROR
====================================================== */

.error-symbol {
  width: 44px;
  height: 44px;

  margin: 0 auto 18px;

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

  border:
    1px solid
    rgba(223, 201, 159, 0.68);

  border-radius: 50%;

  font-size: 22px;

  color: #dfc99f;
}


#errorState h2 {
  max-width: 290px;

  margin: auto;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 24px;
  font-weight: 400;

  line-height: 1.3;

  color: #f8f0e3;
}



/* ======================================================
   GUEST PASS
====================================================== */

.guest-pass {
  width: 100%;

  text-align: center;
}



/* ======================================================
   GUEST INFO
====================================================== */

.guest-information {
  margin-bottom: 20px;
}


.small-label {
  font-size: 8px;

  font-weight: 700;

  letter-spacing: 2.7px;

  color: #ddc494;
}


.special-text {
  margin-top: 7px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 12px;
  font-style: italic;

  color:
    rgba(248, 241, 231, 0.68);
}


/* ======================================================
   NAMA TAMU — SAN FRANCISCO
====================================================== */

#guestName {
  margin-top: 6px;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "SF Pro Display",
    "SF Pro Text",
    "Helvetica Neue",
    Arial,
    sans-serif;

  font-size: clamp(24px, 7vw, 30px);

  font-weight: 500;

  font-style: normal;

  line-height: 1.2;

  letter-spacing: -0.5px;

  color: #fbf3e7;

  text-shadow:
    0 2px 10px rgba(0, 0, 0, 0.25);
}

.guest-code {
  margin-top: 8px;

  font-size: 8px;
  font-weight: 600;

  letter-spacing: 1.8px;

  color:
    rgba(248, 241, 231, 0.55);
}



/* ======================================================
   QR CARD
====================================================== */

.qr-card {
  width: 100%;
  max-width: 280px;

  margin: auto;

  padding:
    18px 19px
    17px;

  background:
    rgba(250, 246, 239, 0.94);

  border:
    1px solid
    rgba(255, 255, 255, 0.20);

  border-radius: 17px;

  box-shadow:
    0 20px 50px
    rgba(0, 0, 0, 0.25);

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}



/* ======================================================
   QR
====================================================== */

.qr-label {
  margin-bottom: 11px;

  font-size: 8px;
  font-weight: 700;

  letter-spacing: 2.1px;

  color: #837666;
}


.qr-wrapper {
  width: 170px;
  height: 170px;

  margin: auto;

  padding: 10px;

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

  background: #ffffff;

  border-radius: 9px;
}


.qr-code {
  width: 100%;
  height: 100%;

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


.qr-code img,
.qr-code canvas {
  width: 100% !important;
  height: 100% !important;

  object-fit: contain;
}



/* ======================================================
   SOUVENIR
====================================================== */

.souvenir-row {
  margin-top: 16px;

  padding:
    0 4px
    12px;

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

  border-bottom:
    1px solid
    rgba(43, 39, 34, 0.12);
}


.souvenir-row span {
  font-size: 11px;

  color: #81766b;
}


.souvenir-row strong {
  font-size: 14px;
  font-weight: 600;

  color: #372f28;
}



/* ======================================================
   STATUS
====================================================== */

.status-card {
  margin-top: 13px;

  padding: 0 4px;

  display: flex;
  align-items: center;

  gap: 10px;

  text-align: left;
}


.status-dot {
  width: 8px;
  height: 8px;

  flex-shrink: 0;

  border-radius: 50%;

  background: #627863;

  box-shadow:
    0 0 0 4px
    rgba(98, 120, 99, 0.11);
}


.status-information {
  display: flex;
  flex-direction: column;

  gap: 1px;
}


.status-information small {
  font-size: 7px;
  font-weight: 700;

  letter-spacing: 1.4px;

  color: #9a9084;
}


.status-information strong {
  font-size: 11px;
  font-weight: 600;

  color: #576d59;
}


.status-used .status-dot {
  background: #9d6666;

  box-shadow:
    0 0 0 4px
    rgba(157, 102, 102, 0.10);
}


.status-used .status-information strong {
  color: #956161;
}


.claimed-time {
  margin-top: 2px;

  font-size: 8px;

  color: #9d958b;
}



/* ======================================================
   NOTE
====================================================== */

.guest-note {
  max-width: 280px;

  margin:
    22px auto
    0;

  font-size: 10px;

  line-height: 1.65;

  color:
    rgba(248, 241, 231, 0.72);
}



/* ======================================================
   FOOTER
====================================================== */

.card-footer {
  margin-top: 32px;

  text-align: center;
}


.footer-monogram {
  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 15px;

  letter-spacing: 3px;

  color: #f5ead9;
}


.footer-monogram span {
  color: #d9bd8b;

  font-style: italic;
}


.footer-text {
  margin-top: 7px;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size: 9px;

  font-style: italic;

  color:
    rgba(248, 241, 231, 0.62);
}


.footer-heart {
  display: block;

  margin-top: 7px;

  font-size: 14px;

  color: #d9bd8b;
}



/* ======================================================
   HIDDEN
====================================================== */

.hidden {
  display: none !important;
}



/* ======================================================
   SMALL PHONE
====================================================== */

@media (max-width: 360px) {

  .card-inner {
    padding-left: 18px;
    padding-right: 18px;
  }


  .couple-name {
    font-size: 35px;
  }


  .qr-card {
    max-width: 260px;
  }


  .qr-wrapper {
    width: 155px;
    height: 155px;
  }

}



/* ======================================================
   IPAD / TABLET
====================================================== */

@media (min-width: 768px) {

  .guest-page {
    align-items: center;

    padding: 30px;
  }


  .souvenir-card {
    min-height: 820px;

    border-radius: 24px;

    box-shadow:
      0 25px 80px
      rgba(0, 0, 0, 0.38);
  }


  .card-inner {
    min-height: 820px;

    padding-left: 28px;
    padding-right: 28px;
  }


  /* tetap satu baris juga di iPad */
  .couple-name {
    font-size: 46px;
  }

}