/* ==========================================================================
   ProbatePack.ie — revamp.css
   Valuion-inspired design system adapted to ProbatePack's palette.
   Loaded alongside core.css on homepage, products page, use-cases pages.
   Mobile-first. WCAG 2.2 AA. All colours verified ≥ 4.5:1 body / 3:1 UI.
   ========================================================================== */

/* ==========================================================================
   01. DESIGN TOKENS (extends core.css)
   ========================================================================== */
:root {
  /* Spacing (8pt grid) */
  --rv-space-1: 4px;
  --rv-space-2: 8px;
  --rv-space-3: 12px;
  --rv-space-4: 16px;
  --rv-space-5: 20px;
  --rv-space-6: 24px;
  --rv-space-7: 32px;
  --rv-space-8: 40px;
  --rv-space-9: 48px;
  --rv-space-10: 64px;
  --rv-space-11: 80px;
  --rv-space-12: 96px;

  /* Typography scale */
  --rv-text-xs: 12px;   --rv-lh-xs: 16px;
  --rv-text-sm: 14px;   --rv-lh-sm: 20px;
  --rv-text-base: 16px; --rv-lh-base: 24px;
  --rv-text-lg: 18px;   --rv-lh-lg: 28px;
  --rv-text-xl: 20px;   --rv-lh-xl: 28px;
  --rv-text-2xl: 24px;  --rv-lh-2xl: 32px;
  --rv-text-3xl: 30px;  --rv-lh-3xl: 36px;
  --rv-text-4xl: 36px;  --rv-lh-4xl: 40px;
  --rv-text-5xl: 48px;  --rv-lh-5xl: 56px;
  --rv-text-6xl: 60px;  --rv-lh-6xl: 68px;

  /* Colours - mapped from core.css brand palette */
  --rv-primary: #0E2F2F;          /* teal-dark */
  --rv-primary-dark: #082020;
  --rv-primary-light: #E8F0F0;
  --rv-accent: #B35A3B;            /* terracotta */
  --rv-accent-hover: #9A4C31;
  --rv-accent-light: #F7EDE6;
  --rv-accent-text: #8B4426;
  --rv-surface: #FFFFFF;
  --rv-bg: #FAF8F4;                /* cream page */
  --rv-bg-alt: #F2ECDE;            /* cream card, slightly warmer */
  --rv-bg-tinted: #F7F2E8;         /* section tinted */
  --rv-text: #1F2937;
  --rv-text-secondary: #4B5563;
  --rv-text-tertiary: #6B7280;
  --rv-border: #E5E7EB;
  --rv-border-hover: #CBD5E0;

  /* Semantic status */
  --rv-success: #065F46;
  --rv-success-light: #D1FAE5;
  --rv-warning: #B45309;
  --rv-warning-light: #FEF3C7;
  --rv-error: #B91C1C;
  --rv-error-light: #FEE2E2;

  /* Elevation */
  --rv-shadow-sm: 0 1px 2px rgba(14,47,47,0.05);
  --rv-shadow-md: 0 4px 6px -1px rgba(14,47,47,0.07), 0 2px 4px -2px rgba(14,47,47,0.05);
  --rv-shadow-lg: 0 10px 15px -3px rgba(14,47,47,0.08), 0 4px 6px -4px rgba(14,47,47,0.04);
  --rv-shadow-xl: 0 20px 25px -5px rgba(14,47,47,0.08), 0 8px 10px -6px rgba(14,47,47,0.04);

  /* Radii */
  --rv-radius-sm: 6px;
  --rv-radius-md: 8px;
  --rv-radius-lg: 12px;
  --rv-radius-xl: 16px;
  --rv-radius-2xl: 24px;
  --rv-radius-full: 9999px;

  /* Motion */
  --rv-t-fast: 0.15s;
  --rv-t-base: 0.2s;
  --rv-t-slow: 0.3s;
  --rv-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   02. SECTION PRIMITIVES
   ========================================================================== */
.rv-section {
  padding: var(--rv-space-12) 0;
  position: relative;
}
.rv-section--tight { padding: var(--rv-space-10) 0; }
.rv-section--tinted { background: var(--rv-bg-tinted); }
.rv-section--dark {
  background: var(--rv-primary);
  color: #E8DFD1;
}
.rv-section--dark h2, .rv-section--dark h3 { color: #FFFFFF; }

.rv-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--rv-space-5);
}
.rv-container--prose { max-width: 720px; }

