/*
Theme Name: Landmark Advisors
Theme URI: https://landmarkadvisors.co.uk
Author: Landmark Advisors Limited
Author URI: https://landmarkadvisors.co.uk
Description: A bespoke WordPress theme for Landmark Advisors Limited, an ecommerce consultancy building content-to-consumer infrastructure for the creator economy. Includes a one-page front-page layout, editable contact details via the Customizer, and full blog and page templates.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: landmark-advisors
Tags: business, consultancy, one-column, custom-menu, custom-logo, editor-style, translation-ready
*/

/* ============================================================
   1. TOKENS
   ============================================================ */
:root {
  /* Palette — deep aubergine base, coral signal, gold rail */
  --ink:        #241733;
  --ink-2:      #34204A;
  --ink-3:      #4B3164;
  --paper:      #FBFAF9;
  --stone:      #EFE9E6;
  --stone-2:    #E2D9D4;
  --coral:      #F0567A;
  --coral-dim:  #C8455F;
  --gold:       #E5B45C;
  --muted:      #6E6076;
  --muted-dark: #B9A9C4;

  /* Type */
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono:    "DM Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Scale */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1:  clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --step-3:  clamp(1.95rem, 1.65rem + 1.5vw, 3rem);
  --step-4:  clamp(2.5rem, 1.9rem + 3vw, 4.75rem);
  --step-5:  clamp(3rem, 2rem + 5vw, 6.5rem);

  /* Space */
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --section-y: clamp(4.5rem, 9vw, 9rem);
  --maxw: 1180px;
  --measure: 62ch;

  --rail-w: 2px;
  --radius: 2px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.62;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 60;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.2em; }

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
  white-space: nowrap;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 999;
  background: var(--ink); color: var(--paper);
  padding: 0.7rem 1.1rem; font-family: var(--mono); font-size: var(--step--1);
}
.skip-link:focus { top: 1rem; }

/* ============================================================
   3. LAYOUT PRIMITIVES
   ============================================================ */
.lm-wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.lm-section { padding-block: var(--section-y); position: relative; }
.lm-section--tight { padding-block: clamp(3rem, 6vw, 5.5rem); }

.lm-section--dark { background: var(--ink); color: var(--paper); }
.lm-section--dark h2, .lm-section--dark h3 { color: var(--paper); }
.lm-section--stone { background: var(--stone); }

/* Eyebrow — mono, letterspaced, with a short gold tick */
.lm-eyebrow {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.4rem;
}
.lm-eyebrow::before {
  content: "";
  width: 26px; height: var(--rail-w);
  background: var(--gold);
  flex: none;
}
.lm-section--dark .lm-eyebrow { color: var(--muted-dark); }

.lm-lede {
  font-size: var(--step-1);
  line-height: 1.5;
  max-width: var(--measure);
  color: var(--muted);
}
.lm-section--dark .lm-lede { color: var(--muted-dark); }

.lm-prose { max-width: var(--measure); }

/* ============================================================
   4. BUTTONS
   ============================================================ */
.lm-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  border: var(--rail-w) solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.lm-btn:hover { background: var(--coral); border-color: var(--coral); color: var(--ink); transform: translateY(-2px); }

.lm-btn--ghost { background: transparent; color: var(--ink); }
.lm-btn--ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); transform: translateY(-2px); }

.lm-section--dark .lm-btn { background: var(--coral); border-color: var(--coral); color: var(--ink); }
.lm-section--dark .lm-btn:hover { background: var(--paper); border-color: var(--paper); }
.lm-section--dark .lm-btn--ghost { background: transparent; color: var(--paper); border-color: var(--muted-dark); }
.lm-section--dark .lm-btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* Hero sits on the dark ink field — buttons need the dark-section treatment */
.lm-hero .lm-btn {
  background: var(--coral);
  border-color: var(--coral);
  color: var(--ink);
}
.lm-hero .lm-btn:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.lm-hero .lm-btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.38);
}
.lm-hero .lm-btn--ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ============================================================
   5. HEADER
   ============================================================ */
