/*
 * styles.css — Lee Solutions and Consulting Co., Ltd.
 *
 * No external fonts, frameworks or images: everything loads from this site.
 * To change the brand colours, edit ONLY the colour tokens in the two blocks
 * below (light mode and dark mode). Keep every token as a 6-digit hex colour
 * on its own line: the automated tests read these lines and check that the
 * text stays readable (WCAG contrast).
 */

/* ---------- Colour tokens: light mode ---------- */
:root {
  --color-bg: #ffffff;
  --color-surface: #f4f7fa;
  --color-text: #0b1620;
  --color-muted: #4e5f6e;
  --color-accent: #1f5fa8;
  --color-button-bg: #1f5fa8;
  --color-button-text: #ffffff;
  --color-hero-bg: #0b1620;
  --color-hero-text: #ffffff;
  --color-hero-muted: #9fb3c4;
  --color-input-border: #5f6b78;
  --color-focus: #0b57b8;
  --color-error: #b3261e;
  --color-border: #dce3ea;
  --color-dark-border: #1f3345;
  --color-orange: #8db8e8;
}

/* ---------- Colour tokens: dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b1620;
    --color-surface: #111f2c;
    --color-text: #f4f7fa;
    --color-muted: #b8c6d2;
    --color-accent: #8db8e8;
    --color-button-bg: #1f5fa8;
    --color-button-text: #ffffff;
    --color-hero-bg: #0b1620;
    --color-hero-text: #ffffff;
    --color-hero-muted: #9fb3c4;
    --color-input-border: #8a96a3;
    --color-focus: #8ab8ff;
    --color-error: #ff9a92;
    --color-border: #1f3345;
    --color-dark-border: #1f3345;
    --color-orange: #8db8e8;
  }
}

/* ---------- Typography and layout tokens (not colours) ---------- */
:root {
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Thai", Tahoma, Arial, sans-serif;
  --font-display: var(--font-sans);
  --radius: 14px;
  --radius-lg: 24px;
  --max-width: 74rem;
  --gutter: 1rem;
  --gutter-wide: 2.5rem;
  color-scheme: light dark;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  font-weight: 700;
  line-height: 1.15;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 4.5rem);
  letter-spacing: -0.015em;
}

h2 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--color-accent);
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 0.15em;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 48rem) {
  .container {
    padding-inline: var(--gutter-wide);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-button-bg);
  color: var(--color-button-text);
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Header and navigation ---------- */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.brand small {
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  display: inline-block;
  padding: 0.55rem 0.1rem;
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Home page: the header continues the dark hero, so it reads as one block. */
.home .site-header {
  background: var(--color-bg);
  border-bottom-color: var(--color-border);
}

.home .brand,
.home .nav a {
  color: var(--color-text);
}

.home .brand small {
  color: var(--color-muted);
}

.home .nav a:hover {
  color: var(--color-accent);
}

/* The header button keeps the button colours, not the link colours. */
.nav a.btn,
.nav a.btn:hover,
.home .nav a.btn,
.home .nav a.btn:hover {
  color: var(--color-button-text);
}

.nav a.btn:hover {
  text-decoration: underline;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--color-button-bg);
  border-radius: var(--radius);
  background: var(--color-button-bg);
  color: var(--color-button-text);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.06);
  text-decoration: underline;
}

.btn-outline {
  background: transparent;
  color: var(--color-hero-text);
  border-color: var(--color-hero-text);
}

.btn-outline:hover {
  background: var(--color-hero-text);
  color: var(--color-hero-bg);
  filter: none;
}

.btn-small {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

.text-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-weight: 600;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* ---------- Hero (full-width, dark, image-like background made in CSS) ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--color-hero-bg);
  background-image:
    radial-gradient(circle at 78% 22%, rgba(31, 95, 168, 0.28), transparent 46%),
    linear-gradient(to top, rgba(11, 22, 32, 0.96) 10%, rgba(11, 22, 32, 0.35) 70%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 4rem 4rem, 4rem 4rem;
  color: var(--color-hero-text);
  padding-block: clamp(4rem, 10vw, 7.5rem) clamp(3rem, 6vw, 4.5rem);
}

