/* ==========================================================================
   Lunock site styles (home + legal pages). Shared layout,
   recolored to the Lunock night palette.
   ========================================================================== */

/* ============================== TOKENS ============================== */
:root {
  --accent: #A4AEF7;
  --accent-deep: #8C97EC;
  --on-accent: #14121F;
  --link: #A4AEF7;
  --link-hover: #C4CBFA;

  --page: #12111A;
  --surface: #1E1C27;
  --border: #33303F;
  --text: #EEE7DA;
  --text-2: #9C96A8;
  --text-3: #8A8597;

  --maxw: 1080px;
  --shadow: 0 12px 34px rgba(0, 0, 0, .45);

  --font-head: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
  background: var(--page);
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--surface);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-weight: 700;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 14px;
}

.grad {
  color: var(--accent);
}

/* ============================== BUTTONS / BADGE ============================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .95rem;
  padding: .6rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  border: 0;
  white-space: nowrap;
  transition: background-color .18s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-deep);
}

.appstore-badge {
  display: inline-block;
  border-radius: 11px;
  line-height: 0;
  transition: opacity .18s ease;
}

.appstore-badge img {
  height: 54px;
  width: auto;
}

.appstore-badge:hover {
  opacity: .82;
}

/* ============================== LOGO ============================== */
.logo {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}

.logo__mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--surface);
}

.logo__mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo__text {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -.02em;
  color: var(--text);
}

.logo__text .lk {
  color: var(--accent);
}

/* ============================== HEADER (floating glass bar) ============================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-top: 14px;
}

.header__inner {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px 0 16px;
  background: rgba(30, 28, 39, .72);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(238, 231, 218, .08);
  border-radius: 999px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .30);
  transition: box-shadow .3s ease, background .3s ease;
}

.site-header.scrolled .header__inner {
  background: rgba(30, 28, 39, .88);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.header__inner .logo__mark {
  width: 34px;
  height: 34px;
}

.header__inner .logo__text {
  font-size: 1.2rem;
}

.header__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__inner .btn--primary {
  font-size: .9rem;
  padding: .55rem 1.05rem;
}

/* ============================== HERO ============================== */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--page);
  padding: 124px 0 84px;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.04fr .96fr;
  gap: 52px;
  align-items: center;
}

.hero__title {
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  line-height: 1.05;
  white-space: nowrap;
}

.hero__sub {
  margin-top: 20px;
  max-width: 480px;
  font-size: clamp(1.04rem, 1.4vw, 1.18rem);
  color: var(--text-2);
  text-wrap: pretty;
}

.hero__cta {
  margin-top: 32px;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

/* ============================== iPHONE MOCKUP ============================== */
.phone {
  position: relative;
  width: clamp(250px, 74vw, 288px);
  background: #2A2833;
  border-radius: 48px;
  padding: 11px;
  box-shadow: 0 40px 80px -28px rgba(0, 0, 0, .7), 0 0 90px -20px rgba(164, 174, 247, .22),
    inset 0 0 0 2px rgba(255, 255, 255, .06);
}

.phone__screen {
  position: relative;
  width: 100%;
  aspect-ratio: 402 / 874;
  border-radius: 38px;
  overflow: hidden;
  background: #000;
}

.phone__island {
  position: absolute;
  top: 2.6%;
  left: 50%;
  transform: translateX(-50%);
  width: 30%;
  height: 3.6%;
  background: #000;
  border-radius: 999px;
  z-index: 6;
}

.phone__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* ============================== LEGAL PAGES ============================== */
.legal {
  padding: 140px 0 100px;
  background: var(--page);
}

.legal-inner {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-2);
}

.legal-inner h1 {
  color: var(--text);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
  letter-spacing: -.03em;
}

.legal-inner h2 {
  color: var(--text);
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-inner p {
  margin-bottom: 1.2rem;
}

.legal-inner ul {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.legal-inner li {
  margin-bottom: .5rem;
}

.legal-inner strong {
  color: var(--text);
  font-weight: 700;
}

.legal-inner a {
  color: var(--link);
  text-decoration: underline;
}

.legal-inner a:hover {
  color: var(--link-hover);
}

/* ============================== FOOTER ============================== */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 40px 0 30px;
}

.footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 28px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
}

.footer__links a {
  color: var(--text-2);
  font-weight: 600;
  font-size: .93rem;
  transition: color .15s ease;
}

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

.footer__bar {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 20px;
  color: var(--text-3);
  font-size: .85rem;
}

.footer__bar a {
  color: var(--text-3);
  transition: color .15s ease;
}

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

/* ============================== MOTION ============================== */
.intro {
  animation: intro-up .6s ease both;
  animation-delay: var(--delay, 0s);
}

@keyframes intro-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}

/* ============================== RESPONSIVE ============================== */
@media (max-width:880px) {
  .hero {
    padding: 110px 0 72px;
  }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 44px;
    text-align: center;
  }

  .hero__sub {
    margin-inline: auto;
  }
}

@media (max-width:560px) {
  .container {
    padding-inline: 20px;
  }

  .legal {
    padding: 120px 0 72px;
  }

  .appstore-badge img {
    height: 52px;
  }

  .footer__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }

  .footer__bar {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width:359px) {
  .header__inner .logo__text {
    display: none;
  }
}

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

  * {
    transition-duration: .001ms !important;
  }

  .intro {
    animation: none;
  }
}
