/*
Theme Name: TMCC กลับมาแล้ววว
Theme URI: https://www.tmcc.co.th/
Author: Touch Mind Capital Co., Ltd.
Author URI: https://www.tmcc.co.th/
Description: Production block theme for TMCC Engineering + Integration. Built for WordPress 7.1, accessibility, performance, search engines and AI crawlers.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tmcc-comeback
Tags: block-patterns, full-site-editing, custom-logo, featured-images, translation-ready, accessibility-ready
*/

:root {
  --tmcc-ink: #071426;
  --tmcc-navy: #0a1d35;
  --tmcc-blue: #0078d4;
  --tmcc-cyan: #36c5f0;
  --tmcc-sky: #eaf8ff;
  --tmcc-line: #d7e2ec;
  --tmcc-muted: #5d6b7a;
  --tmcc-white: #ffffff;
  --tmcc-radius: 18px;
  --tmcc-shadow: 0 20px 60px rgba(7, 20, 38, .12);
}

html { scroll-behavior: smooth; }
body { text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
a { text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--tmcc-cyan); outline-offset: 3px; }

.tmcc-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: rgba(7,20,38,.94);
  backdrop-filter: blur(16px);
}

.admin-bar .tmcc-site-header { top: 32px; }
.tmcc-brand-lockup { min-width: 176px; }
.tmcc-brand-lockup .wp-block-site-title { letter-spacing: .035em; line-height: 1.12; }
.tmcc-brand-subtitle { letter-spacing: .11em; line-height: 1.25; text-transform: uppercase; }
.tmcc-navigation { line-height: 1.25; }
.tmcc-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: .22rem;
  flex: 0 0 auto;
  margin-left: .65rem;
  padding: .2rem;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(255,255,255,.055);
}
.tmcc-language-option {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 34px;
  margin: 0;
  padding: .36rem .55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #dcefff;
  font: inherit;
  font-size: .72rem;
  font-weight: 760;
  line-height: 1;
  letter-spacing: .04em;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.tmcc-language-option:hover { background: rgba(255,255,255,.1); color: #fff; }
.tmcc-language-option[aria-pressed="true"] {
  background: var(--tmcc-cyan);
  color: var(--tmcc-ink);
  box-shadow: 0 4px 14px rgba(54,197,240,.22);
}
.tmcc-language-flag { display: block; width: 18px; height: 12px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.28); }

.tmcc-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  min-height: clamp(680px, 84vh, 900px);
  background: var(--tmcc-ink);
}

.tmcc-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(5,17,32,.97) 0%, rgba(5,17,32,.84) 48%, rgba(5,17,32,.20) 100%), var(--tmcc-hero-image, none) center/cover no-repeat;
}

.tmcc-hero::after {
  content: "";
  position: absolute;
  inset: auto -12% -48% 34%;
  z-index: -1;
  height: 72%;
  transform: rotate(-8deg);
  background: linear-gradient(90deg, transparent, rgba(54,197,240,.18), transparent);
}

.tmcc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin: 0 0 1.4rem;
  color: var(--tmcc-cyan);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.tmcc-eyebrow::before { content: ""; width: 36px; height: 2px; background: currentColor; }
