/* ==========================================================================
   MECANDRIA — Testimonials (page-specific; loaded only on testimonials.html)
   Classes are prefixed .tm- so nothing leaks into other pages.

   A collection of relationships, not a review wall:
   hero → what our clients say (featured) → client stories (alternating)
   → how trust is built → CTA.

   Content rule: only client-approved testimonials. A block can still be
   marked as a placeholder ([data-placeholder] + .tm-flag) while awaiting
   approval; removing both publishes it with the same layout.
   ========================================================================== */
.tm {
  --tm-bg: #FBF8F3; --tm-bg-2: #F4EEE5;
  --tm-line: rgba(90, 80, 70, .16); --tm-line-2: rgba(90, 80, 70, .28);
  --tm-muted: #5A5568; --tm-dim: #6E6878;
  --tm-cyan: 0, 119, 95; --tm-violet: 91, 46, 230; --tm-magenta: 199, 0, 73;   /* warm ivory palette: the "cyan" slot holds the teal label colour */
}
.tm section { position: relative; isolation: isolate; }
.tm-sec { padding-block: clamp(20px, 2.5vw, 32px) clamp(48px, 5.5vw, 80px); background: var(--tm-bg); }
.tm-sec--alt { background: var(--tm-bg-2); }
.tm-sec--alt::before, .tm-sec--alt::after { content: ""; position: absolute; left: 0; right: 0; height: 120px; pointer-events: none; z-index: -1; }
.tm-sec--alt::before { top: 0; background: linear-gradient(var(--tm-bg), transparent); }
.tm-sec--alt::after { bottom: 0; background: linear-gradient(transparent, var(--tm-bg)); }

.tm-chap { display: inline-flex; align-items: center; gap: 14px; font-size: 11.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: rgb(var(--tm-cyan)); }
.tm-chap b { color: var(--tm-dim); font-variant-numeric: tabular-nums; }
.tm-chap::after { content: ""; width: 36px; height: 1px; background: linear-gradient(90deg, rgba(var(--tm-cyan), .7), transparent); }
.tm-h1 { font-size: clamp(2.3rem, 1rem + 3.8vw, 5rem); font-weight: 800; line-height: .98; letter-spacing: -.04em; text-transform: uppercase; }
.tm-h2 { font-size: clamp(1.6rem, .72rem + 2.6vw, 3.4rem); text-transform: uppercase; font-weight: 800; line-height: 1.03; letter-spacing: -.035em; }
.tm-lead { font-size: clamp(1.03rem, .95rem + .35vw, 1.2rem); line-height: 1.65; color: var(--tm-muted); max-width: 52ch; }
.tm-cool { background: linear-gradient(92deg, #00775F, #00728A 45%, #5B2EE6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tm-head { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px clamp(40px, 6vw, 96px); align-items: end; margin-bottom: clamp(48px, 6vw, 84px); }
.tm-head .tm-h2 { margin-top: 22px; }
.tm-head p { margin: 0; color: var(--tm-muted); font-size: 1.06rem; line-height: 1.7; max-width: 46ch; }

/* placeholder flag — small, honest, never loud */
.tm-flag { display: inline-flex; align-items: center; gap: 10px; font-size: 10.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--tm-dim); }
.tm-flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid rgba(var(--tm-violet), .7); }

/* ==========================================================================
   HERO — typography first; one oversized outline quotation mark
   ========================================================================== */
