/* ==========================================================================
   Elementive — consolidated stylesheet
   --------------------------------------------------------------------------
   Replaces: tailwind.css (compiled utilities), style.css (custom rules),
   swiper-bundle.min.css and the EmailOctopus embedded styles — one file,
   plain modern CSS, no framework.

   Structure:
     1. Design tokens (custom properties)
     2. Font faces
     3. Reset + base typography
     4. Shared helpers (.container, .visually-hidden, focus styles)
     5. Skip link, header, primary nav, contact CTA
     6. Hero
     7. Layout wrapper + sticky subnav
     8. Section shells (tag headings, extend-background)
     9. Services
    10. Expertise + testimonial carousel
    11. About / team / where we excel
    12. Dialogs (bio modals, origin story, video)
    13. Footer + newsletter form
    14. Reduced motion

   Values are taken from the live site's computed styles, not re-invented,
   so the rendered output matches the current design.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   Colors are the values the live site actually renders. Where they differ
   slightly from the brand-guide hexes, the live value is used (noted below).
   -------------------------------------------------------------------------- */
:root {
    /* Base */
    --color-black: #0f2830;        /* live "black" (brand guide lists #000000 / #2e3844) */
    --color-white: #ffffff;

    /* Brand accents */
    --color-green-1: #6aa342;      /* brand guide: #60ad30 */
    --color-green-2: #00d37f;      /* bright green; brand guide: #1ed27f */
    --color-green-3: #b2cf4a;      /* yellow-green; brand guide: #b1cf4a */
    --color-teal: #24818a;         /* brand guide: #24818b */

    /* Neutrals / backgrounds */
    --color-gray-warm: #f8f3f0;    /* services background */
    --color-gray-warm-2: #f3f4f2;  /* footer background */
    --color-gray-blue: #e5f1f5;    /* about background */
    --color-gray-text: #5e7078;    /* nav links, muted text on light bg */
    --color-gray-text-dark: #7c9098; /* muted headings on dark bg */
    --color-gray-border: rgba(114, 136, 144, 0.2);
    --color-slate: #4a585e;        /* role line inside bio dialogs */
    --color-error: #b3261e;        /* form error text (8.5:1 on footer bg) */

    /* Type scale (major-third-ish scale; root is 14px, 12px below 720px,
       so every rem value scales down on small screens) */
    --text-15: 0.9rem;
    --text-18: 1.125rem;
    --text-23: 1.407rem;
    --text-29: 1.758rem;
    --text-37: 2.197rem;

    /* Spacing scale (same modular scale as the type) */
    --space-8: 0.512rem;
    --space-10: 0.64rem;
    --space-12: 0.8rem;
    --space-15: 1rem;
    --space-18: 1.25rem;
    --space-23: 1.563rem;
    --space-29: 1.953rem;
    --space-37: 2.441rem;
    --space-46: 3.052rem;
    --space-57: 3.815rem;
    --space-71: 4.76rem;
    --space-89: 5.96rem;
    --space-112: 7.451rem;
    --space-140: 9.3rem;

    /* Fonts */
    --font-sans: "DM Sans", sans-serif;
    --font-serif: "Tiempos Fine", serif;

    /* Carousel: fixed 32px gutter between slides; --carousel-per-view is
       switched by the media queries in section 10 and read by script.js */
    --carousel-gap: 32px;
    --carousel-per-view: 1;

    /* Width of the ::after strip that extends section backgrounds to the
       right viewport edge; measured and set by script.js */
    --after-width: 0px;
}

/* --------------------------------------------------------------------------
   2. FONT FACES
   DM Sans (400/700 + italics) is loaded from Google Fonts in index.html.
   Tiempos Fine is self-hosted, same files the current site uses.
   -------------------------------------------------------------------------- */
