/* PagePins Extension - Premium Design System */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  /* Color System */
  /* A refined, ultra-modern low-contrast background layered with distinct vibrant accents */
  --bg-primary: #f8f9fa;
  --bg-secondary: #eef1f6;
  --bg-tertiary: #e2e8f0;
  
  --surface-default: rgba(255, 255, 255, 0.7);
  --surface-solid: #ffffff;
  --surface-raised: rgba(255, 255, 255, 0.9);
  --surface-inverse: #064e3b; /* Dark solid surface for primary CTAs, logo bg, etc. */
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-inverse: #ffffff;
  
  --border-subtle: rgba(15, 23, 42, 0.06);
  --border-strong: rgba(15, 23, 42, 0.12);
  
  /* Brand Accents - Emerald & Deep Slate */
  --accent-base: #10b981;
  --accent-hover: #059669;
  --accent-deep: #064e3b;
  --accent-surface: #ecfdf5;
  --accent-glow: rgba(16, 185, 129, 0.25);
  
  --gold-highlight: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.2);

  /* Typography */
  --font-heading: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Roboto', system-ui, -apple-system, sans-serif;

  /* Shadows for depth */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 12px 24px -6px rgba(15, 23, 42, 0.08), 0 4px 12px -4px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 32px 64px -12px rgba(15, 23, 42, 0.12), 0 16px 32px -8px rgba(15, 23, 42, 0.06);
  --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Layout */
  --container-max: 1200px;
  --container-padding: 32px;
  
  /* Transitions */
  --trans-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --trans-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =========================================================================
   Base Resets & Globals
   ========================================================================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  /* A beautiful subtle gradient that feels dimensional */
  background-image: 
    radial-gradient(circle at 15% 0%, rgba(16, 185, 129, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(245, 158, 11, 0.04) 0%, transparent 40%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--trans-smooth);
}

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

/* =========================================================================
   Layout & Containers
   ========================================================================= */

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

.section {
  padding: 120px 0;
  position: relative;
}

.section-sm {
  padding: 80px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 64px;
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

@media (max-width: 1024px) {
  .grid-2 { gap: 48px; }
  .grid-3 { gap: 24px; }
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .section-sm { padding: 48px 0; }
}

/* =========================================================================
   UI Components: Buttons
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-weight: 500;
  font-size: 1.05rem;
  font-family: var(--font-heading);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--trans-bounce);
  user-select: none;
}

.btn:active {
  transform: scale(0.97) !important;
}

.btn-primary {
  background: var(--surface-inverse);
  color: var(--text-inverse);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(6, 78, 59, 0.3);
}

.btn-secondary {
  background: var(--surface-default);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--surface-raised);
  transform: translateY(-2px);
  border-color: var(--text-primary);
}

/* =========================================================================
   UI Components: Glass Cards
   ========================================================================= */

.glass-panel {
  background: var(--surface-default);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--surface-raised);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
}

.card {
  padding: 40px;
  border-radius: var(--radius-lg);
  background: var(--surface-solid);
  border: 1px solid var(--border-subtle);
  transition: var(--trans-smooth);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-glow);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--accent-surface);
  color: var(--accent-base);
  display: grid;
  place-items: center;
  margin-bottom: 24px;
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.card p {
  font-size: 1.05rem;
  margin-bottom: 0;
  flex-grow: 1;
}

/* =========================================================================
   Topbar Navigation
   ========================================================================= */

.nav-wrapper {
  position: fixed;
  top: 24px;
  left: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 0 var(--container-padding);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 900px;
  transition: var(--trans-smooth);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.brand-logo {
  width: 32px;
  height: 32px;
  background: var(--surface-inverse);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--text-inverse);
}

.brand-logo svg {
  width: 18px;
  height: 18px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  background: var(--surface-inverse);
  color: var(--text-inverse) !important;
  border: 1px solid transparent;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

.nav-cta:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(6, 78, 59, 0.3);
}

.chrome-icon {
  width: 16px;
  height: 16px;
}

