/*
 * SAYLURE public landing — saylure.com
 *
 * Self-contained: system fonts, local assets, no CDN, no tracker, no framework.
 * Colours come from the app's own dark theme (packages/design-tokens), and the
 * starfield behind the page is the app's real wallpaper asset, so the site and
 * the product look like the same thing.
 *
 * The one hard layout rule: a real app capture is never squeezed to make a row
 * fit. `--screen-w` is set per breakpoint and every phone image is exactly that
 * wide; when a row can no longer hold three of them, the row wraps.
 */

:root {
  --ink: #03050a;
  --ink-soft: #0b0d13;
  --surface: #11131a;
  --fg: #f7f7fa;
  --fg-muted: #a2a2ab;
  --accent: #ff2f73;
  --accent-soft: #ff5f8e;
  --violet: #b13cff;
  --line: rgba(255, 255, 255, 0.09);
  --maxw: 1240px;
  --pad: 24px;
  --radius: 22px;

  /* Width of a real app capture. Overridden per section and per breakpoint. */
  --screen-w: 320px;

  /* Room for the rotated frames so a decorative tilt can never push the page
     into a horizontal scroll on a narrow desktop. */
  --tilt-gutter: 26px;

  /* A card's own chrome around the capture: horizontal padding plus borders. */
  --card-frame: 54px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background-color: var(--ink);
  color: var(--fg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* The app's own wallpaper, dimmed, plus two soft glows. Decorative only. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-color: var(--ink);
  background-image:
    radial-gradient(60% 45% at 78% 8%, rgba(177, 60, 255, 0.24), transparent 70%),
    radial-gradient(55% 40% at 12% 32%, rgba(255, 47, 115, 0.16), transparent 70%),
    radial-gradient(70% 50% at 50% 100%, rgba(102, 33, 160, 0.2), transparent 70%),
    url("brand/backdrop.webp");
  background-size: auto, auto, auto, 1536px auto;
  background-position: center, center, center, top center;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat;
  opacity: 0.55;
}

a {
  color: var(--accent-soft);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

img {
  max-width: 100%;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 20;
  background: var(--accent);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* ---------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(3, 5, 10, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  display: block;
}

.site-nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 15px;
}

.site-nav a {
  color: var(--fg-muted);
  padding: 6px 0;
}

.site-nav a:hover {
  color: var(--fg);
}

.lang {
  display: flex;
  gap: 4px;
  align-items: center;
  font-size: 13px;
}

.lang a {
  color: var(--fg-muted);
  padding: 6px 7px;
  border-radius: 8px;
}

.lang a[aria-current="page"] {
  color: var(--fg);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 600;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  border: 0;
  box-shadow: 0 8px 30px rgba(255, 47, 115, 0.3);
}

.cta:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.cta-header {
  padding: 9px 18px;
  font-size: 15px;
}

.menu-button {
  display: none;
  margin-left: auto;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--fg);
  font: inherit;
  cursor: pointer;
}

.menu-button svg {
  width: 20px;
  height: 20px;
}

.menu-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px var(--pad) 22px;
}

.menu-panel.open {
  display: block;
}

.menu-panel nav {
  display: flex;
  flex-direction: column;
}

.menu-panel nav a {
  color: var(--fg);
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.menu-panel .cta {
  margin-top: 18px;
  width: 100%;
}

/* ------------------------------------------------------------------ hero -- */

section {
  padding: 84px 0;
}

.hero {
  padding: 64px 0 96px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) auto;
  gap: 40px;
  align-items: center;
}

h1 {
  font-size: clamp(38px, 3.6vw, 50px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 700;
}

h1 .glow {
  display: block;
  color: var(--accent);
  text-shadow: 0 0 34px rgba(255, 47, 115, 0.45);
}

.hero-sub {
  color: var(--fg-muted);
  font-size: clamp(17px, 1.4vw, 20px);
  max-width: 34ch;
  margin: 0 0 32px;
}

.hero-phones {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  position: relative;
  padding: 24px var(--tilt-gutter);
}

.hero-phones .phone:first-child {
  transform: rotate(2.5deg);
  margin-right: -50px;
  z-index: 1;
}

.hero-phones .phone:last-child {
  transform: rotate(-2.5deg);
  margin-top: 46px;
}

/* The thin connector between the two hero phones. Purely decorative. */
.connector {
  position: absolute;
  left: 50%;
  top: 52%;
  width: 132px;
  height: 76px;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
}

/* ----------------------------------------------------------------- phone -- */

.phone {
  flex: 0 0 auto;
  padding: 6px;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 47, 115, 0.12);
}

.phone img {
  display: block;
  width: var(--screen-w);
  height: auto;
  border-radius: 28px;
  object-fit: contain;
}

/* --------------------------------------------------------------- feature -- */

