/* =============================================================================
   Crestworthy Portal — the look
   Mobile-first. Warm cream, dark navy, teal accent, Bruce-orange for wins.
   Big friendly type, rounded cards, thumb-sized buttons.
   ========================================================================== */

:root {
  --cream:        #FDF8F1;
  --cream-deep:   #F6EEE2;
  --card:         #FFFFFF;
  --navy:         #1B2A41;
  --navy-soft:    #4A5A72;
  --teal:         #0E7C7B;
  --teal-dark:    #0A6160;
  --orange:       #F26B21;
  --line:         #E8DECE;
  --shadow:       0 2px 4px rgba(27, 42, 65, .04), 0 8px 24px rgba(27, 42, 65, .07);
  --radius:       20px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--cream);
  color: var(--navy);
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
               "Segoe UI", "Nunito", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Layout: single column, generous air ---------------------------------- */

.wrap {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 32px 20px 64px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 24px;
}

/* --- Type ----------------------------------------------------------------- */

h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

p { margin: 0 0 16px; }
p:last-child { margin-bottom: 0; }

.lead   { font-size: 18px; color: var(--navy-soft); }
.small  { font-size: 15px; color: var(--navy-soft); }
.center { text-align: center; }

/* --- Brand mark ----------------------------------------------------------- */

.brand {
  text-align: center;
  margin-bottom: 24px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}

/* --- Form ----------------------------------------------------------------- */

label {
  display: block;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
}

input[type="email"] {
  width: 100%;
  padding: 18px 18px;
  font-size: 18px;
  font-family: inherit;
  color: var(--navy);
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}

input[type="email"]:focus {
  border-color: var(--teal);
  background: #fff;
}

input[type="email"]::placeholder { color: #A9B3C0; }

/* --- Buttons: giant and thumb-friendly ------------------------------------ */

.btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 19px 24px;
  font-family: inherit;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  background: var(--teal);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: background .15s ease, transform .08s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover:not(:disabled)  { background: var(--teal-dark); }
.btn:active:not(:disabled) { transform: scale(.985); }

.btn:disabled {
  opacity: .55;
  cursor: default;
}

.btn-quiet {
  background: none;
  color: var(--navy-soft);
  font-size: 16px;
  font-weight: 600;
  text-decoration: underline;
  padding: 12px;
  margin-top: 8px;
}

.btn-quiet:hover:not(:disabled) { background: none; color: var(--navy); }

/* --- Messages ------------------------------------------------------------- */

.note {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 14px;
  font-size: 16px;
}

.note-bad {
  background: #FDECE4;
  border: 1px solid #F6C4A9;
  color: #8A3B12;
}

.note-good {
  background: #E7F3F1;
  border: 1px solid #B4DCD7;
  color: var(--teal-dark);
}

/* --- The big check for "we sent it" --------------------------------------- */

.bigmark {
  font-size: 52px;
  line-height: 1;
  margin-bottom: 16px;
}

/* --- The video player ------------------------------------------------------
   HeyABQ videos are shot vertical (9:16) for TikTok, so the frame matches.
   Capped by screen height so the whole video is visible without scrolling. */

.player {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 68vh;
  margin: 20px auto 0;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  /* Keeps the 9:16 shape when max-height is what's limiting us */
  aspect-ratio: 9 / 16;
}

/* When height is the constraint, shrink the width to match so the rounded
   corners hug the video instead of framing black bars. */
@supports (aspect-ratio: 9 / 16) {
  .player { width: min(100%, calc(68vh * 9 / 16)); }
}

.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Customer list ---------------------------------------------------------- */

.wrap-top { justify-content: flex-start; }

.back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--navy-soft);
  text-decoration: none;
}

.back:hover { color: var(--navy); }

.list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}

.row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.avatar {
  flex: 0 0 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--teal-dark);
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.who { flex: 1; min-width: 0; }

.who-name {
  font-weight: 700;
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.who-detail {
  font-size: 15px;
  color: var(--navy-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-remove {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: none;
  color: #B9A99A;
  font-size: 17px;
  cursor: pointer;
}

.row-remove:hover { background: var(--cream-deep); color: var(--navy); }

label.spaced { margin-top: 16px; }

input[type="text"],
input[type="tel"],
textarea {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-family: inherit;
  color: var(--navy);
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 14px;
  outline: none;
  resize: vertical;
}

input[type="text"]:focus,
input[type="tel"]:focus,
textarea:focus { border-color: var(--teal); background: #fff; }

.filebtn {
  display: block;
  margin-top: 14px;
  padding: 16px;
  text-align: center;
  font-weight: 700;
  font-size: 17px;
  color: var(--teal-dark);
  background: var(--cream);
  border: 2px dashed var(--line);
  border-radius: 14px;
  cursor: pointer;
}

.filebtn:hover { border-color: var(--teal); }

/* --- Home menu -------------------------------------------------------------- */

.menu-link {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  font-size: 18px;
  box-shadow: var(--shadow);
}

.menu-link:hover { border-color: var(--teal); }
.menu-link .emoji { font-size: 24px; }
.menu-link .chev { margin-left: auto; color: var(--navy-soft); }

/* --- Footer --------------------------------------------------------------- */

.foot {
  text-align: center;
  padding: 8px 20px 32px;
  font-size: 14px;
  color: var(--navy-soft);
}

/* --- Utility -------------------------------------------------------------- */

.hidden { display: none !important; }

.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  margin-right: 8px;
  vertical-align: -3px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

/* Respect people who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  .btn:active { transform: none; }
}
