/* ===================================================================
   LEC Corporation — Design tokens
   Palette: Ink / Cloud / Navy + Blue, Pink, Yellow accents
   Display: Kanit · Body: IBM Plex Sans Thai · Utility: JetBrains Mono
=================================================================== */

:root {
  --ink: #14141f;
  --ink-soft: #4a4a5c;
  --cloud: #fafafc;
  --cloud-dim: #f1f1f7;
  --navy: #0e1533;
  --navy-soft: #1a2350;
  --line: rgba(20, 20, 31, 0.1);
  --line-light: rgba(255, 255, 255, 0.14);

  --blue: #2e5eff;
  --blue-soft: #e7edff;
  --pink: #ff4f93;
  --pink-soft: #ffe6ef;
  --yellow: #ffcb3d;
  --yellow-soft: #fff6dd;

  --font-display: "Kanit", "IBM Plex Sans Thai", sans-serif;
  --font-body: "IBM Plex Sans Thai", "Kanit", sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 1px 2px rgba(20, 20, 31, 0.04), 0 10px 30px -12px rgba(20, 20, 31, 0.12);
  --wrap: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cloud);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 14pt;
}

h1, h2, h3 { font-family: var(--font-display); margin: 0 0 0.5em; line-height: 1.2; }
p { margin: 0 0 1em; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.mono { font-family: var(--font-mono); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  z-index: 999;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

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

/* ---------- dots / chips shared tokens ---------- */
.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.dot-blue { background: var(--blue); }
.dot-pink { background: var(--pink); }
.dot-yellow { background: var(--yellow); }

/* ===================================================================
   Header
=================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 252, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
}
.logo-mark {
  display: inline-flex;
  gap: 3px;
  padding: 6px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
}
.logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}
.logo-sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  text-transform: uppercase;
  margin-top: -2px;
}

.main-nav { display: flex; gap: 28px; }
.main-nav a {
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 2px;
  background: var(--blue);
  transform: scaleX(0);
  transition: transform 0.2s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  border-top: 1px solid var(--line);
}
.mobile-nav a {
  padding: 12px 0;
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}
.mobile-nav.open { display: flex; }

/* ===================================================================
   Buttons
=================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: #fff;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(20,20,31,0.4); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { padding: 10px 20px; font-size: 0.88rem; }
.btn-full { width: 100%; }

/* ===================================================================
   Hero
=================================================================== */
.hero { padding: 84px 0 60px; overflow: hidden; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--blue);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.tag-bracket { color: var(--pink); }

.hero h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hl { position: relative; white-space: nowrap; }
.hl-blue { color: var(--blue); }
.hl-pink { color: var(--pink); }

.hero-sub {
  font-size: 1.08rem;
  max-width: 46ch;
  margin-top: 18px;
}

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

.hero-trust {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

/* ---- hero visual: assembling browser mockup ---- */
.hero-visual { position: relative; }

.browser-frame {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--cloud-dim);
}
.bdot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.browser-url {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 10px;
}

.browser-body {
  position: relative;
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 28px);
  gap: 10px;
  min-height: 260px;
}

.block {
  border-radius: 8px;
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  animation: settle 0.6s ease forwards;
}
.block-nav { grid-column: 1 / -1; grid-row: 1; background: var(--cloud-dim); }
.block-side { grid-column: 1 / 2; grid-row: 2 / 5; background: var(--cloud-dim); }
.block-card { grid-row: span 2; border-radius: 10px; }
.block-card.blue { grid-column: 2 / 3; grid-row: 2 / 4; background: var(--blue-soft); border: 1px solid var(--blue); }
.block-card.pink { grid-column: 3 / 4; grid-row: 2 / 4; background: var(--pink-soft); border: 1px solid var(--pink); }
.block-card.yellow { grid-column: 4 / 5; grid-row: 2 / 4; background: var(--yellow-soft); border: 1px solid var(--yellow); }
.block-line { grid-column: 2 / 5; height: 10px; align-self: center; background: var(--cloud-dim); }
.block-line.long { grid-row: 4; width: 100%; }
.block-line.short { grid-row: 4; width: 60%; margin-top: 16px; }

.b-1 { animation-delay: 0.05s; }
.b-2 { animation-delay: 0.15s; }
.b-3 { animation-delay: 0.28s; }
.b-4 { animation-delay: 0.38s; }
.b-5 { animation-delay: 0.48s; }
.b-6 { animation-delay: 0.58s; }
.b-7 { animation-delay: 0.64s; }

@keyframes settle {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.float-chip {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  color: #fff;
  animation: drift 5s ease-in-out infinite;
  opacity: 0;
  animation: settle 0.5s ease forwards, drift 5s ease-in-out 0.6s infinite;
}
.chip-blue { background: var(--blue); top: -14px; right: 60px; animation-delay: 0.7s, 0.7s; }
.chip-pink { background: var(--pink); bottom: 30%; left: -18px; animation-delay: 0.85s, 0.85s; }
.chip-yellow { background: var(--yellow); color: var(--ink); bottom: -14px; right: 30%; animation-delay: 1s, 1s; }

@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .block, .float-chip { animation: none !important; opacity: 1; transform: none; }
}

/* ===================================================================
   Sections (shared)
=================================================================== */
.section { padding: 96px 0; }
.section-dark { background: var(--navy); color: #fff; }
.section-dark p { color: rgba(255,255,255,0.68); }

.section-tag {
  font-size: 0.82rem;
  color: var(--pink);
  margin-bottom: 14px;
}
.section-tag.light { color: var(--yellow); }

.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; max-width: 20ch; }
.section-title.light { color: #fff; }

.section-desc { max-width: 56ch; font-size: 1.02rem; }
.section-desc.light { color: rgba(255,255,255,0.68); }

.grid { display: grid; gap: 22px; margin-top: 44px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- service cards ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.card-icon.blue { background: var(--blue-soft); color: var(--blue); }
.card-icon.pink { background: var(--pink-soft); color: var(--pink); }
.card-icon.yellow { background: var(--yellow-soft); color: #a87400; }
.card h3 { font-size: 1.08rem; }
.card p { font-size: 0.92rem; margin-bottom: 0; }

/* ---------- work cards ---------- */
.work-card { color: #fff; }
.work-shot {
  position: relative;
  aspect-ratio: 5 / 4;
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--navy-soft);
}
.work-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08) brightness(0.75);
}
.work-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: color;
  z-index: 1;
}
.work-shot.tint-blue::before { background: var(--blue); }
.work-shot.tint-pink::before { background: var(--pink); }
.work-shot.tint-yellow::before { background: var(--yellow); }
.work-shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,21,51,0.85), rgba(14,21,51,0) 55%);
  z-index: 1;
}
.work-shot .mini-browser {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  box-shadow: 0 14px 30px -12px rgba(0,0,0,0.6);
}
.mini-browser { background: rgba(14,21,51,0.92); backdrop-filter: blur(6px); border-radius: 10px; overflow: hidden; }
.mini-bar { display: flex; gap: 4px; padding: 8px 10px; }
.mini-bar span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.25); }
.mini-body { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; }
.mini-block { border-radius: 6px; height: 34px; }
.mini-block.wide { width: 100%; }
.mini-block.small { width: calc(50% - 4px); }
.mini-block.line { width: 70%; height: 8px; background: rgba(255,255,255,0.12); }
.mini-block.blue { background: rgba(46,94,255,0.35); }
.mini-block.pink { background: rgba(255,79,147,0.35); }
.mini-block.yellow { background: rgba(255,203,61,0.35); }