.hero-inner {
  max-width: 50rem;
}

.hero-title span {
  display: block;
}

.hero-lead {
  max-width: 40rem;
  font-size: 1.15rem;
  color: var(--color-hero-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

.hero-actions .text-link {
  margin-top: 0;
  color: var(--color-hero-text);
}

.hero-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  max-width: 40rem;
  margin-top: 2rem;
}

.hero-form[hidden] {
  display: none;
}

.hero-form .field {
  flex: 1 1 16rem;
  margin-bottom: 0;
}

.hero-form .field label {
  color: var(--color-hero-text);
}

.hero-form .field input {
  border-color: var(--color-hero-muted);
}

.hero-form .notice {
  flex-basis: 100%;
  color: var(--color-hero-muted);
  margin: 0;
}

.hero-form .field-error {
  color: var(--color-error);
}

.credentials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0;
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-dark-border);
  font-size: 0.95rem;
  color: var(--color-hero-muted);
}

.credentials li {
  padding: 1.1rem 1.1rem 0 0;
}

.credentials li::before {
  content: "\2713\00a0";
  color: var(--color-orange);
  font-weight: 700;
}

/* ---------- Sections ---------- */
.section {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.section-alt {
  background: var(--color-surface);
}

.section-dark {
  background: var(--color-hero-bg);
  color: var(--color-hero-text);
}

.section-dark + .section-dark {
  border-top: 1px solid var(--color-dark-border);
}

.eyebrow {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.section-dark .eyebrow {
  color: var(--color-orange);
}

.muted-phrase {
  color: var(--color-muted);
}

.section-dark .muted-phrase {
  color: var(--color-hero-muted);
}

.lead {
  max-width: 46rem;
  font-size: 1.15rem;
  color: var(--color-muted);
}

.section-dark .lead {
  color: var(--color-hero-muted);
}

.section-head {
  max-width: 52rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.italic {
  font-style: italic;
}

/* ---------- Tools strip (white, hairline rules) ---------- */
.strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.strip li {
  padding: 1.6rem 1rem;
  border-right: 1px solid var(--color-border);
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-text);
}

.strip li:last-child {
  border-right: 0;
}

.strip small {
  display: block;
  margin-top: 0.25rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---------- Problem tiles (dark, image-like, outcome-led) ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 22rem;
  padding: 1.75rem;
  background-color: #0b1620;
  color: #ffffff;
  transition: opacity 0.3s ease;
}

.tile:hover {
  opacity: 0.94;
}

.tile-grid {
  background-image:
    linear-gradient(to top, rgba(11, 22, 32, 0.97) 15%, rgba(11, 22, 32, 0.2) 75%),
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: auto, 2.5rem 2.5rem, 2.5rem 2.5rem;
}

.tile-diagonal {
  background-image:
    linear-gradient(to top, rgba(11, 22, 32, 0.97) 15%, rgba(11, 22, 32, 0.2) 75%),
    repeating-linear-gradient(45deg, rgba(31, 95, 168, 0.28) 0 2px, transparent 2px 14px);
}

.tile-dots {
  background-image:
    linear-gradient(to top, rgba(11, 22, 32, 0.97) 15%, rgba(11, 22, 32, 0.2) 75%),
    radial-gradient(circle, rgba(255, 255, 255, 0.22) 1.5px, transparent 1.6px);
  background-size: auto, 1.4rem 1.4rem;
}

.tile .tile-label {
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c4cfd9;
}

.tile h3 {
  font-size: 1.6rem;
  color: #ffffff;
}

.tile .text-link {
  color: #ffffff;
}

/* ---------- Cards and lists ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1px;
  margin-top: 0;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.card {
  padding: 2rem 1.75rem;
  background: var(--color-bg);
}

.card .for {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.list li {
  margin-bottom: 0.55rem;
}

.notice {
  color: var(--color-muted);
  font-size: 0.93rem;
}

.callout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
  padding: 2rem;
  border-left: 0.3rem solid var(--color-accent);
  background: var(--color-surface);
}

.callout h3 {
  margin-bottom: 0.5rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.health-check-list {
  margin-bottom: 1.25rem;
}

/* ---------- Workflow (numbered stages, active stage in orange) ---------- */
.flow {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 56rem) {
  .flow {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border);
}

.steps li {
  border-bottom: 1px solid var(--color-border);
  padding: 1.1rem 0;
}

.step-button {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.step-number {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-muted);
  min-width: 2rem;
}

.step-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.step-button:hover .step-title {
  color: var(--color-accent);
}

.steps li.is-active .step-number,
.steps li.is-active .step-title {
  color: var(--color-accent);
}

.step-text {
  margin: 0.35rem 0 0 3rem;
  color: var(--color-muted);
}

.step-text[hidden] {
  display: none;
}

.flow-panel {
  padding: 1.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
}

.flow-panel svg {
  display: block;
  width: 100%;
  height: auto;
}

.flow-panel .bar-label {
  font-size: 14px;
  fill: var(--color-text);
}

.flow-panel .bar-sub {
  font-size: 12px;
  fill: var(--color-muted);
}

.flow-caption {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 1.05rem;
  color: var(--color-text);
}

/* ---------- Track record (large numbers in a bordered row) ---------- */
.proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border);
}