.tmcc-display { max-width: 790px; letter-spacing: -.032em; text-wrap: balance; }
.tmcc-lead { max-width: 680px; color: #c8d7e6; line-height: 1.6; text-wrap: pretty; }

.tmcc-button .wp-block-button__link,
.wp-block-button.tmcc-button .wp-block-button__link {
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.tmcc-button .wp-block-button__link:hover,
.wp-block-button.tmcc-button .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(54,197,240,.24);
}

.tmcc-proof-strip { border-block: 1px solid var(--tmcc-line); }
.tmcc-proof-item { border-left: 1px solid var(--tmcc-line); padding-left: clamp(1rem, 3vw, 2.25rem); }
.tmcc-proof-item:first-child { border-left: 0; padding-left: 0; }
.tmcc-proof-item:nth-child(2) > .wp-block-heading.has-large-font-size {
  max-width: none;
  font-size: clamp(1rem, .9rem + .25vw, 1.15rem) !important;
  line-height: 1.3;
  letter-spacing: -.01em;
  white-space: nowrap;
}

.tmcc-section { padding-block: clamp(4.5rem, 8vw, 8rem); }
.tmcc-section-heading { max-width: 760px; text-wrap: balance; }
.tmcc-section-heading.has-x-large-font-size { font-size: clamp(1.75rem, 1.45rem + 1.15vw, 2.55rem) !important; }
.tmcc-muted { color: var(--tmcc-muted); }

/* Positioning copy: balanced bilingual typography, including templates
   customized in the Site Editor before this class was introduced. */
.tmcc-positioning-th,
.tmcc-section.has-sky-background-color > .wp-block-columns.are-vertically-aligned-center > .wp-block-column:nth-child(2) > .has-large-font-size {
  font-size: clamp(1.32rem, 1.15rem + .65vw, 1.72rem) !important;
  line-height: 1.64;
  word-break: normal;
  overflow-wrap: normal;
  line-break: auto;
}
.tmcc-positioning-en,
.tmcc-section.has-sky-background-color > .wp-block-columns.are-vertically-aligned-center > .wp-block-column:nth-child(2) > .tmcc-muted {
  font-size: clamp(.96rem, .92rem + .16vw, 1.07rem);
  line-height: 1.72;
}

.tmcc-card {
  height: 100%;
  box-sizing: border-box;
  padding: clamp(1.2rem, 1.05rem + .35vw, 1.45rem);
  border: 1px solid var(--tmcc-line);
  border-radius: var(--tmcc-radius);
  background: var(--tmcc-white);
  box-shadow: 0 8px 28px rgba(7,20,38,.06);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.tmcc-card:hover {
  transform: translateY(-5px);
  border-color: rgba(0,120,212,.38);
  box-shadow: var(--tmcc-shadow);
}

.tmcc-card-number {
  margin: 0 0 .65rem;
  color: var(--tmcc-blue);
  font-size: .78rem;
  font-weight: 780;
  line-height: 1.2;
  letter-spacing: .075em;
}
.tmcc-card > .wp-block-heading.has-large-font-size {
  margin-block: .1rem .7rem;
  font-size: clamp(1.15rem, 1.04rem + .4vw, 1.42rem) !important;
  line-height: 1.24;
  letter-spacing: -.012em;
}
.tmcc-card > p:not(.tmcc-card-number) {
  margin-bottom: 0;
  font-size: clamp(.88rem, .84rem + .12vw, .96rem);
  line-height: 1.55;
}
.tmcc-services .tmcc-card { min-height: 228px; padding: 1.35rem !important; }
.tmcc-dark-card { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.055); box-shadow: none; }
.tmcc-dark-card:hover { border-color: var(--tmcc-cyan); box-shadow: 0 18px 50px rgba(0,0,0,.20); }

.tmcc-integration-grid { position: relative; }
.tmcc-layer { min-height: 108px; padding: 1.05rem 1.25rem !important; border-left: 4px solid var(--tmcc-cyan); }
.tmcc-layer > .wp-block-heading.has-large-font-size { margin-bottom: .45rem; font-size: clamp(1.12rem, 1.02rem + .3vw, 1.34rem) !important; }
.tmcc-layer > p:not(.tmcc-card-number) { font-size: clamp(.84rem, .81rem + .1vw, .91rem); line-height: 1.45; }
.tmcc-layer:nth-child(2) { border-left-color: #1aa7e8; }
.tmcc-layer:nth-child(3) { border-left-color: #0b84d1; }
.tmcc-layer:nth-child(4) { border-left-color: #065ea4; }

.tmcc-industries .wp-block-cover { min-height: 360px; border-radius: var(--tmcc-radius); overflow: hidden; }
.tmcc-industries .wp-block-cover__background { transition: opacity .25s ease; }
.tmcc-industries .wp-block-cover:hover .wp-block-cover__background { opacity: .58 !important; }

.tmcc-process { counter-reset: tmcc-step; }
.tmcc-process > .wp-block-column { position: relative; }
.tmcc-process > .wp-block-column::before {
  counter-increment: tmcc-step;
  content: "0" counter(tmcc-step);
  display: block;
  margin-bottom: 1rem;
  color: var(--tmcc-cyan);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .12em;
}

.tmcc-reference-note { max-width: 880px; }
.tmcc-cta { position: relative; overflow: hidden; border-radius: 26px; }
.tmcc-cta::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -180px;
  width: 420px;
  height: 420px;
  border: 80px solid rgba(54,197,240,.13);
  border-radius: 50%;
  pointer-events: none;
}

.tmcc-query-card .wp-block-post-featured-image img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; }
.tmcc-query-card .wp-block-post-title a { text-decoration: none; }
.tmcc-query-card .wp-block-post-title a:hover { color: var(--tmcc-blue); }

.tmcc-project-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-block: var(--wp--preset--spacing--40);
  border: 1px solid var(--tmcc-line);
  border-radius: var(--tmcc-radius);
  overflow: hidden;
}
.tmcc-project-fact { padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--tmcc-line); }
.tmcc-project-fact:nth-child(odd) { border-right: 1px solid var(--tmcc-line); }
.tmcc-project-fact dt { color: var(--tmcc-muted); font-size: .82rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.tmcc-project-fact dd { margin: .4rem 0 0; font-weight: 620; }

.tmcc-contact-form { display: grid; gap: 1.1rem; max-width: 820px; }
.tmcc-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.tmcc-field { display: grid; gap: .42rem; }
.tmcc-field label { font-weight: 700; }
.tmcc-field input, .tmcc-field select, .tmcc-field textarea {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border: 1px solid #a9bac9;
  border-radius: 9px;
  background: #fff;
  color: var(--tmcc-ink);
  font: inherit;
  padding: .78rem .9rem;
}
.tmcc-field textarea { min-height: 150px; resize: vertical; }
.tmcc-field input:focus, .tmcc-field select:focus, .tmcc-field textarea:focus { border-color: var(--tmcc-blue); outline: 3px solid rgba(0,120,212,.18); }
.tmcc-form-notice { border-left: 4px solid var(--tmcc-blue); background: var(--tmcc-sky); padding: 1rem 1.2rem; }
.tmcc-honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.tmcc-site-footer { border-top: 1px solid rgba(255,255,255,.12); }
.tmcc-site-footer a { color: #dcefff; }

/* Bilingual About page. Each language remains visible on one URL while
   retaining clear visual hierarchy and machine-readable language markers. */
.tmcc-about-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(5.5rem, 10vw, 9rem);
  background: var(--tmcc-ink);
}
.tmcc-about-hero::after {
  content: "";
  position: absolute;
  inset: auto -10rem -15rem auto;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border: 7rem solid rgba(54,197,240,.1);
  border-radius: 50%;
}
.tmcc-about-title { max-width: 940px; text-wrap: balance; }
.tmcc-about-title > .tmcc-lang-en,
.tmcc-about-title > .tmcc-lang-th { display: block; }
.tmcc-about-title > .tmcc-lang-th {
  margin-top: .9rem;
  font-size: .46em;
  line-height: 1.45;
  letter-spacing: 0;
}
html[data-tmcc-language="th"] .tmcc-about-title > .tmcc-lang-th {
  margin-top: 0;
  font-size: 1em;
  line-height: 1.28;
}
.tmcc-about-intro { max-width: 900px; }
.tmcc-about-intro.tmcc-lang-th { font-size: clamp(1.18rem, 1.05rem + .45vw, 1.5rem); line-height: 1.68; }
.tmcc-about-intro.tmcc-lang-en { color: #b9ccdc; font-size: clamp(.98rem, .92rem + .18vw, 1.08rem); line-height: 1.72; }
.tmcc-lang-th { word-break: normal; overflow-wrap: normal; line-break: auto; }
.tmcc-lang-en { text-wrap: pretty; }
.tmcc-bilingual-copy { display: grid; gap: clamp(1.35rem, 2.6vw, 2.5rem); }
.tmcc-bilingual-copy > .tmcc-lang-en {
  padding-top: clamp(1rem, 1.8vw, 1.5rem);
  border-top: 1px solid var(--tmcc-line);
  color: var(--tmcc-muted);
}
.tmcc-about-facts { border-block: 1px solid var(--tmcc-line); }
.tmcc-about-fact { min-height: 104px; }
.tmcc-about-fact + .tmcc-about-fact { border-left: 1px solid var(--tmcc-line); padding-left: clamp(1rem, 3vw, 2.25rem); }
.tmcc-about-card { height: 100%; }
.tmcc-about-card .tmcc-lang-th { margin-bottom: .5rem; }
.tmcc-about-card .tmcc-lang-en { margin-bottom: 0; color: var(--tmcc-muted); font-size: .88rem; line-height: 1.55; }
.tmcc-about-step {
  position: relative;
  padding-top: 1.2rem;
  border-top: 2px solid var(--tmcc-cyan);
}
.tmcc-about-step .tmcc-step-number { color: var(--tmcc-blue); font-size: .75rem; font-weight: 800; letter-spacing: .13em; }
.tmcc-about-values .tmcc-about-card { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.055); }
.tmcc-about-values .tmcc-about-card .tmcc-lang-en { color: #b9ccdc; }
.tmcc-about-mission { border-left: 4px solid var(--tmcc-cyan); }

@media (max-width: 781px) {
  .admin-bar .tmcc-site-header { top: 46px; }
  .tmcc-hero { min-height: auto; }
  .tmcc-hero > .wp-block-group.alignwide {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin-inline: auto;
    padding-inline: clamp(1.25rem, 5.5vw, 1.75rem);
  }
  .tmcc-display { font-size: clamp(2.4rem, 10.5vw, 3.55rem) !important; letter-spacing: -.026em; }
  .tmcc-lead { font-size: clamp(1.08rem, 3.4vw, 1.3rem) !important; }
  .tmcc-proof-item { border-left: 0; border-top: 1px solid var(--tmcc-line); padding: 1.25rem 0 0; }
  .tmcc-proof-item:first-child { border-top: 0; padding-top: 0; }
  .tmcc-form-grid { grid-template-columns: 1fr; }
  .tmcc-project-facts { grid-template-columns: 1fr; }
  .tmcc-project-fact:nth-child(odd) { border-right: 0; }
  .tmcc-services .tmcc-card { min-height: auto; }
  .tmcc-proof-item:nth-child(2) > .wp-block-heading.has-large-font-size { white-space: normal; }
  .tmcc-about-fact + .tmcc-about-fact { border-left: 0; border-top: 1px solid var(--tmcc-line); padding: 1.25rem 0 0; }
  .tmcc-about-fact { min-height: auto; }
  .tmcc-language-switcher { margin-left: auto; }
  .tmcc-language-option { min-width: 38px; padding-inline: .42rem; }
  .tmcc-language-option > span:not(.screen-reader-text) { display: none; }
}

@media (min-width: 782px) and (max-width: 1050px) {
  .tmcc-proof-item:nth-child(2) > .wp-block-heading.has-large-font-size { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
  .tmcc-site-header, .tmcc-site-footer, .wp-block-buttons { display: none !important; }
  body { color: #000; background: #fff; }
  a { color: #000; text-decoration: none; }
}
