/* ============================================================
   Jett's Window Cleaning — Customer Portal (My Mag Tag)
   Palette from jettswindows.com: teal #014f4f, brass/gold #b78e58, cream #eee4cd
   ============================================================ */

:root {
  --cream: #efe6d0;
  --teal: #014f4f;
  --teal-deep: #013b3b;
  --gold: #b78e58;
  --gold-light: #d7b787;
  --gold-600: #9c743f;
  --white: #ffffff;
  --text: #1c2b2b;
  --text-soft: #5c6a66;

  --radius: 18px;
  --shadow: 0 6px 18px rgba(1, 79, 79, 0.15);
  --shadow-hover: 0 12px 28px rgba(1, 79, 79, 0.25);
}

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

body {
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 500;
  color: var(--text);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */
.portal {
  max-width: 540px;
  margin: 0 auto;
  padding: 2rem 1.25rem 1.5rem;
}

/* ---------- Brand header ---------- */
.brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.brand__logo {
  max-width: 240px;
  width: 70%;
  height: auto;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  box-shadow: var(--shadow);
}

.brand__welcome {
  margin-top: 1rem;
  font-weight: 600;
  color: var(--teal);
  font-size: 1rem;
}

/* ---------- Featured actions ---------- */
.featured {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius);
  color: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.2s;
}

.feature:active { transform: scale(0.98); }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.feature--review {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.feature--refer {
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  cursor: pointer;
}

.feature__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.6rem;
}

.feature__stars {
  letter-spacing: 0.15em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.feature__title { font-weight: 800; font-size: 1.35rem; }

.feature__sub {
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.92;
  margin-top: 0.25rem;
}

.feature__sub--emph {
  font-weight: 800;
  font-size: 1.2rem;
  opacity: 1;
  margin-top: 0.4rem;
}

/* ---------- Secondary grid ---------- */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.2s;
}

.tile:active { transform: scale(0.98); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }

.tile__title { font-weight: 700; font-size: 1.1rem; color: var(--teal); }
.tile__sub { font-size: 0.85rem; color: var(--text-soft); margin-top: 0.3rem; }

/* ---------- Footer ---------- */
.portal-footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--teal);
  font-size: 0.85rem;
  opacity: 0.85;
}

.portal-footer strong { font-weight: 800; }

/* ---------- Referral popup (modal) ---------- */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(1, 40, 40, 0.55);
  z-index: 100;
}

.modal.is-open { display: flex; }

.modal__card {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 24px;
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.9rem;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--text-soft);
  cursor: pointer;
}

.modal__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--teal);
  text-align: center;
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.ref-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.1rem;
}

.ref-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(1, 79, 79, 0.22);
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ref-input::placeholder { color: #9aa39c; }

.ref-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(1, 79, 79, 0.15);
}

.ref-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--teal);
  margin-top: 0.3rem;
}

.ref-choices { display: grid; gap: 0.5rem; }

.ref-choice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border: 2px solid rgba(1, 79, 79, 0.22);
  border-radius: 14px;
  font-size: 0.95rem;
  cursor: pointer;
}

.ref-choice input { accent-color: var(--teal); width: 1.05rem; height: 1.05rem; }

.ref-submit {
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: var(--white);
  font-family: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.15s;
}

.ref-submit:active { transform: scale(0.98); }

.ref-success { text-align: center; padding: 1.5rem 0.5rem 0.5rem; }

.ref-success__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.ref-success .ref-submit { margin-top: 1.25rem; }

.hidden-iframe { display: none; width: 0; height: 0; border: 0; }

/* ---------- Larger screens ---------- */
@media (min-width: 560px) {
  .portal { padding-top: 3rem; }
}