@font-face {
    font-family: "Tiempos Fine";
    src: url("https://www.elementive.com/lib/fonts/tiempos-fine-regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Tiempos Fine";
    src: url("https://www.elementive.com/lib/fonts/tiempos-fine-medium.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   3. RESET + BASE TYPOGRAPHY
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1, h2, h3, h4, h5, h6,
p, blockquote, figure, dl, dd {
    margin: 0;
}

ul, ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    text-rendering: optimizeLegibility;
}

@media (max-width: 720px) {
    html {
        font-size: 12px; /* whole layout scales down below 720px, as on the live site */
    }
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-black);
    background-color: var(--color-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-size: inherit;
    font-weight: inherit;
}

b, strong {
    font-weight: 700;
}

em, i {
    font-style: italic;
}

a {
    color: inherit;
    text-decoration: none; /* underlines are opt-in, matching the current design */
}

img {
    display: block;
    max-width: 100%;
    height: auto; /* pairs with width/height attributes to prevent layout shift */
}

button,
input {
    font: inherit;
    color: inherit;
    margin: 0;
}

button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    text-align: inherit;
}

/* --------------------------------------------------------------------------
   4. SHARED HELPERS
   -------------------------------------------------------------------------- */

/* Centered content column. Below 1060px it is full-width; horizontal padding
   is applied by the sections themselves. */
.container {
    width: 100%;
    margin-inline: auto;
}
@media (min-width: 1060px) { .container { max-width: 1060px; } }
@media (min-width: 1200px) { .container { max-width: 1100px; } }
@media (min-width: 1300px) { .container { max-width: 1200px; } }

/* Screen-reader-only text (carousel status line) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Keyboard focus indicator: brand-styled dashed outline, shown only for
   keyboard focus (:focus-visible) so mouse clicks stay clean — replaces the
   old JS-driven .focus-with-keyboard class. */
:focus-visible {
    outline: 2px dashed var(--color-gray-text);
}

/* On the dark Expertise section the gray outline would fail 3:1, so use white */
.section--expertise :focus-visible {
    outline-color: var(--color-white);
}

/* --------------------------------------------------------------------------
   5. SKIP LINK, HEADER, PRIMARY NAV, CONTACT CTA
   -------------------------------------------------------------------------- */

/* First focusable element; visually hidden until it receives focus */
.skip-link {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 40;
    padding: var(--space-10) var(--space-23);
    background-color: var(--color-black);
    color: var(--color-white);
    font-weight: 700;
    transform: translateY(-150%);
}
.skip-link:focus {
    transform: none;
}

.site-header {
    display: flex;
    align-items: center;
    gap: var(--space-37);
    padding: var(--space-12) var(--space-15);
}
@media (min-width: 640px) {
    .site-header { padding: var(--space-37); }
}
@media (min-width: 1024px) {
    .site-header { gap: var(--space-57); }
}

.site-header__logo {
    width: auto;
    height: var(--space-46);
}
@media (min-width: 640px) {
    .site-header__logo { height: var(--space-57); }
}

/* Primary nav: hidden on small screens (the sticky subnav covers navigation
   there), shown from 768px up */
.site-nav {
    display: none;
}
@media (min-width: 768px) {
    .site-nav {
        display: flex;
        align-items: center;
        gap: var(--space-18);
        color: var(--color-gray-text);
        font-weight: 700;
        font-size: var(--text-23);
    }
}
@media (min-width: 1024px) {
    .site-nav { gap: var(--space-37); }
}
.site-nav a:hover,
.site-nav a:focus {
    color: var(--color-black);
}

/* Floating "Contact Us" pill. Absolute on small screens (scrolls with the
   page), fixed from 1024px up. The scroll-spy adds .services / .expertise
   as the button passes over those sections. */
.button-contact {
    position: absolute;
    top: var(--space-15);
    right: var(--space-15);
    z-index: 20;
    padding: var(--space-10) var(--space-23);
    border-radius: 9999px;
    background-color: var(--color-black);
    color: var(--color-white);
    font-size: var(--text-18);
}
@media (min-width: 640px) {
    .button-contact {
        top: var(--space-37);
        right: var(--space-37);
        font-size: var(--text-23);
    }
}
@media (min-width: 1024px) {
    .button-contact { position: fixed; }
}
.button-contact:hover,
.button-contact:focus {
    background-color: var(--color-green-2);
    color: var(--color-black);
    transform: scale(1.05);
}
.button-contact.services {
    background-color: var(--color-green-3);
    color: var(--color-black);
}
.button-contact.expertise {
    background-color: var(--color-white);
    color: var(--color-black);
}

/* --------------------------------------------------------------------------
   6. HERO
   -------------------------------------------------------------------------- */
.hero {
    overflow: hidden;
    border-bottom: 1px solid var(--color-gray-border);
}
@media (min-width: 1024px) {
    .hero { border-bottom: 0; }
}

.hero__container {
    padding-top: var(--space-71);
    padding-inline: var(--space-15);
}
@media (min-width: 768px) {
    .hero__container { padding-top: var(--space-112); }
}
@media (min-width: 1024px) {
    .hero__container {
        padding-top: var(--space-140);
        padding-left: var(--space-112);
    }
}

.hero__grid {
    display: grid;
    gap: var(--space-37);
}
@media (min-width: 768px) {
    .hero__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.hero__copy {
    display: flex;
    flex-direction: column;
    row-gap: var(--space-18);
}
@media (min-width: 768px) {
    .hero__copy {
        grid-column: span 3;
        padding-bottom: var(--space-140);
    }
}

.hero__heading {
    font-weight: 700;
    font-size: var(--text-37);
}

.hero__subhead {
    font-size: var(--text-23);
    line-height: 1.2; /* matches the heading-style line-height of the original */
}

.hero__cta {
    align-self: flex-start;
    font-weight: 700;
    font-size: var(--text-23);
}
.hero__cta:hover,
.hero__cta:focus {
    color: var(--color-green-3);
}

.hero__art {
    position: relative;
    margin-top: calc(-1 * var(--space-37));
}
@media (min-width: 768px) {
    .hero__art {
        grid-column: span 3;
        margin-top: 0;
    }
}

.hero__blocks {
    width: 100%;
    z-index: 0;
}
@media (min-width: 768px) {
    .hero__blocks {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 120%;
        max-width: none;
    }
}

/* --------------------------------------------------------------------------
   7. LAYOUT WRAPPER + STICKY SUBNAV
   Small screens: horizontal bar stuck to the top of the viewport.
   1024px+: vertical rail on the left of the content column.
   -------------------------------------------------------------------------- */
.layout {
    display: flex;
    flex-direction: column;
}
@media (min-width: 1024px) {
    .layout { flex-direction: row; }
}

.subnav {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: var(--color-white);
}
@media (min-width: 1024px) {
    .subnav { position: relative; }
}

.subnav__list {
    position: sticky;
    top: 0;
    left: 0;
    display: flex;
    background-color: var(--color-white);
    font-weight: 700;
    font-size: var(--text-18);
}
@media (min-width: 1024px) {
    .subnav__list {
        display: block;
        padding-left: var(--space-23);
        padding-top: var(--space-112);
    }
}

.subnav__item {
    color: var(--color-gray-text);
    white-space: nowrap;
}
.subnav__item:hover {
    color: var(--color-black);
}
.subnav__item a {
    display: block;
    padding: var(--space-10) 2.4rem var(--space-10) var(--space-12);
}

/* Active state, set by the scroll-spy: each item keeps its own accent color */
.subnav__item.active { color: var(--color-black); }
.subnav__item.active.active-bg-green-1 { background-color: var(--color-green-1); }
.subnav__item.active.active-bg-green-2 { background-color: var(--color-green-2); }
.subnav__item.active.active-bg-green-3 { background-color: var(--color-green-3); }

/* Sections column: clips the extend-background strips, but stays visible on
   very wide screens so nothing is cut off */
.layout__sections {
    overflow: hidden;
}
@media (min-width: 1220px) {
    .layout__sections { overflow: visible; }
}

/* --------------------------------------------------------------------------
   8. SECTION SHELLS
   -------------------------------------------------------------------------- */
.section {
    padding-block: var(--space-46);
}

.section--services {
    background-color: var(--color-gray-warm);
    padding-inline: var(--space-15);
}
@media (min-width: 640px) {
    .section--services { padding-inline: var(--space-57); }
}
@media (min-width: 1024px) {
    .section--services { border-top-left-radius: var(--space-18); }
}

.section--expertise {
    background-color: var(--color-black);
    padding-inline: var(--space-15);
}
.section--about {
    background-color: var(--color-gray-blue);
    padding-inline: var(--space-15);
}
@media (min-width: 768px) {
    .section--expertise,
    .section--about { padding-inline: var(--space-57); }
}

/* Extend each section's background color to the right edge of the viewport.
   The strip width (--after-width) is measured by script.js; below 1060px the
   sections are full-width so the strip collapses. */
.extend-background {
    position: relative;
    z-index: 1;
}
.extend-background::after {
    content: "";
    position: absolute;
    top: 0;
    left: 100%;
    height: 100%;
    width: var(--after-width);
    z-index: -1;
}
@media (max-width: 1060px) {
    .extend-background::after { width: 0; }
}
.section--services.extend-background::after  { background-color: var(--color-gray-warm); }
.section--expertise.extend-background::after { background-color: var(--color-black); }
.section--about.extend-background::after     { background-color: var(--color-gray-blue); }

/* Section heading with the small "tag" graphics hugging either side (768px+) */
.section-tag {
    position: relative;
    display: inline-block;
    z-index: 0;
    margin-bottom: var(--space-37);
}
.section-tag__heading {
    font-weight: 700;
    font-size: var(--text-29);
    color: var(--color-black);
}
.section-tag__heading--on-dark {
    color: var(--color-gray-text-dark);
}
.section-tag__left,
.section-tag__right {
    display: none;
}
@media (min-width: 768px) {
    .section-tag__left,
    .section-tag__right {
        display: block;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: auto;
    }
    .section-tag__left  { height: 1.3rem; left: -1.3rem; }
    .section-tag__right { height: 2rem;   right: -2rem; }
}

/* --------------------------------------------------------------------------
   9. SERVICES
   -------------------------------------------------------------------------- */
.services__intro-grid {
    display: grid;
    gap: var(--space-29);
    margin-bottom: var(--space-71);
}
@media (min-width: 1024px) {
    .services__intro-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.services__intro {
    font-family: var(--font-serif);
    font-size: var(--text-37);
}
@media (min-width: 1024px) {
    .services__intro { grid-column: span 2; }
}

.services__grid {
    display: grid;
    gap: var(--space-29);
}
@media (min-width: 640px)  { .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .services__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .services__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.service-card {
    background-color: var(--color-white);
    padding: var(--space-23);
}

/* Title + icon share a fixed-height block so all four cards align */
.service-card__top {
    display: flex;
    flex-direction: column;
    height: 13.6rem;
}
.service-card__title {
    font-weight: 700;
    font-size: var(--text-18);
}
.service-card__icon {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.service-card__body {
    line-height: 1.375;
}
.service-card__body a {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   10. EXPERTISE + TESTIMONIAL CAROUSEL
   -------------------------------------------------------------------------- */
.expertise__grid {
    display: grid;
    gap: var(--space-71);
    margin-bottom: var(--space-46);
}
@media (min-width: 768px) {
    .expertise__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .expertise__about { grid-column: span 2; }
}
.expertise__heading {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: var(--text-37);
    color: var(--color-green-2);
    margin-bottom: var(--space-29);
}
.expertise__body {
    color: var(--color-white);
}

/* Logo tile that opens the About Elementive video dialog */
.video-trigger {
    position: relative;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgb(114, 136, 144);
    border-radius: 0.328rem;
}
.video-trigger__logo {
    width: 50%;
}
.video-trigger__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.video-trigger__play img {
    height: var(--space-71);
    width: auto;
}
.video-trigger:hover .video-trigger__play img,
.video-trigger:focus .video-trigger__play img {
    transform: scale(1.05);
}

/* --- Carousel ------------------------------------------------------------ */
/* Slides per view: 1 (base) / 2 (720px+) / 3 (1020px+), 32px gutters —
   script.js reads --carousel-per-view to know the active layout. */
@media (min-width: 720px)  { :root { --carousel-per-view: 2; } }
@media (min-width: 1020px) { :root { --carousel-per-view: 3; } }

.carousel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-37);
}
.carousel__heading {
    font-weight: 700;
    font-size: var(--text-29);
    color: var(--color-gray-text-dark);
}

/* Prev/next controls: shown from 640px up (bullets take over below that) */
.carousel__buttons {
    display: none;
}
@media (min-width: 640px) {
    .carousel__buttons {
        display: flex;
        gap: var(--space-12);
    }
}
.carousel__button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--space-37);
    height: var(--space-37);
    border-radius: 9999px;
    background-color: rgba(0, 211, 127, 0.2);
}
.carousel__button--prev { padding-right: 2px; }
.carousel__button--next { padding-left: 2px; }
.carousel__button:hover,
.carousel__button:focus {
    transform: scale(1.05);
}
.carousel__button[aria-disabled="true"] {
    opacity: 0.5;
    cursor: auto;
}
.carousel__button[aria-disabled="true"]:hover {
    transform: none;
}
.carousel__chevron {
    height: var(--space-18);
    width: auto;
}
.carousel__chevron--prev {
    transform: rotate(180deg);
}

.carousel__viewport {
    overflow: hidden;
}

.carousel__track {
    display: flex;
    column-gap: var(--carousel-gap);
    cursor: grab;
    transition: transform 0.3s, height 0.3s; /* height animates for auto-height */
}
.carousel__track.is-dragging {
    cursor: grabbing;
}

.carousel__slide {
    flex: 0 0 calc((100% - (var(--carousel-per-view) - 1) * var(--carousel-gap)) / var(--carousel-per-view));
    background-color: rgba(0, 211, 127, 0.1);
    padding: var(--space-23);
    border-radius: 0.328rem;
}

.testimonial__quote {
    color: var(--color-white);
    margin-bottom: var(--space-29);
}
.testimonial__attribution {
    color: var(--color-white);
    font-weight: 700;
    line-height: 1.25;
}

/* Bullet pagination: mobile only */
.carousel__pagination {
    text-align: center;
    margin-top: var(--space-23);
}
@media (min-width: 640px) {
    .carousel__pagination { display: none; }
}
.carousel__bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    border-radius: 50%;
    background-color: var(--color-white);
    opacity: 0.6;
}
.carousel__bullet[aria-current="true"] {
    background-color: var(--color-green-2);
    opacity: 1;
}

/* --------------------------------------------------------------------------
   11. ABOUT / TEAM / WHERE WE EXCEL
   -------------------------------------------------------------------------- */
.about__grid {
    display: grid;
    gap: var(--space-46);
    margin-bottom: var(--space-46);
}
@media (min-width: 640px)  { .about__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .about__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

@media (min-width: 640px) {
    .team-card,
    .origin { grid-column: span 2; }
}

.team-card__photo {
    background-color: var(--color-white);
    aspect-ratio: 1 / 1;
    margin-bottom: var(--space-23);
}
.team-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.team-card__name {
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: var(--text-37);
    margin-bottom: var(--space-12);
}
.team-card__role {
    font-weight: 700;
    font-size: var(--text-18);
    line-height: 1.2;
    color: var(--color-gray-text);
    margin-bottom: var(--space-12);
}
.team-card__bio {
    font-size: var(--text-15);
    line-height: 1.375;
    margin-bottom: var(--space-23);
}
.team-card__more {
    font-weight: 700;
    font-size: var(--text-18);
    color: var(--color-teal);
}
.team-card__more:hover,
.team-card__more:focus {
    color: var(--color-black);
}

/* "How we came to be" card + decorative blocks */
.origin {
    position: relative;
}
.origin__card {
    background-color: var(--color-white);
    padding: var(--space-15);
}
.origin__heading {
    font-weight: 700;
    font-size: var(--text-29);
    margin-bottom: var(--space-15);
}
.origin__body {
    font-size: var(--text-15);
    line-height: 1.375;
    margin-bottom: var(--space-29);
}
.origin__more {
    background-color: var(--color-teal);
    color: var(--color-white);
    border-radius: 9999px;
    padding: var(--space-8) var(--space-12);
    font-weight: 700;
    font-size: var(--text-15);
}
.origin__more:hover,
.origin__more:focus {
    background-color: var(--color-green-2);
    color: var(--color-black);
}
.origin__blocks {
    display: none;
}
@media (min-width: 1024px) {
    .origin__blocks {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
    }
}

.excel__heading {
    font-weight: 700;
    font-size: var(--text-29);
    margin-bottom: var(--space-29);
}
.excel__grid {
    display: grid;
    gap: var(--space-23);
}
@media (min-width: 768px) {
    .excel__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--space-71);
    }
}
.excel__title {
    font-weight: 700;
    font-size: var(--text-23);
    margin-bottom: var(--space-12);
}
.excel__body {
    font-size: var(--text-15);
    line-height: 1.375;
}

