/* Public-site foundation. Admin and email templates do not load this file. */
:root {
  --tm-font-sans: "Kanit", Arial, sans-serif;
  --tm-color-accent: #ffac0b;
  --tm-color-accent-hover: #ffc04b;
  --tm-color-accent-text: #946100;
  --tm-color-ink: #171717;
  --tm-color-muted: #656565;
  --tm-color-inverse: #ffffff;
  --tm-color-muted-inverse: #b6b6b6;
  --tm-color-danger: #b42318;
  --tm-surface: #fafafa;
  --tm-surface-warm: #f7f4ee;
  --tm-surface-dark: #141414;
  /* Dark section background with a faint grid and an amber glow top right (CTA, Industries). */
  --tm-surface-dark-grid:
    radial-gradient(60% 90% at 88% 0%, rgba(255, 172, 11, .16), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px) 0 0 / 64px 64px,
    #141414;
  --tm-border: #d5d5d5;
  --tm-button-radius: 4px;
  --tm-control-radius: 4px;
  --tm-button-height: 48px;
  --tm-duration-fast: 180ms;
  --tm-duration-normal: 300ms;
  --tm-motion-reduced: 0.01ms;
  --tm-ease: cubic-bezier(.2,.7,.2,1);
  --tm-shell-max: 1320px;
  --tm-shell-gutter: 40px;
  --primary: var(--tm-color-accent);
  --custom: var(--tm-color-accent);
  /* Compatibility with the original template's semantic variables. */
  --secondary: var(--tm-color-ink);
  --black-2: var(--tm-surface-dark);
}

body, body input, body textarea, body select, body button {
  font-family: var(--tm-font-sans);
}
body h1, body h2, body h3, body h4, body h5, body h6,
body .sec-title, body .sec-title-2, body .hero-title,
body .job-position, body .anow-step-title {
  font-family: var(--tm-font-sans);
}
/* Do not target i, icon spans, or pseudo-elements: their icon fonts are intentional. */
body .custom-color { color: var(--tm-color-accent-text); }
body .dark .custom-color { color: var(--tm-color-accent); }

/* Primary actions: one shape, palette, type scale, target size and motion. */
body :is(.tm-button, .solutions-button, .service-story__button, .careers-button,
  .career-job-apply, .culture-button, .mango-next > a, .projects-cta > a,
  .life-gallery__btn, .anow-btn-continue, .anow-btn-submit, .job-form-btn,
  .wc-btn-primary, .wc-btn-secondary) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: var(--tm-button-height);
  width: auto;
  height: auto;
  max-width: 100%;
  padding: 14px 22px;
  border: 1px solid var(--tm-color-accent);
  border-radius: var(--tm-button-radius);
  background: var(--tm-color-accent);
  color: var(--tm-color-ink);
  font-family: var(--tm-font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  box-shadow: none;
  transition: background-color var(--tm-duration-fast) var(--tm-ease),
    border-color var(--tm-duration-fast) var(--tm-ease),
    color var(--tm-duration-fast) var(--tm-ease);
}
body :is(.tm-button, .solutions-button, .service-story__button, .careers-button,
  .career-job-apply, .culture-button, .mango-next > a, .projects-cta > a,
  .life-gallery__btn, .anow-btn-continue, .anow-btn-submit, .job-form-btn,
  .wc-btn-primary, .wc-btn-secondary):hover {
  background: var(--tm-color-accent-hover);
  border-color: var(--tm-color-accent-hover);
  color: var(--tm-color-ink);
  box-shadow: none;
  transform: none;
}
/* Legacy circular magnetic buttons contain line breaks and a ripple-only span. */
body :is(.wc-btn-primary, .wc-btn-secondary) > span:empty { display: none; }
body :is(.wc-btn-primary, .wc-btn-secondary) br { display: none; }
body :is(.wc-btn-primary, .wc-btn-secondary) > i { position: static; margin: 0; padding: 0; transform: none; }
body .btn_wrapper:has(> :is(.wc-btn-primary, .wc-btn-secondary)) {
  position: relative;
  width: fit-content;
  max-width: 100%;
  min-height: var(--tm-button-height);
  height: auto;
  display: inline-flex;
  margin: 24px 0 0;
  inset: auto;
  transform: none !important;
}
body :is(.wc-btn-primary, .wc-btn-secondary) {
  position: static;
  inset: auto;
  width: max-content;
  min-width: max-content;
  white-space: nowrap;
  transform: none !important;
}
body .anow-btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: var(--tm-button-height);
  padding: 14px 22px;
  border: 1px solid var(--tm-color-ink);
  border-radius: var(--tm-button-radius);
  background: transparent;
  color: var(--tm-color-ink);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  box-shadow: none;
  transition: background-color var(--tm-duration-fast) var(--tm-ease), color var(--tm-duration-fast) var(--tm-ease);
}
body .anow-btn-back:hover { background: var(--tm-color-ink); color: var(--tm-color-inverse); box-shadow: none; transform: none; }
body .anow-btn-back {
  min-height: var(--tm-button-height);
  border: 1px solid var(--tm-border);
  border-radius: var(--tm-button-radius);
  padding: 14px 22px;
  background: transparent;
  color: var(--tm-color-ink) !important;
  box-shadow: none;
  font-size: 15px;
  font-weight: 500;
}
body .anow-btn-back:hover {
  border-color: var(--tm-color-ink);
  background: var(--tm-color-ink);
  color: var(--tm-color-inverse) !important;
}