.lm-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 250, 249, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--stone-2);
}
.lm-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 74px;
}
.lm-brand {
  display: flex; align-items: baseline; gap: 0.55rem;
  text-decoration: none; font-family: var(--display);
  font-size: var(--step-1); font-weight: 600; letter-spacing: -0.02em;
}
.lm-brand__mark { color: var(--coral); font-family: var(--mono); font-size: 0.7em; }
.lm-brand__sub {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); align-self: center;
}

.lm-nav ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.lm-nav a {
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; padding-block: 0.4rem;
  border-bottom: var(--rail-w) solid transparent;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.lm-nav a:hover, .lm-nav .current-menu-item > a { border-bottom-color: var(--coral); }

.lm-header__cta { flex: none; }

.lm-burger {
  display: none; background: none; border: 0; padding: 0.5rem;
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; color: inherit;
}

@media (max-width: 900px) {
  .lm-burger { display: block; }
  .lm-header__cta { display: none; }
  .lm-nav {
    position: absolute; inset: 74px 0 auto 0;
    background: var(--paper); border-bottom: 1px solid var(--stone-2);
    display: none; padding: 1rem var(--gutter) 1.75rem;
  }
  .lm-nav.is-open { display: block; }
  .lm-nav ul { flex-direction: column; gap: 0; }
  .lm-nav li { border-bottom: 1px solid var(--stone); }
  .lm-nav a { display: block; padding: 0.95rem 0; border-bottom: 0; }
}

/* ============================================================
   6. HERO — the signature "conversion rail"
   ============================================================ */
.lm-hero {
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(4rem, 10vw, 8.5rem) clamp(3rem, 6vw, 5rem);
  position: relative;
  overflow: hidden;
}
.lm-hero::after {
  content: "";
  position: absolute; inset: auto -10% -55% auto;
  width: 60vw; height: 60vw; max-width: 720px; max-height: 720px;
  background: radial-gradient(circle at 50% 50%, rgba(240,86,122,0.22), transparent 62%);
  pointer-events: none;
}
.lm-hero__inner { position: relative; z-index: 1; }

.lm-hero__title {
  font-size: var(--step-5);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 144;
  font-weight: 400;
  margin: 0 0 1.1rem;
  max-width: 16ch;
}
.lm-hero__title em {
  font-style: italic;
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144;
  color: var(--coral);
}
.lm-hero__lede {
  font-size: var(--step-1);
  color: var(--muted-dark);
  max-width: 46ch;
  margin: 0 0 2.5rem;
}
.lm-hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* The rail: audience → content → checkout */
.lm-rail {
  margin-top: clamp(3.5rem, 8vw, 6rem);
  border-top: 1px solid rgba(229,180,92,0.28);
  padding-top: 2.25rem;
}
.lm-rail__track {
  position: relative;
  height: var(--rail-w);
  background: rgba(229,180,92,0.28);
  margin-bottom: 1.5rem;
}
.lm-rail__token {
  position: absolute; top: 50%; left: 0;
  width: 9px; height: 9px; margin-top: -4.5px; margin-left: -4.5px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(229,180,92,0.16);
  animation: lm-travel 7s cubic-bezier(0.66, 0, 0.34, 1) infinite;
}
@keyframes lm-travel {
  0%   { left: 0%;   opacity: 0; }
  6%   { opacity: 1; }
  46%  { left: 50%; }
  92%  { left: 100%; opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

.lm-rail__stops {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.lm-rail__stop { position: relative; }
.lm-rail__stop::before {
  content: "";
  position: absolute; top: calc(-2.25rem - 4px); left: 0;
  width: 7px; height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
}
.lm-rail__stop:nth-child(2)::before { left: 50%; }
.lm-rail__stop:nth-child(3)::before { left: auto; right: 0; }
.lm-rail__stop:nth-child(2) { text-align: center; }
.lm-rail__stop:nth-child(3) { text-align: right; }

.lm-rail__label {
  display: block;
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.3rem;
}
.lm-rail__note { font-size: var(--step--1); color: var(--muted-dark); margin: 0; }

@media (max-width: 720px) {
  .lm-rail__stops { grid-template-columns: 1fr; gap: 1.1rem; }
  .lm-rail__stop, .lm-rail__stop:nth-child(2), .lm-rail__stop:nth-child(3) { text-align: left; }
  .lm-rail__stop::before, .lm-rail__stop:nth-child(2)::before, .lm-rail__stop:nth-child(3)::before { display: none; }
  .lm-rail__stop { border-left: var(--rail-w) solid rgba(229,180,92,0.4); padding-left: 1rem; }
}

/* ============================================================
   7. THESIS
   ============================================================ */
.lm-thesis__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.lm-thesis__statement {
  font-family: var(--display);
  font-size: var(--step-3);
  font-variation-settings: "SOFT" 0, "WONK" 1, "opsz" 90;
  line-height: 1.14;
  margin: 0;
}
.lm-thesis__statement span { color: var(--coral); font-style: italic; }

@media (max-width: 860px) {
  .lm-thesis__grid { grid-template-columns: 1fr; }
}

/* ============================================================
   8. PILLARS
   ============================================================ */
.lm-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0;
  margin-top: 3rem;
  border-top: 1px solid var(--stone-2);
}
.lm-pillar {
  padding: 2.25rem clamp(1.25rem, 2.5vw, 2rem) 2.5rem;
  border-bottom: 1px solid var(--stone-2);
  border-right: 1px solid var(--stone-2);
  transition: background 0.2s ease;
}
.lm-pillar:last-child { border-right: 0; }
.lm-pillar:hover { background: var(--stone); }
.lm-pillar h3 { font-size: var(--step-2); margin-bottom: 0.6rem; }
.lm-pillar p { color: var(--muted); margin: 0; font-size: var(--step-0); }
.lm-pillar__tag {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--coral); display: block; margin-bottom: 1.1rem;
}

@media (max-width: 860px) {
  .lm-pillar { border-right: 0; }
}

/* ============================================================
   9. PHASES — vertical rail, genuine sequence
   ============================================================ */
.lm-phases { margin-top: 3.25rem; position: relative; }
.lm-phases::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--rail-w);
  background: linear-gradient(to bottom, var(--gold), rgba(229,180,92,0.15));
}
.lm-phase {
  position: relative;
  padding: 0 0 2.75rem 2.5rem;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.lm-phase.is-visible { opacity: 1; transform: none; }
.lm-phase:last-child { padding-bottom: 0; }
.lm-phase::before {
  content: "";
  position: absolute; left: calc(var(--rail-w) / -2 - 4px); top: 0.55rem;
  width: 10px; height: 10px;
  background: var(--ink);
  border: var(--rail-w) solid var(--gold);
  border-radius: 50%;
}
.lm-section--dark .lm-phase::before { background: var(--ink); }
.lm-phase__num {
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: 0.16em; color: var(--gold); display: block; margin-bottom: 0.5rem;
}
.lm-phase h3 { font-size: var(--step-2); margin-bottom: 0.45rem; }
.lm-phase p { color: var(--muted-dark); max-width: var(--measure); margin: 0; }

@media (max-width: 600px) {
  .lm-phase { padding-left: 1.75rem; }
}

/* ============================================================
   10. FIGURES
   ============================================================ */
.lm-figures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: clamp(1.25rem, 3vw, 2.25rem);
  margin-top: 2.5rem;
}
.lm-figure { border-top: var(--rail-w) solid var(--coral); padding-top: 1.1rem; }
.lm-figure__value {
  font-family: var(--display);
  font-size: var(--step-3);
  font-variation-settings: "SOFT" 0, "WONK" 0, "opsz" 90;
  line-height: 1;
  display: block;
  margin-bottom: 0.4rem;
}
.lm-figure__label { font-size: var(--step--1); color: var(--muted); margin: 0; }
.lm-section--dark .lm-figure__label { color: var(--muted-dark); }