.rv-eyebrow {
  display: inline-block;
  font-size: var(--rv-text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rv-accent-text);
  margin-bottom: var(--rv-space-4);
}
.rv-section--dark .rv-eyebrow { color: #E8A88E; }

.rv-section-title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  font-weight: 600;
  color: var(--rv-primary);
  margin: 0 0 var(--rv-space-5);
  letter-spacing: -0.01em;
}
.rv-section--dark .rv-section-title { color: #FFFFFF; }

.rv-section-lead {
  font-size: var(--rv-text-lg);
  line-height: var(--rv-lh-lg);
  color: var(--rv-text-secondary);
  max-width: 640px;
  margin: 0 0 var(--rv-space-8);
}
.rv-section--dark .rv-section-lead { color: #C5D3D3; }

/* ==========================================================================
   03. HERO (split layout: copy + embedded mini-calculator)
   ========================================================================== */
.rv-hero {
  padding: var(--rv-space-12) 0 var(--rv-space-11);
  background: linear-gradient(180deg, var(--rv-bg) 0%, var(--rv-surface) 100%);
  position: relative;
  overflow: hidden;
}
.rv-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(179,90,59,0.05) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(14,47,47,0.04) 0%, transparent 40%);
  pointer-events: none;
}

.rv-hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rv-space-9);
  align-items: start;
  position: relative;
}
@media (min-width: 960px) {
  .rv-hero__grid {
    grid-template-columns: 1.15fr 1fr;
    gap: var(--rv-space-10);
  }
}

.rv-hero__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.08;
  font-weight: 600;
  color: var(--rv-primary);
  margin: 0 0 var(--rv-space-5);
  letter-spacing: -0.015em;
}
.rv-hero__subtitle {
  font-size: var(--rv-text-lg);
  line-height: var(--rv-lh-lg);
  color: var(--rv-text-secondary);
  max-width: 540px;
  margin: 0 0 var(--rv-space-7);
}

.rv-hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: var(--rv-space-4);
  margin-bottom: var(--rv-space-8);
}

.rv-hero__trust {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rv-space-3);
  padding: 0;
  margin: 0;
  list-style: none;
}
@media (min-width: 560px) {
  .rv-hero__trust { grid-template-columns: 1fr 1fr; }
}
.rv-hero__trust-item {
  display: flex;
  align-items: center;
  gap: var(--rv-space-2);
  font-size: var(--rv-text-sm);
  color: var(--rv-text-secondary);
  font-weight: 500;
}
.rv-hero__trust-item svg {
  width: 16px;
  height: 16px;
  color: var(--rv-accent);
  flex-shrink: 0;
}

/* ==========================================================================
   04. HERO EMBEDDED CALCULATOR WIDGET
   ========================================================================== */
