/* ZAURIX visual refinement — preserve mode
   Loaded after styles.css and runtime.css.
   No content, route, form, chat, or brand-asset contracts are changed here. */

:root {
  --refine-panel: rgba(0, 0, 0, 0.24);
  --refine-panel-deep: rgba(0, 0, 0, 0.34);
  --refine-line: rgba(255, 255, 255, 0.18);
  --refine-line-strong: rgba(255, 255, 255, 0.34);
  --refine-soft-white: rgba(255, 255, 255, 0.88);
  --refine-shadow: rgba(58, 10, 10, 0.44);
}

/* -------------------------------------------------------------------------- */
/* Global rhythm and type                                                     */
/* -------------------------------------------------------------------------- */

html {
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  overflow-x: hidden;
  letter-spacing: 0.005em;
}

p,
li,
dd,
label,
input,
select,
textarea,
button {
  line-height: 1.76;
  text-wrap: pretty;
}

h1,
h2,
h3 {
  line-height: 1.24;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.section {
  padding-block: clamp(88px, 8vw, 116px);
}

.section > .wrap,
.site-footer > .wrap {
  position: relative;
  z-index: 1;
}

.section-head {
  margin-bottom: clamp(40px, 5vw, 58px);
}

.section-head h2 {
  column-gap: 0.52em;
  row-gap: 0.18em;
  align-items: flex-start;
}

.section-head h2 .icon-heading {
  flex: 0 0 auto;
  margin-top: 0.14em;
}

.section-lead {
  line-height: 1.82;
}

/* Keep Thai readable without loosening the compact English labels. */
.en,
.section-index,
.eyebrow,
.value-en,
.service-index,
.why-index,
.step-index,
.platform-label {
  letter-spacing: 0.14em;
}

/* -------------------------------------------------------------------------- */
/* Icon system                                                                 */
/* -------------------------------------------------------------------------- */

.icon {
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.icon-heading {
  width: 1em;
  height: 1em;
}

.site-nav .icon,
.footer-nav .icon,
.contact-meta .icon {
  width: 16px;
  height: 16px;
}

.site-nav a:not(.btn),
.footer-nav a,
.contact-meta dt {
  gap: 9px;
}

/* A small chamfered outline badge gives all content icons one deliberate home. */
.icon-card {
  width: 40px;
  height: 40px;
  padding: 9px;
  margin-bottom: 18px;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.06);
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}

.icon-launcher {
  width: 27px;
  height: 27px;
}

/* -------------------------------------------------------------------------- */
/* Header and navigation                                                       */
/* -------------------------------------------------------------------------- */

.site-header {
  height: var(--header-h);
  box-shadow: 0 1px 0 rgba(58, 10, 10, 0.28);
}

.header-inner {
  gap: 20px;
}

.logo-link {
  min-height: 44px;
}

.logo-link img {
  height: 34px;
}

.site-nav {
  gap: 8px 18px;
}

.site-nav ul {
  gap: 4px 18px;
}

.site-nav a:not(.btn) {
  min-height: 44px;
  padding-block: 10px;
  font-size: 0.88rem;
  line-height: 1.2;
}

.header-cta {
  min-height: 48px;
}

.nav-toggle {
  min-width: 44px;
  min-height: 44px;
}

/* runtime.css owns the menu display contract through 1100px; these rules only
   tune its geometry and never force desktop display inside that breakpoint. */
@media (max-width: 1100px) {
  .header-inner {
    gap: 16px;
  }

  .site-nav ul a:not(.btn) {
    display: flex;
    min-height: 52px;
    padding: 14px 0;
    font-size: 1.1rem;
    align-items: center;
    gap: 11px;
  }

  .site-nav ul a .icon {
    width: 18px;
    height: 18px;
  }

  .header-cta {
    min-height: 52px;
  }
}

/* -------------------------------------------------------------------------- */
/* Hero and quiet decorative field                                            */
/* -------------------------------------------------------------------------- */

.hero-content {
  padding-block: clamp(68px, 8vw, 104px) clamp(104px, 12vw, 136px);
}

.hero-logo {
  margin-bottom: clamp(28px, 3.5vw, 38px);
}

.hero h1 {
  line-height: 1.18;
}

.hero-lead {
  line-height: 1.82;
}

/* Existing geometric motion remains, but sits behind the message rather than
   competing with it. */
.hero > .bg-anim,
.section > .bg-anim,
.site-footer > .bg-anim {
  opacity: 0.42;
}

.hero > .bg-anim {
  opacity: 0.34;
}

.bg-peaks {
  opacity: 0.72;
}

/* -------------------------------------------------------------------------- */
/* Section alignment and panels                                                */
/* -------------------------------------------------------------------------- */

.about-grid,
.contact-grid {
  gap: clamp(36px, 6vw, 72px);
}

.about-copy p + p {
  margin-top: 1.08em;
}

.about-copy {
  max-width: 64ch;
}

.values-grid {
  border-top-width: 1px;
}

.values-grid li {
  min-height: 160px;
  padding: 30px 24px 34px;
}

.value-en {
  margin-bottom: 12px;
}

.value-th {
  line-height: 1.72;
}

.why-grid {
  border: 1px solid var(--refine-line-strong);
}

.why-card {
  min-height: 100%;
  padding: 34px 30px 38px;
  border-color: var(--refine-line);
}

.why-card h3,
.service-card h3,
.step-card h3 {
  line-height: 1.32;
}

.why-card p,
.step-card p,
.service-card p {
  line-height: 1.78;
}

.license-note {
  line-height: 1.75;
}

.services-grid {
  gap: clamp(16px, 2.2vw, 24px);
}

.service-card {
  padding: 32px 28px 38px;
  box-shadow: 7px 7px 0 var(--refine-shadow);
}

.service-card .placeholder-list {
  row-gap: 10px;
  line-height: 1.6;
}

.steps-stair {
  gap: clamp(14px, 2vw, 20px);
}

.step-card {
  padding: 30px 26px 34px;
  box-shadow: 7px 7px 0 var(--refine-shadow);
}

.step-card .icon-card {
  margin-bottom: 18px;
}

.steps-cta {
  margin-top: clamp(40px, 5vw, 56px);
}

/* -------------------------------------------------------------------------- */
/* Platform gallery (parent markup contract)                                   */
/* -------------------------------------------------------------------------- */

.section-gallery .platform-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(16px, 2.6vw, 28px);
}

