/* PickHue landing page */

:root {
  --page-bg: #0c0c0c;
  --page-surface: #141414;
  --page-text: #ffffff;
  --page-text-muted: rgba(255, 255, 255, 0.42);
  --fineprint-muted: rgba(255, 255, 255, 0.42);
  --page-accent: #e7fe96;
  --page-accent-text: #141414;
  --page-btn-secondary-bg: #ffffff;
  --page-btn-secondary-text: #141414;
  --preview-bg: #0c0c0c;
  --preview-border: rgba(255, 255, 255, 0.1);
  --footer-muted: rgba(255, 255, 255, 0.28);
  --footer-name: rgba(255, 255, 255, 0.8);
  --footer-name-hover: rgba(255, 255, 255, 0.92);
  --logo-stroke: rgba(255, 255, 255, 0.2);
  --logo-stroke-hover: rgba(255, 255, 255, 0.4);
  --stroke-ease: 0.32s ease;
  --page-inset: 30px;
  --logo-size: 44px;
  --logo-content-gap: 48px;
  --content-bias: 28px;
  --hero-btn-gap: 26px;
  --preview-height: min(360px, max(260px, calc(100svh - 31rem)));
  --chrome-top: 100px;
  --chrome-bottom: calc(var(--page-inset) + 0.875rem + var(--content-bias));
}

html[data-page-theme="light"] {
  --page-bg: #f6f6f6;
  --page-surface: #ffffff;
  --page-text: #141414;
  --page-text-muted: rgba(20, 20, 20, 0.42);
  --fineprint-muted: rgba(20, 20, 20, 0.6);
  --page-accent: #b8e635;
  --page-accent-text: #141414;
  --page-btn-secondary-bg: #141414;
  --page-btn-secondary-text: #ffffff;
  --preview-bg: #ffffff;
  --preview-border: rgba(20, 20, 20, 0.1);
  --footer-muted: rgba(20, 20, 20, 0.32);
  --footer-name: rgba(20, 20, 20, 0.72);
  --footer-name-hover: rgba(20, 20, 20, 0.88);
  --logo-stroke: rgba(20, 20, 20, 0.2);
  --logo-stroke-hover: rgba(20, 20, 20, 0.4);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

@media (min-width: 481px) {
  html,
  body {
    height: 100%;
    overflow: hidden;
  }
}

body {
  margin: 0;
  min-height: 100dvh;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--page-text);
  font-family: "Geist", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

a {
  color: inherit;
}

.page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 0 clamp(16px, 4vw, 24px);
}

@media (min-width: 481px) {
  .page {
    height: 100svh;
    max-height: 100svh;
    min-height: 0;
    overflow: hidden;
  }
}

.page__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 640px;
  padding-top: var(--chrome-top);
  padding-bottom: var(--chrome-bottom);
  min-height: 0;
}

@media (min-width: 481px) {
  .page__body {
    overflow: hidden;
  }
}

/* ----- Hero ----- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 560px;
}

.hero__logo {
  position: absolute;
  top: var(--page-inset);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: var(--logo-size);
  height: var(--logo-size);
  border-radius: 13px;
  background: var(--page-surface);
  border: 1.5px solid var(--logo-stroke);
  color: #ffffff;
  display: grid;
  place-items: center;
  transition:
    background-color 0.3s ease,
    border-color var(--stroke-ease),
    color 0.3s ease;
}

html[data-page-theme="light"] .hero__logo {
  color: #141414;
}

.hero__logo:hover {
  border-color: var(--logo-stroke-hover);
}

.hero__logo-mark {
  width: 14px;
  height: 21px;
  display: block;
}

.hero__logo-mark path {
  fill: currentColor;
}

.hero__title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5.6vw, 2.75rem);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.hero__title-line {
  display: block;
}

.hero__subtitle {
  margin: 0 0 18px;
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero__fineprint {
  margin: 0 0 var(--hero-btn-gap);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.4;
  color: var(--fineprint-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: var(--hero-btn-gap);
}

/* ----- CTA buttons ----- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn__icon {
  flex-shrink: 0;
  display: block;
  width: 16px;
  height: 16px;
}

.btn__label--wave {
  display: inline-block;
  text-align: left;
}

.btn__label--wave .btn__wave-letter {
  display: inline-block;
  animation: btn-text-breathing-wave 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  will-change: transform;
}

@keyframes btn-text-breathing-wave {
  0% {
    transform: scale(1);
  }

  12% {
    transform: scale(1.13);
  }

  24% {
    transform: scale(1);
  }

  100% {
    transform: scale(1);
  }
}

.btn--primary {
  color: var(--page-accent-text);
  background: var(--page-accent);
  border: 1.5px solid transparent;
  box-shadow: none;
  transition:
    border-color 0.28s ease,
    box-shadow 0.28s ease,
    background-color 0.28s ease;
}

@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover {
    border-color: rgba(231, 254, 150, 0.55);
    box-shadow:
      0 0 0 1px rgba(231, 254, 150, 0.35),
      0 0 0 3px rgba(231, 254, 150, 0.12),
      0 0 28px rgba(231, 254, 150, 0.16);
  }

  html[data-page-theme="light"] .btn--primary:hover {
    border-color: rgba(184, 230, 53, 0.65);
    box-shadow:
      0 0 0 1px rgba(184, 230, 53, 0.4),
      0 0 0 3px rgba(184, 230, 53, 0.14),
      0 0 24px rgba(184, 230, 53, 0.2);
  }
}

.btn--secondary {
  background: var(--page-btn-secondary-bg);
  color: var(--page-btn-secondary-text);
  border: none;
}

/* ----- Extension preview frame (Prod-style crop + inset) ----- */

