/* Household Hub — portfolio-style marketing & legal */

:root {
  --hh-bg: #000000;
  --hh-surface: #141416;
  --hh-surface-raised: #212225;
  --hh-surface-hover: #2a2d31;
  --hh-border: rgba(255, 255, 255, 0.08);
  --hh-border-strong: rgba(255, 255, 255, 0.14);
  --hh-text: #f4f4f5;
  --hh-text-secondary: #a1a1aa;
  --hh-text-faint: #71717a;
  --hh-accent: #208aef;
  --hh-accent-soft: rgba(32, 138, 239, 0.14);
  --hh-accent-glow: rgba(32, 138, 239, 0.35);
  --hh-success: #34d399;
  --hh-max: 1080px;
  --hh-radius: 20px;
  --hh-radius-sm: 12px;
  --hh-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --hh-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: var(--hh-font);
  background: var(--hh-bg);
  color: var(--hh-text);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

a {
  color: var(--hh-accent);
  text-decoration: none;
  transition: color 0.2s var(--hh-ease);
}

a:hover {
  color: #5eb0ff;
}

.hh-ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.hh-ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: hh-drift 18s var(--hh-ease) infinite alternate;
}

.hh-ambient-orb--a {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: var(--hh-accent-glow);
}

.hh-ambient-orb--b {
  width: 280px;
  height: 280px;
  bottom: 10%;
  left: -60px;
  background: rgba(32, 138, 239, 0.12);
  animation-delay: -6s;
}

@keyframes hh-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-24px, 32px) scale(1.08); }
}

.hh-wrap {
  width: min(100% - 2.5rem, var(--hh-max));
  margin-inline: auto;
}

/* --- Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--hh-ease),
    transform 0.7s var(--hh-ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }

/* --- Header --- */
.hh-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition:
    background 0.3s var(--hh-ease),
    border-color 0.3s var(--hh-ease),
    backdrop-filter 0.3s var(--hh-ease);
}

.hh-header--scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--hh-border);
}

.hh-header .hh-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.hh-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--hh-text);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.hh-brand:hover {
  color: var(--hh-text);
}

.hh-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, #3d9ef7 0%, var(--hh-accent) 55%, #1568c4 100%);
  display: grid;
  place-items: center;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #fff;
  box-shadow: 0 8px 24px var(--hh-accent-soft);
}

.hh-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.hh-nav a {
  position: relative;
  color: var(--hh-text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  padding-bottom: 2px;
}

.hh-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: var(--hh-accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--hh-ease);
}

.hh-nav a:hover {
  color: var(--hh-text);
}

.hh-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* --- Hero --- */
.hh-hero {
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4rem);
}

.hh-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 900px) {
  .hh-hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 2.5rem;
  }
}

.hh-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.35rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--hh-border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--hh-text-secondary);
  margin-bottom: 1.25rem;
}

.hh-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hh-success);
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.6);
  animation: hh-pulse 2.4s ease-in-out infinite;
}

@keyframes hh-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.88); }
}

.hh-hero h1 {
  font-size: clamp(2.35rem, 6vw, 3.65rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
}

.hh-hero h1 span {
  display: block;
  background: linear-gradient(120deg, #fff 0%, #b8d9ff 45%, var(--hh-accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hh-hero-lead {
  max-width: 34rem;
  margin: 0 0 1.75rem;
  color: var(--hh-text-secondary);
  font-size: clamp(1rem, 2.2vw, 1.125rem);
  line-height: 1.65;
}

.hh-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.72rem 1.2rem;
  border-radius: var(--hh-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.25s var(--hh-ease),
    background 0.25s var(--hh-ease),
    border-color 0.25s var(--hh-ease),
    box-shadow 0.25s var(--hh-ease);
}

.hh-btn--primary {
  background: var(--hh-accent);
  color: #fff;
  box-shadow: 0 12px 32px var(--hh-accent-soft);
}

.hh-btn--primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(32, 138, 239, 0.28);
}

.hh-btn--ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--hh-text);
  border: 1px solid var(--hh-border-strong);
}

.hh-btn--ghost:hover {
  color: var(--hh-text);
  background: rgba(255, 255, 255, 0.07);
  transform: translateY(-2px);
}

.hh-btn--disabled {
  opacity: 0.5;
  pointer-events: none;
  box-shadow: none;
}

/* --- Device mockup --- */
.hh-device-wrap {
  display: flex;
  justify-content: center;
  perspective: 1200px;
}

.hh-device {
  width: min(100%, 300px);
  padding: 10px;
  border-radius: 36px;
  background: linear-gradient(160deg, #2a2d31 0%, #141416 100%);
  border: 1px solid var(--hh-border-strong);
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: hh-float 5s ease-in-out infinite;
  transform: rotateY(-8deg) rotateX(4deg);
}

@keyframes hh-float {
  0%, 100% { transform: rotateY(-8deg) rotateX(4deg) translateY(0); }
  50% { transform: rotateY(-6deg) rotateX(2deg) translateY(-10px); }
}

.hh-device-notch {
  width: 88px;
  height: 22px;
  margin: 0 auto 8px;
  border-radius: 0 0 14px 14px;
  background: #000;
}

.hh-device-screen {
  border-radius: 28px;
  overflow: hidden;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.hh-device-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 1rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--hh-text-secondary);
}

.hh-device-list {
  padding: 0 0.85rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.hh-device-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: var(--hh-surface-raised);
  font-size: 0.72rem;
  color: var(--hh-text-secondary);
  animation: hh-row-in 0.6s var(--hh-ease) both;
}

