/* shared */
/* ==========================================================================
   Tenos — shared block components.
   Auto-prepended to every block CSS bundle by the Blocks plugin's endpoints and by
   enqueue_template_blocks(). Everything here is used by two or more blocks;
   a rule used by exactly one block belongs in that block's own CSS.

   Tokens come from resources/css/global.css. Buttons from buttons.css.
   ========================================================================== */


/* --- Card (article cards, discover/careers cards) ------------------------ */

.card{
  display:flex;flex-direction:column;gap:1rem;
  padding:clamp(20px, 2.4vw, 32px);min-height:200px;
  text-decoration:none;color:var(--navy);
  transition:transform var(--speed) var(--ease);
}
.card:hover{transform:translateY(-4px)}
.card__label{font-size:var(--step-micro)}
.card__title{
  font-family:var(--font-display);font-size:var(--step-body);font-weight:700;line-height:1.25;
}
.card__body{font-size:var(--step-body)}
.card .link-arrow{margin-top:auto;align-self:flex-start}

.card--cyan  {background:var(--cyan)}
.card--green {background:var(--green)}
.card--yellow{background:var(--yellow)}
.card--white {background:var(--white)}
.card--purple{background:var(--purple);color:var(--white)}
.card--pink  {background:var(--pink);color:var(--white)}
.card--navy  {background:var(--navy);color:var(--white)}
.card--orange{background:var(--orange);color:var(--navy)}
.card--tall  {min-height:290px}

@media (prefers-reduced-motion: reduce){
  .card:hover{transform:none}
}


/* --- Collage (three overlapping photos) ----------------------------------
   Images sit on a 12x12 grid so they can overlap; below 900px the stack
   flattens into a simple grid.
   ------------------------------------------------------------------------ */

.collage{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  grid-template-rows:repeat(12, 1fr);
  aspect-ratio:4 / 3;
}
.collage>*{min-width:0;min-height:0;overflow:hidden}
.collage img{
  width:100%;height:100%;object-fit:cover;
  background:var(--grey-100);font-size:0.8125rem;color:var(--ink);
}

/* Mobile: the collage grid is proportional, so the composition holds at any
   width — flattening it into equal 4:3 tiles was what read badly, because the
   small overlapping accent became a third full-size photo (and in the CTA band
   and home hero that accent is a crop of a photo already in the collage, so it
   showed twice). Keep the layout, drop the accent: the tile it sits on always
   spans the area beneath it, so nothing leaves a hole. */
@media (max-width: 700px){
  /* Doubled class so this beats the per-block ratios (equal specificity, and
     block CSS loads after shared): the desktop ratios are landscape-ish, which
     leaves the two remaining photos squat on a phone. */
  .collage.collage{aspect-ratio:1 / 1}
  .collage__accent{display:none}
}


/* --- Media pair (two overlapping photos) --------------------------------- */

.media-pair{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  grid-template-rows:repeat(12, 1fr);
  aspect-ratio:4 / 3;
}
.media-pair>*{min-width:0;min-height:0;overflow:hidden}
.media-pair img{
  width:100%;height:100%;object-fit:cover;
  background:var(--grey-100);font-size:0.8125rem;color:var(--ink);
}
.media-pair__a{grid-area:1 / 1 / 8 / 9}
.media-pair__b{grid-area:4 / 6 / 13 / 13}

@media (max-width: 700px){
  .media-pair{grid-template-columns:repeat(2, 1fr);grid-template-rows:none;gap:8px;aspect-ratio:auto}
  .media-pair>*{grid-area:auto !important;aspect-ratio:4 / 3}
}


/* --- Breadcrumb ----------------------------------------------------------
   Rendered by tenos_breadcrumb() inside hero blocks and CPT singles.
   Inherits its colour from the surface it sits on.
   ------------------------------------------------------------------------ */

