/* ==========================================================================
   TSPACE interior & building — tspacex.com
   Mobile-first, minimal, SEO-friendly
   ========================================================================== */

:root {
  --bg: #fbfcfb;
  --bg-tint: #eef4f3;
  --bg-dark: #0e2b2b;
  --bg-dark-2: #144040;
  --ink: #102424;
  --ink-soft: #3d4f4b;
  --line: #d9e6e2;
  --accent: #008080;
  --accent-dark: #006d6d;
  --accent-deep: #0a5e5e;
  --red: #c02020;
  --red-deep: #9c1a1a;
  --mist: #7fd1c9;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 43, 43, 0.08);
  --font: "Prompt", "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
}

img, svg { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent-dark); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* --------------------------------------------------------------------------
   Header / Nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 252, 251, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark { display: flex; background:#fff; border:1px solid var(--line); border-radius: 50%; overflow:hidden; padding:2px; }
.brand-mark img { border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 20px; letter-spacing: 0.12em; }
.brand-text small { font-size: 11px; color: var(--ink-soft); letter-spacing: 0.08em; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; list-style: none; gap: 24px; }
.site-nav a { color: var(--ink); font-weight: 500; font-size: 15px; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.nav-cta {
  background: var(--accent-dark); color: #fff !important; padding: 10px 18px; border-radius: 999px;
  font-size: 14px !important; font-weight: 600 !important; white-space: nowrap;
}
.nav-cta:hover { background: var(--accent-deep); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: 0.25s; }

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero { position: relative; overflow: hidden; padding: 88px 0 72px; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-glow { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; }
.hero-glow-1 { width: 420px; height: 420px; background: #6fc8c2; top: -140px; right: -120px; }
.hero-glow-2 { width: 360px; height: 360px; background: #e88a7f; bottom: -160px; left: -120px; opacity: 0.3; }

.hero-inner { position: relative; max-width: 860px; }

.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-dark); margin-bottom: 14px;
}

h1, h2, h3 { line-height: 1.3; font-weight: 600; }
h1 { font-size: clamp(28px, 5.2vw, 46px); font-weight: 600; margin-bottom: 18px; }
h2 { font-size: clamp(24px, 3.6vw, 34px); margin-bottom: 12px; }
h3 { font-size: 19px; }

.hero h1 .accent { color: var(--accent-dark); }

.hero-sub { font-size: 17px; color: var(--ink-soft); max-width: 640px; margin-bottom: 28px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }

.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 600;
  font-size: 15px; transition: 0.2s; border: 2px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent-dark); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--accent-dark); color: #fff; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 12px 26px; list-style: none; padding: 0; }
.hero-badges li { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); }
.hero-badges span { color: var(--red); font-weight: 700; margin-right: 6px; }

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { padding: 80px 0; }
.section-dark { background: var(--bg-dark); color: var(--bg); }
.section-dark .eyebrow { color: var(--mist); }
.section-dark .section-lead { color: #cfe6e0; }
.section-tint { background: var(--bg-tint); }
.section-lead { color: var(--ink-soft); max-width: 720px; margin-bottom: 40px; }

.grid { display: grid; gap: 22px; }
.services-grid { grid-template-columns: 1fr; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow); transition: 0.25s;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); }

.card-icon {
  width: 56px; height: 56px; border-radius: 12px; background: var(--bg-tint);
  color: var(--accent-dark); display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 30px; height: 30px; }

.service-card h3 { margin-bottom: 8px; }
.service-card p { color: var(--ink-soft); font-size: 15px; margin-bottom: 14px; }
.card-link { font-weight: 600; font-size: 14.5px; }