/* Circular actions are deliberately reserved for image/card navigation. */
body :is(.tm-icon-button, .project-card__link, .culture-card__arrow) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--tm-color-accent);
  background: var(--tm-color-accent);
  color: var(--tm-color-ink);
}
body :is(.tm-icon-button, .project-card__link):hover { background: var(--tm-color-accent-hover); }
body :is(.tm-text-link, .projects-explore, .careers-text-link, .service-story__text-link,
  .solutions-text-link, .mango-explore, .career-job-details) {
  font-family: var(--tm-font-sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-underline-offset: 5px;
}
body .tm-text-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: inherit;
  padding-bottom: 8px;
  border-bottom: 1px solid currentColor;
}

/* Shared form geometry, retaining validation colors and existing field behavior. */
body :is(#application-form, #contactForm, #jobFormModal) :is(input:not([type="radio"]):not([type="checkbox"]), select, textarea) {
  font-family: var(--tm-font-sans);
  font-size: 16px;
  line-height: 1.5;
  border-radius: var(--tm-control-radius);
}
body :is(#application-form, #contactForm, #jobFormModal) :is(input:not([type="radio"]):not([type="checkbox"]), select) {
  min-height: var(--tm-button-height);
}
body :is(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--tm-color-accent-text);
  outline-offset: 4px;
}
body .contact-sec-title-2 {
  font-size: clamp(42px, 5.5vw, 80px);
  line-height: 1.08;
  letter-spacing: -1.5px;
}

/* Shared editorial hero: composition varies, visual language does not. */
body .tm-editorial-hero {
  background: var(--tm-surface-dark);
  color: var(--tm-color-inverse);
  padding: 145px 0 72px;
  overflow: hidden;
}
body .tm-editorial-hero__grid {
  display: grid;
  grid-template-columns: 1.15fr minmax(0, 1fr);
  gap: 60px;
  align-items: center;
  padding-bottom: 0;
}
body .tm-editorial-hero__copy { min-width: 0; }
body .tm-editorial-hero .tm-editorial-hero__eyebrow {
  color: var(--tm-color-accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  line-height: 1.5;
  margin: 0 0 24px;
  text-transform: uppercase;
}
body .tm-editorial-hero h1 {
  color: var(--tm-color-inverse);
  font-family: var(--tm-font-sans);
  font-size: clamp(46px, 5.4vw, 82px);
  font-weight: 500;
  letter-spacing: -3px;
  line-height: 1.02;
  margin: 0 0 30px;
}
body .tm-editorial-hero h1 em {
  color: var(--tm-color-accent);
  font-style: normal;
}
body .tm-editorial-hero .tm-editorial-hero__description {
  max-width: 480px;
  color: var(--tm-color-muted-inverse);
  font-size: 17px;
  line-height: 1.75;
  margin: 0 0 34px;
}
body .tm-editorial-hero .tm-text-link,
body .tm-editorial-hero .careers-text-link {
  color: var(--tm-color-inverse);
  border-color: var(--tm-color-muted);
}
body .tm-editorial-hero__visual {
  position: relative;
  isolation: isolate;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--tm-surface-dark);
}
body .tm-editorial-hero__visual > img:first-child {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
  animation: none;
}
body .tm-editorial-hero .culture-values {
  border-color: var(--tm-color-muted);
  margin-top: 48px;
  padding-bottom: 0;
}
body .tm-editorial-hero .culture-values h2 { color: var(--tm-color-inverse); }
body .tm-editorial-hero .culture-values p { color: var(--tm-color-muted-inverse); }
body .tm-editorial-hero .culture-values > div > span { color: var(--tm-color-accent); }
@media (min-width: 1200px) { body .tm-editorial-hero { padding-top: 64px; } }
@media (max-width: 991px) {
  body .tm-editorial-hero__grid { gap: 36px; }
  body .tm-editorial-hero h1 { font-size: 46px; letter-spacing: -1.8px; }
}
@media (max-width: 600px) {
  body .tm-editorial-hero { padding: 115px 0 48px; }
  body .tm-editorial-hero__grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  body .tm-editorial-hero .tm-editorial-hero__description { font-size: 16px; }
}