.breadcrumb__list{
  display:flex;flex-wrap:wrap;align-items:center;gap:0.5rem;
  margin:0;padding:0;list-style:none;
  font-size:var(--step-micro);font-weight:500;
}
.breadcrumb__list>li{display:flex;align-items:center;gap:0.5rem}
.breadcrumb__list>li+li::before{
  content:"";width:5px;height:5px;
  border-top:1.5px solid currentColor;border-right:1.5px solid currentColor;
  transform:rotate(45deg);opacity:0.7;
}
.breadcrumb a{text-decoration:none;opacity:0.75}
.breadcrumb a:hover{opacity:1;text-decoration:underline}
.breadcrumb [aria-current="page"]{font-weight:700}
.breadcrumb__home{display:inline-flex}
.breadcrumb__home svg{width:clamp(15px,1.15vw,22px);height:auto}


/* --- Tabs (category filters) --------------------------------------------- */

.tabs{display:flex;flex-wrap:wrap;gap:clamp(1.25rem, 3vw, 2.5rem)}
.tabs a{
  padding-bottom:6px;border-bottom:2px solid transparent;
  font-size:var(--step-nav);text-decoration:none;
}
.tabs a:hover{border-bottom-color:currentColor}
.tabs [aria-current="page"]{font-weight:700;border-bottom-color:currentColor}


/* --- Accordion -----------------------------------------------------------
   Real <details>/<summary> with a shared name, so one opens at a time and
   the whole thing works with JavaScript off. The +/− is CSS off [open].
   ------------------------------------------------------------------------ */

/* The artwork rules these at full-strength ink (#1E3096); currentColor keeps
   that true on navy surfaces too. */
.accordion{border-top:1px solid currentColor}
.accordion__item{border-bottom:1px solid currentColor}

.accordion__summary{
  display:flex;align-items:center;justify-content:space-between;gap:2rem;
  padding:clamp(14px, 1.8vw, 34px) 0;
  font-family:var(--font-display);font-size:var(--step-h3);font-weight:300;line-height:1.2;
  cursor:pointer;list-style:none;
}
.accordion__summary::-webkit-details-marker{display:none}
.accordion__summary:hover{opacity:0.72}

.accordion__summary::after{
  content:"";flex:none;width:22px;height:22px;
  background:
    linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 100% no-repeat;
  transition:transform var(--speed) var(--ease);
}
.accordion__item[open] .accordion__summary::after{
  background:linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
  transform:rotate(180deg);
}

.accordion__body{padding:0 clamp(2rem, 6vw, 5rem) clamp(20px, 2.4vw, 32px) 0;max-width:68ch}
.accordion__body>*{margin:0}
.accordion__body>*+*{margin-top:1rem}


/* --- Panel (inset card padding; surface-* supplies the colour) ----------- */

.panel{padding:clamp(28px, 4vw, 56px)}
.panel--flush{padding:0}


/* --- Small eyebrow (cards and feature panels) ---------------------------- */

.eyebrow--sm{font-size:var(--step-micro);font-weight:400;margin:0 0 0.875rem}

/* content */
/* ==========================================================================
   Content — design module 36. Everything styles off the element, so whatever
   the editor emits into the wysiwyg comes out right without per-paragraph
   classes.

   The same rules dress TinyMCE's canvas (.mce-content-body), which
   app/setup.php hands this file to via add_editor_style() — so the body an
   editor types in the wysiwyg field matches the article it renders. Keep the
   two halves of each selector list together when editing.
   ========================================================================== */

.m-abody{padding-block:clamp(36px, 3.5vw, 67px) clamp(36px, 4.5vw, 72px)}
/* Offset matches .m-ndetail__inner (161px at 1920) so an article title and
   its body share a left edge. */
.m-abody__inner{
  margin-left:clamp(0px, 8.4vw, 161px);
  max-width:50em;
}

.m-abody__inner h1,
.m-abody__inner h2,
.mce-content-body h1,
.mce-content-body h2{
  font-family:var(--font-display);
  font-size:var(--step-h2);
  font-weight:300;
  line-height:1.15;
  letter-spacing:-0.01em;
  max-width:20ch;
  margin:0 0 clamp(28px, 3.4vw, 52px);
}

.m-abody__inner h3,
.m-abody__inner h4,
.mce-content-body h3,
.mce-content-body h4{
  font-family:var(--font-body);
  font-size:var(--step-body);
  font-weight:700;
  margin:clamp(28px, 3.4vw, 52px) 0 1rem;
}
.m-abody__inner h3:first-child,
.m-abody__inner h4:first-child,
.mce-content-body h3:first-child,
.mce-content-body h4:first-child{margin-top:0}

