/* Denewood Financial Planning - site styles
   Brand: Forest #1F4536, Cream #F1F3EE, Gold #C8A86A (on forest), Antique gold #A88A52 (on cream).
   Cormorant Garamond SemiBold for names and headings; Jost Regular for body copy and contact details.
   Layout: the forest panel from the business card holds the name and contents; the page reads like the letterhead. */

:root {
  --forest: #1F4536;
  --cream: #F1F3EE;
  --gold: #C8A86A;
  --antique: #A88A52;
  --sage: #E3E8E0;
  --paper: #FAFBF8;
  --muted: #4D6056;
  --line: #CDD5C9;
  --on-forest: #F1F3EE;
  --on-forest-muted: #B9C7BD;
  --serif: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans: "Jost", "Futura", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --side: 300px;
  --measure: 36rem;
  --wide: 54rem;
  --pad: clamp(20px, 6vw, 96px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--cream);
  color: var(--forest);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--forest); margin: 0; text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-color: var(--antique); }
:focus-visible { outline: 2px solid var(--antique); outline-offset: 3px; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--paper); padding: 8px 14px; z-index: 50; }
.skip:focus { top: 12px; }

/* ---------- Name panel ---------- */
.side {
  background: var(--forest);
  color: var(--on-forest);
}
.lockup { display: inline-grid; justify-items: stretch; text-decoration: none; color: var(--on-forest); }
.lockup b {
  font-family: var(--serif); font-weight: 600; letter-spacing: 0.05em;
  font-size: 2.25rem; line-height: 1; text-align: center; padding-left: 0.05em;
}
.lockup small {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 9px;
  font-family: var(--sans); font-weight: 400; font-size: 0.52rem; letter-spacing: 0.38em; text-transform: uppercase;
  white-space: nowrap;
}
.lockup small::before, .lockup small::after { content: ""; height: 1px; flex: 1 1 auto; min-width: 12px; background: var(--gold); }
.lockup small::after { margin-left: -0.38em; }
.side .where { color: var(--on-forest-muted); font-size: 0.95rem; margin-top: 22px; }

