/* =========================================================================
   Möbius (Thailand) Co., Ltd. — single-page site
   Design system: "engineered intelligence" — deep ink navy + electric blue
   ========================================================================= */

:root {
  /* ---- Structural tokens (theme-independent) ---- */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --font-display: "Poppins", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans Thai", "Poppins", system-ui, sans-serif;
  --container: 1200px;
  --gutter: clamp(20px, 5vw, 56px);
  --section-y: clamp(72px, 11vh, 140px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1C12.7 7 17 11.3 23 12C17 12.7 12.7 17 12 23C11.3 17 7 12.7 1 12C7 11.3 11.3 7 12 1Z'/%3E%3C/svg%3E");
  --grad-brand: linear-gradient(135deg, #0040C1 0%, #2E6BFF 100%);
  --grad-line:  linear-gradient(90deg, transparent, var(--border-2), transparent);

  /* ---- LIGHT theme (default — follows system via inline head script) ---- */
  color-scheme: light;
  --bg:           #F4F7FC;
  --bg-elev:      #FFFFFF;
  --surface:      #FFFFFF;
  --surface-2:    #EDF1FA;
  --border:       rgba(12, 28, 68, 0.10);
  --border-2:     rgba(12, 28, 68, 0.17);
  --text:         #0C1526;
  --text-muted:   #515D78;
  --text-dim:     #79859F;
  --brand:        #0040C1;
  --brand-bright: #1452E6;
  --brand-light:  #1741C9;
  --accent-glow:  rgba(46, 107, 255, 0.22);
  --grad-text:    linear-gradient(115deg, #0C1526 0%, #1A4FD1 78%);
  --shadow:       0 24px 60px -30px rgba(20, 40, 90, 0.30);
  --shadow-sm:    0 10px 30px -14px rgba(20, 40, 90, 0.20);
  --glow:         0 0 42px -10px var(--accent-glow);
  --header-bg:    rgba(244, 247, 252, 0.82);
  --drawer-bg:    rgba(248, 250, 253, 0.98);
  --glow-a:       rgba(46, 107, 255, 0.10);
  --glow-b:       rgba(0, 64, 193, 0.07);
  --glow-c:       rgba(46, 107, 255, 0.06);
  --grid-line:    rgba(12, 28, 68, 0.05);
  --grain-opacity: 0.02;
}

/* ---- DARK theme ---- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg:           #06090F;
  --bg-elev:      #0A0F1C;
  --surface:      #0C1322;
  --surface-2:    #111A2E;
  --border:       rgba(122, 152, 224, 0.13);
  --border-2:     rgba(122, 152, 224, 0.26);
  --text:         #EAF0FF;
  --text-muted:   #9AA6C2;
  --text-dim:     #69748F;
  --brand:        #0040C1;
  --brand-bright: #2E6BFF;
  --brand-light:  #7AA0FF;
  --accent-glow:  rgba(46, 107, 255, 0.45);
  --grad-text:    linear-gradient(115deg, #FFFFFF 0%, #BBCBFF 38%, #7AA0FF 100%);
  --shadow:       0 24px 70px -24px rgba(0, 0, 0, 0.65);
  --shadow-sm:    0 10px 30px -12px rgba(0, 0, 0, 0.55);
  --glow:         0 0 50px -6px var(--accent-glow);
  --header-bg:    rgba(6, 9, 15, 0.72);
  --drawer-bg:    rgba(6, 9, 15, 0.97);
  --glow-a:       rgba(46, 107, 255, 0.18);
  --glow-b:       rgba(0, 64, 193, 0.14);
  --glow-c:       rgba(46, 107, 255, 0.10);
  --grid-line:    rgba(122, 152, 224, 0.13);
  --grain-opacity: 0.035;
}

/* ----------------------------------------------------------------- Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }
:focus-visible {
  outline: 2px solid var(--brand-light);
  outline-offset: 3px;
  border-radius: 4px;
}
::selection { background: var(--brand-bright); color: #fff; }

/* --------------------------------------------------------- Atmosphere bg */
body::before {
  /* fixed grid + radial brand glows */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 600px at 78% -8%, var(--glow-a), transparent 60%),
    radial-gradient(800px 700px at 10% 8%, var(--glow-b), transparent 55%),
    radial-gradient(1000px 800px at 50% 112%, var(--glow-c), transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 100% 64px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 64px 100%,
    var(--bg);
  background-blend-mode: normal;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 80%, transparent 100%);
          mask-image: linear-gradient(180deg, #000 0%, #000 80%, transparent 100%);
  opacity: 0.9;
}
body::after {
  /* subtle film grain */
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ------------------------------------------------------------- i18n swap */
[data-lang] { display: none; }
html[lang="th"] [data-lang="th"],
html[lang="en"] [data-lang="en"] { display: inline; }

/* ------------------------------------------------------------ Primitives */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.accent { color: var(--brand-light); }
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-light);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1.5px;
  background: var(--brand-bright);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Buttons */
.btn {
  --pad-y: 0.85em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  padding: var(--pad-y) 1.5em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  border-radius: var(--r-pill);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, border-color 0.3s, color 0.3s;
  white-space: nowrap;
}
.btn svg { width: 1.05em; height: 1.05em; transition: transform 0.35s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--accent-glow);
}
.btn--primary::after {
  /* sheen */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.35) 50%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.7s var(--ease);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 40px -12px var(--accent-glow); }
.btn--primary:hover::after { transform: translateX(130%); }
.btn--ghost {
  border: 1px solid var(--border-2);
  color: var(--text);
  background: rgba(255,255,255,0.015);
  backdrop-filter: blur(4px);
}
.btn--ghost:hover { border-color: var(--brand-light); color: var(--text); background: rgba(46,107,255,0.08); transform: translateY(-2px); }
.btn--sm { font-size: 0.85rem; --pad-y: 0.7em; padding-inline: 1.15em; }
.btn--block { width: 100%; }

/* Chips / tags */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.5em 0.95em;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.018);
}

