/*
Theme Name: Wolstan Investments & Pensions
Theme URI: https://www.wolstan.com/
Author: Wolstan
Description: Bespoke, accessible theme for Wolstan Investments & Pensions Limited.
Version: 2.3.1
Requires at least: 6.2
Requires PHP: 8.0
Text Domain: wolstan
*/

:root {
  --green: #0d3b32;
  --navy: #10243b;
  --gold: #c6a15b;
  --cream: #f7f2e7;
  --ink: #17232a;
  --white: #ffffff;
  
  --max-w: 1340px;
  
  /* Refined typographic stack for a premium firm */
  --font-heading: "Hoefler Text", "Baskerville", "Didot", "Bodoni MT", "Georgia", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --shadow-sm: 0 4px 12px rgba(16,36,59,0.04);
  --shadow-md: 0 8px 24px rgba(16,36,59,0.08);
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.15;
  margin-top: 0;
  color: var(--navy);
}
h1 { font-size: clamp(36px, 4vw, 56px); margin-bottom: 0.4em; }
h2 { font-size: clamp(28px, 3.5vw, 42px); margin-bottom: 0.5em; }
h3 { font-size: clamp(22px, 2.5vw, 28px); margin-bottom: 0.5em; }
h4 { font-size: 18px; font-weight: 600; font-family: var(--font-body); }
p { margin-top: 0; margin-bottom: 1.5em; }

a { color: var(--gold); transition: color var(--transition); text-decoration: none; }
a:hover { color: var(--green); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
img { max-width: 100%; height: auto; display: block; }
.container { width: min(var(--max-w), calc(100% - 48px)); margin: 0 auto; }

/* Skip Link */
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 9999; background: var(--white); padding: 12px; color: var(--navy); }