.tm-hero { min-height: 76vh; min-height: 76svh; display: grid; align-content: center; overflow: hidden; padding: calc(var(--nav-h) + 40px) 0 clamp(64px, 7vw, 96px); background: var(--tm-bg); }
.tm-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(40% 55% at 80% 40%, rgba(var(--tm-violet), .12), transparent 70%), radial-gradient(30% 40% at 10% 100%, rgba(0, 211, 164, .07), transparent 70%); }
.tm-hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.tm-hero h1 { margin: 24px 0 28px; max-width: 15ch; }
.tm-hero h1 span { display: block; }
.tm-hero-mark { position: relative; justify-self: end; text-align: right; }
.tm-hero-mark .glyph { display: block; font-size: clamp(14rem, 26vw, 26rem); font-weight: 800; line-height: .7; height: .55em; color: transparent; -webkit-text-stroke: 1.5px rgba(var(--tm-cyan), .32); font-family: Georgia, "Times New Roman", serif; }
.tm-hero-mark .rule { position: absolute; right: 0; bottom: -28px; width: 60%; height: 1px; background: linear-gradient(270deg, rgba(var(--tm-cyan), .6), transparent); }
.tm-principle { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: baseline; margin-top: clamp(56px, 7vw, 96px); padding-top: 22px; border-top: 1px solid var(--tm-line); color: var(--tm-muted); font-size: .98rem; line-height: 1.6; }
.tm-principle b { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: #3A3648; }
.tm-rise { animation: tm-rise 1.1s var(--ease) both; }
.tm-rise:nth-child(2) { animation-delay: .1s; } .tm-rise:nth-child(3) { animation-delay: .2s; }
.tm-hero-mark.tm-rise { animation-delay: .3s; }
.tm-principle.tm-rise { animation-delay: .45s; }
.client-logos.tm-rise { animation-delay: .6s; }
@keyframes tm-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   FEATURED — one large quote, accent line, client and context beneath
   ========================================================================== */
.tm-feature { position: relative; margin: 0; padding: clamp(40px, 5vw, 72px) 0 0 clamp(24px, 4vw, 64px); }
.tm-feature::before { /* the accent line */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(rgb(var(--tm-cyan)), rgba(var(--tm-violet), .6) 45%, var(--tm-line) 80%); }
.tm-feature-mark { position: absolute; right: 0; top: -.12em; z-index: -1; font-family: Georgia, "Times New Roman", serif; font-size: clamp(12rem, 24vw, 22rem); line-height: 1; color: rgba(90, 80, 70, .05); pointer-events: none; }
.tm-feature blockquote { margin: 26px 0 0; }
.tm-feature blockquote p { margin: 0; max-width: 46ch; font-size: clamp(1.35rem, .95rem + 1.4vw, 2.2rem); font-weight: 700; line-height: 1.3; letter-spacing: -.03em; color: #1D1B2F; text-wrap: balance; }
.tm-feature-who { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 28px clamp(32px, 5vw, 80px); align-items: start; margin-top: clamp(40px, 5vw, 64px); padding-top: 26px; border-top: 1px solid var(--tm-line); }
.tm-person { display: grid; gap: 6px; }
.tm-person .name { font-size: 1.2rem; font-weight: 700; color: #1D1B2F; }
.tm-person span:not(.name) { color: var(--tm-muted); }
.tm-feature-who dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px 32px; margin: 0; }

/* shared definition-list styling for client details */
.tm dt { margin-bottom: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--tm-dim); }
.tm dd { margin: 0; color: #3A3648; line-height: 1.5; }
[data-placeholder] .tm-person .name, [data-placeholder] dd, [data-placeholder] .tm-person span:not(.name) { color: #6E6878; font-style: italic; }

/* quote fade-in */
.js .tm-feature[data-reveal] blockquote p { opacity: 0; transform: translateY(18px); }
.js .tm-feature.is-in blockquote p { opacity: 1; transform: none; transition: opacity 1.2s var(--ease) .2s, transform 1.2s var(--ease) .2s; }

/* ==========================================================================
   CLIENT STORIES — alternating editorial rows (quote | client, then flipped)
   ========================================================================== */
.tm-stories { border-top: 1px solid var(--tm-line-2); }
.tm-story { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, .65fr); gap: 32px clamp(40px, 6vw, 110px); align-items: center; margin: 0; padding: clamp(48px, 6vw, 88px) 0; border-bottom: 1px solid var(--tm-line); }
.tm-story::before { /* small hover accent along the top rule */
  content: ""; position: absolute; left: 0; top: -1px; width: 40px; height: 1px; background: rgb(var(--tm-cyan)); transition: width .7s var(--ease); }
.tm-story.flip::before { left: auto; right: 0; }
.tm-story:hover::before { width: 30%; }
.tm-story.flip { grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); }
.tm-story.flip .tm-story-q { order: 2; }
.tm-story.flip .tm-who { order: 1; }
.tm-story-q { position: relative; }
.tm-story blockquote { margin: 0; }
.tm-story blockquote p { margin: 0; font-size: clamp(1.2rem, .9rem + 1vw, 1.75rem); font-weight: 600; line-height: 1.38; letter-spacing: -.02em; color: #2B2839; transition: transform .6s var(--ease); }
.tm-story:hover blockquote p { transform: translateX(4px); }
.tm-story.flip:hover blockquote p { transform: translateX(-4px); }
/* skeleton lines show where the client's words will sit */
.tm-lines { display: grid; gap: 12px; margin-top: 26px; max-width: 520px; }
.tm-lines i { display: block; height: 1px; background: repeating-linear-gradient(90deg, rgba(90, 80, 70, .28) 0 6px, transparent 6px 12px); }
.tm-lines i:nth-child(2) { width: 86%; } .tm-lines i:nth-child(3) { width: 58%; }
.tm-who { display: grid; gap: 22px; padding-left: 28px; border-left: 1px solid var(--tm-line); }
.tm-story.flip .tm-who { padding: 0 28px 0 0; border-left: 0; border-right: 1px solid var(--tm-line); }
.tm-who dl { display: grid; gap: 16px; margin: 0; }
.tm-who .name { font-size: 1.12rem; font-weight: 700; }

/* ==========================================================================
   HOW TRUST IS BUILT — four large words on one connecting line
   ========================================================================== */
.tm-trust { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.tm-trust::before, .tm-trust::after { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 1px; }
.tm-trust::before { background: var(--tm-line-2); }
.tm-trust::after { background: linear-gradient(90deg, rgb(var(--tm-cyan)), rgb(var(--tm-violet)) 70%, rgba(var(--tm-magenta), .8)); transform-origin: left; }
.js .tm-trust[data-reveal] { opacity: 1; transform: none; }
.js .tm-trust[data-reveal]::after { transform: scaleX(0); }
.js .tm-trust.is-in::after { transform: scaleX(1); transition: transform 2s var(--ease) .2s; }
.tm-trust li { position: relative; padding: 44px clamp(12px, 2vw, 32px) 0 0; }
.tm-trust .dot { position: absolute; left: 0; top: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--tm-bg); border: 1px solid rgb(var(--tm-cyan)); box-shadow: inset 0 0 0 4px var(--tm-bg), inset 0 0 0 8px rgba(var(--tm-cyan), .8); }
.tm-trust li:last-child .dot { border-color: rgb(var(--tm-magenta)); box-shadow: inset 0 0 0 4px var(--tm-bg), inset 0 0 0 8px rgba(var(--tm-magenta), .85); }
.tm-trust h3 { margin: 12px 0 14px; font-size: clamp(1.6rem, .7rem + 2.3vw, 3.3rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; overflow-wrap: anywhere; }
.tm-trust p { margin: 0; max-width: 24ch; color: var(--tm-muted); line-height: 1.6; }
.js .tm-trust li { opacity: 0; transform: translateY(14px); }
.js .tm-trust.is-in li { opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(.3s + var(--i) * .3s); }

/* ==========================================================================
   FINAL CTA
   ========================================================================== */
.tm-cta .tm-cool { display: block; }
.tm-cta .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.tm-cta .atmos .blob { opacity: .4; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px) {
  .tm-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .tm-hero-mark { display: none; }
  .tm-head { grid-template-columns: minmax(0, 1fr); }
  .tm-feature-who { grid-template-columns: minmax(0, 1fr); }
  .tm-story, .tm-story.flip { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .tm-story.flip .tm-story-q { order: 0; }
  .tm-story.flip .tm-who { order: 1; }
  .tm-story.flip .tm-who, .tm-who { padding: 22px 0 0; border: 0; border-top: 1px solid var(--tm-line); }
  .tm-who dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tm-story.flip::before { left: 0; right: auto; }
  .tm-story.flip:hover blockquote p { transform: translateX(4px); }
  /* trust: the line turns vertical */
  .tm-trust { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-left: 40px; }
  .tm-trust::before, .tm-trust::after { left: 7px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .tm-trust::after { background: linear-gradient(rgb(var(--tm-cyan)), rgb(var(--tm-violet)) 70%, rgba(var(--tm-magenta), .8)); transform-origin: top; }
  .js .tm-trust[data-reveal]::after { transform: scaleY(0); }
  .js .tm-trust.is-in::after { transform: scaleY(1); }
  .tm-trust li { padding: 0; }
  .tm-trust .dot { left: -40px; top: 2px; }
  .tm-trust p { max-width: 40ch; }
}
@media (max-width: 600px) {
  .tm-hero { min-height: 0; text-align: left; }
  .tm-feature { padding-left: 22px; }
  .tm-feature-who dl, .tm-who dl { grid-template-columns: minmax(0, 1fr); }
  .tm-story-q { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tm-rise { animation: none !important; }
  .js .tm-feature[data-reveal] blockquote p, .js .tm-trust li { opacity: 1 !important; transform: none !important; transition: none !important; }
  .js .tm-trust[data-reveal]::after { transform: none !important; transition: none !important; }
  .tm-story::before, .tm-story blockquote p { transition: none !important; }
}