/* =========================================================== Header / Nav */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 74px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  color: var(--text);
}
.brand__mark { width: 36px; height: auto; flex: none; filter: drop-shadow(0 3px 10px var(--accent-glow)); }
.brand__sub { color: var(--text-dim); font-weight: 500; }

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.6vw, 26px);
}
.nav__link {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 4px;
  position: relative;
  transition: color 0.25s;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 4px; right: 4px; bottom: 2px;
  height: 1.5px;
  background: var(--brand-bright);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--text); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.nav__actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.lang-toggle:hover { color: var(--text); border-color: var(--brand-light); background: rgba(46,107,255,0.08); }
.lang-toggle svg { width: 15px; height: 15px; opacity: 0.8; }

/* Theme toggle (animated sun/moon) */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--text-muted);
  transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.2s var(--ease);
}
.theme-toggle:hover { color: var(--brand-light); border-color: var(--brand-light); background: rgba(46,107,255,0.08); }
.theme-toggle:active { transform: scale(0.9); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }
:root[data-theme="dark"] .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle__moon { display: none; }

.nav__cta { /* hidden on small */ }

/* Hamburger */
.nav__burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 12px;
}
.nav__burger span {
  position: relative;
  width: 19px; height: 1.6px;
  background: var(--text);
  transition: background 0.2s;
}
.nav__burger span::before, .nav__burger span::after {
  content: ""; position: absolute; left: 0;
  width: 19px; height: 1.6px; background: var(--text);
  transition: transform 0.3s var(--ease), top 0.3s;
}
.nav__burger span::before { top: -6px; }
.nav__burger span::after  { top: 6px; }
body.menu-open .nav__burger span { background: transparent; }
body.menu-open .nav__burger span::before { top: 0; transform: rotate(45deg); }
body.menu-open .nav__burger span::after  { top: 0; transform: rotate(-45deg); }

/* Mobile drawer */
.nav__drawer {
  position: fixed;
  inset: 74px 0 0 0;
  z-index: 90;
  background: var(--drawer-bg);
  backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  padding: 32px var(--gutter) 48px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateY(-12px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s var(--ease), visibility 0.3s;
}
body.menu-open .nav__drawer { opacity: 1; transform: none; visibility: visible; }
.nav__drawer a {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text);
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.nav__drawer a:last-of-type { border-bottom: none; }
.nav__drawer .btn { margin-top: 22px; }

/* ===================================================================== Hero */
.hero {
  position: relative;
  padding: clamp(120px, 20vh, 200px) 0 clamp(60px, 9vh, 110px);
  overflow: hidden;
}
.hero__mobius {
  position: absolute;
  top: 50%; right: -6%;
  width: min(760px, 62vw);
  transform: translateY(-50%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}
.hero__inner { position: relative; z-index: 1; max-width: 760px; }
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.5rem, 6.4vw, 4.7rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 24px 0 0;
}
.hero__title .gradient-text { display: inline; }
.hero__lead {
  margin-top: 26px;
  font-size: clamp(1.02rem, 1.5vw, 1.22rem);
  color: var(--text-muted);
  max-width: 60ch;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 38px;
}
.hero__meta {
  margin-top: 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 0.86rem;
  color: var(--text-dim);
}
.hero__meta > span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta > span::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--brand-bright); box-shadow: 0 0 8px var(--accent-glow);
}