.work-tag { font-size: 0.78rem; color: var(--yellow); margin-bottom: 8px; }
.work-card h3 { font-size: 1.1rem; color: #fff; }
.work-card p { font-size: 0.92rem; }

/* ---------- stack pills ---------- */
.stack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}
.pill {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
}
.pill-blue { border-color: var(--blue); color: var(--blue); }
.pill-pink { border-color: var(--pink); color: var(--pink); }
.pill-yellow { border-color: var(--yellow); color: #a87400; }

/* ---------- about ---------- */
.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.about-side { display: flex; flex-direction: column; gap: 20px; }

.about-photo {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}
.about-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05) brightness(0.92);
}
.about-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  mix-blend-mode: color;
}
.about-photo.tint-blue::after { background: var(--blue); }

.about-marks {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
}
.mark-line { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; }

/* ---------- contact ---------- */
.section-contact { background: var(--cloud-dim); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 12px; }
.contact-list li { font-size: 0.98rem; }
.contact-label { display: block; font-size: 0.75rem; color: var(--pink); margin-bottom: 2px; }

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-card);
}
.form-row { margin-bottom: 18px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: 0.88rem; font-weight: 500; }
.form-row input, .form-row textarea {
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--cloud);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
}
.form-note { font-size: 0.86rem; margin: 12px 0 0; color: var(--blue); min-height: 1.2em; }

/* ===================================================================
   Footer
=================================================================== */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-inner p { margin: 0 auto 0 0; font-size: 0.86rem; color: var(--ink-soft); }
.footer-inner nav { display: flex; gap: 20px; }
.footer-inner nav a { font-size: 0.86rem; color: var(--ink-soft); }
.footer-inner nav a:hover { color: var(--ink); }

/*.boxstyle{
  position: relative;
  height: 360px;
  width: 400px;
  overflow: hidden;
}*/

/* ===================================================================
   Responsive
=================================================================== */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .about-inner, .contact-inner { grid-template-columns: 1fr; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 480px; }
}

@media (max-width: 760px) {
  .main-nav, .header-inner .btn-small { display: none; }
  .nav-toggle { display: flex; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero { padding: 48px 0 40px; }
  .section { padding: 64px 0; }
}
