/* ==========================================================================
   home-search.css — Home page additions on top of the shared styles:
   the hero lookup result and the timeline band brought over from
   homecv.html. Loads after the page styles.
   ========================================================================== */

[hidden] { display: none !important; }

/* ─── Hero lookup ──────────────────────────────────────────────────────── */
.addr-opt.is-hl { background: var(--surface-2); }
.hs-unit { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14.5px; color: var(--brown-3); }
.hs-unit-input {
  width: 110px; height: 44px; padding: 0 12px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: var(--bg); font: inherit; color: var(--brown);
}
.hs-unit-input:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(20,58,112,0.09); }
.hs-status { min-height: 0; margin: 8px 0 0; font-size: 14.5px; color: var(--brown-3); }
.hs-status:empty { display: none; }
.hs-status.is-error { color: var(--danger); }

.hs-result {
  max-width: 760px; margin: 8px auto 34px; padding: 40px 40px 28px;
  background: rgba(255,255,255,0.94); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 30px 70px -50px rgba(36,30,22,0.5);
  text-align: center; scroll-margin-top: 100px;
}
.hs-result-head { display: flex; align-items: center; justify-content: center; gap: 14px; }
.hs-result-ic {
  width: 46px; height: 46px; border-radius: 12px; flex: none;
  display: grid; place-items: center; background: rgba(20,58,112,0.12); color: var(--icon-ink); font-size: 24px;
}
.hs-result-title {
  margin: 0; outline: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 3vw, 36px); letter-spacing: -0.01em; color: var(--brown);
}
.hs-ask { margin: 30px 0 18px; font-size: clamp(20px, 2vw, 24px); font-weight: 600; color: var(--brown-2); }

.hs-doors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; text-align: left; }
.hs-door {
  display: flex; align-items: center; gap: 16px; min-height: 88px; width: 100%;
  padding: 18px 20px; border-radius: 18px; border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--brown); text-align: left; font: inherit; cursor: pointer; text-decoration: none;
  transition: border-color .14s ease, transform .18s ease, box-shadow .22s ease;
}
.hs-door:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 18px 36px -26px rgba(8,30,62,0.5); }
.hs-door-ic {
  width: 48px; height: 48px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: rgba(20,58,112,0.1); color: var(--icon-ink); font-size: 24px;
}
.hs-door-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 15px; line-height: 1.35; color: var(--brown-3); }
.hs-door-tx b { font-size: 20px; font-weight: 600; color: var(--brown); }
.hs-send { text-align: left; }
.hs-again {
  display: block; margin: 20px auto 0; min-height: 44px; padding: 0 12px;
  border: 0; background: none; cursor: pointer;
  font: 600 16px var(--sans); color: var(--accent);
}

@media (max-width: 560px) {
  .hs-result { padding: 26px 16px 18px; border-radius: 20px; }
  .hs-result-head { flex-direction: column; gap: 10px; }
  .hs-ask { margin: 22px 0 14px; }
  .hs-doors { grid-template-columns: 1fr; gap: 10px; }
  .hs-door { min-height: 72px; padding: 14px 16px; }
}

/* ─── Timeline band (from homecv.html: text left, framed animation right) ── */
#story-motion .sm-split {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
}
#story-motion .sm-copy { max-width: 46ch; }
#story-motion .sm-stage { display: flex; justify-content: center; }
#story-motion .anim-window {
  width: clamp(240px, 34vw, 360px);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 20px;
  background: #faf9f5;
  border: 1px solid rgba(246, 241, 230, 0.16);
  box-shadow: 0 40px 90px -36px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
#story-motion .anim-frame {
  display: block;
  width: 100%;
  /* render taller than the frame so the player bar falls below the clipped edge */
  height: calc(100% + 64px);
  border: 0;
  background: #faf9f5;
  pointer-events: none;
}
@media (max-width: 760px) {
  #story-motion .sm-split { grid-template-columns: 1fr; }
  #story-motion .sm-stage { justify-content: flex-start; }
}

/* Timeline colors on the dark band (from homecv.html) */
#story-motion .timeline { border-top-color: rgba(245,242,231,0.18); }
#story-motion .tl-year { color: var(--accent-ink); }
#story-motion .tl-node p { color: rgba(245,242,231,0.72); }
#story-motion .frame-head h2 { color: #f5f2e7; }

/* ─── Ask the Home assistant cards (from ask-the-home.html, assistant-cards-css) ── */
/* Distinct soft-teal background so this section reads separately from the
   "More than AI over documents" band that follows it */
#assistant { background: linear-gradient(180deg, rgba(20,58,112,0.06), rgba(20,58,112,0.025)); border-top: 1px solid rgba(20,58,112,0.14); border-bottom: 1px solid rgba(20,58,112,0.14); }
/* Stacked rows: each capability card sits beside its animation. Every box
   (card, animation, chat) shares one 16:9 footprint in equal columns so the
   section reads as a tidy, balanced grid. */
#assistant .aa-cards { display: flex; flex-direction: column; gap: 26px; margin-top: 46px; }
#assistant .aa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; align-items: start; }
#assistant .aa-media { min-width: 0; }
/* animation frame: just the central animation, no chrome, fills its 16:9 box */
#assistant .aa-win { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; border: 1px solid rgba(36,30,22,0.10); box-shadow: 0 22px 50px -36px rgba(8,30,62,0.5); background: #E7DCC8; }
#assistant .aa-frame { position: absolute; inset: 0; overflow: hidden; background: #E7DCC8; }
/* iframe is taller than the frame (and centered) so the 16:9 canvas fills it
   exactly while the studio playback bar falls outside the crop */