/* --------------------------------------------------------------------------
   12. DIALOGS
   Native <dialog> + showModal() supplies focus trapping, Escape handling and
   focus return. These styles reproduce the current popup look.
   -------------------------------------------------------------------------- */
.dialog {
    border: 0;
    padding: 0;
    background-color: var(--color-white);
    max-width: min(780px, calc(100vw - 2.5rem));
    max-height: calc(100vh - 2.5rem);
    color: var(--color-black);
}
.dialog::backdrop {
    background-color: rgba(248, 243, 240, 0.8); /* warm-gray at 80%, as today */
}
/* Lock page scrolling while any dialog is open */
body:has(dialog[open]) {
    overflow: hidden;
}

.dialog__close {
    position: absolute;
    top: var(--space-15);
    right: var(--space-15);
    z-index: 1;
}
.dialog__close:hover img,
.dialog__close:focus img {
    transform: scale(1.05);
}

/* Focused dialog titles shouldn't show an outline (they're focused
   programmatically on open, not via keyboard) */
.dialog__title:focus {
    outline: none;
}

/* Links inside dialogs are teal + underlined */
.dialog a {
    color: var(--color-teal);
    text-decoration: underline;
}

.dialog p {
    margin-bottom: var(--space-15);
}

/* Small labels ("Professional Bio", "Contact …", "More Links") — headings
   that render at body size, matching the current design */