.contents summary { cursor: pointer; list-style: none; font-size: 0.95rem; }
.contents summary::-webkit-details-marker { display: none; }
.contents ol { list-style: none; padding: 0; display: grid; gap: 2px; }
.contents a {
  display: grid; grid-template-columns: 18px 1fr; align-items: center;
  color: var(--on-forest); text-decoration: none; padding: 5px 0; font-size: 1rem;
}
.contents a::before {
  content: ""; width: 8px; height: 8px; border-radius: 50% 0; background: var(--gold);
  transform: rotate(-20deg) scale(0); transition: transform 160ms ease;
}
.contents a:hover { color: #fff; }
.contents a[aria-current="true"]::before { transform: rotate(-20deg) scale(1); }

.reach { display: grid; gap: 4px; font-size: 0.95rem; }
.reach a { color: var(--on-forest); text-decoration: none; }
.reach a:hover { text-decoration: underline; text-decoration-color: var(--gold); }
.reach .tel { font-family: var(--serif); font-weight: 600; font-size: 1.45rem; letter-spacing: 0.02em; }

@media (min-width: 1040px) {
  .side {
    position: fixed; inset: 0 auto 0 0; width: var(--side);
    display: flex; flex-direction: column; gap: 40px;
    padding: 56px 40px 40px; overflow-y: auto;
  }
  .contents summary { display: none; }
  .reach { margin-top: auto; }
  .page { margin-left: var(--side); }
}
@media (max-width: 1039.98px) {
  .side { padding: 22px var(--pad) 18px; display: grid; gap: 14px; }
  .side .brandrow { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
  .lockup b { font-size: 1.7rem; }
  .side .where { margin-top: 0; }
  .contents { border-top: 1px solid rgba(200, 168, 106, 0.35); padding-top: 12px; }
  .contents summary { color: var(--on-forest); display: inline-flex; gap: 10px; align-items: center; }
  .contents summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg) translateY(-3px); transition: transform 160ms ease; }
  .contents[open] summary::after { transform: rotate(225deg) translateY(-2px); }
  .contents ol { padding: 8px 0 4px; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  .reach { display: none; }
  .side .tel-sm { color: var(--on-forest); text-decoration: none; font-family: var(--serif); font-weight: 600; font-size: 1.2rem; }
}
@media (min-width: 1040px) { .side .tel-sm { display: none; } }

/* ---------- Page ---------- */
.draft { background: var(--sage); color: var(--forest); font-size: 0.875rem; padding: 8px var(--pad); }
.tbc { background: #E9E0CB; padding: 0 4px; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }

main { padding: clamp(48px, 8vw, 112px) var(--pad) 0; }
main > section { max-width: var(--wide); }
main > section + section { margin-top: clamp(88px, 11vw, 152px); }
.text { max-width: var(--measure); display: grid; gap: 1.1em; }
.text p.soft { color: var(--muted); }

h2 { font-size: clamp(1.95rem, 3.4vw, 2.65rem); line-height: 1.1; max-width: 22em; margin-bottom: 0.7em; }
h3 { font-size: 1.5rem; line-height: 1.2; }

/* Opening */
.opening .kicker { font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.4em; }
.opening h1 {
  font-size: clamp(2.6rem, 5.4vw, 4.4rem);
  line-height: 1.02; letter-spacing: -0.005em;
  max-width: 13em; margin-bottom: 0.5em;
}
.opening .lede { font-weight: 300; font-size: clamp(1.15rem, 1.6vw, 1.3rem); line-height: 1.62; max-width: 34rem; }
.opening .then { margin-top: 1.1em; max-width: 34rem; }
.opening .lede, .opening .then, .text p { text-wrap: pretty; }
.ask { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 2em; }
.btn {
  display: inline-block; font: inherit; font-weight: 500; font-size: 1rem; letter-spacing: 0.02em;
  color: var(--cream); background: var(--forest); border: 1px solid var(--forest);
  padding: 13px 24px; border-radius: 2px; text-decoration: none; cursor: pointer;
}
.btn:hover { background: #183A2D; }
.ask .or { color: var(--muted); }
.ask .or a { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--forest); text-decoration: none; margin-left: 4px; }

/* The lifeline: a plan measured in decades, not products */
.lifeline { margin-top: clamp(56px, 8vw, 96px); container-type: inline-size; max-width: var(--wide); }
.lifeline ol { list-style: none; padding: 0; margin: 0; position: relative; }
.lifeline .ev span { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.22rem; line-height: 1.2; color: var(--forest); display: block; }
.lifeline .when { font-size: 0.85rem; color: var(--muted); }
.lifeline figcaption { margin-top: 18px; font-size: 0.875rem; color: var(--muted); max-width: var(--measure); }
.leaf { width: 12px; height: 12px; border-radius: 50% 0; background: var(--antique); transform: rotate(-20deg); }

/* Horizontal layout when there is room */
@container (min-width: 760px) {
  .lifeline ol { height: 250px; }
  .lifeline ol::before {
    content: ""; position: absolute; left: 0; right: 0; top: 200px; height: 2px; background: var(--forest);
    transform-origin: left center; animation: draw 1300ms cubic-bezier(.4,.1,.2,1) both;
  }
  .lifeline li { position: absolute; left: var(--at); }
  .lifeline .ev { top: 0; height: 207px; width: 9.5rem; display: flex; flex-direction: column; justify-content: flex-end; }
  .lifeline .ev.hi { height: 207px; }
  .lifeline .ev.hi span { margin-bottom: auto; }
  .lifeline .ev.lo span { margin-bottom: 0; }
  .lifeline .ev::after { content: ""; display: block; width: 1px; background: var(--antique); margin: 10px 0 0 5px; flex: 0 0 auto; }
  .lifeline .ev.hi::after { height: 124px; }
  .lifeline .ev.lo::after { height: 44px; }
  .lifeline .ev .leaf { position: absolute; bottom: 0; left: 0; }
  .lifeline .ev.end { transform: translateX(-100%); text-align: right; }
  .lifeline .ev.end::after { margin-left: auto; margin-right: 5px; }
  .lifeline .ev.end .leaf { left: auto; right: 0; }
  .lifeline .when { top: 214px; white-space: nowrap; }
  .lifeline .when.end { transform: translateX(-100%); }
  .lifeline .ev { animation: appear 500ms ease both; animation-delay: calc(500ms + var(--i) * 140ms); }
}
/* Stacked layout on narrow screens */
@container (max-width: 759.98px) {
  .lifeline ol { display: grid; gap: 16px; padding-left: 26px; }
  .lifeline ol::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--forest); }
  .lifeline li { position: relative; }
  .lifeline .ev .leaf { position: absolute; left: -26px; top: 6px; }
  .lifeline .when { margin-top: 6px; }
}
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lifeline ol::before, .lifeline .ev { animation: none !important; }
}

/* Why a plan */
.paths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 64px); max-width: 48rem; margin-bottom: clamp(40px, 6vw, 64px); }
.paths h3 { font-style: italic; font-weight: 500; font-size: 1.85rem; margin-bottom: 0.35em; }
.paths p { color: var(--muted); }
@media (max-width: 640px) { .paths { grid-template-columns: 1fr; } }

/* Services */
.services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 4vw, 40px) clamp(32px, 5vw, 64px); margin-top: clamp(24px, 4vw, 40px); }
.services div { display: grid; gap: 6px; align-content: start; }
.services dt { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; line-height: 1.2; }
.services dd { color: var(--muted); }
@media (max-width: 680px) { .services { grid-template-columns: 1fr; } }
.approach-note { margin-top: clamp(36px, 5vw, 56px); }
.scope { margin-top: 1.1em; max-width: var(--measure); color: var(--muted); }