/* Animated möbius ribbon */
.mobius-svg .ribbon {
  fill: none;
  stroke-linecap: round;
  filter: drop-shadow(0 0 14px var(--accent-glow));
}
.mobius-svg .flow {
  stroke-dasharray: 26 540;
  animation: ribbon-flow 5.5s linear infinite;
}
@keyframes ribbon-flow { to { stroke-dashoffset: -566; } }

/* Marquee */
.marquee {
  position: relative;
  z-index: 1;
  border-block: 1px solid var(--border);
  background: rgba(255,255,255,0.012);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 0;
  animation: marquee 32s linear infinite;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 16px 26px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.marquee__item::after { content: "✺"; color: var(--brand-bright); font-size: 0.8em; }
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ================================================================ Sections */
.section { padding-block: var(--section-y); position: relative; }
.section__head { max-width: 760px; margin-bottom: clamp(40px, 6vw, 68px); }
.section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-top: 18px;
}
.section__intro {
  margin-top: 18px;
  font-size: clamp(1rem, 1.3vw, 1.12rem);
  color: var(--text-muted);
  max-width: 58ch;
}
.section--alt { background: linear-gradient(180deg, transparent, var(--surface-2) 14%, var(--surface-2) 86%, transparent); }

/* Services */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.service-card {
  position: relative;
  padding: clamp(28px, 3vw, 40px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(140% 120% at 100% 0%, rgba(46,107,255,0.07), transparent 55%),
    var(--surface);
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.4s, box-shadow 0.45s;
}
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: conic-gradient(from var(--beam-angle, 0deg), transparent 0 68%, var(--brand-bright) 83%, var(--brand-light) 90%, var(--brand-bright) 97%, transparent 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0.45;
  transition: opacity 0.4s;
  animation: beam-spin 6s linear infinite;
  pointer-events: none;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: transparent; }
.service-card:hover::before { opacity: 1; }
.service-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.service-card__icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--grad-brand);
  box-shadow: var(--glow);
}
.service-card__icon svg { width: 26px; height: 26px; stroke: #fff; }
.service-card__index {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}
.service-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.42rem;
  letter-spacing: -0.01em;
}
.service-card__desc { margin-top: 12px; color: var(--text-muted); font-size: 0.98rem; }
.service-card__eg { margin-top: 14px; font-size: 0.85rem; line-height: 1.66; color: var(--text-dim); }
.service-card__eg b { color: var(--text-muted); font-weight: 600; }
.service-card__list {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.service-card__list li {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: rgba(255,255,255,0.015);
  transition: color 0.25s, border-color 0.25s;
}
.service-card:hover .service-card__list li { border-color: var(--border-2); }

/* Approach steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 22px);
  counter-reset: step;
}
.step {
  position: relative;
  padding: 30px 24px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.4s var(--ease);
}
.step:hover { border-color: var(--border-2); transform: translateY(-4px); }
.step__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.6rem;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0.85;
}
.step__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin: 16px 0 8px;
}
.step__desc { color: var(--text-muted); font-size: 0.92rem; }

/* Why / principles */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2.2vw, 26px);
}
.principle {
  display: flex;
  gap: 20px;
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color 0.3s, background 0.3s;
}
.principle:hover { border-color: var(--border-2); background: var(--surface-2); }
.principle__icon {
  flex: none;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px solid var(--border-2);
  color: var(--brand-light);
  background: rgba(46,107,255,0.08);
}
.principle__icon svg { width: 24px; height: 24px; stroke: currentColor; }
.principle__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.16rem;
}
.principle__desc { margin-top: 7px; color: var(--text-muted); font-size: 0.94rem; }