.preview {
  width: 100%;
  max-width: 420px;
}

.preview__card {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: var(--preview-height);
  border-radius: 16px;
  border: none;
  outline: 1.5px solid var(--preview-border);
  outline-offset: -1.5px;
  background: var(--preview-bg);
  overflow: hidden;
  padding: 40px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  cursor: default;
  transition:
    padding-top 0.2s ease-in-out,
    outline-color 0.3s ease,
    background-color 0.3s ease;
}

.panel-demo {
  flex-shrink: 0;
  width: 100%;
  max-width: 320px;
  display: flex;
  justify-content: center;
}

@media (hover: hover) and (pointer: fine) {
  .preview__card:hover {
    padding-top: 32px;
  }
}

/* ----- Footer ----- */

.footer {
  position: absolute;
  bottom: var(--page-inset);
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0 clamp(16px, 4vw, 24px);
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.4;
  text-align: center;
  pointer-events: none;
}

.footer a {
  pointer-events: auto;
}

.footer__lead {
  color: var(--fineprint-muted);
}

.footer__name {
  color: var(--footer-name);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

.footer__name:hover {
  color: var(--footer-name-hover);
}

/* ----- Responsive ----- */

@media (max-width: 480px) {
  html,
  body {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .page {
    height: auto;
    min-height: 100svh;
    max-height: none;
    overflow: visible;
  }

  .page__body {
    flex: none;
    justify-content: flex-start;
    overflow: visible;
    padding-top: var(--chrome-top);
    padding-bottom: 0;
  }

  :root {
    --page-inset: 20px;
    --logo-size: 40px;
    --hero-btn-gap: 22px;
    --preview-height: 360px;
    --chrome-top: 100px;
    --content-bias: 0px;
    --chrome-bottom: 0px;
  }

  .hero__logo-mark {
    width: 13px;
    height: 19px;
  }

  .hero__actions {
    flex-direction: column;
    width: min(100%, 320px);
  }

  .btn {
    width: 100%;
  }

  .footer {
    position: relative;
    bottom: auto;
    margin-top: 40px;
    padding-top: 8px;
    padding-bottom: calc(var(--page-inset) + 8px);
  }
}

/* Short desktop/tablet viewports — keep one screen, tighten from the bottom */
@media (max-height: 760px) and (min-width: 481px) {
  :root {
    --logo-content-gap: 36px;
    --content-bias: 20px;
    --hero-btn-gap: 22px;
    --preview-height: min(360px, max(240px, calc(100svh - 30rem)));
  }

  .page__body {
    justify-content: flex-start;
  }
}

@media (max-height: 640px) {
  .hero__title {
    font-size: clamp(1.75rem, 5vw, 2.125rem);
  }

  .hero__subtitle {
    font-size: clamp(1.125rem, 3vw, 1.375rem);
    margin-bottom: 16px;
  }

  .hero__fineprint {
    margin-bottom: var(--hero-btn-gap);
  }

  .hero__actions {
    margin-bottom: var(--hero-btn-gap);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__logo,
  body,
  .preview__card,
  .btn--primary {
    transition: none;
  }

  .btn__label--wave .btn__wave-letter {
    animation: none;
  }

  .preview__card:hover {
    padding-top: 40px;
  }

  .btn--primary:hover {
    box-shadow: none;
    border-color: transparent;
  }
}