.rv-widget {
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-xl);
  padding: var(--rv-space-7);
  box-shadow: var(--rv-shadow-lg);
  position: relative;
}
.rv-widget__eyebrow {
  font-size: var(--rv-text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rv-accent-text);
  margin: 0 0 var(--rv-space-2);
}
.rv-widget__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-2xl);
  line-height: var(--rv-lh-2xl);
  color: var(--rv-primary);
  margin: 0 0 var(--rv-space-5);
  font-weight: 600;
}
.rv-widget__field {
  margin-bottom: var(--rv-space-4);
}
.rv-widget__label {
  display: block;
  font-size: var(--rv-text-sm);
  font-weight: 500;
  color: var(--rv-text);
  margin-bottom: var(--rv-space-2);
}
.rv-widget__input,
.rv-widget__select {
  width: 100%;
  padding: var(--rv-space-3) var(--rv-space-4);
  font-size: var(--rv-text-base);
  font-family: inherit;
  color: var(--rv-text);
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-md);
  transition: border-color var(--rv-t-fast), box-shadow var(--rv-t-fast);
  -webkit-appearance: none;
  appearance: none;
}
.rv-widget__input:focus,
.rv-widget__select:focus {
  outline: none;
  border-color: var(--rv-accent);
  box-shadow: 0 0 0 3px rgba(179,90,59,0.18);
}
.rv-widget__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%230E2F2F' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--rv-space-4) center;
  padding-right: var(--rv-space-8);
}
.rv-widget__result {
  margin-top: var(--rv-space-5);
  padding: var(--rv-space-5);
  background: var(--rv-primary);
  color: #FFFFFF;
  border-radius: var(--rv-radius-lg);
  text-align: center;
}
.rv-widget__result-label {
  font-size: var(--rv-text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C5D3D3;
  margin-bottom: var(--rv-space-2);
}
.rv-widget__result-number {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-4xl);
  line-height: 1;
  font-weight: 600;
  color: #E8A88E;
  letter-spacing: -0.02em;
  margin-bottom: var(--rv-space-2);
}
.rv-widget__result-hint {
  font-size: var(--rv-text-xs);
  color: #C5D3D3;
  line-height: 1.5;
}
.rv-widget__footer {
  margin-top: var(--rv-space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rv-space-4);
  flex-wrap: wrap;
}
.rv-widget__link {
  color: var(--rv-accent-text);
  font-size: var(--rv-text-sm);
  font-weight: 500;
  text-decoration: underline;
}

/* ==========================================================================
   05. BUTTONS (heavier valuion-style)
   ========================================================================== */
.rv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--rv-space-2);
  padding: var(--rv-space-3) var(--rv-space-6);
  font-size: var(--rv-text-base);
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--rv-radius-md);
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background var(--rv-t-fast), border-color var(--rv-t-fast), transform var(--rv-t-fast), box-shadow var(--rv-t-fast);
  white-space: nowrap;
}
.rv-btn--primary {
  background: var(--rv-accent);
  color: #FFFFFF;
  border-color: var(--rv-accent);
}
.rv-btn--primary:hover {
  background: var(--rv-accent-hover);
  border-color: var(--rv-accent-hover);
  color: #FFFFFF;
}
.rv-btn--ghost {
  background: transparent;
  color: var(--rv-primary);
  border-color: var(--rv-border-hover);
}
.rv-btn--ghost:hover {
  background: var(--rv-bg-alt);
  border-color: var(--rv-primary);
  color: var(--rv-primary);
}
.rv-btn--lg {
  padding: var(--rv-space-4) var(--rv-space-7);
  font-size: var(--rv-text-lg);
}
.rv-btn--dark {
  background: #FFFFFF;
  color: var(--rv-primary);
  border-color: #FFFFFF;
}
.rv-btn--dark:hover {
  background: #E8DFD1;
  border-color: #E8DFD1;
  color: var(--rv-primary);
}

/* ==========================================================================
   06. STEP / PROCESS CARDS
   ========================================================================== */
.rv-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rv-space-6);
}
@media (min-width: 720px) {
  .rv-steps { grid-template-columns: repeat(3, 1fr); }
}
.rv-step {
  position: relative;
  padding: var(--rv-space-7);
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-xl);
  box-shadow: var(--rv-shadow-sm);
}
.rv-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--rv-primary);
  color: #FFFFFF;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-lg);
  font-weight: 600;
  border-radius: var(--rv-radius-full);
  margin-bottom: var(--rv-space-4);
}
.rv-step__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-xl);
  line-height: var(--rv-lh-xl);
  color: var(--rv-primary);
  margin: 0 0 var(--rv-space-3);
  font-weight: 600;
}
.rv-step__body {
  font-size: var(--rv-text-base);
  line-height: var(--rv-lh-base);
  color: var(--rv-text-secondary);
  margin: 0;
}