.proof li {
  padding: 2.25rem 1.5rem 2rem 0;
  border-bottom: 1px solid var(--color-border);
}

.proof strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 5.5rem);
  font-weight: 400;
  line-height: 1;
  color: var(--color-text);
}

.proof span {
  display: block;
  margin-top: 0.75rem;
  color: var(--color-muted);
  max-width: 16rem;
}

/* ---------- Hub-and-spoke diagram and layers (dark) ---------- */
.platform {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 56rem) {
  .platform {
    grid-template-columns: 1fr 1.1fr;
  }
}

.layers {
  margin: 2rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-dark-border);
}

.layers li {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.25rem 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--color-dark-border);
}

.layers .layer-number {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-orange);
}

.layers strong {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
}

.layers p {
  grid-column: 2;
  margin: 0;
  color: var(--color-hero-muted);
  font-size: 0.97rem;
}

.diagram-wrap {
  padding: 1.5rem;
  border: 1px solid var(--color-dark-border);
  background: #0e1822;
}

.diagram-wrap svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram-wrap .hub-line {
  stroke: #3d5366;
  stroke-width: 1.5;
}

.diagram-wrap .hub-node {
  fill: #0b1620;
  stroke: #3d5366;
  stroke-width: 1.5;
}

.diagram-wrap .hub-core {
  fill: var(--color-orange);
}

.diagram-wrap .hub-core-text {
  font-size: 15px;
  font-weight: 700;
  fill: #111318;
}

.diagram-wrap .hub-text {
  font-size: 13px;
  fill: #ffffff;
}

.diagram-wrap .hub-caption {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--color-hero-muted);
}

/* ---------- Governance and safety (dark, bordered feature panels) ---------- */
.safety-head {
  max-width: 52rem;
}

.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: 3rem;
  background: var(--color-dark-border);
  border: 1px solid var(--color-dark-border);
}

/* Desktop: two panels on top, three below (6 columns, 3 + 3 then 2 + 2 + 2). */
@media (min-width: 56rem) {
  .features {
    grid-template-columns: repeat(6, 1fr);
  }

  .feature {
    grid-column: span 2;
  }

  .feature:nth-child(-n + 2) {
    grid-column: span 3;
  }
}

.feature {
  padding: 2rem 1.75rem;
  background: var(--color-hero-bg);
}

.feature svg {
  display: block;
  width: 3.5rem;
  height: 3.5rem;
  margin-bottom: 1.25rem;
  fill: none;
  stroke: var(--color-orange);
  stroke-width: 1.5;
  stroke-linecap: square;
}

.feature h3 {
  color: var(--color-hero-text);
}

.feature p {
  margin: 0;
  color: var(--color-hero-muted);
  font-size: 0.97rem;
}

