/* Feature: Customer home ("Need help right now?" card, the check tile, tool groups, recent checks).
   Owner: Yan Lin
   Uses the Clarity variables only. */

.hello { margin-bottom: 1rem; }
.hello h1 { margin-bottom: 0; font-size: 2.25rem; }

/* ---------- The welcome with its drawing ----------
   Short on purpose: a greeting and one line, so the red card shows without scrolling on a phone */
.hello--hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .5rem 1rem; }
.hello--hero .eyebrow { margin-bottom: .125rem; }
.hello--hero h1 { font-size: 1.75rem; }
@media (min-width: 40rem) { .hello--hero h1 { font-size: 2.25rem; } }
.hero-art { width: 4.5rem; height: auto; overflow: visible; }
@media (min-width: 40rem) { .hero-art { width: 9rem; } }

/* The drawing's parts, in Clarity colours */
.ha-blob { fill: var(--red-tint); }
.ha-dot { fill: var(--slate-tint); }
.ha-phone { fill: var(--white); stroke: var(--charcoal); stroke-width: 3; }
.ha-screen { fill: var(--slate-tint); }
.ha-slot, .ha-line--soft, .ha-accept { fill: var(--divider); }
.ha-avatar { fill: var(--white); }
.ha-head { fill: var(--slate); }
.ha-body { fill: none; stroke: var(--slate); stroke-width: 3; stroke-linecap: round; }
.ha-line { fill: var(--charcoal); }
.ha-decline { fill: var(--red); }
.ha-ring { fill: none; stroke: var(--red); stroke-width: 4; stroke-linecap: round; opacity: .35; animation: ha-ring 1.4s ease-out 3 both; }
.ha-ring--2 { animation-delay: .18s; }
@keyframes ha-ring { 0% { opacity: 0; } 40% { opacity: 1; } 100% { opacity: .35; } }
.ha-pause { transform-box: fill-box; transform-origin: center; filter: drop-shadow(0 8px 12px rgba(158, 27, 50, .3)); animation: ha-breathe 5s ease-in-out infinite; }
.ha-pause-box { fill: var(--red); }
.ha-bar { fill: var(--white); }
.ha-check circle { fill: var(--white); stroke: var(--red-dark); stroke-width: 3; }
.ha-check path { fill: none; stroke: var(--red-dark); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
@keyframes ha-breathe { 50% { transform: scale(1.05); } }

/* ---------- "Need help right now?": the dark red card, the one loud thing on the page ----------
   White text is 5.7:1 or more everywhere on it. */

.urgent {
  --focus: var(--white);
  position: relative; overflow: hidden; padding: 1.5rem;
  background: var(--red-dark); color: var(--white);
  border-radius: var(--radius-lg); box-shadow: 0 16px 40px rgba(158, 27, 50, .25);
}
.urgent::before, .urgent::after { content: ""; position: absolute; z-index: 0; border-radius: 50%; pointer-events: none; }
.urgent::before { top: -9rem; right: -7rem; width: 22rem; height: 22rem; background: var(--red); opacity: .55; }
.urgent::after { right: 7rem; bottom: -8rem; width: 12rem; height: 12rem; background: rgba(255, 255, 255, .07); }
.urgent > * { position: relative; z-index: 1; }
.urgent h2 { font-size: 1.625rem; }
.urgent-choices { display: grid; gap: .75rem; margin-top: 1rem; }

/* The two big white choices */
.big-choice {
  --focus: var(--white);
  display: flex; align-items: center; gap: 1rem; min-height: 80px; padding: 1rem 1.125rem;
  background: var(--white); color: var(--charcoal); text-decoration: none;
  border-radius: var(--radius); box-shadow: var(--shadow);
  transition: background-color .15s, transform .15s;
}
.big-choice:hover { background: var(--red-tint); transform: translateY(-2px); }
.big-choice-icon {
  display: grid; place-items: center; flex: none; width: 3.25rem; height: 3.25rem;
  border-radius: 50%; background: var(--red); color: var(--white);
}
.big-choice-icon .icon { width: 1.625rem; height: 1.625rem; }
.big-choice-text strong { display: block; font-size: 1.25rem; line-height: 1.25; }
.big-choice-text span { display: block; margin-top: .125rem; color: var(--muted); font-size: 1rem; }
.big-choice-arrow { margin-left: auto; color: var(--red-dark); transition: transform .15s; }
.big-choice:hover .big-choice-arrow { transform: translateX(3px); }
.big-choice:active { transform: scale(.98); }

/* "Someone is calling me now" is the one thing that should stand out most:
   its round icon sends out a soft ring three times when the page opens, like a phone ringing. */
.big-choice--first .big-choice-icon { position: relative; }
.big-choice--first .big-choice-icon::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(237, 28, 36, .45); animation: home-ring 1.6s .4s ease-out 3;
}
@keyframes home-ring { to { box-shadow: 0 0 0 .875rem rgba(237, 28, 36, 0); } }

