/* ═══════════════════════════════════════════════════════
   IKIGAI · Search Portal styles
   ═══════════════════════════════════════════════════════ */

.search-portal { width: 100%; }
.search-portal__wrap {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 26px;
  background: var(--ik-glass-deep);
  border: 1px solid var(--ik-glass-border);
  border-radius: 64px;
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow:
    0 0 0 1px rgba(110,168,255,0.06),
    0 24px 64px rgba(80,100,200,0.08),
    inset 0 1px 0 rgba(255,255,255,0.85);
  transition: box-shadow 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  animation: type-glow 5s ease-in-out infinite;
}
.search-input.is-focused {
  box-shadow:
    0 0 0 1px rgba(126,246,226,0.45),
    0 32px 96px rgba(110,168,255,0.18),
    inset 0 1px 0 rgba(255,255,255,0.9);
  transform: translateY(-2px);
}

.search-input__orbicon {
  position: relative;
  width: 32px; height: 32px;
  flex: none;
}
.search-orbicon-core {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    #fff 0%, #7EF6E2 50%, #6EA8FF 100%);
  filter: blur(0.2px);
  animation: breathe 2.6s ease-in-out infinite;
  box-shadow: 0 0 16px rgba(126,246,226,0.5);
}
.search-orbicon-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(110,168,255,0.4);
  border-radius: 50%;
  animation: spin-slow 12s linear infinite;
}
.search-orbicon-ring::after {
  content: "";
  position: absolute;
  top: -2px; left: 50%;
  width: 4px; height: 4px;
  background: #6EA8FF;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 8px #6EA8FF;
}

.search-input__field {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: -0.02em;
  color: var(--ik-ink-deep);
  caret-color: var(--ik-cosmic);
}
.search-input__field::placeholder { color: var(--ik-ink-faint); }

.search-input__overlay {
  position: absolute;
  left: 80px;
  right: 200px;
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(18px, 2.2vw, 26px);
  letter-spacing: -0.02em;
  color: var(--ik-ink-mid);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}
.search-placeholder { color: var(--ik-ink-faint); font-style: normal; }
.search-caret {
  display: inline-block;
  width: 2px; height: 1.1em;
  background: var(--ik-cosmic);
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: caret-blink 1s steps(1) infinite;
}

.search-input__status {
  flex: none;
  min-width: 130px;
  text-align: right;
}
.status-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ik-ink-light);
  transition: color 0.4s ease;
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ik-stardust);
  transition: background 0.5s ease, box-shadow 0.5s ease;
}
.status-label--typing .status-dot,
.status-label--erasing .status-dot {
  background: var(--ik-cosmic);
  box-shadow: 0 0 8px rgba(110,168,255,0.6);
}
.status-label--thinking .status-dot {
  background: var(--ik-violet);
  box-shadow: 0 0 12px rgba(155,140,255,0.6);
  animation: breathe 0.8s ease-in-out infinite;
}
.status-label--searching .status-dot {
  background: var(--ik-cosmic);
  animation: breathe 0.5s ease-in-out infinite;
  box-shadow: 0 0 14px var(--ik-cosmic);
}
.status-label--showing .status-dot {
  background: var(--ik-aura);
  box-shadow: 0 0 12px var(--ik-aura);
}

@media (max-width: 720px) {
  .search-input { padding: 18px 18px 18px 20px; gap: 12px; flex-wrap: wrap; }
  .search-input__overlay { left: 64px; right: 16px; }
  .search-input__status { width: 100%; min-width: 0; text-align: left; padding-left: 52px; }
}

/* ── Result zone ───────────────────────────────────── */
.result-zone {
  min-height: 0;
  height: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), height 0.6s ease;
}
.result-zone.is-active {
  opacity: 1;
  transform: translateY(0);
  height: auto;
  min-height: 120px;
}

.client-card {
  display: block;
  position: relative;
  padding: 26px 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255,255,255,0.82));
  border: 1px solid var(--ik-glass-border);
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.16,1,0.3,1), box-shadow 0.5s ease;
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--accent) 14%, transparent),
    0 24px 64px color-mix(in oklab, var(--accent) 12%, transparent);
  animation: fade-up 0.7s cubic-bezier(0.16,1,0.3,1);
}
.client-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--accent) 24%, transparent),
    0 32px 88px color-mix(in oklab, var(--accent) 22%, transparent);
}
.client-card__halo {
  position: absolute;
  top: -50%; right: -20%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, color-mix(in oklab, var(--accent) 18%, transparent), transparent 70%);
  pointer-events: none;
  filter: blur(20px);
}
.client-card__row {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 20px;
  align-items: center;
}
.client-card__glyph {
  position: relative;
  width: 64px; height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgba(255,255,255,0.95),
    color-mix(in oklab, var(--accent) 55%, white) 60%,
    color-mix(in oklab, var(--accent) 80%, transparent));
  display: grid;
  place-items: center;
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: 26px;
  color: var(--ik-ink-deep);
  letter-spacing: -0.02em;
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,0.6),
    0 6px 20px color-mix(in oklab, var(--accent) 25%, transparent);
}
.client-card__glyph span { transform: translateY(1px); }
.client-card__glyph-ring {
  position: absolute;
  inset: -4px;
  border: 1px solid color-mix(in oklab, var(--accent) 32%, transparent);
  border-radius: 50%;
  animation: spin-slow 18s linear infinite;
}
.client-card__glyph-ring::after {
  content: "";
  position: absolute;
  top: -2px; left: 50%;
  width: 3px; height: 3px;
  background: var(--accent);
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 6px var(--accent);
}
.client-card__cat {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--ik-ink-light);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.client-card__name {
  font-family: var(--ff-display);
  font-weight: 300;
  font-size: clamp(20px, 2.4vw, 28px);
  letter-spacing: -0.025em;
  color: var(--ik-ink-deep);
  line-height: 1.1;
}
.client-card__tag {
  margin-top: 4px;
  font-size: 14px;
  color: var(--ik-ink-soft);
}
.client-card__url {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ik-ink-mid);
  border: 1px solid var(--ik-glass-border);
  border-radius: 100px;
  background: rgba(255,255,255,0.6);
  transition: background 0.3s ease, transform 0.3s ease;
}
.client-card:hover .client-card__url {
  background: rgba(255,255,255,0.9);
  transform: translateX(2px);
}

.search-portal__sub {
  text-align: center;
  font-size: 14px;
  color: var(--ik-ink-light);
  line-height: 1.7;
  margin-top: 12px;
}

@media (max-width: 640px) {
  .client-card__row {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
  }
  .client-card__url {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .client-card__glyph { width: 56px; height: 56px; font-size: 22px; }
}