/* All new public layouts share the same rail clearance and content measure. */
body main:is(.careers-view, .culture-page, .company-page, .solutions-page, .service-story, .mango-story, .legal-page) {
  width: auto;
  margin-inline: 0;
}
body :is(.projects-shell, .culture-shell, .careers-shell, .mango-shell,
  .solutions-shell, .service-story__shell, .company-shell, .legal-shell,
  .mango-story .th-gallery > .container) {
  width: min(var(--tm-shell-max), calc(100% - var(--tm-shell-gutter) * 2));
  max-width: var(--tm-shell-max);
}
body :is(.contact__area-6, .hero__area, .project-detail-hero) > .container {
  width: min(var(--tm-shell-max), calc(100% - var(--tm-shell-gutter) * 2));
  max-width: var(--tm-shell-max);
}
body .contact__area-6 .contact-sec-title-2 {
  font-size: clamp(48px, 6.2vw, 88px);
  line-height: 1.04;
  letter-spacing: -3px;
}
body :is(.careers-section-heading, .culture-intro, .culture-join, .solutions-heading) h2,
body .company-page h2:not(.tm-footer__heading) {
  font-size: clamp(30px, 3.8vw, 48px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -1.3px;
}
@media (min-width: 1200px) {
  :root { --tm-rail-width: 52px; }
  body :is(.projects-page main:not(.service-story):not(.solutions-page), .culture-page, .careers-view, .mango-story, .company-page, .solutions-page, .service-story, .legal-page, .contact-page, .tm-footer) {
    padding-left: var(--tm-rail-width);
  }
  body main:has(> .contact__area-6) { padding-left: var(--tm-rail-width); }
}
@media (min-width: 1920px) { :root { --tm-rail-width: 72px; } }
@media (max-width: 600px) {
  :root { --tm-shell-gutter: 20px; }
  body .contact__area-6 .contact-sec-title-2 { font-size: 46px; letter-spacing: -1.8px; }
  body :is(.tm-button, .solutions-button, .service-story__button, .careers-button,
    .career-job-apply, .culture-button, .mango-next > a, .projects-cta > a,
    .life-gallery__btn, .anow-btn-continue, .anow-btn-submit, .job-form-btn,
    .wc-btn-primary, .wc-btn-secondary) { gap: 16px; padding: 13px 18px; }
}
body :is(.tm-button, .anow-btn-continue, .anow-btn-submit, .job-form-btn):disabled {
  opacity: .6;
  cursor: not-allowed;
  box-shadow: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body *, body *::before, body *::after {
    animation-duration: var(--tm-motion-reduced) !important;
    animation-iteration-count: 1 !important;
    transition-duration: var(--tm-motion-reduced) !important;
    scroll-behavior: auto !important;
  }
  body :is(.cursor1, .cursor2, .cursor, #cursor) { display: none !important; }
  body :is(.title-anim, .animation__word_come, .animation__char_come,
    .animation__word_come > div, .animation__char_come > div) { opacity: 1 !important; visibility: visible !important; }
}
/* Portfolio atmosphere shared by public heroes; foreground remains above decoration. */
body .project-detail-hero::after { content:''; position:absolute; inset:0; pointer-events:none; background:radial-gradient(ellipse at 78% 48%,#dc87001c 0%,transparent 46%); z-index:0; }
body .project-detail-hero__content { position:relative; z-index:1; }
body :is(.tm-hero-atmosphere,.tm-editorial-hero,.solutions-hero,.service-story__hero,.legal-hero,.mango-hero,.contact__area-6,.hero__area,.tm-job-hero) { position:relative; isolation:isolate; overflow:hidden; background:var(--tm-surface-dark); color:var(--tm-color-inverse); }
body :is(.tm-hero-atmosphere,.tm-editorial-hero,.solutions-hero,.service-story__hero,.legal-hero,.mango-hero,.contact__area-6,.hero__area,.tm-job-hero)::before { content:''; position:absolute; width:500px; height:500px; border:1px solid #ffffff0c; border-radius:50%; left:-280px; top:140px; pointer-events:none; z-index:-1; }
body :is(.tm-hero-atmosphere,.tm-editorial-hero,.solutions-hero,.service-story__hero,.legal-hero,.mango-hero,.contact__area-6,.tm-job-hero)::after { content:''; position:absolute; inset:0; z-index:-1; pointer-events:none; background:radial-gradient(ellipse at 78% 48%,#dc87001c 0%,transparent 46%),radial-gradient(ellipse at 55% 80%,#9e55000b 0%,transparent 48%); background-size:120% 120%; }
@keyframes tm-hero-ambient { from { background-position:0% 20%; opacity:.65; } to { background-position:100% 70%; opacity:1; } }
@media(prefers-reduced-motion:no-preference) { body :is(.tm-hero-atmosphere,.tm-editorial-hero,.solutions-hero,.service-story__hero,.legal-hero,.mango-hero,.contact__area-6,.tm-job-hero)::after { animation:tm-hero-ambient 14s ease-in-out infinite alternate; } }
body :is(.legal-hero,.mango-hero,.contact__area-6,.tm-job-hero) :is(h1,h2,h3) { color:var(--tm-color-inverse); }
body .mango-hero :is(.mango-explore, .mango-explore:hover) { color:var(--tm-color-inverse); }
body .mango-hero h1 em { color:var(--tm-color-accent); }
body :is(.legal-hero,.mango-hero,.contact__area-6,.tm-job-hero) :is(p,.legal-lead,.mango-back,.mango-summary,.mango-eyebrow,.legal-eyebrow,.legal-tabs a,.contact__info a,.contact__info span) { color:var(--tm-color-muted-inverse); }
body :is(.legal-hero,.mango-hero,.tm-job-hero) em, body .legal-tabs a[aria-current='page'] { color:var(--tm-color-accent); }
body .contact__area-6 :is(input,textarea) { color:var(--tm-color-inverse); border-color:#ffffff55; }
body .contact__area-6 :is(input,textarea)::placeholder { color:var(--tm-color-muted-inverse); opacity:1; }
body .tm-job-hero { padding:40px; margin-bottom:40px; }
body .tm-job-hero .text-muted { color:var(--tm-color-muted-inverse)!important; }
body :is(.tm-editorial-hero,.solutions-hero,.service-story__hero,.legal-hero,.mango-hero,.tm-job-hero) :is(h1,.sec-title) { font-size:clamp(48px,6.2vw,88px); line-height:1.04; letter-spacing:-3px; font-weight:500; overflow-wrap:break-word; }
body :is(.tm-editorial-hero,.solutions-hero,.service-story__hero,.legal-hero,.mango-hero) p { font-size:17px; line-height:1.75; }
@media(max-width:600px) { body .tm-job-hero { padding:28px 20px; margin-bottom:28px; } body :is(.tm-editorial-hero,.solutions-hero,.service-story__hero,.legal-hero,.mango-hero,.tm-job-hero) :is(h1,.sec-title) { font-size:46px; letter-spacing:-1.8px; } }

/* Home hero (video): the shared atmosphere glow must not replace the dark overlay. The overlay sits above the
   video and its poster image but below the content (.hero__content is z-index 1), so white text stays readable. */
body .hero__area::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 78% 48%, #dc87001c 0%, transparent 46%),
    linear-gradient(90deg, rgba(20, 20, 20, .86) 0%, rgba(20, 20, 20, .7) 55%, rgba(20, 20, 20, .64) 100%);
}

/* Home hero layout: below 1200px the subtitle sits under the headline (it was absolutely positioned and
   collided with the title), the "120+" note flows after it, and the decorative arrow is hidden. */
@media (max-width: 1199.98px) {
  body .hero__area .hero__title-wrapper { max-width: none; margin-bottom: 28px; }
  body .hero__area .hero__title { line-height: 1.05; }
  body .hero__area .hero__sub-title { position: static; max-width: 520px; padding-top: 20px; font-size: clamp(16px, 2.4vw, 20px); }
  body .hero__area .hero__content > img { display: none; }
  body .hero__area .hero__content .experience { position: static; margin-top: 4px; }
}

/* Home hero on narrow screens: one even, darker overlay (the text spans the full width), a title that fits
   without breaking inside a word, and a subtitle that stays legible over the video. */
body .hero__area .hero__sub-title { color: rgba(255, 255, 255, .86); }
@media (max-width: 991.98px) {
  body .hero__area::after {
    background:
      radial-gradient(ellipse at 78% 48%, #dc87001c 0%, transparent 46%),
      linear-gradient(rgba(20, 20, 20, .76), rgba(20, 20, 20, .76));
  }
}
@media (max-width: 767.98px) {
  body .hero__area .hero__title { font-size: clamp(34px, 9.6vw, 48px); overflow-wrap: normal; word-break: normal; }
}

/* WhatsApp chat button. A third-party brand control, so it keeps WhatsApp green instead of the amber action style. */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 9980;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  padding: 6px 22px 6px 6px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: #075e54;
  color: #fff;
  font-family: var(--tm-font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  transition: background-color var(--tm-duration-fast) var(--tm-ease), transform var(--tm-duration-normal) var(--tm-ease);
}
.wa-float:hover { background: #0a7566; color: #fff; transform: translateY(-2px); }
.wa-float:focus-visible { outline: 2px solid transparent; box-shadow: 0 0 0 2px #fff, 0 0 0 5px #141414, 0 10px 28px rgba(0, 0, 0, .28); }
.wa-float__icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #25d366;
  font-size: 24px;
}
.wa-float__icon i { color: #fff; line-height: 1; }
/* The scroll-to-top button moves up so the two never overlap. */
body .scroll-top { bottom: 88px; }
@media (max-width: 767.98px) {
  .wa-float { right: 16px; padding: 6px; }
  .wa-float__label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .wa-float__icon { width: 46px; height: 46px; font-size: 28px; }
  body .scroll-top { right: 20px; bottom: 90px; }
}
@media (prefers-reduced-motion: no-preference) {
  .wa-float { animation: wa-float-in 600ms var(--tm-ease) 1.2s both; }
  .wa-float__icon::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #25d366;
    opacity: 0;
    animation: wa-float-pulse 3.2s ease-out 3s infinite;
  }
}
@keyframes wa-float-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes wa-float-pulse { 0% { transform: scale(1); opacity: .6; } 70%, 100% { transform: scale(1.7); opacity: 0; } }

/* Homepage light sections: bright amber text on white is hard to read (about 1.9:1). Titles use the ink colour,
   highlighted words use the darker accent text colour (readable on light surfaces); amber stays on buttons and dark sections. */
body :is(.about__area, .workflow__area, .blog__area) .sec-title { color: var(--tm-color-ink); }
body .about__area .about__content span { color: var(--tm-color-accent-text); }
body .counter__area .counter__number { color: var(--tm-color-ink); }

/* Project detail pages: the light showcase uses the darker accent for its label and website link (amber on white is about 1.9:1). */
body .project-detail-showcase__eyebrow, body .project-detail-showcase__meta-item a { color: var(--tm-color-accent-text); }