/* ==========================================================================
   07. PILLAR CARDS (dark section, 4 across)
   ========================================================================== */
.rv-pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rv-space-5);
  margin-top: var(--rv-space-8);
}
@media (min-width: 560px) { .rv-pillars { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .rv-pillars { grid-template-columns: repeat(4, 1fr); } }
.rv-pillar {
  padding: var(--rv-space-6);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--rv-radius-lg);
}
.rv-pillar__icon {
  width: 32px;
  height: 32px;
  color: #E8A88E;
  margin-bottom: var(--rv-space-3);
}
.rv-pillar__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-xl);
  line-height: var(--rv-lh-xl);
  color: #FFFFFF;
  margin: 0 0 var(--rv-space-2);
  font-weight: 600;
}
.rv-pillar__body {
  font-size: var(--rv-text-sm);
  line-height: var(--rv-lh-sm);
  color: #C5D3D3;
  margin: 0;
}

/* ==========================================================================
   08. USE-CASE GRID (8 cards, flexible)
   ========================================================================== */
.rv-cases {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rv-space-5);
  margin-top: var(--rv-space-8);
}
@media (min-width: 560px) { .rv-cases { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .rv-cases { grid-template-columns: repeat(4, 1fr); } }

.rv-case {
  display: block;
  padding: var(--rv-space-6);
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-lg);
  text-decoration: none;
  color: var(--rv-text);
  transition: border-color var(--rv-t-fast), transform var(--rv-t-fast), box-shadow var(--rv-t-fast);
}
.rv-case:hover {
  border-color: var(--rv-accent);
  transform: translateY(-2px);
  box-shadow: var(--rv-shadow-md);
  color: var(--rv-text);
}
.rv-case__title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-lg);
  line-height: var(--rv-lh-lg);
  color: var(--rv-primary);
  margin: 0 0 var(--rv-space-2);
  font-weight: 600;
}
.rv-case__body {
  font-size: var(--rv-text-sm);
  line-height: var(--rv-lh-sm);
  color: var(--rv-text-secondary);
  margin: 0 0 var(--rv-space-3);
}
.rv-case__link {
  font-size: var(--rv-text-xs);
  font-weight: 600;
  color: var(--rv-accent-text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   09. PRICING TIERS (3 cards)
   ========================================================================== */
.rv-tiers {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--rv-space-6);
  margin-top: var(--rv-space-8);
}
@media (min-width: 960px) { .rv-tiers { grid-template-columns: repeat(3, 1fr); } }

.rv-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--rv-space-7);
  background: var(--rv-surface);
  border: 1px solid var(--rv-border);
  border-radius: var(--rv-radius-xl);
  box-shadow: var(--rv-shadow-sm);
  transition: box-shadow var(--rv-t-base), transform var(--rv-t-base);
}
.rv-tier:hover {
  box-shadow: var(--rv-shadow-lg);
  transform: translateY(-2px);
}
.rv-tier--featured {
  border-color: var(--rv-accent);
  border-width: 2px;
  box-shadow: var(--rv-shadow-lg);
}
.rv-tier__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rv-accent);
  color: #FFFFFF;
  font-size: var(--rv-text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: var(--rv-space-2) var(--rv-space-4);
  border-radius: var(--rv-radius-full);
}
.rv-tier__name {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-2xl);
  line-height: var(--rv-lh-2xl);
  color: var(--rv-primary);
  margin: 0 0 var(--rv-space-2);
  font-weight: 600;
}
.rv-tier__price {
  display: flex;
  align-items: baseline;
  gap: var(--rv-space-2);
  margin-bottom: var(--rv-space-3);
}
.rv-tier__price-amount {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-5xl);
  line-height: 1;
  font-weight: 600;
  color: var(--rv-primary);
  letter-spacing: -0.02em;
}
.rv-tier__price-note {
  font-size: var(--rv-text-sm);
  color: var(--rv-text-tertiary);
}
.rv-tier__blurb {
  font-size: var(--rv-text-sm);
  line-height: var(--rv-lh-sm);
  color: var(--rv-text-secondary);
  margin: 0 0 var(--rv-space-6);
}
.rv-tier__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--rv-space-7);
  flex: 1;
}
.rv-tier__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--rv-space-3);
  padding: var(--rv-space-3) 0;
  font-size: var(--rv-text-sm);
  line-height: var(--rv-lh-sm);
  color: var(--rv-text);
  border-top: 1px solid var(--rv-border);
}
.rv-tier__features li:first-child { border-top: none; padding-top: 0; }
.rv-tier__features li::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B35A3B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") no-repeat center center;
}
.rv-tier__cta { margin-top: auto; }

