/* ============================================================
   space-tomato — light, warm, tomato-red marketing site
   ============================================================ */

/* ---- design tokens -------------------------------------------------------- */
:root {
  --bg:#FFFFFF;
  --surface:#FFFFFF;
  --surface-2:#FFF5F2;
  --ink:#1B1410;
  --muted:#6F625B;
  --line:#F0E6E1;
  --accent:#FF4733;
  --accent-2:#FF8A4C;
  --accent-soft:#FFE7E0;
  --hero-bg:#1C100C;
  --hero-ink:#FFF6F2;
  --hero-muted:#C9B5AC;
  --radius:18px;
  --shadow:0 18px 40px -24px rgba(255,71,51,.45);

  --container: 1140px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Anuphan", system-ui, -apple-system, sans-serif;
}

/* ---- base ----------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color .25s ease, color .25s ease;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
.ic { width: 18px; height: 18px; flex: none; }
.accent-text { color: var(--accent); }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 clamp(18px, 5vw, 40px); }
.container-narrow { max-width: 1000px; }
.container-faq { max-width: 760px; }

/* ---- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-line {
  background: var(--accent);
  color: #fff;
  padding: 14px 26px;
  box-shadow: var(--shadow);
}
.btn-line:hover { background: var(--accent-2); }
.btn-outline-light {
  background: transparent;
  color: var(--hero-ink);
  padding: 14px 24px;
  border-color: rgba(255,255,255,.25);
}
.btn-outline-light:hover { background: rgba(255,255,255,.08); }
.btn-text-light {
  color: var(--hero-muted);
  padding: 14px 10px;
  font-weight: 500;
}
.btn-text-light:hover { color: var(--hero-ink); }

/* ---- nav ------------------------------------------------------------------ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: background-color .25s ease;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 13px;
  padding-bottom: 13px;
}
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); }
.brand-mark {
  width: 31px; height: 31px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border-radius: 9px;
  font-size: 17px;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -.01em;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 500; transition: color .15s ease; }
.nav-links a:hover { color: var(--accent); }
.nav-cta { font-size: 15px; padding: 10px 18px; box-shadow: none; }
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 10px;
  padding: 7px;
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---- hero ----------------------------------------------------------------- */
.hero {
  background: var(--hero-bg);
  color: var(--hero-ink);
  position: relative;
  overflow: hidden;
  scroll-margin-top: 80px;
}
.hero-glow { position: absolute; pointer-events: none; }
.hero-glow-1 {
  top: -140px; right: -90px; width: 440px; height: 440px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
  opacity: .3;
}
.hero-glow-2 {
  bottom: -160px; left: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, var(--accent-2) 0%, transparent 70%);
  opacity: .18;
}
.hero-grid {
  position: relative;
  padding-top: clamp(56px, 8vw, 116px);
  padding-bottom: clamp(44px, 6vw, 72px);
  display: flex;
  flex-wrap: wrap;
  gap: clamp(36px, 6vw, 68px);
  align-items: center;
}
.hero-copy { flex: 1 1 440px; min-width: 270px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  font-size: 13px; letter-spacing: .03em;
  color: var(--hero-muted); font-weight: 500;
}
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dot-live { background: #2ECC71; animation: st-pulse 2.4s infinite; }
.dot-online { width: 7px; height: 7px; background: #22C55E; }
.hero-title {
  font-size: clamp(38px, 6.4vw, 68px);
  line-height: 1.05;
  font-weight: 700;
  margin-top: 22px;
  letter-spacing: -.015em;
}
.hero-sub {
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.7;
  color: var(--hero-muted);
  margin-top: 22px;
  max-width: 520px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-trust { margin-top: 20px; font-size: 13.5px; color: var(--hero-muted); }

/* chat mockup */
.hero-art { flex: 1 1 360px; min-width: 270px; display: flex; justify-content: center; }
.chat {
  width: 100%; max-width: 380px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 34px 70px -32px rgba(0,0,0,.55);
  overflow: hidden;
  color: #1B1410;
}
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #F0E6E1;
}
.chat-avatar {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  border-radius: 11px;
  font-size: 20px;
}
.chat-id { line-height: 1.25; }
.chat-name { font-weight: 600; font-size: 14.5px; }
.chat-status { font-size: 12px; color: #16A34A; display: flex; align-items: center; gap: 5px; }
.chat-body {
  background: #FAF6F4;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.bubble {
  max-width: 82%;
  padding: 10px 13px;
  font-size: 14px; line-height: 1.5;
}
.bubble-in {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #EFE7E2;
  border-radius: 15px 15px 15px 5px;
}
.bubble-out {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-radius: 15px 15px 5px 15px;
}
.bubble.typing {
  display: inline-flex; gap: 4px; align-items: center;
  width: max-content;
  border-radius: 15px;
}
.typing-dot { width: 6px; height: 6px; border-radius: 50%; background: #B6A79F; animation: st-blink 1.4s infinite; }
.typing-dot:nth-child(2) { animation-delay: .2s; }
.typing-dot:nth-child(3) { animation-delay: .4s; }
.chat-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid #F0E6E1;
  background: #fff;
}
.chat-input {
  flex: 1;
  background: #F4EEEA;
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 13.5px;
  color: #9C8E86;
}
.chat-send {
  width: 36px; height: 36px; flex: none;
  border-radius: 50%;
  background: var(--accent);
  display: grid; place-items: center;
}
.chat-send svg { width: 16px; height: 16px; }

/* stats strip */
.stats { border-top: 1px solid rgba(255,255,255,.1); position: relative; }
.stats-grid {
  padding-top: clamp(22px, 3vw, 30px);
  padding-bottom: clamp(22px, 3vw, 30px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 34px);
  color: var(--accent);
}
.stat-label { display: block; font-size: 14px; color: var(--hero-muted); margin-top: 3px; }

/* ---- logos ---------------------------------------------------------------- */
.logos {
  padding: clamp(34px, 5vw, 54px) 0;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.logos-label { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 24px; letter-spacing: .02em; }
.logos-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: clamp(18px, 4vw, 44px); }
.logo-pill {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(15px, 2vw, 20px);
  color: var(--muted);
  display: flex; align-items: center; gap: 8px;
  opacity: .85;
}
.logo-dot { width: 9px; height: 9px; }
.logo-dot.round { border-radius: 50%; background: var(--accent); }
.logo-dot.square { border-radius: 2px; background: var(--accent-2); }

/* ---- sections ------------------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-alt { background: var(--surface-2); }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.kicker { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.section-title { font-size: clamp(28px, 4vw, 42px); font-weight: 700; margin-top: 12px; letter-spacing: -.01em; }
.section-lead { font-size: clamp(15px, 1.5vw, 18px); color: var(--muted); line-height: 1.65; margin-top: 14px; }

/* ---- service cards -------------------------------------------------------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-4px); }
.card-icon {
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  color: var(--accent);
}
.card-icon svg { width: 27px; height: 27px; }
.card-title { font-size: 19px; font-weight: 600; margin-top: 6px; }
.card-text { font-size: 15px; line-height: 1.65; color: var(--muted); }

/* ---- pricing -------------------------------------------------------------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex; flex-direction: column;
}
.plan-popular { border: 2px solid var(--accent); position: relative; box-shadow: var(--shadow); }
.plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 600;
  padding: 6px 16px; border-radius: 999px;
  white-space: nowrap; box-shadow: var(--shadow);
}
.plan-name { font-weight: 700; font-size: 19px; }
.plan-desc { color: var(--muted); font-size: 14px; margin-top: 5px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-top: 22px; }
.plan-amount { font-family: var(--font-display); font-weight: 700; font-size: 44px; }
.plan-period { color: var(--muted); font-size: 15px; }
.btn-plan-ghost,
.btn-plan-solid {
  margin-top: 24px;
  display: block;
  text-align: center;
  padding: 13px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  transition: background-color .18s ease;
}
.btn-plan-ghost { border: 1.5px solid var(--accent); color: var(--accent); background: transparent; }
.btn-plan-ghost:hover { background: var(--accent-soft); }
.btn-plan-solid { background: var(--accent); color: #fff; }
.btn-plan-solid:hover { background: var(--accent-2); }
.plan-divider { height: 1px; background: var(--line); margin: 26px 0; }
.plan-feats { list-style: none; display: flex; flex-direction: column; gap: 13px; }
.plan-feats li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; }
.plan-feats li.feat-strong { font-weight: 600; }
.check {
  flex: none; width: 18px; height: 18px; margin-top: 2px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pricing-note { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 28px; }

/* ---- compare table -------------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; min-width: 580px; }
.compare th { padding: 18px 14px; font-size: 15px; font-weight: 600; }
.compare th.col-feat { text-align: left; padding: 18px 22px; font-size: 14px; color: var(--muted); }
.compare th.col-hi { color: var(--accent); font-weight: 700; background: var(--accent-soft); }
.compare tbody tr { border-top: 1px solid var(--line); }
.compare td { text-align: center; padding: 15px 14px; font-size: 14px; }
.compare td.col-feat { text-align: left; padding: 15px 22px; font-size: 14.5px; }
.compare td.col-hi { background: var(--accent-soft); }
.compare td.muted { color: var(--muted); }
.compare td.strong { font-weight: 600; }
.compare td.dash { color: var(--muted); opacity: .4; font-size: 18px; }
.compare td.col-hi.dash { opacity: .55; }
.tick {
  display: inline-block; width: 19px; height: 19px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- faq ------------------------------------------------------------------ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 18px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: inherit;
  color: var(--ink);
  font-size: 16px; font-weight: 600; line-height: 1.4;
}
.faq-toggle {
  flex: none; width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  position: relative;
}
.faq-toggle::before,
.faq-toggle::after {
  content: ""; position: absolute;
  background: var(--accent);
  border-radius: 2px;
  transition: opacity .2s ease, transform .2s ease;
}
.faq-toggle::before { width: 12px; height: 2px; }
.faq-toggle::after { width: 2px; height: 12px; }
.faq-item.is-open .faq-toggle::after { opacity: 0; transform: rotate(90deg); }
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .25s ease;
}
.faq-a > p {
  overflow: hidden;
  padding: 0 20px;
  font-size: 15px; line-height: 1.7; color: var(--muted);
}
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-item.is-open .faq-a > p { padding-bottom: 20px; }

/* ---- final cta ------------------------------------------------------------ */
.cta-band { background: var(--hero-bg); color: var(--hero-ink); position: relative; overflow: hidden; }
.cta-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 520px; height: 520px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 68%);
  opacity: .18; pointer-events: none;
}
.cta-inner {
  position: relative;
  max-width: 760px;
  padding-top: clamp(56px, 8vw, 100px);
  padding-bottom: clamp(56px, 8vw, 100px);
  text-align: center;
}
.cta-title { font-size: clamp(28px, 4.6vw, 48px); font-weight: 700; line-height: 1.18; letter-spacing: -.01em; }
.cta-sub { font-size: clamp(15px, 1.6vw, 18px); color: var(--hero-muted); line-height: 1.7; margin: 18px auto 0; max-width: 540px; }
.cta-actions { justify-content: center; margin-top: 34px; }

/* ---- footer --------------------------------------------------------------- */
.footer { background: var(--surface-2); border-top: 1px solid var(--line); color: var(--ink); }
.footer .container { padding-top: clamp(44px, 6vw, 72px); padding-bottom: 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 36px; }
.footer-brand { min-width: 200px; }
.footer-tag { font-size: 14px; color: var(--muted); line-height: 1.6; margin-top: 14px; max-width: 260px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-head { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.footer-col a { color: var(--muted); font-size: 14px; transition: color .15s ease; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 40px; padding-top: 24px; text-align: center; font-size: 13px; color: var(--muted); }

/* ---- scroll reveal -------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- animations ----------------------------------------------------------- */
@keyframes st-blink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }
@keyframes st-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46,204,113,.55); }
  70%  { box-shadow: 0 0 0 7px rgba(46,204,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}

/* ---- responsive ----------------------------------------------------------- */
@media (max-width: 760px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px clamp(18px, 5vw, 40px) 14px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 0; width: 100%; }
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .dot-live, .typing-dot { animation: none; }
}