.hh-device-row:nth-child(1) { animation-delay: 0.2s; }
.hh-device-row:nth-child(2) { animation-delay: 0.35s; }
.hh-device-row:nth-child(3) { animation-delay: 0.5s; }
.hh-device-row:nth-child(4) { animation-delay: 0.65s; }

@keyframes hh-row-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

.hh-device-check {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid var(--hh-border-strong);
  flex-shrink: 0;
}

.hh-device-check--on {
  background: var(--hh-accent);
  border-color: var(--hh-accent);
}

.hh-device-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 0.5rem 0.65rem 0.75rem;
  border-top: 1px solid var(--hh-border);
  background: rgba(0, 0, 0, 0.5);
}

.hh-device-tab {
  text-align: center;
  font-size: 0.55rem;
  color: var(--hh-text-faint);
  padding-top: 0.35rem;
}

.hh-device-tab--active {
  color: var(--hh-accent);
  font-weight: 600;
}

.hh-device-tab-icon {
  display: block;
  width: 18px;
  height: 3px;
  margin: 0 auto 0.3rem;
  border-radius: 2px;
  background: var(--hh-text-faint);
}

.hh-device-tab--active .hh-device-tab-icon {
  background: var(--hh-accent);
}

/* --- Sections --- */
.hh-section {
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}

.hh-section-head {
  margin-bottom: 2rem;
}

.hh-section-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--hh-accent);
  margin-bottom: 0.5rem;
}

.hh-section-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.hh-section-sub {
  margin: 0;
  color: var(--hh-text-secondary);
  max-width: 32rem;
  font-size: 1rem;
}

/* --- Bento --- */
.hh-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 700px) {
  .hh-bento {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
  }

  .hh-bento-card--wide {
    grid-column: span 2;
  }
}

.hh-bento-card {
  position: relative;
  padding: 1.35rem 1.4rem;
  border-radius: var(--hh-radius);
  background: var(--hh-surface);
  border: 1px solid var(--hh-border);
  overflow: hidden;
  transition:
    border-color 0.3s var(--hh-ease),
    transform 0.3s var(--hh-ease),
    background 0.3s var(--hh-ease);
}

.hh-bento-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 0%), var(--hh-accent-soft), transparent 40%);
  opacity: 0;
  transition: opacity 0.35s var(--hh-ease);
  pointer-events: none;
}

.hh-bento-card:hover {
  border-color: var(--hh-border-strong);
  transform: translateY(-3px);
  background: var(--hh-surface-raised);
}

.hh-bento-card:hover::before {
  opacity: 1;
}

.hh-bento-icon {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  background: var(--hh-accent-soft);
  color: var(--hh-accent);
}

.hh-bento-icon svg {
  width: 20px;
  height: 20px;
}

.hh-bento-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.hh-bento-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--hh-text-secondary);
  line-height: 1.55;
  max-width: 28rem;
}

/* --- Plans --- */
.hh-plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 640px) {
  .hh-plans {
    grid-template-columns: 1fr 1fr;
  }
}

.hh-plan {
  padding: 1.5rem;
  border-radius: var(--hh-radius);
  border: 1px solid var(--hh-border);
  background: var(--hh-surface);
}

.hh-plan--pro {
  border-color: rgba(32, 138, 239, 0.35);
  background: linear-gradient(165deg, rgba(32, 138, 239, 0.08) 0%, var(--hh-surface) 55%);
}

.hh-plan-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hh-text-faint);
  margin-bottom: 0.35rem;
}

.hh-plan--pro .hh-plan-badge {
  color: var(--hh-accent);
}

.hh-plan h3 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.hh-plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hh-plan li {
  font-size: 0.88rem;
  color: var(--hh-text-secondary);
  padding-left: 1.1rem;
  position: relative;
}

.hh-plan li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hh-text-faint);
}

.hh-plan--pro li::before {
  background: var(--hh-accent);
}

.hh-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.hh-tag {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--hh-border);
  color: var(--hh-text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

/* --- Footer --- */
.hh-footer {
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--hh-border);
}

.hh-footer .hh-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.hh-footer-copy {
  margin: 0;
  font-size: 0.85rem;
  color: var(--hh-text-faint);
}

.hh-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.hh-footer-nav a {
  font-size: 0.85rem;
  color: var(--hh-text-secondary);
}

/* --- Legal --- */
.hh-page-hero {
  padding: 2.5rem 0 1rem;
  border-bottom: 1px solid var(--hh-border);
  margin-bottom: 0.5rem;
}

.hh-page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
}

.hh-prose {
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.hh-prose-meta {
  color: var(--hh-text-secondary);
  font-size: 0.92rem;
  line-height: 1.65;
}

.hh-prose h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 2.25rem 0 0.65rem;
  color: var(--hh-text);
  letter-spacing: -0.02em;
}

.hh-prose p,
.hh-prose li {
  color: var(--hh-text-secondary);
  font-size: 0.95rem;
}

.hh-prose ul {
  padding-left: 1.15rem;
}

.hh-prose-card {
  background: var(--hh-surface);
  border: 1px solid var(--hh-border);
  border-radius: var(--hh-radius-sm);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
}

.hh-prose-card p:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .hh-nav {
    gap: 1rem;
  }

  .hh-nav a {
    font-size: 0.8rem;
  }

  .hh-device {
    transform: none;
    animation: hh-float-mobile 5s ease-in-out infinite;
  }

  @keyframes hh-float-mobile {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hh-ambient-orb,
  .hh-device,
  .hh-device-row,
  .hh-eyebrow-dot {
    animation: none !important;
  }

  .hh-device {
    transform: none;
  }
}