.trust-link {
  margin: 1.5rem 0 0;
  text-align: right;
}

.trust-link a {
  color: var(--color-hero-text);
}

.section-dark .btn-outline {
  margin-top: 0.5rem;
}

/* ---------- About mosaic (white, bordered, alternating) ---------- */
.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.mosaic-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 17rem;
  padding: 1.75rem;
  background: var(--color-bg);
}

.mosaic-cell h3 {
  font-size: 1.45rem;
}

.mosaic-cell .role {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.mosaic-cell p {
  margin: 0;
  color: var(--color-muted);
}

.mosaic-pattern {
  background-color: #0b1620;
  color: #ffffff;
  background-image:
    linear-gradient(to top, rgba(11, 22, 32, 0.96) 15%, rgba(11, 22, 32, 0.15) 80%),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: auto, 2.5rem 2.5rem, 2.5rem 2.5rem;
}

.mosaic-pattern h3 {
  color: #ffffff;
}

.mosaic-pattern p {
  color: #c4cfd9;
}

/* ---------- Form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

@media (min-width: 56rem) {
  .contact-grid {
    grid-template-columns: 1.35fr 1fr;
  }
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--color-input-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.field [aria-invalid="true"] {
  border-color: var(--color-error);
}

.field-error {
  margin: 0.3rem 0 0;
  color: var(--color-error);
  font-weight: 600;
}

.status {
  margin-top: 1rem;
  font-weight: 600;
}

.contact-details {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border);
}

.contact-details li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

/* ---------- Final call to action and footer (dark) ---------- */
.final-cta {
  text-align: center;
  padding-block: clamp(4.5rem, 10vw, 7rem);
}

.final-cta h2 {
  max-width: 40rem;
  margin-inline: auto;
}

.final-cta p {
  max-width: 36rem;
  margin: 0 auto 2rem;
  color: var(--color-hero-muted);
  font-size: 1.1rem;
}

.final-cta .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.site-footer {
  padding-block: 3.5rem 2rem;
  background: var(--color-hero-bg);
  color: var(--color-hero-muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--color-dark-border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }
}

.footer-grid h2 {
  margin-bottom: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-hero-text);
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li {
  margin-bottom: 0.5rem;
}

.footer-grid a {
  color: var(--color-hero-muted);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--color-hero-text);
}

.legal {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-dark-border);
}

.site-footer .legal p {
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--color-hero-text);
}

/* ---------- Service cards (home page) ---------- */
.service-card {
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease;
}

.service-card:hover {
  background: var(--color-surface);
}

.service-card .list {
  flex-grow: 1;
}

.service-card .text-link {
  margin-top: 0.25rem;
}

.service-number {
  display: block;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--color-accent);
}

/* ---------- Service detail pages ---------- */
.page-hero {
  padding-block: clamp(3.5rem, 8vw, 6rem);
  background-color: var(--color-hero-bg);
  background-image:
    radial-gradient(circle at 85% 15%, rgba(31, 95, 168, 0.25), transparent 45%),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: auto, 4rem 4rem, 4rem 4rem;
  color: var(--color-hero-text);
}

.page-hero h1 {
  max-width: 48rem;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}

.page-hero .eyebrow {
  color: var(--color-orange);
}

.page-hero .lead {
  max-width: 44rem;
  color: var(--color-hero-muted);
}

.page-hero .text-link {
  color: var(--color-hero-text);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.6rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--color-hero-muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 0.6rem;
}

.breadcrumb a {
  color: var(--color-hero-text);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
}

.offer {
  padding: 2rem 1.75rem;
  background: var(--color-bg);
}

.offer h3 {
  font-size: 1.2rem;
}

.offer p {
  margin: 0;
  color: var(--color-muted);
}

.delivery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.delivery li {
  padding-top: 1rem;
  border-top: 3px solid var(--color-accent);
}

