/* Better Life Labs — mockup-aligned studio styles */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap");

:root {
  --bg: #eef2ef;
  --ink: #1a534c;
  --ink-soft: #2a5f57;
  --muted: #4d6b66;
  --accent: #1a534c;
  --accent-hover: #134039;
  --surface: #ffffff;
  --line: rgba(26, 83, 76, 0.12);
  --radius: 999px;
  --radius-soft: 16px;
  --font: "Outfit", "Segoe UI", sans-serif;
  --max: 72rem;
  --header-h: 4.25rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--accent-hover);
}

/* —— Page shell —— */
.page-bg {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Full-bleed hero atmosphere (home) */
.page-bg--home {
  background: #dfe8e4;
}

.page-bg--home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(
      95deg,
      rgba(236, 240, 238, 0.55) 0%,
      rgba(236, 240, 238, 0.28) 32%,
      rgba(236, 240, 238, 0.08) 55%,
      transparent 78%
    ),
    url("/assets/hero-landscape.png") right center / cover no-repeat;
}

.page-bg--home::after {
  content: "";
  position: fixed;
  top: -18%;
  right: -18%;
  width: min(68vw, 52rem);
  height: 130%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 65% 50% at 55% 38%,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.55) 38%,
    transparent 68%
  );
  animation: drift 18s ease-in-out infinite alternate;
}

.page-bg--plain {
  background:
    radial-gradient(ellipse 70% 50% at 10% 0%, #e4ece8, transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 100%, #d8e4df, transparent 50%),
    var(--bg);
}

@keyframes drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(-2%, 2%) scale(1.04);
  }
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.25s ease, backdrop-filter 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(238, 242, 239, 0.82);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  width: 1.65rem;
  height: 1.65rem;
  flex-shrink: 0;
}

.brand__name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--accent);
}

/* —— Layout —— */
.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
}

main {
  flex: 1;
}

/* —— Hero —— */
.hero {
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(3rem, 8vw, 6rem);
}

.hero--viewport {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 0;
  padding-bottom: clamp(4rem, 10vw, 7rem);
}

.hero__copy {
  max-width: 34rem;
}

.hero--product .hero__copy {
  max-width: 38rem;
}

.hero__eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.5rem, 6.5vw, 4.15rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  color: var(--ink);
}

.hero__lead {
  margin: 0 0 0.65rem;
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.hero__sub {
  margin: 0 0 1.5rem;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.02rem;
  font-weight: 400;
  line-height: 1.5;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.85rem 1.55rem;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 28px rgba(26, 83, 76, 0.18);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: 0 12px 32px rgba(26, 83, 76, 0.24);
}

.btn__arrow {
  font-size: 1.1em;
  line-height: 1;
  transition: transform 0.2s ease;
}

.btn--primary:hover .btn__arrow {
  transform: translateX(3px);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.55);
  color: var(--accent);
  border-color: rgba(26, 83, 76, 0.22);
}

.btn--ghost:hover {
  background: #fff;
  color: var(--accent-hover);
}

.btn--soon {
  background: rgba(26, 83, 76, 0.08);
  color: var(--muted);
  border-color: transparent;
  cursor: default;
  pointer-events: none;
  box-shadow: none;
}

.btn--soon .btn__badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(26, 83, 76, 0.1);
}

/* —— Sections —— */
.section {
  padding: clamp(2.5rem, 6vw, 4.5rem) 0;
}

.section--surface {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.65);
}

.section__title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.55rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.section__sub {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 30rem;
}

/* —— App strip —— */
.app-row {
  display: grid;
  gap: 1rem;
  max-width: 36rem;
}

.app-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.app-link:hover {
  color: inherit;
  opacity: 0.85;
}

.app-link__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: var(--accent);
  display: grid;
  place-items: center;
}

.app-link__icon--terminal {
  background: #161b22;
}

.app-link__icon svg {
  width: 1.35rem;
  height: 1.35rem;
}

.app-link__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-link__tag {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.app-link__arrow {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 600;
}

/* —— Features —— */
.features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.35rem;
  max-width: 34rem;
}

.features__label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.15rem;
  color: var(--accent);
  font-size: 0.95rem;
}

.features__text {
  margin: 0;
  color: var(--ink-soft);
}

/* —— Legal —— */
body.legal {
  background: var(--bg);
}

.legal main {
  width: min(100% - 2.5rem, 40rem);
  margin: 0 auto;
  padding: 2rem 0 3.5rem;
}

.legal h1 {
  font-size: 1.75rem;
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
  font-weight: 700;
}

.legal h2 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
  color: var(--accent);
}

.legal .muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.legal .ja {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.legal-nav {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.legal-nav a {
  color: var(--muted);
  text-decoration: none;
}

.legal-nav a:hover {
  color: var(--accent);
}

/* —— Footer —— */
.site-footer {
  margin-top: auto;
  padding: 2.25rem 0 1.75rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.4);
}

.site-footer__inner {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: flex-start;
}

.site-footer__brand {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.site-footer__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 22rem;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}

.site-footer__links a:hover {
  color: var(--accent);
}

.site-footer__credit {
  width: 100%;
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

/* —— Motion —— */
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim-rise {
  animation: rise-in 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.anim-rise-delay-1 {
  animation-delay: 0.12s;
}

.anim-rise-delay-2 {
  animation-delay: 0.22s;
}

.anim-rise-delay-3 {
  animation-delay: 0.34s;
}

@media (prefers-reduced-motion: reduce) {
  .anim-rise,
  .anim-rise-delay-1,
  .anim-rise-delay-2,
  .anim-rise-delay-3,
  .page-bg--home::after {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 720px) {
  .page-bg--home::before {
    background:
      linear-gradient(
        180deg,
        rgba(238, 242, 239, 0.94) 0%,
        rgba(238, 242, 239, 0.78) 55%,
        rgba(238, 242, 239, 0.55) 100%
      ),
      url("/assets/hero-landscape.png") center / cover no-repeat;
  }

  .page-bg--home::after {
    width: 80vw;
    opacity: 0.7;
  }

  .nav {
    gap: 1rem;
  }
}

@media (max-width: 520px) {
  .brand__name {
    font-size: 0.92rem;
  }

  .app-link {
    grid-template-columns: auto 1fr;
  }

  .app-link__arrow {
    display: none;
  }
}