#assistant .aa-frame iframe { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 100%; height: calc(100% + 84px); border: 0; display: block; }
/* compact chat shares the same 16:9 footprint */
#assistant .aa-media .ah-chat { width: 100%; margin: 0; aspect-ratio: 16 / 9; display: flex; flex-direction: column; }
#assistant .aa-media .ah-chat-body { flex: 1 1 auto; height: auto; min-height: 0; max-height: none; }
#assistant .aa-card { position: relative; display: flex; flex-direction: column; justify-content: center; aspect-ratio: 16 / 9; background: linear-gradient(180deg, var(--surface), var(--bg)); border: 1px solid rgba(36,30,22,0.09); border-radius: 20px; padding: 30px 34px; box-shadow: 0 22px 50px -36px rgba(8,30,62,0.5); overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
#assistant .aa-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--gold)); opacity: .92; }
#assistant .aa-card:hover { transform: translateY(-4px); box-shadow: 0 30px 62px -34px rgba(8,30,62,0.55); border-color: rgba(20,58,112,0.28); }
#assistant .aa-ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(150deg, rgba(20,58,112,0.16), rgba(221,214,202,0.16)); color: var(--icon-ink); font-size: 25px; margin-bottom: 18px; box-shadow: inset 0 0 0 1px rgba(20,58,112,0.12); }
#assistant .aa-tag { font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
#assistant .aa-card h3 { font-family: var(--serif); font-size: 23px; font-weight: 600; color: var(--brown); margin: 0 0 10px; letter-spacing: -0.01em; }
#assistant .aa-card p { font-size: 15px; line-height: 1.62; color: var(--brown-3); margin: 0; text-wrap: pretty; }
/* Modernize the "Data, not opinions" cards to match the assistant cards */
#trust .feat-grid { gap: 22px; }
#trust .feat-card { position: relative; display: flex; flex-direction: column; background: linear-gradient(180deg, var(--surface), var(--bg)); border: 1px solid rgba(36,30,22,0.09); border-radius: 20px; padding: 32px 30px; box-shadow: 0 22px 50px -36px rgba(8,30,62,0.5); overflow: hidden; transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
#trust .feat-card::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--gold)); opacity: .92; }
#trust .feat-card:hover { transform: translateY(-4px); box-shadow: 0 30px 62px -34px rgba(8,30,62,0.55); border-color: rgba(20,58,112,0.28); }
#trust .feat-card .feat-ic { width: 52px; height: 52px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(150deg, rgba(20,58,112,0.16), rgba(221,214,202,0.16)); color: var(--icon-ink); font-size: 25px; margin-bottom: 18px; box-shadow: inset 0 0 0 1px rgba(20,58,112,0.12); }
#trust .feat-card .feat-tag { display: block; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; background: none; border: 0; padding: 0; }
#trust .feat-card h3 { font-family: var(--serif); font-size: 23px; font-weight: 600; color: var(--brown); margin: 0 0 10px; letter-spacing: -0.01em; }
#trust .feat-card p { font-size: 15px; line-height: 1.62; color: var(--brown-3); margin: 0; text-wrap: pretty; }
/* The "Every home is full of data" cards force 4 columns inline, which
   overrides the default .plan collapse and overflows on mobile — restore it */
@media (max-width: 1000px) { #data .plan { grid-template-columns: 1fr 1fr !important; } }
@media (max-width: 560px)  { #data .plan { grid-template-columns: 1fr !important; } }
@media (max-width: 760px) {
  #assistant .aa-row { grid-template-columns: 1fr; }
  #assistant .aa-card { aspect-ratio: auto; }
  /* a 16:9 chat is too short when stacked on phones — give it a usable height */
  #assistant .aa-media .ah-chat { aspect-ratio: auto; }
  #assistant .aa-media .ah-chat-body { height: 220px; flex: none; }
}

/* ─── Search docked in the nav pill (home page, after the hero scrolls away) ─── */
.nav-search { display: none; }
.nav.has-search .nav-search {
  display: block; position: relative; flex: 1 1 auto; min-width: 0;
  max-width: 560px; margin: 0 auto;
}
.nav.has-search .nav-actions { margin-left: 0; }
.nav-search .addr-row { padding: 5px 5px 5px 14px; border-radius: 12px; }
.nav-search .addr-row > i { font-size: 18px; }
.nav-search .addr-input { font-size: 15.5px; height: 36px; }
.nav-search .addr-row .btn { padding: 0 16px; min-height: 36px; font-size: 14.5px; }
.nav-search .hs-status {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; margin: 0;
  padding: 10px 14px; border-radius: 10px; background: var(--bg);
  border: 1px solid var(--line-strong); box-shadow: 0 18px 40px -20px rgba(36,30,22,0.4);
  font-size: 14px;
}

/* Phone: the box takes the middle; "HomeCV" tag, Sign in and the button step aside
   (Sign in stays in the menu; picking an address or the keyboard's search key looks it up). */
@media (max-width: 760px) {
  .nav.has-search .nav-inner { gap: 10px; padding: 0 10px 0 14px; }
  .nav.has-search .brand { gap: 0; }
  .nav.has-search .nav-signin { display: none; }
  /* compact logo: the HomeCV symbol alone, so the search box keeps the room */
  .nav.has-search .brand-lockup { display: none; }
  .nav.has-search .brand-mark { display: block; }
  .nav-search .addr-row { flex-wrap: nowrap; padding: 4px 8px 4px 10px; min-height: 44px; align-items: center; }
  .nav-search .addr-row .btn { display: none; }
  .nav-search .addr-input { font-size: 16px; }
}