.dialog__subhead {
    font-size: 1rem;
    font-weight: inherit;
    line-height: 1.2;
}

/* --- "How we came to be" story dialog --- */
.dialog--story {
    overflow: auto;
}
.dialog--story__inner {
    padding: var(--space-71) var(--space-23);
}
@media (min-width: 640px) {
    .dialog--story {
    overflow: auto;
}
.dialog--story__inner { padding-inline: var(--space-89); }
}
.dialog--story__title {
    display: inline-block;
    font-family: var(--font-serif);
    font-weight: 500;
    font-size: var(--text-37);
    margin-bottom: var(--space-29);
}

/* --- Person bio dialogs --- */
.dialog--person {
    font-weight: 500; /* whole dialog uses the medium weight, as today */
    height: calc(100vh - 2.5rem);
}
@media (min-width: 768px) {
    .dialog--person { height: 28.4rem; }
}
.dialog--person__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-57);
    height: 100%;
    padding: var(--space-37);
    overflow: auto;
}
@media (min-width: 768px) {
    .dialog--person__inner { flex-direction: row; }
}
.dialog--person__photo {
    background-color: var(--color-white);
    aspect-ratio: 1 / 1;
    max-width: 350px;
    margin-bottom: var(--space-37);
}
.dialog--person__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dialog--person__contact {
    margin-bottom: var(--space-29);
}
.dialog--person__links a {
    display: block;
    width: fit-content;
}
.dialog--person__name {
    display: inline-block;
    font-family: var(--font-serif);
    font-size: var(--text-37);
    margin-bottom: var(--space-8);
}
.dialog--person__role {
    font-weight: 700;
    font-size: 1.25rem;
    line-height: 1.2;
    color: var(--color-slate);
    margin-bottom: var(--space-15);
}

