:root {
  --bg: #fbfbfd;
  --navy: #19293a;          /* brand: "Price" */
  --teal: #4f9f8e;          /* brand: "Lynx" */
  --teal-strong: #2f7d6d;   /* darker teal for small UI details */
  --text: var(--navy);
  --muted: #5b6775;         /* navy-tinted gray */
  --hairline: rgba(25, 41, 58, 0.08);

  /* Type scale: 17px body (Apple's default), ~1.25 ratio upward.
     Display sizes shrink a little on narrow screens. */
  --fs-small: 0.875rem;                          /* 14px - badge, button */
  --fs-body: 1.0625rem;                          /* 17px - description */
  --fs-lead: 1.3125rem;                          /* 21px - slogan */
  --fs-title: clamp(2.25rem, 5vw, 3rem);         /* 36-48px - app name, 404 */

  /* Spacing on an 8px rhythm */
  --space-1: 0.5rem;   /*  8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */

  color-scheme: light;
}

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

/* The page itself never scrolls. body only scrolls if the content
   really doesn't fit (e.g. a very small phone in landscape). */
html {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none; /* no macOS rubber-band bounce */
}

body {
  height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none; /* no macOS rubber-band bounce */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* Text stays selectable; images, the badge and buttons don't,
   so they behave like native controls */
img,
svg,
.badge,
.home-link {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none; /* no long-press menu on iOS */
}

/* Images and links can't be dragged out of the page */
img,
a {
  -webkit-user-drag: none;
}

/* Soft pastel "mesh" behind the content, in the spirit of macOS wallpapers */
body::before {
  content: "";
  position: fixed;
  inset: -10vmax;
  pointer-events: none;
  background:
    radial-gradient(38vmax 38vmax at 22% 18%, rgba(79, 159, 142, 0.22), transparent 62%),
    radial-gradient(42vmax 42vmax at 82% 78%, rgba(120, 200, 180, 0.22), transparent 62%),
    radial-gradient(36vmax 36vmax at 85% 12%, rgba(140, 170, 210, 0.22), transparent 62%),
    radial-gradient(34vmax 34vmax at 12% 88%, rgba(25, 41, 58, 0.07), transparent 62%);
  filter: blur(20px);
  z-index: -1;
}

main {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-4) var(--space-3);
}

/* App icon sitting on the page, with a soft macOS-style shadow */
.logo {
  width: clamp(104px, 13vw, 132px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  /* Breathing room between the lynx and the tile edge (~4% of the icon; logo.png adds its own margin) */
  padding: clamp(4px, 0.45vw, 6px);
  /* White macOS-style icon tile; the PNG's own white background fills it */
  background: #fff;
  border-radius: 22.5%;
  box-shadow:
    0 0 0 1px var(--hairline),
    0 2px 6px rgba(25, 41, 58, 0.08),
    0 16px 32px rgba(25, 41, 58, 0.12);
}

h1 {
  margin: var(--space-3) 0 var(--space-1);
  color: var(--navy);
  font-size: var(--fs-title);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

/* Teal half of the wordmark ("Lynx"), also used for the 404 */
.accent {
  color: var(--teal);
}

.slogan {
  margin: 0;
  font-size: var(--fs-lead);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--text);
}

.description {
  max-width: 40rem;
  margin: var(--space-2) auto 0;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--muted);
}

/* Frosted-glass pill, like a macOS material */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-4);
  padding: 0.5rem 1rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px rgba(0, 0, 0, 0.05);
  font-size: var(--fs-small);
  font-weight: 500;
  line-height: 1;
  color: var(--text);
}

.badge svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  margin-top: -2px; /* optically center the Apple glyph */
}

/* 404 page: same size and rhythm as the index headline */
.error-code {
  margin: var(--space-3) 0 var(--space-1);
  font-size: var(--fs-title);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--teal);
}

/* Apple-style dark pill button */
.home-link {
  display: inline-block;
  margin-top: var(--space-4);
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(25, 41, 58, 0.18);
}

.home-link:hover {
  background: #0f1b28;
}

.home-link:focus-visible {
  outline: 3px solid var(--teal-strong);
  outline-offset: 4px;
}