/* Sub-titles emitted by tenos_heading() keep the small-bold treatment at
   whatever level the auto-ladder assigns them. */
.m-abody__inner .m-abody__sub{
  font-family:var(--font-body);
  font-size:var(--step-body);
  font-weight:700;
  line-height:1.4;
  letter-spacing:0;
  max-width:none;
  margin:clamp(28px, 3.4vw, 52px) 0 1rem;
}
.m-abody__inner .m-abody__sub:first-child{margin-top:0}

.m-abody__inner p,
.mce-content-body p{margin:0 0 1.25em}
.m-abody__inner p:first-of-type,
.mce-content-body p:first-of-type{font-size:var(--step-lead);line-height:1.47;max-width:66ch}

.m-abody__inner ul,
.m-abody__inner ol,
.mce-content-body ul,
.mce-content-body ol{margin:0 0 1.25em;padding-left:0;list-style:none}
.m-abody__inner li,
.mce-content-body li{margin-bottom:1em}

.m-abody__inner img,
.mce-content-body img{
  width:100%;height:auto;
  margin:clamp(32px, 4vw, 64px) 0 0.875rem;
  background:var(--grey-100);
}
.m-abody__inner figure,
.mce-content-body figure{margin:clamp(32px, 4vw, 64px) 0}
.m-abody__inner figure img,
.mce-content-body figure img{margin:0 0 0.875rem}
/* WordPress writes an inline pixel width onto the caption wrapper, which is
   the uploaded file's width — override it so a captioned image sits in the
   column like an uncaptioned one. */
.m-abody__inner .wp-caption,
.mce-content-body .wp-caption{width:auto !important;max-width:100%;margin:clamp(32px, 4vw, 64px) 0}
.m-abody__inner .wp-caption img,
.mce-content-body .wp-caption img{margin:0 0 0.875rem}

.m-abody__inner figcaption,
.m-abody__inner .wp-caption-text,
.mce-content-body figcaption,
.mce-content-body .wp-caption-text{font-size:var(--step-small);margin:0;color:var(--ink)}

.m-abody__inner a,
.mce-content-body a{text-decoration:underline;text-underline-offset:2px}
.m-abody__inner blockquote,
.mce-content-body blockquote{
  margin:clamp(28px, 3.4vw, 52px) 0;
  padding-left:1.5rem;
  border-left:3px solid var(--navy);
  font-family:var(--font-display);
  font-size:var(--step-h3);
  font-weight:700;
  line-height:1.3;
}

@media (max-width: 620px){
  .m-abody__inner{margin-left:0}
  .m-abody__inner h1,.m-abody__inner h2{max-width:none}
}

/* --- Contact Form 7 inside the article body (Speak to Tenos) -------------- */
/* A body block that holds a form becomes its own section: tucked up under
   the intro, aligned to the copy (no prose offset), on a grey band as a
   white card, and wide enough for two-up rows. */
.module:has(+ .m-abody .wpcf7){padding-bottom:clamp(20px, 2.5vw, 40px)}
.m-abody:has(.wpcf7){background:var(--grey-50);padding-block:clamp(36px, 4vw, 64px) clamp(48px, 5vw, 80px)}
.m-abody:has(.wpcf7) .m-abody__inner{margin-left:0;max-width:60rem}
.m-abody .wpcf7{margin:0;background:var(--white);padding:clamp(24px, 3.2vw, 48px) clamp(20px, 3.2vw, 48px);border-radius:8px}
.m-abody .wpcf7-form label{display:block;margin:0 0 1.25rem;font-size:0.9375rem;font-weight:700;color:var(--navy)}
.m-abody .wpcf7-form label span[aria-hidden]{color:var(--navy);opacity:0.6;margin-left:2px}
.m-abody .tn-form__row{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:0 24px}
.m-abody .wpcf7-form-control-wrap{display:block;margin-top:0.45rem}
.m-abody .wpcf7-form input:not([type=submit]):not([type=checkbox]):not([type=radio]):not([type=file]):not(.wpcf7-free-text),
.m-abody .wpcf7-form select,
.m-abody .wpcf7-form textarea{
  width:100%;box-sizing:border-box;
  padding:14px 16px;border:1.5px solid rgba(30, 48, 150, 0.25);border-radius:6px;
  background:var(--white);font:inherit;font-size:1rem;font-weight:400;color:var(--navy);
  transition:border-color var(--speed) var(--ease);
}
.m-abody .wpcf7-form input:focus,
.m-abody .wpcf7-form select:focus,
.m-abody .wpcf7-form textarea:focus{outline:none;border-color:var(--navy)}
.m-abody .wpcf7-form textarea{min-height:160px;resize:vertical}
.m-abody .tn-form__consent{font-size:0.875rem;font-weight:400;margin:0 0 1.5rem}
.m-abody .tn-form__consent .wpcf7-list-item{margin:0}
.m-abody .tn-form__consent input[type=checkbox]{margin-right:8px;accent-color:var(--navy)}
/* Choice groups and uploads (Early Careers form): a fieldset per question,
   its options as plain-weight labels, the "Other" free-text box inline. */