.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h2 {
  font-size: clamp(28px, 2.9vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  font-weight: 700;
}

.feature p {
  color: var(--fg-muted);
  max-width: 44ch;
  margin: 0;
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 56px;
  align-items: center;
}

.feature.media-first {
  grid-template-columns: auto minmax(0, 1fr);
}

.feature.media-first .feature-media {
  order: -1;
}

.feature-media {
  display: flex;
  justify-content: center;
  padding: 24px var(--tilt-gutter);
}

.feature-media .phone {
  transform: rotate(3deg);
}

.feature.media-last .feature-media .phone {
  transform: rotate(-3deg);
}

/* ----------------------------------------------------------------- cards -- */

.cards {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, calc(var(--screen-w) + var(--card-frame))), 1fr)
  );
  justify-content: center;
  gap: 24px;
}

.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 30px 26px 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(17, 19, 26, 0.72), rgba(11, 13, 19, 0.5));
  text-align: center;
}

.card .phone {
  transform: none;
}

.card h2 {
  font-size: clamp(22px, 1.9vw, 27px);
  margin: 0 0 10px;
}

.card p {
  color: var(--fg-muted);
  font-size: 16px;
  margin: 0;
  max-width: 34ch;
}

/* --------------------------------------------------------------- privacy -- */

.privacy-strip {
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(177, 60, 255, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(17, 19, 26, 0.8), rgba(11, 13, 19, 0.6));
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.privacy-strip svg {
  width: 48px;
  height: 48px;
}

.privacy-strip ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  color: var(--fg-muted);
}

.privacy-strip li {
  padding-left: 22px;
  position: relative;
  margin: 6px 0;
}

.privacy-strip li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.privacy-strip .read-link {
  font-weight: 600;
  white-space: nowrap;
}

/* ---------------------------------------------------------------- footer -- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 60px;
  color: var(--fg-muted);
  font-size: 15px;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  margin-left: auto;
}

.footer-links a,
.footer-langs a {
  color: var(--fg-muted);
}

.footer-langs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-left: auto;
  font-size: 14px;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

/* ----------------------------------------------------------- breakpoints -- */

/* Wide desktop: the widest captures the contract allows. */
@media (min-width: 1200px) {
  .hero {
    --screen-w: 330px;
  }

  .feature {
    --screen-w: 360px;
  }

  .cards {
    --screen-w: 310px;
  }
}

/* Narrow desktop: the hero pair stacks under the headline rather than being
   squeezed beside it; the feature captures stay large. */
@media (max-width: 1199.98px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 1024px) and (max-width: 1199.98px) {
  .hero {
    --screen-w: 320px;
  }

  .feature {
    --screen-w: 320px;
  }

  .cards {
    --screen-w: 290px;
  }

  .feature {
    gap: 40px;
  }
}

/* Tablet: never squeeze — the three-up row wraps to two, then one. */
@media (max-width: 1023.98px) {
  section {
    padding: 64px 0;
  }

  .hero {
    padding: 48px 0 72px;
    --screen-w: 300px;
  }

  .feature,
  .cards {
    --screen-w: 320px;
  }

  .site-nav {
    display: none;
  }

  .lang {
    display: none;
  }

  .cta-header {
    display: none;
  }

  .menu-button {
    display: inline-flex;
  }

  .hero-grid {
    gap: 48px;
  }

  .feature,
  .feature.media-first {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    justify-items: center;
    text-align: center;
  }

  .feature.media-first .feature-media {
    order: 0;
  }

  .feature p {
    margin-left: auto;
    margin-right: auto;
  }


  .privacy-strip {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 20px;
    padding: 30px;
  }

  .privacy-strip .read-link {
    grid-column: 2;
  }
}

/* Phone: one column, captures as wide as the viewport honestly allows. */
@media (max-width: 767.98px) {
  :root {
    --pad: 16px;
    --tilt-gutter: 8px;
    --card-frame: 18px;
  }

  body {
    font-size: 16px;
  }

  .hero,
  .feature,
  .cards {
    --screen-w: min(88vw, 380px);
  }

  .hero-phones {
    flex-direction: column;
    gap: 0;
  }

  .hero-phones .phone:first-child {
    transform: rotate(1deg);
    margin-right: 0;
  }

  .hero-phones .phone:last-child {
    transform: rotate(-1deg);
    margin-top: -60px;
  }

  .connector {
    display: none;
  }

  .feature-media .phone,
  .feature.media-last .feature-media .phone {
    transform: rotate(1.5deg);
  }

  .card {
    padding: 26px 8px 30px;
  }

  .card-text {
    padding: 0 12px;
  }

  .footer-links,
  .footer-langs {
    margin-left: 0;
  }
}

@media (max-width: 380px) {
  :root {
    --pad: 8px;
    --tilt-gutter: 4px;
    --card-frame: 2px;
  }

  .card {
    padding: 22px 0 26px;
  }

  /* Every remaining pixel belongs to the capture, not to the frame. */
  .phone {
    padding: 4px;
  }
}

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

  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Subtle enter animation; disabled entirely under reduced motion and no-JS. */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

html.no-js .reveal {
  opacity: 1;
  transform: none;
}
