/* TPS18 Services Hub — static styles */

:root {
  --blue: #2e3192;
  --purple: #7330c6;
  --indigo: #4f46e5;
  --ink: #181818;
  --muted: #64748b;
  --border: #e4e4e7;
  --bg: #f8f9fa;
  --surface: #ffffff;
  --success: #059669;
  --success-bg: #e7fdf2;
  --ready: #22c55e;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06), 0 2px 8px rgba(15, 23, 42, 0.04);
  --font: "IBM Plex Sans Thai", "Inter", system-ui, sans-serif;
  --max: 1120px;
  --card-max: 860px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  text-decoration: none;
  font-weight: 600;
}

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

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

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid rgba(228, 228, 231, 0.8);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
  padding-block: 0.65rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  min-width: 0;
}

.brand-mark {
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
}

.brand-tag {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn-contact:hover {
  border-color: #c4b5fd;
  background: #faf8ff;
}

/* Hero */
.hero {
  background:
    radial-gradient(ellipse 80% 90% at 15% 20%, rgba(255, 255, 255, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 70% at 85% 75%, rgba(255, 255, 255, 0.1), transparent 50%),
    linear-gradient(115deg, var(--blue) 0%, #4c1d95 48%, var(--purple) 100%);
  color: #fff;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero::before {
  width: 280px;
  height: 280px;
  right: -40px;
  top: -80px;
  background: rgba(255, 255, 255, 0.04);
  transform: rotate(18deg);
}

.hero::after {
  width: 220px;
  height: 220px;
  right: 120px;
  bottom: -90px;
  background: rgba(255, 255, 255, 0.03);
  transform: rotate(-12deg);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 2.75rem 0 2.5rem;
}

.hero-copy {
  max-width: 40rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
  font-weight: 500;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.hero-lead {
  margin: 0 0 1.25rem;
  font-size: clamp(0.98rem, 1.5vw, 1.08rem);
  color: rgba(255, 255, 255, 0.86);
  max-width: 36rem;
}

.hero-status {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-status li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-ready {
  background: var(--ready);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
}

/* Services */
.services {
  padding: 1.75rem 0 3rem;
}

.services-inner {
  display: flex;
  justify-content: center;
}

.service-card {
  width: min(100%, var(--card-max));
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(180px, 0.85fr);
  grid-template-areas:
    "main illus"
    "footer illus";
  gap: 0.85rem 1.25rem;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid rgba(228, 228, 231, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.35rem 1.35rem 1.2rem;
}

.service-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.service-illustration {
  grid-area: illus;
}

.service-card-footer {
  grid-area: footer;
}

.service-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.service-identity {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  flex-shrink: 0;
}

.service-name {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
}

.service-category {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.status-pill {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.service-headline {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.service-desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.service-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  align-self: end;
}

.service-url {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius-sm);
  background: var(--purple);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-primary:hover {
  background: #5f24ab;
}

.btn-primary:active {
  transform: translateY(1px);
}

.service-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  align-self: center;
}

.illus {
  width: 100%;
  height: auto;
  max-height: 168px;
  border-radius: 16px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding-bottom: 1rem;
}

.footer-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
}

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

.footer-status {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.82rem;
  font-weight: 600;
}

.footer-notes {
  display: grid;
  gap: 0.85rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.footer-note h2 {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
}

.footer-note p,
.footer-credits {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-credits {
  padding-top: 0.35rem;
}

/* Responsive — mobile ~390 */
@media (max-width: 760px) {
  .container {
    width: min(100% - 1.5rem, var(--max));
  }

  .header-inner {
    min-height: 56px;
  }

  .brand-tag {
    font-size: 0.72rem;
  }

  .btn-contact {
    padding: 0.48rem 0.7rem;
    font-size: 0.85rem;
  }

  .hero {
    border-bottom-left-radius: 22px;
    border-bottom-right-radius: 22px;
  }

  .hero-inner {
    padding: 2rem 0 1.85rem;
    text-align: center;
  }

  .hero-copy {
    margin-inline: auto;
  }

  .hero-status {
    justify-content: center;
  }

  .services {
    padding: 1.25rem 0 2.25rem;
  }

  .service-card {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "illus"
      "footer";
    padding: 1rem;
    gap: 1rem;
  }

  .service-card-footer {
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
  }

  .btn-primary {
    width: 100%;
  }

  .illus {
    max-height: 140px;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .service-card-top {
    flex-direction: column;
    align-items: flex-start;
  }
}