/* ============================================================
   11. MARKETS / CLIENTS
   ============================================================ */
.lm-split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
@media (max-width: 860px) { .lm-split { grid-template-columns: 1fr; } }

.lm-list { list-style: none; margin: 1.75rem 0 0; padding: 0; }
.lm-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--stone-2);
  display: flex; gap: 1.25rem; align-items: baseline;
}
.lm-list li:first-child { border-top: 1px solid var(--stone-2); }
.lm-list__key {
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--coral); flex: none; min-width: 8.5rem;
}
.lm-list__val { margin: 0; }

.lm-section--dark .lm-list li { border-color: rgba(255,255,255,0.13); }

/* ============================================================
   12. CONTACT
   ============================================================ */
.lm-contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
@media (max-width: 860px) { .lm-contact__grid { grid-template-columns: 1fr; } }

.lm-detail { margin-bottom: 1.6rem; }
.lm-detail__key {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted-dark); display: block; margin-bottom: 0.35rem;
}
.lm-detail__val { margin: 0; font-size: var(--step-0); }
.lm-detail__val a { text-decoration-color: var(--coral); }

/* ============================================================
   13. FOOTER
   ============================================================ */
.lm-footer {
  background: var(--ink);
  color: var(--muted-dark);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  font-size: var(--step--1);
  border-top: var(--rail-w) solid var(--gold);
}
.lm-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 2.25rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.lm-footer h4 {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); font-weight: 500; margin-bottom: 0.9rem;
}
.lm-footer a { color: var(--paper); }
.lm-footer ul { list-style: none; margin: 0; padding: 0; }
.lm-footer li { margin-bottom: 0.5rem; }
.lm-footer__legal {
  padding-top: 1.75rem;
  display: flex; flex-wrap: wrap; gap: 0.6rem 2rem; justify-content: space-between;
}
.lm-footer__legal p { margin: 0; }