/* Buttons */
.button, .wp-block-button__link, button[type=submit], .next-step, .prev-step, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--navy);
  background: var(--navy);
  color: var(--white);
  padding: 14px 32px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  text-decoration: none;
  font-family: var(--font-body);
  transition: all var(--transition);
  font-size: 15px;
  letter-spacing: 0.02em;
}
.button:hover, .btn:hover, button[type=submit]:hover, .next-step:hover, .prev-step:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}
.button.alt, .btn.alt, .prev-step {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.button.alt:hover, .btn.alt:hover, .prev-step:hover {
  background: var(--navy);
  color: var(--white);
}

/* Header */
.site-header {
  background: var(--white);
  color: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(16,36,59,0.08);
}
.header-inner {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand-panel {
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
}
.brand-panel img { 
  height: 46px; 
  width: auto; 
}
.primary-nav ul {
  display: flex;
  gap: 32px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--navy);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.primary-nav a:hover { color: var(--gold); }
.menu-toggle { display: none; background: transparent; border: none; color: var(--navy); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; padding: 8px 0; }

/* Hero Section */
.hero-text {
  padding: 100px 0 60px;
  background: var(--white);
  text-align: center;
}
.hero-text h1 { max-width: 900px; margin: 0 auto 24px; }
.hero-text p { font-size: 20px; max-width: 700px; margin: 0 auto 40px; color: var(--ink); }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-image-wrapper {
  background: var(--white);
  padding: 0 24px 80px;
}
.hero-image-wrapper img {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: auto;
  display: block;
}

/* Page Hero */
.page-hero {
  background: var(--white);
  padding: 80px 0 40px;
  text-align: center;
}
.page-hero h1 { margin: 0 auto 16px; max-width: 900px; }
.page-hero p { font-size: 19px; max-width: 700px; margin: 0 auto; color: var(--ink); }

.page-feature {
  background: var(--white);
  padding: 0 24px 60px;
  margin: 0;
}
.page-feature img {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: auto;
  display: block;
}

/* Trust Bar */
.trust-bar {
  background: var(--navy);
  color: var(--white);
  padding: 32px 0;
}
.trust-bar .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* Sections */
.section { padding: 80px 0; background: var(--white); }
.section.cream { background: var(--cream); }
.section.navy { background: var(--navy); color: var(--white); }
.section.navy h2, .section.navy h3, .section.navy h4 { color: var(--white); }

/* Layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 64px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }

/* Cards */
.service-card {
  background: var(--white);
  padding: 40px;
  border: 1px solid rgba(16,36,59,0.06);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.section.cream .service-card { background: var(--white); }
.section:not(.cream) .service-card { background: var(--cream); border-color: transparent; }

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.service-card h3 { color: var(--navy); font-size: 24px; margin-bottom: 16px; }
.service-card p { font-size: 16px; color: var(--ink); margin-bottom: 24px; flex-grow: 1; }
.link-arrow {
  color: var(--gold);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: auto;
}
.link-arrow:hover { gap: 12px; color: var(--navy); }

/* Insight Cards */
.insight-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid rgba(16,36,59,0.06);
  transition: box-shadow var(--transition), transform var(--transition);
  height: 100%;
}
.insight-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.insight-media {
  width: 100%;
  margin: 0;
  overflow: hidden;
}
.insight-media img {
  width: 100%;
  height: auto;
  display: block;
}
.insight-content {
  padding: 32px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.insight-meta {
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 12px;
}
.insight-title {
  font-size: 22px;
  margin-bottom: 16px;
}
.insight-title a { color: var(--navy); }
.insight-title a:hover { color: var(--green); }
.insight-excerpt {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 24px;
  flex-grow: 1;
}

/* Prose & Typography Utilities */
.prose { max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.7; }
.prose h2 { margin-top: 2em; margin-bottom: 0.8em; }
.prose h3 { margin-top: 1.5em; margin-bottom: 0.8em; }
.prose ul, .prose ol { margin-bottom: 1.5em; padding-left: 24px; }
.prose li { margin-bottom: 12px; }

.eyebrow {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 16px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-40 { margin-bottom: 40px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-40 { margin-top: 40px; }
.mt-64 { margin-top: 64px; }

.list-check { list-style: none; padding: 0; }
.list-check li { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.list-check li::before { content: "•"; color: var(--gold); font-weight: bold; }

.info-box { background: var(--cream); padding: 48px; }
.process-box { background: var(--cream); color: var(--ink); padding: 56px; }
.process-step { margin-bottom: 24px; }
.process-step:last-child { margin-bottom: 0; }
.process-step h4 { color: var(--navy); font-size: 16px; margin-bottom: 8px; font-family: var(--font-body); font-weight: 700; }
.process-step p { font-size: 15px; margin-bottom: 0; }
.section.navy .process-box h3,
.section.navy .process-box h4 { color: var(--navy); }
.section.navy .process-box p { color: var(--ink); }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin: 24px 0 8px; color: var(--navy); }
input:not([type=checkbox]):not([type=radio]), select, textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(16,36,59,0.2);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
  border-radius: 0;
  transition: border-color var(--transition);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
}
textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.hp { position: absolute !important; left: -9999px !important; }

/* Multi-step */
.form-step { display: none; border: 0; padding: 0; margin: 0; }
.form-step.active { display: block; animation: fadeIn 0.4s ease; }
.form-step h2 { margin: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.steps { display: flex; gap: 4px; padding: 0; list-style: none; margin-bottom: 40px; }
.steps li {
  flex: 1 1 0;
  min-width: 0;
  padding-top: 10px;
  border-top: 4px solid rgba(16,36,59,0.1);
  font-size: 13px;
  line-height: 1.25;
  transition: border-color 0.3s;
}
.steps li.active { border-color: var(--navy); }
.form-actions { display: flex; gap: 16px; margin-top: 32px; }
.document-intro { margin-bottom: 32px; }
.document-group {
  background: var(--white);
  border: 1px solid rgba(16,36,59,0.14);
  padding: 32px;
  margin-top: 24px;
  min-width: 0;
}
.document-group input,
.document-group label { min-width: 0; max-width: 100%; }
.document-group h3 { color: var(--navy); margin-bottom: 24px; }
.identity-type { border: 0; padding: 0; margin: 0 0 24px; }
.identity-type legend { color: var(--navy); font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.identity-type-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.identity-type-options label { margin: 0; cursor: pointer; }
.identity-type-options input { position: absolute; opacity: 0; pointer-events: none; }
.identity-type-options span {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border: 1px solid rgba(16,36,59,0.24);
  background: var(--white);
  color: var(--navy);
  text-align: center;
  font-size: 14px;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.identity-type-options input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.identity-type-options input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 3px; }
.identity-upload[hidden],
.document-group[hidden] { display: none; }
.file-validation-message {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: #fff1f0;
  border-left: 3px solid #a32920;
  color: #7d2019;
  font-size: 14px;
  font-weight: 600;
}
.confirmation-statement {
  margin: 12px 0 0;
  color: rgba(16,36,59,0.78);
  font-size: 14px;
}
.submission-confirmation {
  margin-top: 32px;
  padding: 22px 24px;
  background: var(--white);
  border: 1px solid rgba(16,36,59,0.14);
}
.submission-confirmation p { color: var(--navy); font-weight: 600; }
.submission-confirmation ul { margin: 12px 0 0 20px; }
.submission-confirmation li + li { margin-top: 8px; }
.document-security-note {
  margin: 24px 0 0;
  padding: 20px;
  background: rgba(198,161,91,0.12);
  border-left: 3px solid var(--gold);
  font-size: 14px;
}

.form-status { padding: 24px; background: #eef7e9; border-left: 3px solid var(--green); margin-bottom: 32px; }
.form-status strong { color: var(--green); display: block; margin-bottom: 8px; font-size: 18px; }
.form-status p { margin: 0; font-size: 15px; color: var(--ink); }
.form-status.error { border-left-color: #d32f2f; background: #fdf2f2; }
.form-status.error strong { color: #d32f2f; }
.form-status.invalid { border-left-color: #f57c00; background: #fff8f0; }
.form-status.invalid strong { color: #f57c00; }


/* FAQs */
details {
  border-bottom: 1px solid rgba(16,36,59,0.1);
  padding: 24px 0;
}
summary {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--green);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+';
  color: var(--gold);
  font-size: 24px;
}
details[open] summary::after { content: '-'; }
details p { margin-top: 16px; margin-bottom: 0; }

/* Footer */
.site-footer {
  background: var(--cream);
  color: var(--ink);
  padding: 80px 0 40px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 64px; }
.footer-brand { margin-bottom: 24px; display: inline-block; }
.footer-brand img { height: 44px; width: auto; }
.footer-mission { font-family: var(--font-heading); font-size: 22px; color: var(--navy); margin-bottom: 24px; }
.footer-address { font-style: normal; margin-bottom: 24px; line-height: 1.7; }
.site-footer h2 {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  margin-bottom: 24px;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 16px; }
.site-footer a { color: var(--ink); font-size: 15px; }
.site-footer a:hover { color: var(--gold); }
.smallprint {
  border-top: 1px solid rgba(16,36,59,0.1);
  margin-top: 64px;
  padding-top: 32px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: rgba(23,35,42,0.7);
}

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  max-width: 420px;
  background: var(--white);
  padding: 32px;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  border-top: 4px solid var(--navy);
  color: var(--ink);
}
.cookie-title { display: block; color: var(--navy); font-family: var(--font-heading); font-size: 22px; margin-bottom: 12px; }
.cookie-text { font-size: 14px; margin-bottom: 24px; line-height: 1.6; }
.cookie-actions { display: flex; flex-direction: column; gap: 12px; }
.cookie-actions button { width: 100%; }
.cookie-options-btn { background: none; border: none; color: var(--ink); text-decoration: underline; cursor: pointer; padding: 8px 0; font-size: 14px; }
.cookie-settings { margin-top: 24px; padding-top: 24px; border-top: 1px solid rgba(16,36,59,0.1); }
.cookie-settings label { margin: 0 0 16px; display: flex; gap: 12px; align-items: center; font-weight: normal; }

/* Responsive */
@media(max-width: 1180px) {
  .menu-toggle { display: block; position: relative; z-index: 101; }
  .primary-nav {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 90px);
    background: var(--white);
    padding: 40px 24px;
    border-top: 1px solid rgba(16,36,59,0.08);
    transform: translateX(100vw);
    opacity: 1;
    visibility: hidden;
    pointer-events: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 99;
    transition: transform var(--transition);
  }
  .primary-nav.open { transform: translateX(0); visibility: visible; pointer-events: auto; }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 24px; }
  .primary-nav a { font-size: 18px; }
  .header-cta { display: none; }
  
  .grid-3 { grid-template-columns: 1fr; gap: 32px; }
  .grid-2 { grid-template-columns: 1fr; gap: 48px; }
  
  .trust-bar .container { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media(max-width: 600px) {
  .header-inner { min-height: 72px; }
  .primary-nav { top: 72px; height: calc(100vh - 72px); }
  .brand-panel img { height: 38px; }
  
  .hero-text { padding: 60px 0 40px; }
  .page-hero { padding: 60px 0 32px; }
  
  .trust-bar .container { grid-template-columns: 1fr; gap: 16px; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .section { padding: 56px 0; }
  .info-box { padding: 28px 20px; }
  .document-group { padding: 24px 16px; }
  .identity-type-options { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions button { width: 100%; }
  .steps li { font-size: 11px; overflow-wrap: anywhere; }
}

@media(prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}