/*
Theme Name: Andy Firth (Divi)
Template: Divi
Description: Editorial, khaki-toned child theme for Andy Firth Coaching.
Version: 0.7.0
Author: Andy Firth
*/

:root {
  --af-paper: #f5f2ea;      /* warm off-white page */
  --af-sand: #ebe5d5;       /* light khaki tint */
  --af-khaki: #c3b091;      /* khaki */
  --af-khaki-deep: #6e6343; /* readable khaki for small text */
  --af-olive: #2f2c22;      /* dark olive-ink */
  --af-ink: #24221c;
  --af-muted: #5f5a4c;
  --af-rule: rgba(36,34,28,.16);
  --af-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --af-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

/* ---- Base ---- */
body, #page-container, #main-content, .et_pb_section { background-color: var(--af-paper); }
body, body .et_pb_text, body p, body li, body a, body .et_pb_button { font-family: var(--af-sans) !important; }
body { color: var(--af-ink); -webkit-font-smoothing: antialiased; }
body .et_pb_text { color: var(--af-ink); font-size: 18px; line-height: 1.6; }
body h1, body h2, body h3 { font-family: var(--af-serif) !important; color: var(--af-ink); font-weight: 400 !important; letter-spacing: -.02em; line-height: 1.05 !important; padding-bottom: .35em; font-variation-settings: "opsz" 144; }
body h1 { font-size: clamp(48px, 7.5vw, 104px) !important; }
body h2 { font-size: clamp(34px, 4.6vw, 60px) !important; }
body h3 { font-size: 26px !important; line-height: 1.2 !important; letter-spacing: -.01em; }
body h1 em, body h2 em { font-style: italic; color: var(--af-khaki-deep); }

/* Hide Divi default header/footer (page carries its own for now) */
#main-header, #top-header, #main-footer { display: none !important; }
#page-container { padding-top: 0 !important; margin-top: 0 !important; }

/* ---- Sections ---- */
.et_pb_section.af-section { padding: clamp(72px, 11vw, 140px) 0 !important; background: var(--af-paper) !important; }
.et_pb_section.af-section .et_pb_row, .et_pb_section.af-header .et_pb_row, .et_pb_section.af-footer .et_pb_row { width: 88%; max-width: 1240px; padding: 0 !important; }
.et_pb_section.af-section--sand { background: var(--af-sand) !important; }
.et_pb_section.af-section--khaki { background: var(--af-khaki) !important; }
.et_pb_section.af-section--olive { background: var(--af-olive) !important; }
.af-section--olive .et_pb_text, .af-section--olive h2, .af-section--olive h3, .af-section--olive p { color: var(--af-paper) !important; }
.af-section--olive h2 em { color: var(--af-khaki) !important; }
.af-section--olive .af-eyebrow { color: var(--af-khaki) !important; }
.et_pb_section.af-hero { padding-top: clamp(56px, 8vw, 110px) !important; }

/* ---- Header ---- */
.et_pb_section.af-header { position: sticky; top: 0; z-index: 99; padding: 18px 0 !important; background: rgba(245,242,234,.88) !important; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--af-rule); }
.af-header .et_pb_text_inner > p { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0; }
.af-logo { font-family: var(--af-serif) !important; font-size: 24px; color: var(--af-ink) !important; letter-spacing: -.01em; }
.af-nav { display: flex; gap: 32px; align-items: center; font-size: 15px; }
.af-nav a { color: var(--af-ink) !important; }
.af-nav a:hover { color: var(--af-khaki-deep) !important; }
.af-nav a.af-nav-cta { border-bottom: 1px solid var(--af-ink); padding-bottom: 2px; font-weight: 500; }
@media (max-width: 680px) { .af-nav a:not(.af-nav-cta) { display: none; } }