.section-gallery .platform-card {
  display: flex;
  flex-direction: column;
  align-self: start;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--refine-line-strong);
  background: var(--refine-panel);
  color: var(--white);
  box-shadow: 8px 8px 0 var(--refine-shadow);
}

.section-gallery .platform-frame {
  display: block;
  min-width: 0;
  padding: clamp(12px, 2.2vw, 24px);
  overflow: hidden;
  background: var(--red-deep);
  border-bottom: 1px solid var(--refine-line);
}

.section-gallery .platform-frame > a {
  display: block;
  width: 100%;
}

.section-gallery .platform-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
  filter: none;
  transform: none;
  transition: none;
}

.section-gallery .platform-card figcaption {
  display: block;
  padding: 20px 22px 24px;
}

.section-gallery .platform-label {
  display: block;
  margin-bottom: 9px;
  color: var(--refine-soft-white);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.35;
  text-transform: uppercase;
}

.section-gallery .platform-card h3 {
  margin-bottom: 8px;
  font-size: clamp(1.15rem, 2vw, 1.42rem);
  line-height: 1.32;
}

.section-gallery .platform-card p {
  color: var(--refine-soft-white);
  line-height: 1.72;
}

.section-gallery .platform-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 16px;
  padding: 8px 13px;
  border: 1px solid var(--refine-line-strong);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 3px;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.section-gallery .platform-source:hover,
.section-gallery .platform-source:focus-visible {
  background: var(--white);
  border-color: var(--white);
  color: var(--crimson);
}

.section-gallery .platform-source .icon {
  transform: rotate(-90deg);
}

/* Keep legacy gallery markup visually safe during the handoff. */
.section-gallery .gallery-grid {
  align-items: start;
  gap: clamp(14px, 2.2vw, 24px);
}

.section-gallery .gallery-item {
  box-shadow: 7px 7px 0 var(--refine-shadow);
}

/* -------------------------------------------------------------------------- */
/* FAQ states                                                                  */
/* -------------------------------------------------------------------------- */

.faq-list {
  max-width: 960px;
  border-top-color: var(--refine-line-strong);
}

.faq-item {
  border-bottom-color: var(--refine-line);
  transition: background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.faq-item summary {
  min-height: 64px;
  padding: 18px 22px;
  line-height: 1.5;
}

.faq-item summary:hover {
  background: rgba(255, 255, 255, 0.055);
}

.faq-item summary:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: -3px;
  background: rgba(255, 255, 255, 0.08);
}