/* ==========================================================================
   10. FEATURE COMPARISON TABLE
   ========================================================================== */
.rv-compare {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--rv-space-8);
  font-size: var(--rv-text-sm);
}
.rv-compare th, .rv-compare td {
  padding: var(--rv-space-4);
  text-align: left;
  border-bottom: 1px solid var(--rv-border);
  vertical-align: top;
}
.rv-compare thead th {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-base);
  font-weight: 600;
  color: var(--rv-primary);
  background: var(--rv-bg-tinted);
  border-bottom: 2px solid var(--rv-border);
}
.rv-compare tbody th {
  font-weight: 500;
  color: var(--rv-text);
}
.rv-compare td {
  text-align: center;
  color: var(--rv-text-secondary);
}
.rv-compare td.yes { color: var(--rv-success); font-weight: 700; }
.rv-compare td.no { color: var(--rv-text-tertiary); }
.rv-compare__section-head th {
  font-size: var(--rv-text-xs) !important;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rv-text-tertiary) !important;
  background: var(--rv-bg) !important;
  font-weight: 700 !important;
  padding-top: var(--rv-space-6) !important;
}

/* ==========================================================================
   11. FAQ ACCORDION
   ========================================================================== */
.rv-faq { margin-top: var(--rv-space-7); max-width: 800px; }
.rv-faq__item {
  border-top: 1px solid var(--rv-border);
}
.rv-faq__item:last-child { border-bottom: 1px solid var(--rv-border); }
.rv-faq__item details { padding: var(--rv-space-5) 0; }
.rv-faq__item summary {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: var(--rv-text-lg);
  line-height: var(--rv-lh-lg);
  font-weight: 600;
  color: var(--rv-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--rv-space-4);
}
.rv-faq__item summary::-webkit-details-marker { display: none; }
.rv-faq__item summary::after {
  content: '+';
  font-size: var(--rv-text-2xl);
  color: var(--rv-accent);
  font-weight: 300;
  transition: transform var(--rv-t-base);
}
.rv-faq__item details[open] summary::after {
  transform: rotate(45deg);
}
.rv-faq__item p {
  margin: var(--rv-space-4) 0 0;
  color: var(--rv-text-secondary);
  font-size: var(--rv-text-base);
  line-height: var(--rv-lh-base);
}

/* ==========================================================================
   12. CTA BANNER (final cross-section)
   ========================================================================== */
.rv-cta-banner {
  padding: var(--rv-space-11) var(--rv-space-7);
  background: var(--rv-primary);
  border-radius: var(--rv-radius-2xl);
  text-align: center;
  margin: var(--rv-space-10) auto 0;
  max-width: 960px;
}
.rv-cta-banner h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  color: #FFFFFF;
  margin: 0 0 var(--rv-space-4);
  font-weight: 600;
}
.rv-cta-banner p {
  font-size: var(--rv-text-lg);
  line-height: var(--rv-lh-lg);
  color: #C5D3D3;
  max-width: 560px;
  margin: 0 auto var(--rv-space-7);
}
.rv-cta-banner__actions {
  display: flex;
  gap: var(--rv-space-4);
  justify-content: center;
  flex-wrap: wrap;
}