/* Why */
.why-grid { grid-template-columns: 1fr; }
.why-item {
  background: var(--bg-dark-2); border: 1px solid rgba(127, 209, 201, 0.18);
  border-radius: var(--radius); padding: 26px;
}
.why-item h3 { color: var(--mist); margin-bottom: 8px; font-size: 17px; }
.why-item p { color: #cfe6e0; font-size: 15px; }

/* Process */
.process-list { list-style: none; display: grid; gap: 18px; counter-reset: step; }
.process-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 26px 26px 84px; position: relative;
}
.process-num {
  position: absolute; left: 26px; top: 26px; font-size: 22px; font-weight: 700; color: var(--red);
  border: 2px solid rgba(192, 32, 32, 0.35); border-radius: 10px; padding: 6px 10px; line-height: 1;
}
.process-item h3 { margin-bottom: 6px; }
.process-item p { color: var(--ink-soft); font-size: 15px; }

/* FAQ */
.faq-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 14px; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 18px 22px; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::after { content: "+"; font-size: 22px; color: var(--red); font-weight: 500; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item p { padding: 0 22px 20px; color: var(--ink-soft); font-size: 15px; }

/* Contact */
.contact-inner { display: grid; gap: 40px; }
.contact-info h2 { margin-bottom: 10px; }
.contact-info > p { color: #cfe6e0; margin-bottom: 28px; }

.contact-list { list-style: none; display: grid; gap: 16px; margin-bottom: 28px; }
.contact-list li { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: baseline; }
.contact-label { color: var(--mist); font-weight: 600; font-size: 14px; }
.contact-list a { color: #e6f4f1; }
.contact-list a:hover { color: var(--mist); }
.contact-list address { font-style: normal; color: #cfe6e0; }

.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.section-dark .btn-ghost { border-color: var(--bg); color: var(--bg); }
.section-dark .btn-ghost:hover { background: var(--bg); color: var(--ink); }

.map-card {
  background: var(--bg-dark-2); border: 1px solid rgba(127, 209, 201, 0.18);
  border-radius: var(--radius); padding: 30px; align-self: start;
}
.map-card h3 { color: var(--mist); margin-bottom: 10px; }
.map-card p { color: #cfe6e0; font-size: 15px; margin-bottom: 18px; }
.map-note { margin-top: 14px; margin-bottom: 0 !important; font-size: 13.5px !important; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer { background: #0c2323; color: #9dbdb6; font-size: 14px; }
.footer-inner {
  display: grid; gap: 32px; padding-top: 56px; padding-bottom: 40px;
  grid-template-columns: 1fr;
}
.footer-name { color: #fff; font-size: 16px; letter-spacing: 0.08em; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-name img { border-radius: 50%; background: #fff; padding: 2px; }
.footer-nav p, .footer-contact p { color: var(--mist); font-weight: 600; margin-bottom: 12px; }
.footer-nav ul, .footer-contact ul { list-style: none; display: grid; gap: 8px; }
.footer-nav a, .footer-contact a { color: #9dbdb6; }
.footer-nav a:hover, .footer-contact a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); padding: 18px 20px; font-size: 13px; }

/* --------------------------------------------------------------------------
   Reveal animation (progressive enhancement)
   -------------------------------------------------------------------------- */

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   Tablet+
   -------------------------------------------------------------------------- */

@media (min-width: 640px) {
  .services-grid, .why-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (min-width: 960px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .process-list { grid-template-columns: repeat(4, 1fr); }
  .process-item { padding: 26px; }
  .process-num { position: static; display: inline-block; margin-bottom: 14px; }
  .contact-inner { grid-template-columns: 1.2fr 1fr; gap: 60px; }
  .section { padding: 100px 0; }
  .hero { padding: 120px 0 100px; }
}

/* --------------------------------------------------------------------------
   Mobile nav
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  .site-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 18px 20px 26px;
    gap: 18px; transform: translateY(-120%); transition: transform 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 12px 8px; border-radius: 8px; font-size: 16px; }
  .site-nav a:hover { background: var(--bg-tint); }
  .nav-cta { text-align: center; }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .contact-list li { grid-template-columns: 1fr; gap: 2px; }
}

@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; text-align: center; }
}