/* About */
.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.about__lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  color: var(--text);
}
.about__body { margin-top: 20px; color: var(--text-muted); }
.about__concept {
  margin-top: 26px;
  padding: 22px 24px;
  border-left: 2px solid var(--brand-bright);
  background: linear-gradient(90deg, rgba(46,107,255,0.08), transparent);
  border-radius: 0 var(--r) var(--r) 0;
  color: var(--text-muted);
  font-size: 0.96rem;
}
.about__facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 32px;
}
.fact {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
}
.fact__k {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--text);
}
.fact__v { color: var(--text-dim); font-size: 0.84rem; margin-top: 4px; }
.about__visual {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background:
    radial-gradient(120% 120% at 50% 30%, rgba(46,107,255,0.14), transparent 60%),
    var(--surface);
  overflow: hidden;
}
.about__visual > svg { width: 78%; }

/* Contact */
.contact__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(28px, 4vw, 56px);
}
.contact__info { display: flex; flex-direction: column; gap: 6px; }
.contact__item {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.contact__item:last-child { border-bottom: none; }
.contact__item-ic {
  flex: none; width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 11px;
  border: 1px solid var(--border-2);
  color: var(--brand-light);
  background: rgba(46,107,255,0.07);
}
.contact__item-ic svg { width: 20px; height: 20px; stroke: currentColor; }
.contact__item-ic--line { background: #06C755; border-color: transparent; color: #fff; }
.contact__item-ic--fb   { background: #1877F2; border-color: transparent; color: #fff; }
/* brand logos are filled, not stroked — stop the shared rule from outlining the cut-out letters */
.contact__item-ic.contact__item-ic--line svg,
.contact__item-ic.contact__item-ic--fb svg { stroke: none; }
.contact__item-k { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.contact__item-v { font-weight: 500; margin-top: 3px; color: var(--text); }
.contact__item-v a:hover { color: var(--brand-light); }

.contact__form {
  padding: clamp(26px, 3vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.field { margin-bottom: 18px; }
.field__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label {
  display: block;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 15px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-dim); }
.field textarea { resize: vertical; min-height: 120px; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%237AA0FF' stroke-width='2'%3E%3Cpath d='M3 5l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 15px center; padding-right: 38px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 3px rgba(46,107,255,0.18);
  background: var(--surface-2);
}
.form-note { margin-top: 6px; font-size: 0.85rem; color: var(--text-dim); }
.form-note a { color: var(--brand-light); }
.form-status {
  margin-top: 14px; padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 0.9rem;
  border: 1px solid var(--border-2);
  background: rgba(46,107,255,0.08);
  color: var(--text);
  display: none;
}
.form-status.is-shown { display: block; }

/* Themed custom dropdown (replaces native <select> popup) */
.select { position: relative; }
.select--enhanced .select__native { display: none; }
.select__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 15px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  text-align: left;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.select__trigger:hover { border-color: var(--border-2); }
.select.is-open .select__trigger,
.select__trigger:focus-visible {
  outline: none;
  border-color: var(--brand-bright);
  box-shadow: 0 0 0 3px rgba(46,107,255,0.18);
  background: var(--surface-2);
}
.select__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select__chevron { width: 16px; height: 16px; flex: none; color: var(--brand-light); transition: transform 0.3s var(--ease); }
.select.is-open .select__chevron { transform: rotate(180deg); }

.select__panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  max-height: 264px;
  overflow-y: auto;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.985);
  transform-origin: top center;
  transition: opacity 0.2s, transform 0.22s var(--ease), visibility 0.22s;
}
.select.is-open .select__panel { opacity: 1; visibility: visible; transform: none; }
.select__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 9px;
  font-size: 0.93rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.select__option:hover,
.select__option.is-active { background: rgba(46,107,255,0.12); color: var(--text); }
.select__option[aria-selected="true"] { color: var(--text); }
.select__option[aria-selected="true"]::after {
  content: "";
  margin-left: auto;
  width: 14px; height: 14px;
  flex: none;
  background: var(--brand-light);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3'%3E%3Cpath d='M4 12l5 5L20 6'/%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='%23000' stroke-width='3'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.select__panel::-webkit-scrollbar { width: 9px; }
.select__panel::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 9px; border: 2px solid var(--surface-2); }

/* ================================================================== Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, transparent, var(--surface-2));
  padding-top: clamp(56px, 8vw, 90px);
}
.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: clamp(28px, 4vw, 48px);
  padding-bottom: 48px;
}
.footer__brand .brand { font-size: 1.25rem; margin-bottom: 16px; }
.footer__tagline { color: var(--text-muted); font-size: 0.94rem; max-width: 34ch; }
.footer__col h4 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.footer__col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.94rem;
  padding: 6px 0;
  transition: color 0.25s, transform 0.25s;
}
.footer__col a:hover { color: var(--text); transform: translateX(3px); }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 26px 0 38px;
  border-top: 1px solid var(--border);
  font-size: 0.84rem;
  color: var(--text-dim);
}
.footer__legalname { color: var(--text-muted); }
.footer__bottom-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__bottom-links a:hover { color: var(--text); }

/* ============================================================ Legal page */
.legal-hero { padding: clamp(120px, 18vh, 170px) 0 8px; }
.legal { max-width: 820px; margin-inline: auto; padding-bottom: var(--section-y); }
.legal h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.02em;
}
.legal .updated { margin-top: 12px; color: var(--text-dim); font-size: 0.9rem; }
.legal h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  margin-top: 42px;
  color: var(--text);
}
.legal p { margin-top: 14px; color: var(--text-muted); }
.legal ul { margin-top: 14px; padding-left: 1.25em; list-style: disc; color: var(--text-muted); }
.legal li { margin-top: 8px; }
.legal a { color: var(--brand-light); }
.legal a:hover { text-decoration: underline; }
.legal__note {
  margin-top: 40px;
  padding: 18px 20px;
  border: 1px dashed var(--border-2);
  border-radius: var(--r);
  color: var(--text-dim);
  font-size: 0.9rem;
  background: rgba(46,107,255,0.04);
}

/* =============================================================== Reveal fx */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================== Responsive */
@media (max-width: 1024px) {
  .about__grid { grid-template-columns: 1fr; }
  .about__visual { max-width: 420px; margin-inline: auto; order: -1; }
  .contact__grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer__top { grid-template-columns: 1.3fr 1fr 1fr; }
  .footer__col--last { display: none; }
}
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: inline-flex; }
  .services__grid { grid-template-columns: 1fr; }
  .principles { grid-template-columns: 1fr; }
  .hero__mobius { opacity: 0.4; right: -22%; width: 90vw; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .field__row { grid-template-columns: 1fr; }
  .about__facts { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .footer__col--hide-sm { display: none; }
  .hero__cta .btn { flex: 1 1 auto; }
}

/* ========================================================= Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee__track { animation: none; }
  .mobius-svg .flow { stroke-dasharray: none; }
}

/* ===================================================== Theme transition */
/* Circular reveal when toggling theme (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 9999; }

/* ============================================ MagicUI-inspired effects */
/* Border Beam — rotating conic light around service cards */
@property --beam-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes beam-spin { to { --beam-angle: 360deg; } }
.services__grid .service-card:nth-child(2)::before { animation-delay: -1.5s; }
.services__grid .service-card:nth-child(3)::before { animation-delay: -3s; }
.services__grid .service-card:nth-child(4)::before { animation-delay: -4.5s; }

/* Magic Card — cursor-follow spotlight */
.service-card > * { position: relative; z-index: 1; }
.service-card::after {
  content: "";
  position: absolute; inset: 0; border-radius: inherit; z-index: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 0%), rgba(46,107,255,0.16), transparent 46%);
  opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.service-card:hover::after { opacity: 1; }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 200;
  transform-origin: 0 50%; transform: scaleX(0);
  background: var(--grad-brand); box-shadow: 0 0 12px var(--accent-glow);
}

