/*
Theme Name: Embedded Collective
Author: Embedded Collective
Description: Minimal single-page consultancy theme with editable content and a built-in contact form.
Version: 1.0.4
Requires at least: 6.0
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: embedded-collective
*/

/* Design tokens and foundations */
:root { --paper: #f8f7f2; --ink: #252d29; --accent: #6c001b; --line: #dcd6d3; --muted: #615b59; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 30px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.65 system-ui, -apple-system, sans-serif; }
a { color: inherit; text-underline-offset: 5px; }
a:hover { color: var(--accent); }
.wrap { width: min(1140px, 88%); margin: auto; }

/* Header and navigation */
header { padding: 28px 0; border-bottom: 1px solid var(--line); }
header .wrap, nav, footer .wrap { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { flex-shrink: 0; text-decoration: none; font-size: 21px; font-weight: 650; line-height: 1.12; letter-spacing: -.6px; }
.brand span { display: block; font-weight: 400; }
.custom-logo, .brand-logo { display: block; width: 250px; max-width: 100%; height: auto; }
nav a { text-decoration: none; font-size: 14px; }
.nav-contact { border-bottom: 1px solid; padding-bottom: 3px; }

/* Typography */
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, serif; font-weight: 400; line-height: 1.05; letter-spacing: -2px; }
h1 { font-size: clamp(64px, 8vw, 112px); max-width: 850px; margin-bottom: 30px; }
h2 { font-size: clamp(38px, 5vw, 60px); max-width: 650px; }
h3 { font-size: 23px; font-weight: 500; line-height: 1.3; letter-spacing: -.4px; }
.eyebrow { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); font-weight: 650; margin-bottom: 26px; }
.small { font-size: 14px; color: var(--muted); }

/* Hero */
.hero { padding: 60px 0 80px; }

/* Preserve the width of the hero even when WordPress adds editor styles. */
#main .hero.wrap { width: min(1140px, 88%); max-width: none; }
.hero h1 { max-width: none; font-size: clamp(29px, 6.5vw, 84px); white-space: nowrap; word-break: normal; overflow-wrap: normal; }
.hero h1 em { color: var(--accent); font-weight: 400; }
.intro { max-width: 590px; font-size: 21px; color: var(--muted); }
.hero .intro { max-width: 760px; }
.hero-bottom { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-top: 35px; }
.hero > p:empty { display: none; }