.delivery .step-no {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.delivery strong {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.delivery p {
  margin: 0;
  color: var(--color-muted);
}

/* ---------- English / Thai switch ----------
 * Each text is written twice: <span class="en"> and <span class="th">.
 * Only the chosen language is shown. Without JavaScript, English is shown. */
html:not([data-lang="th"]) .th,
html[data-lang="th"] .en {
  display: none !important;
}

html[data-lang="th"] body {
  line-height: 1.8;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.9rem;
  border: 1.5px solid var(--color-text);
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.lang-switch:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.lang-switch[hidden] {
  display: none;
}

/* ---------- Simple pages (privacy, 404) ---------- */
.page {
  max-width: 46rem;
  padding-block: 3rem;
}

/* ---------- Polish: softer shapes, a clearer language toggle, gentle motion ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
}

.btn {
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  box-shadow: 0 10px 22px -14px rgba(31, 95, 168, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -14px rgba(31, 95, 168, 0.95);
}

.btn-outline:hover {
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.5rem 1.1rem;
}

.cards,
.offer-grid,
.tiles,
.mosaic,
.features {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.callout {
  border-left: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 6px 0 0 var(--color-accent);
}

.flow-panel,
.diagram-wrap {
  border-radius: var(--radius-lg);
}

.hero,
.page-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Soft glow in the corner of dark heroes. */
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 640px;
  height: 640px;
  top: -240px;
  right: -200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(141, 184, 232, 0.3), transparent 62%);
  pointer-events: none;
}

.page-hero::before {
  width: 480px;
  height: 480px;
  top: -200px;
}

.hero .container {
  position: relative;
  z-index: 1;
}

/* Decorative network picture behind the hero text. */
.hero-visual {
  position: absolute;
  right: -3%;
  bottom: -8%;
  width: min(46vw, 520px);
  margin: 0;
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.hero-visual svg {
  display: block;
  width: 100%;
  height: auto;
}

.hero-visual .link {
  stroke: #8db8e8;
  stroke-width: 1.4;
  stroke-dasharray: 6 10;
  opacity: 0.55;
}

.hero-visual .node {
  fill: #0b1620;
  stroke: #8db8e8;
  stroke-width: 2;
}

.hero-visual .node.core {
  fill: #1f5fa8;
  stroke: #8db8e8;
}

/* Language toggle: a pill with TH and EN, the chosen one filled in. */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 4px;
  min-height: 0;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
}

.lang-switch[hidden] {
  display: none;
}

.lang-switch button {
  min-width: 3.2rem;
  padding: 0.4rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-switch button[aria-pressed="true"] {
  background: var(--color-button-bg);
  color: var(--color-button-text);
}

.lang-switch button[aria-pressed="false"]:hover {
  background: var(--color-bg);
}

.lang-switch:hover {
  background: var(--color-surface);
  color: var(--color-text);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes drift {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-70px, 50px);
  }
}

@keyframes flow {
  to {
    stroke-dashoffset: -32;
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.14);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before,
  .page-hero::before {
    animation: drift 18s ease-in-out infinite alternate;
  }

  .hero-inner > * {
    animation: rise 0.8s ease both;
  }

  .hero-inner > *:nth-child(2) {
    animation-delay: 0.12s;
  }

  .hero-inner > *:nth-child(3) {
    animation-delay: 0.24s;
  }

  .hero-inner > *:nth-child(4) {
    animation-delay: 0.36s;
  }

  .hero-visual .link {
    animation: flow 3s linear infinite;
  }

  .hero-visual .node.core {
    transform-box: fill-box;
    transform-origin: center;
    animation: pulse 2.4s ease-in-out infinite;
  }
}

@media (max-width: 860px) {
  .hero-visual {
    width: 78vw;
    right: -22%;
    bottom: -4%;
    opacity: 0.3;
  }
}

/* Logo on the left, company name to its right, both centred vertically. */
.brand {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  line-height: 1.25;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand .en,
.brand .th {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand small {
  display: block;
  line-height: 1.3;
}

/* ---------- Print ---------- */
@media print {
  .site-header .nav,
  .hero-form,
  .skip-link,
  #contact-form {
    display: none;
  }
}