/* ============================================================
   14. BLOG / PAGE TEMPLATES
   ============================================================ */
.lm-page-head {
  background: var(--ink); color: var(--paper);
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 4rem);
}
.lm-page-head h1 { font-size: var(--step-4); margin: 0; max-width: 20ch; }
.lm-page-head .lm-eyebrow { color: var(--muted-dark); }

.lm-entry { padding-block: var(--section-y); }
.lm-entry__content { max-width: var(--measure); }
.lm-entry__content h2 { font-size: var(--step-2); margin-top: 2rem; }
.lm-entry__content h3 { font-size: var(--step-1); margin-top: 1.75rem; }
.lm-entry__content img { margin-block: 1.75rem; }
.lm-entry__content blockquote {
  margin: 1.75rem 0; padding-left: 1.5rem;
  border-left: var(--rail-w) solid var(--coral);
  font-family: var(--display); font-size: var(--step-1); font-style: italic;
}
.lm-entry__meta {
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 2rem;
}

.lm-posts { display: grid; gap: 0; border-top: 1px solid var(--stone-2); }
.lm-post-card {
  padding: 2rem 0;
  border-bottom: 1px solid var(--stone-2);
  display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 2rem;
}
.lm-post-card h2 { font-size: var(--step-2); margin: 0 0 0.5rem; }
.lm-post-card h2 a { text-decoration: none; }
.lm-post-card h2 a:hover { color: var(--coral); }
.lm-post-card__date {
  font-family: var(--mono); font-size: var(--step--1);
  letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase;
}
.lm-post-card p { color: var(--muted); margin: 0; }
@media (max-width: 700px) {
  .lm-post-card { grid-template-columns: 1fr; gap: 0.6rem; }
}

.lm-pagination { margin-top: 2.5rem; font-family: var(--mono); font-size: var(--step--1); }
.lm-pagination .page-numbers {
  display: inline-block; padding: 0.5rem 0.85rem;
  border: 1px solid var(--stone-2); margin-right: 0.4rem; text-decoration: none;
}
.lm-pagination .page-numbers.current,
.lm-pagination .page-numbers:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* WordPress core alignment classes */
.alignleft  { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.aligncenter { margin-inline: auto; }
.alignwide, .alignfull { max-width: none; }
.wp-caption-text, figcaption {
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-top: 0.5rem;
}
.sticky, .gallery-caption, .bypostauthor { display: block; }

/* ============================================================
   15. MOTION PREFERENCES
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .lm-phase { opacity: 1; transform: none; }
  .lm-rail__token { left: 50%; animation: none; }
}