/* Orbiting circles — dots revolving around the Möbius mark */
.orbits { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.orbits__core { width: 56%; filter: drop-shadow(0 0 30px var(--accent-glow)); }
.orbit {
  position: absolute; border: 1px solid var(--border); border-radius: 50%;
  animation: orbit-spin 24s linear infinite;
}
.orbit--1 { inset: 17%; }
.orbit--2 { inset: 1%; animation-duration: 38s; animation-direction: reverse; }
.orbit__slot { position: absolute; inset: 0; transform: rotate(var(--a, 0deg)); }
.orbit__slot::before {
  content: ""; position: absolute; top: -9px; left: 50%; margin-left: -9px;
  width: 18px; height: 18px;
  background: var(--brand-bright);
  -webkit-mask: var(--sparkle) center / contain no-repeat;
          mask: var(--sparkle) center / contain no-repeat;
  filter: drop-shadow(0 0 7px var(--accent-glow));
}
.orbit__slot.is-lg::before { width: 25px; height: 25px; margin-left: -12.5px; top: -12.5px; }
.orbit__slot.is-sm::before { width: 13px; height: 13px; margin-left: -6.5px; top: -6.5px; opacity: 0.8; }
/* mixed shapes: dot · hollow ring · diamond */
.orbit__slot.is-dot::before {
  -webkit-mask: none; mask: none; filter: none; border-radius: 50%;
  width: 11px; height: 11px; margin-left: -5.5px; top: -5.5px;
  box-shadow: 0 0 14px var(--accent-glow);
}
.orbit__slot.is-ring::before {
  -webkit-mask: none; mask: none; filter: none; background: transparent;
  width: 14px; height: 14px; margin-left: -7px; top: -7px;
  border-radius: 50%; border: 2px solid var(--brand-light);
  box-shadow: 0 0 10px var(--accent-glow);
}
.orbit__slot.is-diamond::before {
  -webkit-mask: none; mask: none; filter: none; border-radius: 3px;
  width: 12px; height: 12px; margin-left: -6px; top: -6px;
  transform: rotate(45deg); box-shadow: 0 0 12px var(--accent-glow);
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }

/* =========================================== Floating chat / contact */
.chat-widget {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 150;
  transition: opacity 0.3s, transform 0.3s;
}
body.menu-open .chat-widget { opacity: 0; pointer-events: none; transform: scale(0.9); }

.chat-fab {
  position: relative;
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: 0 14px 34px -8px var(--accent-glow), 0 6px 18px rgba(0,0,0,0.28);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.chat-fab:hover { transform: translateY(-3px) scale(1.05); }
.chat-fab:active { transform: scale(0.95); }
.chat-fab svg { position: absolute; width: 27px; height: 27px; transition: opacity 0.25s, transform 0.4s var(--ease); }
.chat-fab__close { opacity: 0; transform: rotate(-90deg); }
.chat-widget.is-open .chat-fab__open { opacity: 0; transform: rotate(90deg); }
.chat-widget.is-open .chat-fab__close { opacity: 1; transform: rotate(0); }
.chat-fab::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  animation: chat-pulse 2.6s ease-out infinite;
}
.chat-widget.is-open .chat-fab::before { animation: none; }
@keyframes chat-pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 15px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.chat-panel {
  position: absolute; right: 0; bottom: calc(100% + 14px);
  width: min(340px, calc(100vw - 32px));
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform-origin: bottom right;
  opacity: 0; visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.25s, transform 0.3s var(--ease), visibility 0.3s;
}
.chat-widget.is-open .chat-panel { opacity: 1; visibility: visible; transform: none; }
.chat-panel__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 17px 18px 15px;
  background: var(--grad-brand); color: #fff;
}
.chat-panel__title strong { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; display: block; }
.chat-panel__sub { font-size: 0.8rem; opacity: 0.88; margin-top: 2px; display: block; }
.chat-panel__close { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #fff; transition: background 0.2s; }
.chat-panel__close:hover { background: rgba(255,255,255,0.18); }
.chat-panel__close svg { width: 17px; height: 17px; }
.chat-panel__channels { padding: 10px; display: flex; flex-direction: column; gap: 3px; }
.chat-ch { display: flex; align-items: center; gap: 13px; padding: 11px 12px; border-radius: 12px; transition: background 0.2s; }
.chat-ch:hover { background: var(--surface-2); }
.chat-ch__ic { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: #fff; }
.chat-ch--line .chat-ch__ic { background: #06C755; }
.chat-ch--fb   .chat-ch__ic { background: #1877F2; }
.chat-ch--mail .chat-ch__ic { background: var(--grad-brand); }
.chat-ch--tel  .chat-ch__ic { background: #3B4A66; }
.chat-ch__ic svg { width: 22px; height: 22px; }
.chat-ch__txt { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.chat-ch__txt b { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.chat-ch__txt small { font-size: 0.8rem; color: var(--text-dim); }
.chat-ch__arrow { margin-left: auto; color: var(--text-dim); transition: transform 0.2s, color 0.2s; }
.chat-ch__arrow svg { width: 17px; height: 17px; }
.chat-ch:hover .chat-ch__arrow { transform: translateX(3px); color: var(--brand-light); }
@media (max-width: 560px) { .chat-fab { width: 54px; height: 54px; } }