.m-abody .tn-form__group{margin:0 0 1.25rem;padding:0;border:0;min-width:0}
.m-abody .tn-form__group legend{padding:0;font-size:0.9375rem;font-weight:700;color:var(--navy)}
.m-abody .tn-form__group legend span[aria-hidden]{opacity:0.6;margin-left:2px}
.m-abody .wpcf7-form p.tn-form__hint{margin:0.35rem 0 0;font-size:0.875rem;font-weight:400;color:var(--navy);opacity:0.75}
.m-abody .wpcf7-form .tn-form__row + p.tn-form__hint{margin:-0.75rem 0 1.25rem}
.m-abody .wpcf7-checkbox,
.m-abody .wpcf7-radio{display:flex;flex-wrap:wrap;gap:0.5rem 1.5rem}
.m-abody .wpcf7-checkbox .wpcf7-list-item,
.m-abody .wpcf7-radio .wpcf7-list-item{display:flex;align-items:center;gap:0.5rem;margin:0}
.m-abody .wpcf7-form :is(.wpcf7-checkbox, .wpcf7-radio) .wpcf7-list-item label{display:flex;align-items:flex-start;gap:8px;margin:0;font-weight:400;font-size:1rem}
.m-abody .wpcf7-form :is(.wpcf7-checkbox, .wpcf7-radio) .wpcf7-list-item input:is([type=checkbox],[type=radio]){flex:none;width:1.1rem;height:1.1rem;margin:0.2rem 0 0;accent-color:var(--navy)}
.m-abody .wpcf7-list-item.has-free-text{flex:1 1 16rem;min-width:0}
.m-abody .wpcf7-form .wpcf7-list-item input.wpcf7-free-text{width:auto;min-width:0;flex:1 1 8rem;box-sizing:border-box;padding:8px 12px;border:1.5px solid rgba(30, 48, 150, 0.25);border-radius:6px;background:var(--white);font:inherit;font-size:0.9375rem;font-weight:400;color:var(--navy)}
.m-abody .wpcf7-form .wpcf7-list-item input.wpcf7-free-text:disabled{opacity:0.5}
.m-abody .wpcf7-form input[type=file]{display:block;width:100%;box-sizing:border-box;padding:12px;border:1.5px dashed rgba(30, 48, 150, 0.35);border-radius:6px;font:inherit;font-size:0.9375rem;font-weight:400;color:var(--navy);background:var(--white);cursor:pointer}
.m-abody .wpcf7-form input[type=file]::file-selector-button{margin-right:12px;padding:8px 16px;border:0;border-radius:999px;background:var(--navy);color:var(--white);font:inherit;font-weight:700;cursor:pointer}
.m-abody .wpcf7-form .wpcf7-submit{cursor:pointer}
.m-abody .wpcf7-not-valid-tip{font-size:0.8125rem;font-weight:400;color:#b3261e;margin-top:4px}
.m-abody .wpcf7-response-output{margin:1.25rem 0 0;padding:14px 16px;border:1.5px solid var(--navy);border-radius:6px;font-size:0.9375rem}
.m-abody .wpcf7-spinner{margin-left:12px}
@media (max-width: 620px){
  .m-abody .tn-form__row{grid-template-columns:1fr}
}

