/* ==========================================================================
   Glypax — landing page styles
   ========================================================================== */

/* Fonts (self-hosted, no third-party requests) */
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url("../fonts/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Tokens ------------------------------------------------------------------ */
:root {
  color-scheme: light;

  /* Brand (sampled from the Glypax logo) */
  --purple: #8d01fa;
  --purple-hover: #7600d4;
  --purple-ring: #ce93fd;
  --purple-tint: #ecd2ff;

  /* Neutrals */
  --bg: #fbf9fd;
  --surface: #ffffff;
  --ink: #17131f;
  --ink-soft: #2a2535;
  --muted: #615a6e;
  --line: #ebe6f1;

  --radius-pill: 999px;
  --container: 1080px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 64px;

  --font: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

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

a {
  color: inherit;
}

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Brand (logo + wordmark) -------------------------------------------------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink-soft);
  border-radius: 12px;
}
.brand__icon {
  width: 36px;
  height: 36px;
  flex: none;
}
.brand__name {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* Header ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 10px;
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
  padding: 10px 10px 10px 22px;
  background: rgb(251 249 253 / 0.82);
  border: 1px solid var(--line);
  border-radius: 22px;
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}
.btn--primary {
  background: var(--purple);
  color: #fff;
}
.btn--primary:hover {
  background: var(--purple-hover);
}
.btn--primary:active {
  transform: translateY(1px);
}

/* Hero -------------------------------------------------------------------- */
.hero {
  padding-block: clamp(40px, 7vw, 96px) clamp(32px, 5vw, 64px);
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
}

.hero__title {
  margin: 0;
  font-size: clamp(2.125rem, 1.15rem + 2.6vw, 2.875rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--ink);
  text-wrap: balance;
}
.hero__title .line {
  display: block;
}
.hl {
  color: var(--purple);
  white-space: nowrap;
  padding-bottom: 0.1em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9.5C45 4 105 3.2 197 6.2' fill='none' stroke='%23CE93FD' stroke-width='4.2' stroke-linecap='round'/%3E%3Cpath d='M14 12.2C70 8.6 128 8.2 186 9.6' fill='none' stroke='%23CE93FD' stroke-width='2.6' stroke-linecap='round' opacity='.75'/%3E%3C/svg%3E")
    no-repeat left bottom / 100% 0.26em;
}

.hero__text {
  margin: 24px 0 0;
  max-width: 34rem;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.7;
  color: var(--muted);
}

.hero__stores {
  margin-top: 36px;
  scroll-margin-top: calc(var(--header-h) + 40px);
}

.hero__media {
  /* space available outside the 1080px container on wide screens */
  --outside: max(0px, (100vw - var(--container) - var(--gutter) * 2) / 2);
  position: relative;
  margin-right: calc(-1 * min(var(--outside), 150px));
  margin-left: -12px;
}
.hero__media::before {
  /* soft brand glow behind the screens */
  content: "";
  position: absolute;
  inset: 8% 6% 4% 6%;
  z-index: -1;
  background: radial-gradient(
    closest-side,
    rgb(206 147 253 / 0.45),
    rgb(236 210 255 / 0.25) 55%,
    transparent 100%
  );
  filter: blur(10px);
}
.hero__media img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 24px 40px rgb(48 18 82 / 0.14));
}

/* Store badges (Coming soon) ---------------------------------------------- */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  padding-top: 12px; /* room for the "Coming soon" tag */
}

.store-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 182px;
  height: 58px;
  padding: 6px 22px 0 18px;
  background: #000;
  color: #fff;
  border: 1px solid #000;
  border-radius: 14px;
  cursor: default;
  user-select: none;
}
.store-badge__icon {
  width: 28px;
  height: 28px;
  flex: none;
}
.store-badge__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.store-badge__text small {
  white-space: nowrap;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.92;
}
.store-badge__text strong {
  white-space: nowrap;
  font-size: 1.32rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.store-badge__soon {
  position: absolute;
  top: -12px;
  right: -8px;
  padding: 3px 9px;
  background: var(--purple);
  color: #fff;
  border: 2px solid var(--bg);
  border-radius: var(--radius-pill);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgb(141 1 250 / 0.25);
}

.stores--sm .store-badge {
  min-width: 158px;
  height: 50px;
  padding: 6px 18px 0 14px;
  border-radius: 12px;
  gap: 10px;
}
.stores--sm .store-badge__icon {
  width: 24px;
  height: 24px;
}
.stores--sm .store-badge__text small {
  font-size: 0.66rem;
}
.stores--sm .store-badge__text strong {
  font-size: 1.14rem;
}

/* Little nudge when "Get the app" jumps to the badges */
@media (prefers-reduced-motion: no-preference) {
  .hero__stores:target .store-badge__soon {
    animation: soon-pop 0.9s ease 0.35s 2;
  }
}
@keyframes soon-pop {
  0%,
  100% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18) rotate(-3deg);
  }
}

/* Works with every GLP-1 (marquee) ---------------------------------------- */
.works {
  padding-block: clamp(24px, 4vw, 48px) clamp(56px, 8vw, 96px);
}
.works__title {
  margin: 0 0 24px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.marquee {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 64s linear infinite;
}
.marquee:hover .marquee__track {
  animation-play-state: paused;
}
.marquee__list {
  display: flex;
  gap: 14px;
  margin: 0;
  padding: 4px 7px;
  list-style: none;
}
.marquee__item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 58px;
  padding: 0 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee {
    -webkit-mask-image: none;
    mask-image: none;
  }
  .marquee__track {
    animation: none;
    width: auto;
    justify-content: center;
  }
  .marquee__list {
    flex-wrap: wrap;
    justify-content: center;
  }
  .marquee__list[aria-hidden="true"] {
    display: none;
  }
}