/* --- Video dialog: transparent, fills the viewport over the backdrop --- */
.dialog--video {
    background: transparent;
    width: 100vw;
    height: 100vh;
    max-width: 100vw;
    max-height: 100vh;
    padding: var(--space-18);
}
.dialog--video__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.dialog--video__title {
    font-weight: 700;
    font-size: 1.95rem;
    margin-bottom: var(--space-15);
}
.dialog--video__frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    width: 100%;
    max-width: 800px;
}
.dialog--video__frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --------------------------------------------------------------------------
   13. FOOTER + NEWSLETTER
   -------------------------------------------------------------------------- */
.site-footer {
    position: relative;
    background-color: var(--color-gray-warm-2);
    padding: var(--space-37) var(--space-15) var(--space-71);
}
@media (min-width: 640px) {
    .site-footer { padding: var(--space-37); }
}

.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.site-footer__content {
    grid-column: span 6;
}
@media (min-width: 640px)  { .site-footer__content { grid-column: span 5; } }
@media (min-width: 768px)  { .site-footer__content { grid-column: span 4; } }
@media (min-width: 1024px) { .site-footer__content { grid-column: span 3; } }

.site-footer__heading {
    font-weight: 700;
    font-size: var(--text-37);
    line-height: 1.25;
    margin-bottom: var(--space-37);
}

