/* =========================================================================
   Tutok — HOME screen styles  (prefix: home-)
   Style direction: premium violet consumer app. Editorial gradient hero
   that bleeds to the device edges, layered depth, warm Taglish microcopy.
   Shared classes are styled in components.css; this file adds only the
   home-specific surfaces and a few tasteful flourishes.
   ========================================================================= */

.home { position: relative; }

/* The flush screen removes default padding so the hero can bleed edge-to-edge.
   The body below re-applies the standard horizontal rhythm. */
.home-body {
  padding: 0 var(--s-4) var(--s-6);
}

/* =========================================================================
   HERO — violet gradient header
   ========================================================================= */
.home-hero {
  position: relative;
  padding: var(--s-3) var(--s-4) var(--s-6);
  /* Pull up under the status bar so the gradient meets the top edge cleanly. */
  margin-top: calc(-1 * var(--s-2));
  border-radius: 0 0 var(--r-xl) var(--r-xl);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.home-hero__bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(120% 80% at 12% -10%, rgba(168,85,247,.55), transparent 60%),
    radial-gradient(120% 90% at 108% 4%, rgba(91,91,245,.65), transparent 55%),
    var(--grad-brand);
}
/* fine grain + a soft sheen for atmosphere (kept very subtle) */
.home-hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(140% 60% at 50% -20%, rgba(255,255,255,.22), transparent 60%);
  mix-blend-mode: screen;
  opacity: .8;
}
/* tame the decorative .glow halo inside the dark hero */
.home-hero.glow::after { inset: -20% -10% 40%; opacity: .5; filter: blur(14px); }

/* ---- top bar: brand / location / avatar ---- */
.home-hero__bar {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: 48px;
}
.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
}
.home-brand__mark { filter: drop-shadow(0 3px 8px rgba(20,18,31,.35)); }
.home-brand__word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-lg);
  letter-spacing: -.02em;
  color: #fff;
}

.home-loc {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
  min-height: 44px;
  padding: 6px 12px 6px 8px;
  border-radius: var(--r-pill);
  background: rgba(255,255,255,.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  text-align: left;
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
  max-width: 56%;
}
.home-loc:hover { background: rgba(255,255,255,.26); }
.home-loc:active { transform: scale(.97); }
.home-loc__pin {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
}
.home-loc__pin svg { stroke: #fff; }
.home-loc__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.home-loc__label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.home-loc__area {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-loc__chev { stroke: rgba(255,255,255,.85); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

.home-avatar {
  flex: 0 0 auto;
  border-radius: 50%;
  line-height: 0;
  transition: transform var(--dur-fast) var(--ease);
}
.home-avatar .avatar--ring { box-shadow: 0 0 0 2px var(--brand), 0 0 0 4px rgba(255,255,255,.9), var(--sh-2); }
.home-avatar:hover { transform: translateY(-1px); }
.home-avatar:active { transform: scale(.94); }

/* ---- lede: greeting + big headline ---- */
.home-hero__lede { margin-top: var(--s-5); }
.home-hello {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  color: rgba(255,255,255,.92);
  letter-spacing: .005em;
}
.home-hello__wave {
  display: inline-block;
  transform-origin: 70% 80%;
  animation: home-wave 2.6s var(--ease) 0.4s 2;
}
@keyframes home-wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(16deg); }
  20%, 40% { transform: rotate(-10deg); }
}
.home-headline {
  margin-top: var(--s-2);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 1.3rem + 3.4vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: -.025em;
  color: #fff;
  text-wrap: balance;
}
.home-headline__accent {
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, transparent 62%, rgba(255,176,32,.95) 62%);
  padding: 0 .06em;
  border-radius: 2px;
}

/* ---- search button (looks like a real search field) ---- */
.home-search {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  width: 100%;
  margin-top: var(--s-5);
  min-height: 56px;
  padding: 0 8px 0 16px;
  border-radius: var(--r-pill);
  background: var(--surface);
  box-shadow: var(--sh-3), inset 0 0 0 1px rgba(255,255,255,.6);
  text-align: left;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur) var(--ease);
}
.home-search:hover { transform: translateY(-1px); box-shadow: var(--sh-pop); }
.home-search:active { transform: translateY(0) scale(.99); }
.home-search__icon { display: inline-flex; flex: 0 0 auto; color: var(--brand); }
.home-search__icon svg { stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.home-search__text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-search__kbd {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--sh-brand);
}
.home-search__kbd svg { stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.home-search__sub {
  margin-top: var(--s-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(255,255,255,.82);
}

/* ---- trust strip ---- */
.home-trust {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: var(--s-5);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  background: rgba(255,255,255,.13);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.home-trust__item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  text-align: center;
}
.home-trust__value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h3);
  letter-spacing: -.01em;
  color: #fff;
  line-height: 1.1;
}
.home-trust__label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.74);
}
.home-trust__sep { width: 1px; height: 26px; background: rgba(255,255,255,.22); flex: 0 0 auto; }