.call-line { margin: 1.125rem 0 0; font-weight: 600; }
.call-line a { color: var(--white); font-weight: 800; white-space: nowrap; }

/* ---------- The one big "Check" tile: icon in a soft red square, red border ---------- */

.tools-section { margin-top: 2rem; }
.tools-section h2 { margin-bottom: .75rem; }
.tools-sub { margin: -.375rem 0 .75rem; color: var(--muted); }
.tool {
  display: flex; align-items: center; gap: 1rem; width: 100%; min-height: 88px; padding: 1.125rem;
  background: var(--surface); color: var(--text); text-align: left; text-decoration: none;
  border: 2px solid transparent; border-radius: var(--radius-lg); box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tool:hover { border-color: var(--red); transform: translateY(-2px); box-shadow: 0 2px 4px rgba(54, 59, 64, .06), 0 14px 32px rgba(54, 59, 64, .12); }
.tool--main { border-color: var(--red); }
.tool-icon {
  display: grid; place-items: center; flex: none; width: 3.25rem; height: 3.25rem;
  border-radius: 14px; background: var(--red-tint); color: var(--red-dark);
}
.tool-icon .icon { width: 1.75rem; height: 1.75rem; }
.tool-text { flex: 1; min-width: 0; }
.tool-text strong { display: block; font-size: 1.1875rem; line-height: 1.3; }
.tool-text span { display: block; margin-top: .2rem; color: var(--muted); font-size: 1rem; line-height: 1.4; }
.tool-arrow { color: var(--text); transition: transform .15s; }
.tool:hover .tool-arrow { transform: translateX(3px); }
.tool:active { transform: scale(.98); }

/* ---------- The tool groups: plain lists, one line per tool ----------
   Like a phone's Settings list: easy to scan, every row a big tap target (at least 64px tall). */

.more-list { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.more-list li + li { border-top: 1px solid var(--border); }
.more-link {
  display: flex; align-items: center; gap: .875rem; min-height: 64px; padding: .75rem 1.125rem;
  color: var(--text); text-decoration: none; font-size: 1.125rem; font-weight: 700; line-height: 1.3;
  transition: background-color .15s;
}
.more-link:hover { background: var(--red-tint); }
.more-link:active { background: var(--red-tint); }
.more-icon {
  display: grid; place-items: center; flex: none; width: 2.5rem; height: 2.5rem;
  border-radius: 12px; background: var(--red-tint); color: var(--red-dark);
}
.more-icon .icon { width: 1.375rem; height: 1.375rem; }
.more-text { flex: 1; min-width: 0; }
.more-link .menu-lock .icon { width: 1.125rem; height: 1.125rem; }
.more-arrow { flex: none; color: var(--muted); }
.lock-note .menu-lock { vertical-align: -.125rem; margin: 0 .125rem 0 0; }
.tool--main + .more-list { margin-top: .75rem; }   /* "Check a transfer first" under the big Check tile */

/* Touch screens have no real hover: a tapped tile should not stay lifted */
@media (hover: none) {
  .tool:hover, .big-choice:hover { transform: none; box-shadow: var(--shadow); }
  .tool:hover .tool-arrow, .big-choice:hover .big-choice-arrow { transform: none; }
  .tool--main:hover { box-shadow: var(--shadow); }
  .more-link:hover { background: none; }
}

/* On a phone, a little less padding in the red card, so the big choices' words have room */
@media (max-width: 30rem) {
  .urgent { padding: 1.25rem 1rem; }
  .big-choice { gap: .75rem; padding: .875rem; }
  .big-choice-icon { width: 2.75rem; height: 2.75rem; }
}

/* ---------- My recent checks: folded away until opened ---------- */

.recent { margin-top: 2rem; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.recent summary { display: flex; align-items: center; min-height: 56px; padding: .75rem 1.25rem; cursor: pointer; font-weight: 700; }
.recent-list { padding: 0 1.25rem 1rem; }
.recent-list li {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem;
  padding: .875rem 0; border-top: 1px solid var(--border);
}
.recent-what { min-width: 0; }
.recent-what strong { display: block; font-weight: 600; overflow-wrap: anywhere; }
.recent-what span { color: var(--muted); font-size: 1rem; }