.site-footer__email {
    display: inline-block;
    font-weight: 700;
    font-size: var(--text-29);
    color: var(--color-green-1);
    text-decoration: underline;
    margin-bottom: var(--space-46);
}
.site-footer__email:hover,
.site-footer__email:focus {
    color: var(--color-teal);
}

/* --- Newsletter form (replaces the EmailOctopus embed markup/styles) --- */
.newsletter {
    max-width: 600px;
}

.newsletter__form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-top: 16px;
}

.newsletter__field {
    flex-grow: 1;
    min-width: 200px;
    margin: 0 2px 0.5rem;
}

.newsletter__label {
    display: block;
    font-size: 12px;
    color: #212529;
    margin-bottom: 2px;
}

.newsletter__input {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #495057;
    background-color: var(--color-white);
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.newsletter__input::placeholder {
    color: #6c757d;
}
.newsletter__input:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: 0;
}
.newsletter__input[aria-invalid="true"] {
    border-color: var(--color-error);
}

.newsletter__submit {
    flex-grow: 1;
    margin: 0 2px 0.5rem;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
    color: #000000;
    background-color: var(--color-green-3);
    border: 1px solid var(--color-green-3);
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

.newsletter__error {
    width: 100%;
    margin: 0 2px;
    font-size: var(--text-15);
    color: var(--color-error);
}

/* Honeypot: parked off-screen, exactly like the EmailOctopus embed */
.newsletter__hp {
    position: absolute;
    left: -5000px;
}

.newsletter__powered-by {
    margin-top: 10px;
    text-align: center;
    font-family: Montserrat, Arial, sans-serif;
    font-size: 10px;
    line-height: 32px;
    color: #3c2668;
}
.newsletter__powered-by a {
    position: relative;
    display: inline-block;
    margin-left: 3px;
    padding-left: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #6e54d7;
}
.newsletter__powered-by a::before {
    content: "";
    position: absolute;
    top: 6px;
    left: 4px;
    width: 14px;
    height: 18px;
    background-image: url(https://gallery.eo.page/tentacles/icons/v1/powered-by/otto-branded.svg);
    background-size: cover;
}

/* --- Footer meta + social --- */
.site-footer__meta {
    margin-top: 1.6rem; /* spacer line, as in the current layout */
    font-size: var(--text-15);
}
.site-footer__meta a {
    text-decoration: underline;
}
.site-footer__meta a:hover,
.site-footer__meta a:focus {
    text-decoration: none;
}

.site-footer__social {
    position: absolute;
    right: var(--space-37);
    bottom: var(--space-37);
    display: flex;
    gap: var(--space-23);
}
@media (min-width: 640px) {
    .site-footer__social {
        right: var(--space-57);
        gap: var(--space-29);
    }
}
.site-footer__social img {
    width: var(--space-37);
    height: auto;
}
@media (min-width: 640px) {
    .site-footer__social img { width: var(--space-46); }
}

/* --------------------------------------------------------------------------
   14. INTERIOR / ARTICLE PAGES
   Shared text styling for content pages that reuse the site header/footer
   but don't have the homepage's custom sections (privacy policy, services
   pages, etc.) — add the "article" class to the page's content wrapper.
   Sizes mirror the live site's own .article-body rules, which reuse the
   spacing scale for heading sizes rather than the type scale.
   -------------------------------------------------------------------------- */
.article {
    max-width: 760px; /* readability cap for long-form text; the original
                          rules didn't set one since the homepage never
                          needed it */
    margin-inline: auto;
    padding: var(--space-71) var(--space-15) var(--space-46);
    font-size: var(--space-18); /* 1.25rem, matches the live site's .article-body */
    color: #000;
}
@media (min-width: 640px) {
    .article { padding-inline: var(--space-37); }
}

.article__meta {
    color: var(--color-gray-text);
    font-size: var(--text-15);
    margin-bottom: var(--space-37);
}

.article h1,
.article h2,
.article h3,
.article h4,
.article h5,
.article h6 {
    font-weight: 700;
    margin-bottom: 1.6rem;
}
.article h1 { font-size: var(--space-37); }
.article h2 { font-size: var(--space-29); margin-top: var(--space-46); }
.article h3 { font-size: var(--space-23); margin-top: var(--space-37); }
.article h4,
.article h5,
.article h6 { font-size: var(--space-18); }

.article p,
.article ul,
.article ol {
    font-size: var(--space-18);
    margin-bottom: 1.6rem;
}
.article ul,
.article ol {
    padding-left: var(--space-29);
}
.article ul { list-style-type: disc; }
.article ol { list-style-type: decimal; }
.article li {
    padding-left: var(--space-10);
    margin-bottom: var(--space-10);
}
.article li:last-child { margin-bottom: 0; }

.article a {
    color: #1e6d76; /* distinct "article link" teal used on the live site's text pages */
    text-decoration: underline;
    overflow-wrap: break-word;
    word-break: break-word; /* keeps long unsubscribe/opt-out URLs from overflowing */
}
.article a:hover,
.article a:focus {
    color: var(--color-black);
}

/* --------------------------------------------------------------------------
   15. REDUCED MOTION
   Kill smooth scrolling and all transitions (carousel slide/height, hover
   scaling, form focus) for users who prefer reduced motion.
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