.external-icon {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

.cws-link {
  gap: 10px;
}

@media (max-width: 640px) {
  .nav-links { display: none; }
}

/* =========================================================================
   Hero Section
   ========================================================================= */

.hero {
  padding-top: 200px;
  padding-bottom: 120px;
}

.hero-content {
  max-width: 580px;
}

.hero .grid-2 {
  gap: 96px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  padding: 8px 16px;
  background: var(--accent-surface);
  color: var(--accent-hover);
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(3rem, 5vw, 4.5rem);
  margin-bottom: 24px;
  /* subtle text gradient for the main header */
  background: linear-gradient(135deg, var(--text-primary) 30%, #475569 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.05;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 40px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* =========================================================================
   Browser Mockup (macOS Style)
   ========================================================================= */

.mockup-wrapper {
  position: relative;
  z-index: 10;
  perspective: 1000px;
}

.mockup-bg-blob {
  position: absolute;
  width: 120%;
  height: 120%;
  top: -10%;
  left: -10%;
  background: radial-gradient(circle at 50% 50%, var(--accent-glow) 0%, transparent 60%);
  z-index: -1;
  filter: blur(40px);
}

.browser-window {
  background: var(--surface-solid);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: rotateY(-4deg) rotateX(2deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mockup-wrapper:hover .browser-window {
  transform: rotateY(0deg) rotateX(0deg);
}

.browser-header {
  height: 48px;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.browser-dots {
  display: flex;
  gap: 8px;
}

.browser-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yel { background: #ffbd2e; }
.dot-grn { background: #27c93f; }

.browser-url {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-solid);
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-family: var(--font-body);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.04);
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-body {
  position: relative;
  height: 500px;
  background: #f8fafc;
  display: flex;
}

.browser-content-area {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Mock Website inside Browser */
.mock-website {
  width: 100%;
  max-width: 400px;
  background: white;
  padding: 32px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-subtle);
}

.mock-website h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.mock-website p {
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.mock-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mock-block {
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  font-size: 0.85rem;
}

/* Annotations inside Mockup */
.pin-wrapper {
  position: absolute;
  z-index: 20;
}

/* Marker 1 focuses on the 'Starter' Continue button at bottom-left */
.pin-1-wrap { bottom: 28%; left: 36%; }
/* Marker 2 focuses on the 'Growth' Price at top-right of the block */
.pin-2-wrap { top: 45%; right: 26%; }

.annotation-pin {
  width: 24px;
  height: 24px;
  background: var(--accent-base);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3); /* Match accent color */
  position: absolute;
  top: -12px;
  left: -12px;
}

.annotation-popup {
  position: absolute;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  width: 200px;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: var(--shadow-xl);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-up {
  bottom: 24px; /* Floats directly above the pin */
  left: -100px;
}

/* Extension-like Toolbar */
.mock-anchor-shell {
  position: absolute;
  bottom: 24px;
  right: 24px;
  height: 48px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  border-radius: 24px;
  display: flex;
  align-items: center;
  padding: 4px;
  gap: 8px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 30;
}

.mock-anchor-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 20px;
  height: 32px;
  font-size: 0.8rem;
  cursor: pointer;
}

.mock-anchor-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mock-anchor-actions button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.mock-anchor-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-base);
  border: none;
  color: black;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 640px) {
  .browser-body { height: 400px; }
  .annotation-popup { display: none; }
}

/* =========================================================================
   Call Out / Quote Section
   ========================================================================= */

.quote-box {
  background: var(--accent-deep);
  border-radius: var(--radius-lg);
  padding: 64px;
  text-align: center;
  color: var(--surface-default);
  position: relative;
  overflow: hidden;
}

.quote-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% -20%, rgba(16, 185, 129, 0.3) 0%, transparent 60%);
  pointer-events: none;
}

.quote-box p {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--text-inverse);
  font-family: var(--font-heading);
  line-height: 1.4;
  position: relative;
  z-index: 1;
}

.quote-box strong {
  color: var(--accent-base);
}

@media (max-width: 768px) {
  .quote-box { padding: 40px 24px; }
}

/* =========================================================================
   Footer
   ========================================================================= */

footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 80px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-brand p {
  max-width: 400px;
  font-size: 1rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  font-family: var(--font-heading);
  font-weight: 500;
}

.footer-links a:hover {
  filter: brightness(0.6);
}

/* =========================================================================
   Typography Overrides for Privacy document
   ========================================================================= */
.prose {
  max-width: 800px;
  margin: 0 auto;
}

.prose h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  margin-bottom: 16px;
}

.prose h2 {
  font-size: 1.75rem;
  margin-top: 48px;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.prose p, .prose ul, .prose li {
  font-size: 1.125rem;
  margin-bottom: 24px;
}

.prose ul {
  padding-left: 24px;
}

.prose li {
  margin-bottom: 12px;
}

.prose code {
  background: var(--bg-tertiary);
  padding: 4px 8px;
  border-radius: 6px;
  font-family: 'Space Grotesk', monospace;
  font-size: 0.9em;
  color: var(--text-primary);
}

.meta-text {
  color: var(--text-secondary);
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 48px;
  display: inline-block;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--accent-base);
}