/* Footer ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(40px, 6vw, 64px) 32px;
}
.site-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px 48px;
}
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.site-footer__brand .brand__icon {
  width: 40px;
  height: 40px;
}
.site-footer__brand .brand__name {
  font-size: 1.75rem;
}
.disclaimer {
  margin: 0;
  max-width: 25rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.copyright {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: 4px;
}
.footer-links a:hover {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 404 --------------------------------------------------------------------- */
.not-found {
  padding-block: clamp(64px, 12vw, 140px);
  text-align: center;
}
.not-found h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
}
.not-found p {
  margin: 0 0 28px;
  color: var(--muted);
}

/* Current page in the footer legal nav */
.footer-links a[aria-current="page"] {
  color: var(--purple);
}

/* Legal pages ------------------------------------------------------------- */
.legal {
  max-width: calc(760px + var(--gutter) * 2);
  padding-block: clamp(40px, 6vw, 72px) clamp(56px, 8vw, 96px);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink-soft);
}
.legal h1 {
  margin: 0;
  font-size: clamp(2.125rem, 1.4rem + 2.4vw, 2.875rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.legal .effective {
  display: inline-block;
  margin: 18px 0 32px;
  padding: 5px 14px;
  background: var(--purple-tint);
  color: #4b0a86;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
}
.legal h2 {
  margin: 2.6em 0 0.7em;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.legal h3 {
  margin: 2em 0 0.5em;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.legal [id] {
  scroll-margin-top: calc(var(--header-h) + 32px);
}
.legal p {
  margin: 0 0 1em;
}
.legal ul,
.legal ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}
.legal li {
  margin-bottom: 0.45em;
}
.legal li > ul,
.legal li > ol {
  margin: 0.45em 0 0;
}
.legal li::marker {
  color: var(--purple);
}
.legal strong {
  color: var(--ink);
  font-weight: 700;
}
.legal a {
  color: var(--purple);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}
.legal a:hover {
  color: var(--purple-hover);
  text-decoration-thickness: 2px;
}

/* Table of contents */
.legal .toc-title {
  margin-top: 0;
}
.legal .toc {
  margin: 0 0 1em;
  padding: 18px 22px 18px 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}
.legal .toc li {
  margin-bottom: 0.2em;
}
.legal .toc a {
  color: var(--ink-soft);
  text-decoration: none;
}
.legal .toc a:hover {
  color: var(--purple);
  text-decoration: underline;
}

/* Tables */
.legal .table-wrap {
  --table-border: #cdbde0;
  margin: 1.2em 0 1.6em;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--table-border);
  border-radius: 16px;
}
.legal table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.legal th,
.legal td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border: 1px solid var(--table-border);
}
/* the wrapper draws the outer frame, so drop the cells' outer edges */
.legal tr > :first-child {
  border-left: 0;
}
.legal tr > :last-child {
  border-right: 0;
}
.legal thead tr:first-child > * {
  border-top: 0;
}
.legal tbody tr:last-child > * {
  border-bottom: 0;
}
.legal thead th {
  background: #f3e8fd;
  color: var(--ink);
  font-weight: 700;
  border-bottom-width: 2px;
}
.legal tbody tr:nth-child(even) td {
  background: #fcfaff;
}

.legal hr {
  margin: 3em 0 1.5em;
  border: 0;
  border-top: 1px solid var(--line);
}
.legal .doc-note {
  font-size: 0.9375rem;
  color: var(--muted);
}

/* Support page ------------------------------------------------------------ */
.support .support-lead {
  margin: 16px 0 28px;
  font-size: 1.1875rem;
  color: var(--muted);
}
.support-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 8px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgb(48 18 82 / 0.06);
}
.support-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.support-card__label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.legal .support-card__email {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.legal .support-card__email:hover {
  color: var(--purple);
  text-decoration: underline;
}
.legal .support-card .btn {
  color: #fff;
  text-decoration: none;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
  .hero__media {
    margin-inline: auto;
    max-width: 720px;
  }
  .site-footer__top {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  :root {
    --header-h: 56px;
  }
  .site-header__bar {
    padding: 8px 8px 8px 14px;
    border-radius: 18px;
  }
  .brand__icon {
    width: 32px;
    height: 32px;
  }
  .brand__name {
    font-size: 1.35rem;
  }
  .btn {
    min-height: 40px;
    padding: 8px 18px;
    font-size: 0.95rem;
  }
  .hero__title {
    font-size: clamp(1.75rem, 0.9rem + 3.6vw, 2.125rem);
    text-wrap: wrap;
  }
  .stores {
    gap: 18px 12px;
  }
  .store-badge {
    min-width: 0;
    flex: 1 1 150px;
    height: 54px;
    padding: 6px 14px 0;
    gap: 10px;
  }
  .stores--sm .store-badge {
    flex: 0 1 auto;
  }
  .store-badge__text strong {
    font-size: 1.18rem;
  }
  .hero__media {
    margin-inline: calc(var(--gutter) * -1);
  }
  .marquee__item {
    min-width: 0;
    height: 50px;
    padding: 0 22px;
    font-size: 1rem;
    border-radius: 18px;
  }
  .site-footer__bottom {
    flex-direction: column-reverse;
    align-items: flex-start;
  }
  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}
