/* OpsMo marketing site — shared responsive layer over the artboard markup
   (artboards were designed at 1440px with inline styles; this file keeps the
   desktop look pixel-close and adapts tablet/mobile with attribute selectors) */
:root { --gx: 80px; --purple: #5f4a8b; --purple-dark: #4c3b6f; --ink: #18181b; --bg: #f7effb; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Sarabun", "Leelawadee UI", system-ui, sans-serif; overflow-x: hidden; }
a { color: var(--purple); text-decoration: none; } a:hover { color: var(--purple-dark); }
h1, h2, h3 { font-family: "Taviraj", "Noto Serif Thai", Georgia, serif; margin: 0; }
svg { max-width: 100%; }
.page { width: 100%; max-width: 1440px; margin: 0 auto; background: var(--bg); }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px var(--gx); background: #fff; border-bottom: 1px solid #e4e4e7; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Taviraj", Georgia, serif; font-weight: 700; font-size: 22px; color: var(--purple); letter-spacing: -0.01em; }
.brand.light { color: #fff; font-size: 18px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.nav-a { font-size: 15px; font-weight: 500; color: #52525b; padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-a.on { font-weight: 600; color: var(--purple); border-bottom-color: var(--purple); }
.nav-cta { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.btn-ghost { font-size: 14px; font-weight: 600; color: var(--purple); padding: 10px 16px; }
.btn-solid { font-size: 14px; font-weight: 600; color: #fff !important; background: var(--purple); padding: 11px 18px; border-radius: 10px; box-shadow: 0 1px 2px rgba(0,0,0,.08); border: 0; cursor: pointer; font-family: inherit; }
.btn-solid:hover { background: var(--purple-dark); }
.nav-toggle, .nav-burger { display: none; }

/* ---------- footer ---------- */
.site-footer { background: #362a4f; color: #fff; padding: 44px var(--gx) 24px; }
.foot-grid { display: flex; justify-content: space-between; align-items: flex-start; gap: 40px; flex-wrap: wrap; }
.foot-brand { display: flex; flex-direction: column; gap: 10px; }
.foot-brand p { margin: 0; font-size: 13px; color: #c9c0da; max-width: 340px; line-height: 1.6; }
.foot-col { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.foot-col span { font-weight: 600; color: #fff; }
.foot-col a { color: #c9c0da; } .foot-col a:hover { color: #fff; }
.foot-copy { color: #8f84a8; font-size: 12px; margin-top: 28px; }

/* ---------- content helpers ---------- */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
.tbl table { min-width: 720px; border-collapse: separate; border-spacing: 0; }
.tbl th:first-child, .tbl td:first-child { position: sticky; left: 0; background: #fff; z-index: 1; box-shadow: 4px 0 8px -6px rgba(0,0,0,.18); }
.tbl-hint { display: none; font-size: 12px; color: #71717a; margin: 0 0 8px; }
@media (max-width: 900px) {
  .tbl-hint { display: block; }
  .tbl th:first-child, .tbl td:first-child { width: 165px; min-width: 165px; max-width: 165px; font-size: 13px !important; }
  .tbl td:first-child div { font-size: 11px !important; }
  .tbl th:not(:first-child), .tbl td:not(:first-child) { min-width: 84px; padding-left: 8px !important; padding-right: 8px !important; }
}
.in { height: 44px; border: 1px solid #e4e4e7; border-radius: 10px; background: #fff; padding: 0 14px; font-size: 14px; font-family: inherit; color: var(--ink); width: 100%; }
.in:focus { outline: 2px solid var(--purple); outline-offset: 1px; border-color: var(--purple); }
textarea.in { height: auto; padding: 10px 14px; resize: vertical; }
.hint { margin: 0; font-size: 12px; color: #71717a; }

/* ---------- hero carousel (index page) ---------- */
.hero-carousel { position: relative; overflow: hidden; }
.hero-track { display: flex; align-items: stretch; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide { flex: 0 0 100%; min-width: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: center; }
.hero-slide > * { width: 100%; }
.hero-dots { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2; }
.hero-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(95,74,139,.28); cursor: pointer; }
.hero-dot.on { width: 24px; background: var(--purple); }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 999px; border: 1px solid #e4e4e7; background: rgba(255,255,255,.94); color: var(--purple); font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 10px rgba(36,28,51,.12); z-index: 2; }
.hero-arrow:hover { background: #fff; }
.hero-arrow.prev { left: 16px; } .hero-arrow.next { right: 16px; }
@media (max-width: 900px) { .hero-arrow { display: none; } }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  :root { --gx: 40px; }
  .site-nav { gap: 18px; }
  [style*="grid-template-columns:repeat(5"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  [style*="grid-template-columns:repeat(4"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [style*="font-size:58px"] { font-size: 44px !important; }
  [style*="font-size:54px"] { font-size: 42px !important; }
}
@media (max-width: 900px) {
  [style*="grid-template-columns:repeat(3"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  [style*="grid-template-columns:260px"] { grid-template-columns: 1fr !important; }
  /* header → burger menu */
  .nav-burger { display: flex; flex-direction: column; gap: 5px; padding: 8px; cursor: pointer; margin-left: auto; }
  .nav-burger span { display: block; width: 24px; height: 2px; background: var(--purple); border-radius: 2px; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid #e4e4e7; box-shadow: 0 12px 24px rgba(0,0,0,.08); }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .nav-a { padding: 14px var(--gx); border-bottom: 1px solid #f4f4f5; }
  .nav-a.on { border-bottom-color: #f4f4f5; background: #f7effb; }
  .nav-cta { margin: 0; padding: 14px var(--gx); justify-content: flex-start; }
}
/* ---------- phone ---------- */
@media (max-width: 640px) {
  :root { --gx: 20px; }
  [style*="grid-template-columns:repeat("] { grid-template-columns: 1fr !important; }
  [style*="font-size:58px"], [style*="font-size:54px"] { font-size: 32px !important; }
  [style*="font-size:44px"], [style*="font-size:40px"] { font-size: 28px !important; }
  [style*="font-size:38px"], [style*="font-size:36px"] { font-size: 24px !important; }
  [style*="font-size:34px"], [style*="font-size:32px"], [style*="font-size:30px"] { font-size: 22px !important; }
  [style*="font-size:28px"], [style*="font-size:27px"], [style*="font-size:26px"] { font-size: 20px !important; }
  [style*="font-size:19px"] { font-size: 16px !important; }
  /* flex rows may wrap; columns keep stacking */
  [style*="display:flex"]:not([style*="flex-direction:column"]) { flex-wrap: wrap; }
  [style*="justify-content:space-between"] { gap: 12px; }
  [style*="max-width:520px"], [style*="max-width:640px"], [style*="max-width:720px"] { max-width: 100% !important; }
  .brand { font-size: 20px; }
  .foot-grid { flex-direction: column; gap: 24px; }
}