/* =========================================================================
   BODY sections
   ========================================================================= */
.home-body .section-title { margin-top: var(--s-6); }
.home-subjects { padding-top: var(--s-1); }

/* =========================================================================
   MAP preview card
   ========================================================================= */
.home-map {
  position: relative;
  padding: 0;
  overflow: hidden;
  box-shadow: var(--sh-2);
}
.home-map__canvas {
  aspect-ratio: 16 / 11;
  border-radius: var(--r-lg);
  box-shadow: none;
}
.home-map__overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-4);
  z-index: 6;
  background: linear-gradient(180deg, transparent, rgba(20,18,31,.16));
  pointer-events: none;
}
.home-map__overlay > * { pointer-events: auto; }
.home-map__chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  box-shadow: var(--sh-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  color: var(--ink);
}
.home-map__live {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px var(--success-soft);
  flex: 0 0 auto;
  position: relative;
}
.home-map__live::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--success);
  animation: home-ping 2s var(--ease-io) infinite;
}
@keyframes home-ping {
  0% { transform: scale(1); opacity: .6; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}
.home-map__btn { box-shadow: var(--sh-brand); }

/* =========================================================================
   RESUME row ("Pick up where you left off")
   ========================================================================= */
.home-resume {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  cursor: pointer;
}
.home-resume__avatar { flex: 0 0 auto; }
.home-resume__body { flex: 1 1 auto; min-width: 0; }
.home-resume__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-body);
  color: var(--ink);
}
.home-resume__emoji { font-size: 1.05em; line-height: 1; }
.home-resume__sub {
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: 600;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-resume__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--fs-sm);
  transition: background var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.home-resume__cta svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.home-resume:hover .home-resume__cta { background: color-mix(in srgb, var(--brand-soft) 65%, var(--brand) 14%); }
.home-resume:active .home-resume__cta { transform: scale(.96); }

/* =========================================================================
   TUTOR list spacing on home
   ========================================================================= */
.home-tutors > * + * { margin-top: var(--s-3); }

/* =========================================================================
   PROMO banner
   ========================================================================= */
.home-promo-wrap { margin-top: var(--s-5); }
.home-promo {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  width: 100%;
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--grad-accent);
  color: #fff;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(255,122,89,.32);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), filter var(--dur-fast) var(--ease);
}
.home-promo:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(255,122,89,.4); filter: brightness(1.03); }
.home-promo:active { transform: translateY(0) scale(.99); }
.home-promo__glow {
  position: absolute;
  top: -40%; right: -10%;
  width: 60%; height: 180%;
  background: radial-gradient(circle, rgba(255,255,255,.35), transparent 65%);
  pointer-events: none;
}
.home-promo__icon {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 50px; height: 50px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.22);
  font-size: 1.55rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.home-promo__body { flex: 1 1 auto; min-width: 0; }
.home-promo__title {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-h3);
  letter-spacing: -.01em;
  line-height: 1.2;
}
.home-promo__sub {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: rgba(255,255,255,.94);
}
.home-promo__code {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: .04em;
  padding: 1px 6px;
  border-radius: var(--r-xs);
  background: rgba(255,255,255,.24);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.3);
}
.home-promo__chev {
  flex: 0 0 auto;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  color: #fff;
}
.home-promo__chev svg { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* =========================================================================
   RESPONSIVE — small phones (≤360px) tighten the hero
   ========================================================================= */
@media (max-width: 360px) {
  .home-loc { max-width: 48%; padding: 6px 10px 6px 7px; }
  .home-loc__pin { width: 24px; height: 24px; }
  .home-trust { padding: var(--s-3); gap: var(--s-1); }
  .home-trust__value { font-size: var(--fs-body); }
  .home-promo__icon { width: 44px; height: 44px; font-size: 1.35rem; }
}

/* Larger viewports inside the frame: a touch more vertical generosity */
@media (min-width: 600px) {
  .home-hero { padding-bottom: var(--s-7); }
  .home-map__canvas { aspect-ratio: 16 / 9; }
}

/* =========================================================================
   Reduced motion
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  .home-hello__wave { animation: none; }
  .home-map__live::after { animation: none; }
}