.faq-item[open] {
  background: rgba(0, 0, 0, 0.12);
  box-shadow: inset 3px 0 0 var(--white);
}

.faq-item[open] summary {
  background: rgba(255, 255, 255, 0.06);
}

.faq-answer {
  padding: 2px 24px 24px 60px;
  color: var(--refine-soft-white);
  line-height: 1.82;
}

.faq-answer p {
  line-height: 1.82;
}

/* -------------------------------------------------------------------------- */
/* Contact and form states                                                     */
/* -------------------------------------------------------------------------- */

.contact-info .section-head {
  margin-bottom: 26px;
}

.contact-intro {
  max-width: 42em;
  line-height: 1.82;
}

.contact-meta {
  gap: 18px;
}

.contact-meta > div {
  padding-bottom: 2px;
}

.contact-meta dd {
  line-height: 1.7;
}

.contact-info .btn-line {
  min-height: 52px;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.field input,
.field select,
.field textarea,
.chat-form input {
  min-height: 50px;
  line-height: 1.55;
}

.field textarea {
  min-height: 148px;
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible,
.chat-form input:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
  border-color: var(--white);
}

.contact-form {
  box-shadow: 8px 8px 0 var(--refine-shadow);
}

/* -------------------------------------------------------------------------- */
/* Footer and chat                                                             */
/* -------------------------------------------------------------------------- */

.footer-main {
  gap: clamp(36px, 6vw, 64px);
}

.footer-nav a {
  min-height: 44px;
  line-height: 1.5;
}

.footer-risk {
  line-height: 1.78;
}

.chat-widget {
  right: clamp(16px, 2.5vw, 28px);
  bottom: clamp(16px, 2.5vw, 28px);
}

.chat-toggle {
  min-width: 60px;
  min-height: 60px;
  box-shadow: 5px 5px 0 var(--refine-shadow);
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%);
}

.chat-toggle:focus-visible,
.chat-close:focus-visible,
.chat-form .btn:focus-visible,
.btn-line:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 3px;
}

.chat-panel {
  box-shadow: 8px 8px 0 var(--refine-shadow);
}

.chat-header {
  min-height: 64px;
  padding: 10px 14px 10px 18px;
}

.chat-close {
  min-width: 44px;
  min-height: 44px;
}

.chat-messages {
  padding: 18px;
  gap: 12px;
}

.chat-bubble {
  line-height: 1.72;
}

.chat-line {
  min-height: 52px;
}

.chat-line-status {
  line-height: 1.55;
}

.chat-form {
  align-items: center;
}

/* -------------------------------------------------------------------------- */
/* Responsive layout                                                           */
/* -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: minmax(170px, 0.34fr) 1fr;
    gap: 34px;
  }

  .why-card {
    padding-inline: 26px;
  }

  .contact-grid,
  .footer-main {
    gap: 42px;
  }
}

@media (max-width: 800px) {
  .section {
    padding-block: 76px;
  }

  .section-head {
    margin-bottom: 38px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-visual {
    width: min(240px, 100%);
  }

  .values-grid li {
    min-height: 0;
    padding: 26px 22px 30px;
  }

  .why-card,
  .service-card,
  .step-card {
    padding: 28px 22px 32px;
  }

  .section-gallery .platform-gallery {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .section-gallery .platform-card figcaption {
    padding: 18px 20px 22px;
  }

  .section-gallery .gallery-grid {
    gap: 14px;
  }

  .faq-item summary {
    padding-inline: 18px;
  }

  .faq-answer {
    padding-inline: 20px;
    padding-bottom: 22px;
  }

  .contact-form {
    box-shadow: 6px 6px 0 var(--refine-shadow);
  }
}

@media (max-width: 480px) {
  body {
    letter-spacing: 0;
  }

  .hero-content {
    padding-block: 54px 96px;
  }

  .hero h1 {
    line-height: 1.2;
  }

  .section-head h2 {
    column-gap: 0.42em;
  }

  .icon-card {
    width: 38px;
    height: 38px;
    padding: 8px;
  }

  .section-gallery .platform-frame {
    padding: 12px;
  }

  .chat-panel {
    width: calc(100vw - 28px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq-item {
    transition: none;
  }
}