/* ---- Type helpers ---- */
.af-eyebrow { font-family: var(--af-sans) !important; font-size: 13px !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--af-khaki-deep) !important; padding-bottom: 18px !important; }
.af-lead { font-size: clamp(19px, 1.8vw, 22px) !important; line-height: 1.55; color: var(--af-muted) !important; max-width: 560px; }
.af-small { font-size: 14px !important; color: var(--af-muted) !important; }
.af-statement p { font-family: var(--af-serif) !important; font-size: clamp(30px, 4.2vw, 54px) !important; line-height: 1.15; letter-spacing: -.02em; color: var(--af-olive) !important; max-width: 1000px; }
.af-link a, a.af-link { color: var(--af-ink) !important; border-bottom: 1px solid currentColor; padding-bottom: 2px; font-weight: 500; }
.af-section--olive .af-link a { color: var(--af-paper) !important; }

/* ---- Hero photo ---- */
.af-photo { aspect-ratio: 4/5; background: linear-gradient(170deg, #d8cfb8, #b9ab86); display: flex; align-items: flex-end; padding: 20px; color: var(--af-olive); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }

/* ---- Numbered rows ---- */
.af-rows { list-style: none !important; padding: 0 !important; margin: 0; border-top: 1px solid var(--af-rule); }
.af-rows li { display: grid; grid-template-columns: 90px 1fr 1.4fr; gap: 24px; padding: 36px 0; border-bottom: 1px solid var(--af-rule); align-items: baseline; }
.af-rows .af-num { font-family: var(--af-serif); font-size: 22px; color: var(--af-khaki-deep); }
.af-rows h3 { padding: 0 !important; }
.af-rows p { color: var(--af-muted); padding: 0; }
@media (max-width: 780px) { .af-rows li { grid-template-columns: 1fr; gap: 8px; padding: 28px 0; } }

/* ---- Ruled columns (what changes / steps / offers) ---- */
.et_pb_column.af-ruled { border-top: 1px solid var(--af-ink); padding-top: 28px !important; }
.af-ruled .af-num { font-family: var(--af-serif); font-size: 18px; color: var(--af-khaki-deep); padding-bottom: 12px; }
.af-ruled p { color: var(--af-muted); }
.et_pb_column.af-offer { background: var(--af-paper); padding: 36px 32px !important; border-top: 0; }
.et_pb_column.af-offer--featured { background: var(--af-olive) !important; }
.af-offer--featured h3, .af-offer--featured p, .af-offer--featured .af-price { color: var(--af-paper) !important; }
.af-offer--featured .af-eyebrow { color: var(--af-khaki) !important; }
.af-price { font-family: var(--af-serif) !important; font-size: 40px !important; line-height: 1; color: var(--af-ink) !important; padding: 8px 0 18px !important; }

/* ---- Quote ---- */
.af-quote p:first-child { font-family: var(--af-serif) !important; font-style: italic; font-size: clamp(28px, 3.6vw, 46px) !important; line-height: 1.25; max-width: 900px; }
.af-quote .af-cite { font-size: 14px !important; letter-spacing: .12em; text-transform: uppercase; color: var(--af-khaki) !important; padding-top: 24px; }

/* ---- Buttons ---- */
body .et_pb_button { background: var(--af-olive) !important; color: var(--af-paper) !important; border: 0 !important; border-radius: 2px !important; padding: 16px 28px !important; font-size: 16px !important; font-weight: 500 !important; letter-spacing: .01em; line-height: 1.2 !important; }
body .et_pb_button:hover { background: var(--af-ink) !important; padding: 16px 28px !important; }
body .et_pb_button:after { content: "→" !important; font-family: var(--af-sans) !important; opacity: 1 !important; margin-left: 10px !important; position: static !important; font-size: 16px !important; display: inline !important; }
.af-section--olive .et_pb_button { background: var(--af-khaki) !important; color: var(--af-olive) !important; }

/* ---- Footer ---- */
.et_pb_section.af-footer { padding: 48px 0 !important; background: var(--af-olive) !important; }
.af-footer .et_pb_text, .af-footer p, .af-footer a { font-size: 13px !important; color: #b9b19c !important; }
.af-footer .af-logo { font-size: 28px !important; color: var(--af-paper) !important; display: block; padding-bottom: 16px; }

@media (max-width: 980px) { .et_pb_column.af-ruled, .et_pb_column.af-offer { margin-bottom: 28px !important; } .af-photo { aspect-ratio: 4/3; } }

/* ---- Fixes after render ---- */
.af-statement p.af-eyebrow { font-family: var(--af-sans) !important; font-size: 13px !important; line-height: 1.4; letter-spacing: .14em; color: var(--af-olive) !important; opacity: .75; }
.af-rows li > * { margin: 0 !important; }
@media (max-width: 780px) { .af-rows li { gap: 6px; } }
.et_pb_section.af-footer { border-top: 1px solid rgba(245,242,234,.14); }

/* ---- Portrait ---- */
img.af-portrait { display: block; width: 100%; height: auto; aspect-ratio: 4/5; object-fit: cover; }

/* ---- Heading spacing fix: let Fraunces pick the right optical size, loosen tracking ---- */
body h1, body h2, body h3, .af-logo, .af-statement p, .af-quote p:first-child, .af-price, .af-num { font-variation-settings: normal !important; font-optical-sizing: auto; }
body h1 { letter-spacing: -.015em !important; line-height: 1.04 !important; }
body h2 { letter-spacing: -.005em !important; line-height: 1.12 !important; }
body h3 { letter-spacing: 0 !important; line-height: 1.25 !important; }
.af-statement p, .af-quote p:first-child { letter-spacing: -.005em !important; }

/* ---- Numbered rows: ignore stray <br> WordPress inserts, pin each item to its column ---- */
.af-rows li > br { display: none !important; }
.af-rows li { grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.3fr) !important; column-gap: 40px !important; }
.af-rows li > .af-num { grid-column: 1; }
.af-rows li > h3 { grid-column: 2; }
.af-rows li > p { grid-column: 3; max-width: 560px; }
@media (max-width: 780px) {
  .af-rows li { grid-template-columns: 1fr !important; }
  .af-rows li > .af-num, .af-rows li > h3, .af-rows li > p { grid-column: 1; }
}

/* ---- About / Coaching page helpers ---- */
.af-todo { background: #efe6c8; color: #6e6343; padding: 2px 6px; font-size: .9em; }
.af-list { list-style: none !important; padding: 0 !important; margin: 0; }
.af-list li { padding: 12px 0; border-bottom: 1px solid var(--af-rule); color: var(--af-muted); }
.af-list li:last-child { border-bottom: 0; }
.af-hero .et_pb_row .et_pb_column:only-child h1 { max-width: 16ch; }

/* ---- Apply page: steps ---- */
.af-steps { list-style: none !important; padding: 0 !important; margin: 40px 0 0; border-top: 1px solid var(--af-rule); }
.af-steps li { display: grid; grid-template-columns: 56px 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--af-rule); }
.af-steps li > br { display: none; }
.af-steps .af-num { font-family: var(--af-serif); font-size: 20px; color: var(--af-khaki-deep); }
.af-steps h3 { font-size: 22px !important; padding: 0 0 4px !important; }
.af-steps p { color: var(--af-muted); padding: 0; }

/* ---- Apply page: form ---- */
.et_pb_column.af-form-col { background: var(--af-sand); padding: 40px 36px !important; }
.af-form .et_pb_contact_field { width: 100% !important; margin: 0 0 18px !important; padding: 0 !important; }
.af-form label, .af-form .et_pb_contact_form_label { display: block !important; font-size: 14px; font-weight: 500; color: var(--af-ink); margin-bottom: 6px; }
.af-form input.input, .af-form textarea.input, .af-form select.input, .af-form .et_pb_contact_select {
  width: 100% !important; background: var(--af-paper) !important; border: 1px solid rgba(36,34,28,.22) !important; border-radius: 2px !important;
  padding: 14px 16px !important; font-family: var(--af-sans) !important; font-size: 16px !important; color: var(--af-ink) !important; }
.af-form textarea.input { min-height: 130px; }
.af-form input.input:focus, .af-form textarea.input:focus, .af-form select.input:focus { border-color: var(--af-olive) !important; outline: 2px solid rgba(110,99,67,.25); }
.af-form .et_contact_bottom_container { float: none !important; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.af-form .et_pb_contact_right { font-size: 15px; color: var(--af-muted); }
.af-form .et_pb_contact_captcha { width: 64px !important; display: inline-block; }
.af-form .et_pb_contact_submit { margin: 0 !important; }
.af-form .et-pb-contact-message { font-size: 16px; color: var(--af-olive); }
@media (max-width: 980px) { .et_pb_column.af-form-col { padding: 28px 22px !important; margin-top: 32px; } }
.af-form .et_contact_bottom_container { justify-content: flex-start !important; text-align: left !important; }
.af-form .et_pb_contact_right { float: none !important; text-align: left !important; display: block; width: auto !important; }
.af-form .et_pb_contact_right label { display: flex !important; align-items: center; gap: 10px; margin: 0; }
.af-form .et_pb_contact_captcha.input { width: 72px !important; padding: 10px 12px !important; }

/* ---- Testimonial supporting line ---- */
.af-quote .af-quote-more { font-size: 18px !important; line-height: 1.6; color: #cfc7b0 !important; max-width: 640px; padding-top: 20px; }

/* ---- Header: tighter, Apply as button ---- */
.af-nav a.af-nav-cta { border-bottom: 0 !important; padding: 9px 18px !important; background: var(--af-olive); color: var(--af-paper) !important; border-radius: 2px; font-weight: 500; line-height: 1; transition: background .2s; }
.af-nav a.af-nav-cta:hover { background: var(--af-ink); color: var(--af-paper) !important; }

/* ---- Footer v2 (khaki) ---- */
.et_pb_section.af-footer { background: var(--af-khaki) !important; padding: 72px 0 28px !important; border-top: 0 !important; }
.af-footer .et_pb_text, .af-footer p, .af-footer li, .af-footer a { color: var(--af-olive) !important; font-size: 15px !important; }
.af-footer .af-logo { font-size: 34px !important; color: var(--af-olive) !important; display: block; padding-bottom: 14px; }
.af-footer .af-foot-tag { max-width: 300px; line-height: 1.5; }
.af-footer .af-foot-head { font-size: 12px !important; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .7; padding-bottom: 14px; }
.af-footer .af-foot-links { list-style: none !important; padding: 0 !important; margin: 0; }
.af-footer .af-foot-links li { padding: 4px 0; }
.af-footer .af-foot-links a:hover, .af-footer .af-foot-bar a:hover { text-decoration: underline; }
.af-footer .af-foot-text { padding-bottom: 12px; }
.af-footer a.af-foot-cta { display: inline-block; background: var(--af-olive); color: var(--af-paper) !important; padding: 11px 20px; border-radius: 2px; font-weight: 500; }
.af-footer a.af-foot-cta:hover { background: var(--af-ink); text-decoration: none !important; }
.af-footer .et_pb_row + .et_pb_row { margin-top: 56px !important; }
.af-foot-bar { display: flex; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid rgba(47,44,34,.25); }
.af-foot-bar, .af-foot-bar span, .af-foot-bar a { font-size: 13px !important; }
.af-foot-bar a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 980px) { .af-footer .et_pb_column { margin-bottom: 32px !important; } .af-foot-bar { flex-direction: column; } }

/* ---- Programme saving tag ---- */
.af-offer .af-save { display: inline-block; font-size: 13px !important; font-weight: 600; letter-spacing: .04em; color: var(--af-olive) !important; background: var(--af-khaki); padding: 4px 10px !important; margin: -8px 0 14px; }

/* ---- Active page in navigation ---- */
.page-id-12 .af-nav a[href="/about/"],
.page-id-13 .af-nav a[href="/coaching/"] { opacity: 1; color: var(--af-ink) !important; font-weight: 600; box-shadow: inset 0 -2px 0 var(--af-khaki-deep); padding-bottom: 4px; }
.page-id-16 .af-nav a.af-nav-cta { background: var(--af-khaki-deep) !important; }
.page-id-12 .af-foot-links a[href="/about/"], .page-id-13 .af-foot-links a[href="/coaching/"], .home .af-foot-links a[href="/"] { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.page-id-20 .af-nav a[href="/contact/"] { opacity: 1; color: var(--af-ink) !important; font-weight: 600; box-shadow: inset 0 -2px 0 var(--af-khaki-deep); padding-bottom: 4px; }
.page-id-20 .af-foot-links a[href="/contact/"] { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 680px) { .af-nav a.af-nav-cta { padding: 9px 14px !important; } }