/* Buttons */
.button { display: inline-flex; background: var(--accent); color: white; padding: 14px 24px; text-decoration: none; border: 1px solid var(--accent); font: inherit; cursor: pointer; gap: 35px; }
.button:hover { background: #4d0013; color: white; }

/* Shared section layouts */
.section { padding: 88px 0 50px; border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1.25fr; gap: 90px; }
#main .section-copy { padding-right: 180px; }
#main .section-copy p, #main .section-copy li { font-size: 22px; }
#main .section-copy li + li { margin-top: .5em; }
.questions { margin: 0; padding: 0; list-style: none; }
.questions li { font-family: Georgia, serif; font-size: 26px; line-height: 1.3; padding: 22px 0; border-bottom: 1px solid var(--line); }
.questions li:first-child { padding-top: 0; }
.questions li:last-child { border: 0; }
.tinted { background: #efece8; }

/* Services */
.service-row { display: grid; grid-template-columns: 40px minmax(280px, 1fr) minmax(0, 1.15fr); column-gap: 32px; row-gap: 35px; padding: 30px 0; border-top: 1px solid #d5ceca; }
.service-row > .number { grid-column: 1; }
.service-row > h3 { grid-column: 2; min-width: 0; word-break: normal; overflow-wrap: normal; }
.service-row > p { grid-column: 3; min-width: 0; }
.service-row p { margin: 0; color: var(--muted); }
.service-row > p:empty { display: none; }
.number { color: var(--accent); font-size: 13px; }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 45px; margin-top: 50px; }
.steps h3 { margin-top: 20px; }
.steps p { color: var(--muted); }

/* HOW WE WORK */
#services .services-process { margin-top: 0; }
#services .services-heading { margin-top: 40px; margin-bottom: 12px; }

/* Individual process sections */
#services .services-step { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 24px 0; border-top: 1px solid var(--line); }

/* Step numbers and labels */
#services .services-step-label { display: block; font-size: 12px; font-weight: 650; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin: 0; }

/* Main content */
#services .services-step-content { min-width: 0; }
#services .services-step-content > h3 { font-family: Georgia, serif; font-size: clamp(28px, 3vw, 36px); font-weight: 400; line-height: 1.2; letter-spacing: -0.8px; margin-top: 0; margin-bottom: 20px; }
#services .services-step-content > p { max-width: 960px; color: var(--muted); }

/* Fully Engaged and Advisory Options */
#services .services-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 30px; }

/* Individual option cards */
#services .services-option { background: #efece8; border: 1px solid var(--line); padding: 32px; min-width: 0; }

/* Option labels */
#services .services-option-label { font-size: 12px; font-weight: 650; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 20px; }

/* Card headings */
#services .services-option h4 { font-family: Georgia, serif; font-size: clamp(24px, 2.5vw, 30px); font-weight: 400; line-height: 1.2; letter-spacing: -0.5px; margin: 0 0 20px; }

/* Card descriptions */
#services .services-option p { font-size: 16px; line-height: 1.65; color: var(--muted); }
#services .services-option p:last-child { margin-bottom: 0; }

/* Card lists */
#services .services-option ul { padding-left: 20px; margin: 15px 0; }
#services .services-option li { font-size: 16px; line-height: 1.6; }
#services .services-option li + li { margin-top: 8px; }

/* ABOUT */
.about-copy { font-size: 18px; }
#about .founder-row { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
#about .founder-row .eyebrow { margin: 0; }
#about .linkedin-link { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; color: #0a66c2; text-decoration: none; }
#about .linkedin-link svg { display: block; width: 20px; height: 20px; }
#about .linkedin-link:hover { opacity: .75; }
#about .linkedin-link:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* Align the icon with the founder eyebrow on desktop. */
#about .founder-row .linkedin-link { position: relative; top: 8px; }
#about .about-headshot { display: block; width: 320px; max-width: 100%; height: auto; margin-top: 24px; border-radius: 6px; }

/* CONTACT */
.contact { background: var(--ink); color: var(--paper); }
.contact .eyebrow, .contact .small { color: #e0d5d2; }
.contact h2 { max-width: 430px; }
.contact a { color: inherit; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label { display: block; font-size: 14px; }
input, textarea { width: 100%; font: inherit; border: 1px solid #948682; background: transparent; color: inherit; padding: 12px; margin: 7px 0 20px; border-radius: 0; }
textarea { min-height: 140px; resize: vertical; }
.contact .button { background: #efe4e1; color: var(--ink); border: 0; }
.trap { position: absolute; left: -9999px; }
.status { padding: 16px; border: 1px solid; margin-bottom: 20px; }

/* Copy-email control */
#contact .email-contact { font-size: 14px; line-height: 1.65; }
#contact .email-contact p { margin: 0; }
#contact .email-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
#contact .copy-email { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 24px; width: 24px; height: 24px; margin: 0; padding: 3px; border: 0; background: transparent; box-shadow: none; color: inherit; cursor: pointer; }
#contact .copy-email svg { display: block; }
#contact .copy-email:hover { background: transparent; opacity: .75; }
#contact .copy-email:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
#contact .copy-status { display: block; min-height: 1.5em; margin: 0; font-size: 12px; }

/* Legal pages and footer */
.legal { padding: 75px 0; max-width: 780px; min-height: 65vh; }
.legal h1 { font-size: 60px; }
.legal h2 { font-size: 32px; letter-spacing: -.5px; margin-top: 35px; }
footer { padding: 32px 0; font-size: 12px; }
footer .links { display: flex; gap: 25px; }

/* Accessibility */
.skip { position: absolute; top: -100px; }
.skip:focus { top: 0; background: white; padding: 12px; z-index: 10; }
:focus-visible { outline: 3px solid #b76c7d; outline-offset: 5px; }

/* RESPONSIVE LAYOUTS */
@media (min-width: 761px) {
  .service-row > h3, .service-row > p, .service-row > .number { grid-row: 1; }
}
@media (min-width: 761px) and (max-width: 900px) {
  .service-row { grid-template-columns: 30px minmax(250px, 1fr) minmax(0, 1fr); column-gap: 22px; }
}
@media (max-width: 760px) {
  .brand-logo, .custom-logo { width: 185px; }
  header .wrap { gap: 20px; align-items: start; }
  nav { gap: 15px; flex-wrap: wrap; justify-content: end; }
  nav a { font-size: 12px; }
  .brand { font-size: 18px; }
  .hero { padding: 39px 0 65px; }
  .hero-bottom { align-items: start; flex-direction: column; }
  .split { grid-template-columns: 1fr; gap: 35px; }
  .section { padding: 60px 0 35px; }
  #main .section-copy { padding-right: 0; }
  .service-row { grid-template-columns: 30px minmax(0, 1fr); gap: 15px; }
  .service-row > h3, .service-row p { grid-column: 2; }
  .service-row > h3 { margin-bottom: 0; }
  .service-row > h3 br { display: none; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  footer .wrap { align-items: start; flex-direction: column; gap: 15px; }
  h1, h2 { letter-spacing: -1.5px; }

  /* How we work responsive */
  #services .services-process { margin-top: 25px; }
  #services .services-step { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 30px 0; }
  #services .services-step-content > h3 { font-size: 28px; }
  #services .services-options { grid-template-columns: 1fr; gap: 20px; margin-top: 25px; }
  #services .services-option { padding: 25px; }
  #services .services-option h4 { font-size: 26px; }
  #services .services-step--accessible { padding: 25px; margin-top: 15px; }

  /* Mobile alignment does not change the headshot's dimensions. */
  #about .founder-row .linkedin-link { top: 0; }
}
@media (max-width: 420px) {
  header .wrap { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Embedded Collective Referral Partners */
#ec-referral-page { --ref-paper: #f8f7f2; --ref-ink: #252d29; --ref-accent: #6c001b; --ref-muted: #615b59; --ref-line: #dcd6d3; background: var(--ref-paper); color: var(--ref-ink); font-size: 18px; line-height: 1.65; }
#ec-referral-page, #ec-referral-page * { box-sizing: border-box; }
#ec-referral-page .ref-wrap { width: min(1140px, 88%); max-width: none; margin: 0 auto; padding: 8px 0 8px; }
#ec-referral-page p { margin: 0 0 20px; }
#ec-referral-page a { color: inherit; text-underline-offset: 4px; }
#ec-referral-page .ref-eyebrow { margin-bottom: 22px; color: var(--ref-accent); font-size: 12px; font-weight: 650; letter-spacing: 2px; text-transform: uppercase; }
#ec-referral-page h1, #ec-referral-page h2 { max-width: none; margin: 0 0 26px; font-family: Georgia, serif; font-weight: 400; line-height: 1.08; white-space: normal; }
#ec-referral-page h1 { font-size: clamp(28px, 6.5vw, 64px); letter-spacing: -2px; }
#ec-referral-page h1 em { color: var(--ref-accent); font-weight: 400; }
#ec-referral-page h2 { font-size: clamp(32px, 3.8vw, 46px); letter-spacing: -1px; }
#ec-referral-page .ref-hero { padding: 44px 0 60px; }
#ec-referral-page .ref-topline { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
#ec-referral-page .ref-topline .ref-eyebrow { margin: 0; }
#ec-referral-page .ref-download { color: var(--ref-accent); font-size: 14px; }
#ec-referral-page .ref-byline { margin-bottom: 22px; color: var(--ref-muted); font-size: 14px; }
#ec-referral-page .ref-lead { max-width: 1140px; font-size: 23px; line-height: 1.5; }
#ec-referral-page .ref-intro { max-width: 810px; margin-bottom: 30px; color: var(--ref-muted); font-size: 19px; }
#ec-referral-page .ref-button { display: inline-flex; align-items: center; justify-content: space-between; gap: 28px; padding: 14px 24px; border: 1px solid var(--ref-accent); background: var(--ref-accent); color: #fff; font: inherit; text-decoration: none; }
#ec-referral-page .ref-button:hover { background: #4d0013; color: #fff; }
#ec-referral-page .ref-section { padding-top: 48px; padding-right: 0; padding-bottom: 36px; padding-left: 0; border-top: 1px solid var(--ref-line); }
#ec-referral-page .ref-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 70px; }
#ec-referral-page .ref-columns > div { min-width: 0; }
#ec-referral-page .ref-copy { font-size: 19px; }
#ec-referral-page .ref-copy p:last-child { margin-bottom: 16px; }
#ec-referral-page .ref-copy li + li { margin-top: 16px; }
#ec-referral-page .ref-tinted { background: #efece8; }
#ec-referral-page .ref-quotes { margin: 0; padding: 0; list-style: none; }
#ec-referral-page .ref-quotes li { margin: 0; padding: 22px 0; border-bottom: 1px solid var(--ref-line); font-family: Georgia, serif; font-size: 25px; line-height: 1.4; }
#ec-referral-page .ref-quotes li:first-child { padding-top: 0; }
#ec-referral-page .ref-quotes li:last-child { padding-bottom: 0; border-bottom: 0; }
#ec-referral-page .ref-citation { font-size: 0.65em; line-height: 0; vertical-align: super; margin-left: 2px; }
#ec-referral-page .ref-citation a { color: var(--ref-accent); text-decoration: none; }
#ec-referral-page .ref-hero .ref-footnote { margin: 28px 0 0; padding-top: 12px; border-top: 1px solid var(--ref-line); color: var(--ref-muted); font-size: 13px; line-height: 1.5; scroll-margin-top: 24px; }

#ec-referral-page #send-referral { scroll-margin-top: 30px; padding-bottom: 24px; }

/* Center the referral contact section. */
#ec-referral-page #send-referral.ref-contact-actions { padding: 48px 0; background: #252d29; color: #f8f7f2; text-align: center;}
#ec-referral-page .ref-contact-actions .ref-eyebrow { color: #e0d5d2; }
#ec-referral-page .ref-contact-actions h2 { max-width: none; }
#ec-referral-page .ref-contact-actions .ref-wrap > p:not(.ref-eyebrow) { max-width: 680px; margin: 0 auto 28px; }

/* Three centered maroon buttons. */
#ec-referral-page .ref-action-buttons { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 16px; }
#ec-referral-page .ref-action-buttons a { display: inline-flex; align-items: center; justify-content: center; min-width: 150px; min-height: 48px; padding: 14px 28px; border: 1px solid #fff; background: #6c001b; color: #fff; font-weight: 600; text-decoration: none; }
#ec-referral-page .ref-action-buttons a:hover { background: #4d0013; border-color: #fff; }
#ec-referral-page .ref-action-buttons a:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
#ec-referral-page .ref-copy-homepage { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 24px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #f8f7f2; font: inherit; text-transform: none; cursor: pointer; }
#ec-referral-page .ref-copy-homepage svg { flex-shrink: 0; }
#ec-referral-page .ref-copy-homepage:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }
#ec-referral-page .ref-copy-feedback { display: block; min-height: 1.5em; margin-top: 6px; color: #f8f7f2; font-size: 14px; }

/* Referral guide label beside the header logo */
header .ref-header-label { display: flex; flex-direction: column; gap: 6px; margin-left: auto; align-self: center; text-align: center; color: #6c001b; font-size: 12px; font-weight: 650; line-height: 1.5; letter-spacing: 2px; text-transform: uppercase; }


/* Mobile */
@media (max-width: 760px) {
  #ec-referral-page .ref-hero { padding: 32px 0 48px; }
  #ec-referral-page .ref-topline { gap: 12px; margin-bottom: 8px; }
  #ec-referral-page h1 { font-size: clamp(38px, 9vw, 62px); letter-spacing: -1px; }
  #ec-referral-page .ref-lead { font-size: 21px; }
  #ec-referral-page .ref-section { padding: 44px 0 24px; }
  #ec-referral-page .ref-columns { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  #ec-referral-page .ref-quotes li { font-size: 23px; }
  #ec-referral-page .ref-form-panel { padding: 22px; }
}

/* Center the label beneath the logo on small screens */
@media (max-width: 420px) {
  body:has(#ec-referral-page) header .wrap {
    align-items: center;
  }

  header .ref-header-label {
    margin-left: 0;
    text-align: center;
  }
}

/* CASE STUDIES */
.ec-case-study { --case-maroon: #6c001b; --case-ink: #252d29; --case-muted: #615b59; --case-line: #dcd6d3; max-width: 1100px; margin: 0 auto; padding: 0 0 32px; color: var(--case-ink); font-size: 16px; line-height: 1.5; }
.ec-case-study, .ec-case-study * { box-sizing: border-box; }
#main:has(.ec-case-study) > h1 { display: none; }
#main.legal:has(.ec-case-study) { padding-top: 24px; }

/* Headline and short result summary */
.ec-case-study .case-header { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--case-line); }
.ec-case-study .case-eyebrow { margin: 0 0 8px; color: var(--case-maroon); font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.ec-case-study .case-title { max-width: none; margin: 0 0 12px; font-family: Georgia, serif; font-size: clamp(30px, 3.5vw, 46px); font-weight: 400; line-height: 1.12; letter-spacing: -1px; }
.ec-case-study .case-summary { max-width: 85ch; margin: 0; color: var(--case-muted); font-size: 18px; line-height: 1.45; }

/* Situation and Intervention */
.ec-case-study .case-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.ec-case-study .case-section { min-width: 0; }
.ec-case-study .case-section h2, .ec-case-study .case-takeaways h2 { max-width: none; margin: 0 0 10px; color: var(--case-maroon); font-family: inherit; font-size: 12px; font-weight: 700; line-height: 1.4; letter-spacing: 1.5px; text-transform: uppercase; }
.ec-case-study .case-section p { margin: 0 0 10px; }
.ec-case-study .case-section p:last-child { margin-bottom: 0; }
.ec-case-study ul { margin: 0; padding-left: 20px; }
.ec-case-study li + li { margin-top: 8px; }

/* Takeaways — concluding paragraph */
.ec-case-study .case-takeaways { margin-top: 24px; padding: 20px 24px; background: #efece8; border-left: 3px solid var(--case-maroon); }
.ec-case-study .case-takeaways p { margin: 0; line-height: 1.5; }

/* Mobile */
@media (max-width: 700px) {
  .ec-case-study { padding: 0 0 24px; }
  .ec-case-study .case-grid { grid-template-columns: 1fr; gap: 20px; }
  .ec-case-study .case-takeaways { padding: 18px 20px; }
}

/* WPForms: shared field spacing */
.wpforms-container .wpforms-field { padding-top: 10px !important; padding-bottom: 10px !important; }