/* ============================================================================
   Primelab — "Liquid Glass" shared design system
   Apple-inspired blue aesthetic. Shared verbatim by primelab.site and
   founder.primelab.site so the two read as one family.
   Self-contained: no external CSS. Loads Inter for non-Apple platforms;
   Apple platforms fall through to real SF Pro via -apple-system.
   ========================================================================== */

/* ---- Font (non-Apple fallback to a close geometric sans) ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

:root {
  /* Palette */
  --blue:        #0071e3;   /* primary CTA (apple.com blue) */
  --blue-bright: #0a84ff;   /* accent / gradient */
  --indigo:      #5e5ce6;   /* gradient depth */
  --cyan:        #64d2ff;   /* highlight */
  --ink:         #1d1d1f;   /* primary text */
  --muted:       #6e6e73;   /* secondary text */
  --line:        rgba(0, 30, 80, 0.10);

  /* Ambient background */
  --bg-1: #eef3ff;
  --bg-2: #dfe9fc;
  --bg-3: #eaf0ff;

  /* Glass material */
  --glass-bg:      rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.72);
  --glass-brd:     rgba(255, 255, 255, 0.75);
  --glass-blur:    saturate(180%) blur(30px);
  --glass-shadow:  0 10px 40px -12px rgba(10, 40, 90, 0.28),
                   0 2px 8px -4px rgba(10, 40, 90, 0.20);
  --glass-inset:   inset 0 1px 0 0 rgba(255, 255, 255, 0.9),
                   inset 0 -1px 0 0 rgba(120, 160, 220, 0.15);

  /* Rhythm */
  --radius:   22px;
  --radius-lg: 30px;
  --radius-pill: 980px;
  --maxw: 1080px;
  --gutter: clamp(20px, 5vw, 40px);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
          "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.6;
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---- Ambient gradient field + drifting color blobs (the thing glass refracts) ---- */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  background:
    radial-gradient(40vmax 40vmax at 12% 8%,  rgba(10,132,255,0.35), transparent 60%),
    radial-gradient(38vmax 38vmax at 88% 12%, rgba(94,92,230,0.30), transparent 60%),
    radial-gradient(46vmax 46vmax at 70% 88%, rgba(100,210,255,0.28), transparent 62%),
    linear-gradient(160deg, var(--bg-1), var(--bg-2) 55%, var(--bg-3));
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(2.5%, 2%, 0) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }

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

/* ---- Glass primitive ---- */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--glass-shadow), var(--glass-inset);
  border-radius: var(--radius);
}
/* specular sheen streak across glass surfaces */
.glass--sheen { position: relative; overflow: hidden; }
.glass--sheen::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0) 28%);
  pointer-events: none;
}

/* ---- Sticky glass navbar ---- */
.gnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.6);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.gnav__inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.gnav__brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.gnav__menu { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 28px); }
.gnav__menu a { color: var(--muted); font-size: 0.94rem; font-weight: 500; transition: color 0.2s; }
.gnav__menu a:hover { color: var(--ink); }
.gnav__toggle { display: none; }

/* ---- Buttons (Apple pill) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 14px 26px; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -8px rgba(0,113,227,0.7); }
.btn--primary:hover { background: #0077ed; transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(0,113,227,0.8); }
.btn--glass {
  background: var(--glass-bg-strong); color: var(--ink);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-color: var(--glass-brd); box-shadow: var(--glass-inset);
}
.btn--glass:hover { transform: translateY(-1px); background: rgba(255,255,255,0.85); }

/* ---- Type scale ---- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--blue); text-transform: none;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-bright); box-shadow: 0 0 0 4px rgba(10,132,255,0.15); }

h1, h2, h3 { margin: 0; letter-spacing: -0.022em; line-height: 1.05; font-weight: 700; }
.display { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.02; }
.gradient-text { background: linear-gradient(120deg, var(--blue), var(--indigo) 60%, var(--blue-bright)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-title { font-size: clamp(1.7rem, 3.4vw, 2.6rem); font-weight: 700; letter-spacing: -0.025em; }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.35rem); color: var(--muted); font-weight: 450; line-height: 1.5; }

/* ---- Sections ---- */
.section { padding-block: clamp(64px, 10vw, 120px); }
.section__head { max-width: 640px; margin-bottom: clamp(28px, 5vw, 52px); }
.section__kicker { font-size: 0.85rem; font-weight: 600; color: var(--blue); margin-bottom: 12px; }

/* ---- Hero ---- */
.hero { padding-block: clamp(72px, 12vw, 150px); text-align: left; }
.hero .lede { margin-top: 20px; max-width: 620px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* ---- Card grid ---- */
.grid { display: grid; gap: clamp(16px, 2.2vw, 22px); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  padding: clamp(22px, 3vw, 30px);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 50px -16px rgba(10,40,90,0.34), var(--glass-inset); }
.card__num { font-size: 0.8rem; font-weight: 700; color: var(--blue-bright); letter-spacing: 0.04em; }
.card h3 { font-size: 1.25rem; margin: 12px 0 8px; letter-spacing: -0.015em; }
.card p { color: var(--muted); margin: 0; font-size: 0.98rem; }

/* ---- Tag / chip ---- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  font-size: 0.8rem; font-weight: 500; color: #0a3a70;
  padding: 5px 12px; border-radius: var(--radius-pill);
  background: rgba(10,132,255,0.10); border: 1px solid rgba(10,132,255,0.16);
}

/* ---- Link with arrow ---- */
.arrow-link { color: var(--blue); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.arrow-link:hover { text-decoration: none; }
.arrow-link span { transition: transform 0.2s; }
.arrow-link:hover span { transform: translateX(3px); }

/* ---- Footer ---- */
.gfoot { padding-block: 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.gfoot__inner { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---- Focus (accessibility floor) ---- */
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--blue); color:#fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip-link:focus { left: 12px; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .grid--3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .gnav__menu { display: none; }
  .gnav__menu.is-open {
    display: flex; position: absolute; top: 56px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px var(--gutter) 20px;
    background: rgba(255,255,255,0.85);
    -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--line);
  }
  .gnav__menu.is-open a { padding: 10px 0; font-size: 1.05rem; }
  .gnav__toggle {
    display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px;
  }
  .gnav__toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }
}

/* motion-reduced global damping for hover transforms */
@media (prefers-reduced-motion: reduce) {
  .card, .btn, .arrow-link span { transition: none; }
  .card:hover, .btn:hover { transform: none; }
}