/* Why now: run-in heads */
.runin { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 1.3rem; }

/* Returning to the UK */
.returning { background: var(--sage); padding: clamp(36px, 6vw, 72px) clamp(24px, 5vw, 64px); margin-left: calc(-1 * clamp(24px, 5vw, 64px)); max-width: calc(var(--wide) + 2 * clamp(24px, 5vw, 64px)); }
.returning .cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 56px); align-items: start; }
.leaves { list-style: none; padding: 0; display: grid; gap: 14px; }
.leaves li { display: grid; grid-template-columns: 22px 1fr; }
.leaves li::before { content: ""; width: 9px; height: 9px; margin-top: 0.62em; border-radius: 50% 0; background: var(--antique); transform: rotate(-20deg); }
@media (max-width: 760px) { .returning .cols { grid-template-columns: 1fr; } .returning { margin-left: calc(-1 * var(--pad)); margin-right: calc(-1 * var(--pad)); padding-inline: var(--pad); } }

/* How it works */
.steps { list-style: none; padding: 0; margin-top: clamp(28px, 4vw, 40px); display: grid; gap: 26px; max-width: 44rem; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 3.2rem minmax(0, 1fr); gap: 4px 16px; counter-increment: step; }
.steps li::before { content: counter(step); font-family: var(--serif); font-weight: 600; font-size: 2.1rem; line-height: 1; color: var(--forest); grid-row: span 2; border-top: 1px solid var(--antique); padding-top: 8px; }
.steps h3 { font-size: 1.4rem; padding-top: 4px; }
.steps p { color: var(--muted); }

.motto { margin-top: clamp(64px, 9vw, 112px); max-width: 40rem; display: grid; gap: 22px; }
.motto img { width: 120px; height: auto; }
.motto blockquote { margin: 0; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: clamp(1.75rem, 3.4vw, 2.5rem); line-height: 1.22; }
.motto .strong { font-weight: 500; }
.motto .small { font-size: 0.95rem; color: var(--muted); }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 64px); align-items: start; }
.details { display: grid; gap: 18px; margin-top: 28px; }
.details dt { font-size: 0.875rem; color: var(--muted); }
.details dd { font-size: 1.1rem; }
.details dd a { text-decoration: none; }
form.enquiry { display: grid; gap: 16px; background: var(--paper); border-top: 2px solid var(--antique); padding: clamp(20px, 4vw, 32px); }
.field { display: grid; gap: 6px; }
.field label { font-size: 0.9rem; font-weight: 500; }
.field input, .field textarea, .field select {
  font: inherit; font-size: 1rem; color: var(--forest); background: #fff;
  border: 1px solid var(--line); border-radius: 2px; padding: 11px 12px; width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-status { font-size: 0.95rem; }
.fine { font-size: 0.875rem; color: var(--muted); }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }

/* Footer, set like the letterhead */
.foot { margin-top: clamp(96px, 12vw, 160px); padding: 0 var(--pad) 48px; }
.foot .inner { max-width: var(--wide); border-top: 1px solid var(--antique); padding-top: 22px; display: grid; gap: 10px; font-size: 0.8rem; line-height: 1.6; color: var(--muted); }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 0.9rem; margin-bottom: 6px; }
.foot .links a { color: var(--forest); }
.foot strong { font-weight: 500; color: var(--forest); }

/* Technology page */
.tech h1 { font-size: clamp(2.6rem, 5.6vw, 4rem); line-height: 1.02; margin-bottom: 0.6em; }

/* Risk and regulatory warnings: in the body, at body size, set apart on paper */
.warn { background: var(--paper); border-left: 2px solid var(--forest); padding: 12px 16px; max-width: var(--measure); color: var(--forest); font-size: 1.0625rem; }
.opening .warn { margin-top: 1.8em; max-width: 34rem; }

/* Sub-heading inside a section */
.sub { margin: clamp(40px, 6vw, 64px) 0 0.6em; font-size: 1.7rem; }

/* Wide screens: use the full width. Section headings sit in a left column with the content beside them. */
@media (min-width: 1500px) {
  :root { --wide: 84rem; }
  .opening h1 { max-width: 20em; }
  .opening .lede, .opening .then, .opening .warn { max-width: 40rem; }
  main > section:not(.opening):not(.returning):not(#contact) {
    display: grid; grid-template-columns: minmax(0, 21rem) minmax(0, 1fr); column-gap: clamp(48px, 5vw, 96px); align-items: start;
  }
  main > section:not(.opening):not(.returning):not(#contact) > h2 { grid-column: 1; grid-row: 1 / span 12; margin-bottom: 0; }
  main > section:not(.opening):not(.returning):not(#contact) > :not(h2) { grid-column: 2; }
  main > section:not(.opening):not(.returning):not(#contact) > :nth-child(2) { margin-top: 0.5rem; }
  .steps, .motto { max-width: none; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(32px, 4vw, 64px); }
  .steps li { align-content: start; }
}
