/* ================================
   Root Variables
================================ */
:root {
  --brand-primary-900: #0f172a;
  --brand-primary-700: #1d4ed8;
  --brand-primary-600: #2563eb;
  --brand-primary-500: #3b82f6;
  --brand-accent-500: #0ea5e9;
  --brand-accent-400: #38bdf8;
  --neutral-0: #ffffff;
  --neutral-50: #f4f7fb;
  --neutral-100: #e9eef5;
  --neutral-300: #c5d0dd;
  --neutral-700: #43566f;
  --neutral-900: #122033;
  --state-hover: color-mix(in srgb, var(--brand-primary-700) 86%, black);
  --state-active: color-mix(in srgb, var(--brand-primary-700) 72%, black);
  --state-focus: color-mix(in srgb, var(--brand-accent-500) 68%, #ffffff);
  --primary: var(--brand-primary-900);
  --secondary: var(--brand-primary-700);
  --accent: var(--brand-accent-400);
  --bg: #f4f7fb;
  --text: #122033;
  --surface: #ffffff;
  --muted: #43566f;
  --border: rgba(15, 23, 42, 0.14);
  --gradient-main: linear-gradient(130deg, #0f172a 0%, #1d4ed8 55%, #38bdf8 100%);
  --gradient-soft: linear-gradient(180deg, rgba(37, 99, 235, 0.08), rgba(56, 189, 248, 0.03));
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.09);
  --radius: 1rem;
  --radius-lg: 1.5rem;
  --container: 1180px;
  --duration: 0.35s;
  --space-2xs: 0.375rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 2.75rem;
  --section-space: clamp(4.25rem, 7.5vw, 5.75rem);
  --font-size-hero-th: clamp(2.1rem, 3.9vw, 3.35rem);
  --font-size-hero-en: clamp(2.2rem, 4vw, 3.5rem);
  --font-size-h2-th: clamp(1.65rem, 2.5vw, 2.3rem);
  --font-size-h2-en: clamp(1.72rem, 2.65vw, 2.4rem);
  --font-size-h3-th: clamp(1.05rem, 1.5vw, 1.24rem);
  --font-size-h3-en: clamp(1.1rem, 1.6vw, 1.32rem);
  --font-size-body-th: 1rem;
  --font-size-body-en: 0.985rem;
  --line-height-tight: 1.18;
  --line-height-heading-th: 1.34;
  --line-height-heading-en: 1.28;
  --line-height-body-th: 1.74;
  --line-height-body-en: 1.68;
  --motion-fast: 140ms;
  --motion-base: 200ms;
  --motion-slow: 280ms;
  --ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ================================
   Dark Mode Variables
================================ */
body.dark {
  --bg: #0a1220;
  --text: #e6edf8;
  --surface: #0f1a2b;
  --muted: #b6c5da;
  --border: rgba(148, 163, 184, 0.35);
  --state-hover: color-mix(in srgb, var(--brand-primary-500) 82%, #000000);
  --state-active: color-mix(in srgb, var(--brand-primary-500) 66%, #000000);
  --state-focus: color-mix(in srgb, var(--brand-accent-400) 70%, #ffffff);
  --gradient-soft: linear-gradient(180deg, rgba(59, 130, 246, 0.2), rgba(14, 165, 233, 0.1));
  --shadow: 0 24px 48px rgba(2, 6, 23, 0.52);
}

/* ================================
   Base
================================ */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 8% -8%, rgba(37, 99, 235, 0.12), transparent 32%),
    radial-gradient(circle at 95% 12%, rgba(56, 189, 248, 0.1), transparent 36%);
  color: var(--text);
  font-size: var(--font-size-body-th);
  line-height: var(--line-height-body-th);
  overflow-x: hidden;
  transition: background-color var(--motion-slow) var(--ease-standard), color var(--motion-slow) var(--ease-standard);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 var(--space-sm);
  font-family: "Kanit", "Noto Sans Thai", sans-serif;
  line-height: var(--line-height-heading-th);
  letter-spacing: -0.015em;
  color: var(--text);
}

h1 {
  font-size: var(--font-size-hero-th);
  line-height: var(--line-height-tight);
  font-weight: 700;
}

h2 {
  font-size: var(--font-size-h2-th);
  font-weight: 700;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--font-size-h3-th);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

h4 {
  font-size: 1rem;
  font-weight: 600;
}

p {
  margin: 0 0 var(--space-md);
  color: var(--muted);
}

/* Language-specific typography refinement */
:lang(en) {
  letter-spacing: -0.01em;
}

h1:lang(en) {
  font-size: var(--font-size-hero-en);
}

h2:lang(en) {
  font-size: var(--font-size-h2-en);
  line-height: var(--line-height-heading-en);
}

h3:lang(en) {
  font-size: var(--font-size-h3-en);
  line-height: var(--line-height-heading-en);
}

p:lang(en),
li:lang(en),
a:lang(en),
button:lang(en) {
  font-size: var(--font-size-body-en);
  line-height: var(--line-height-body-en);
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 3px solid var(--state-focus);
  outline-offset: 2px;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -48px;
  background: var(--primary);
  color: #f8fafc;
  padding: 0.55rem 0.85rem;
  border-radius: 0.5rem;
  z-index: 2000;
  transition: top var(--motion-base) var(--ease-standard);
}

.skip-link:focus {
  top: 0.75rem;
}

.section {
  padding: var(--section-space) 0;
}

.glass {
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

/* ================================
   Decorative Background
================================ */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: -1;
}

.bg-orb--one {
  width: 420px;
  height: 420px;
  top: -120px;
  left: -120px;
  background: rgba(37, 99, 235, 0.28);
}

.bg-orb--two {
  width: 340px;
  height: 340px;
  right: -90px;
  top: 30vh;
  background: rgba(56, 189, 248, 0.24);
}

/* ================================
   Loader
================================ */
.loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--bg);
  z-index: 1500;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__ring {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 4px solid rgba(37, 99, 235, 0.2);
  border-top-color: var(--secondary);
  animation: spin 0.9s linear infinite;
}

/* ================================
   Navbar
================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding-top: 0.7rem;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.logo {
  font-family: "Kanit", "Noto Sans Thai", sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.nav-link {
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  transition: background-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background: var(--state-hover);
  color: #f8fafc;
}

.nav-link:active {
  background: var(--state-active);
  color: #f8fafc;
}

.menu-toggle,
.theme-toggle,
.back-to-top {
  border: 0;
  background: var(--surface);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform var(--motion-base) var(--ease-standard), background-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard);
}

.menu-toggle,
.theme-toggle {
  border: 1px solid var(--border);
}

.menu-toggle {
  display: none;
}

.theme-toggle:hover,
.back-to-top:hover,
.menu-toggle:hover {
  transform: translateY(-1px);
}

/* ================================
   Hero
================================ */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 2rem;
  min-height: 88vh;
}

.kicker {
  display: inline-flex;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--secondary);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero__content p {
  max-width: 62ch;
  font-size: clamp(1rem, 1.05vw, 1.1rem);
}

.hero__content h1 {
  max-width: 15ch;
}

.hero__actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.hero__visual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1.6rem;
  background-image: var(--gradient-soft);
  box-shadow: var(--shadow);
}

.hero__visual::before,
.about__visual::before {
  content: "";
  position: absolute;
  inset: auto auto -42% -22%;
  width: 72%;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(29, 78, 216, 0.28), transparent 64%);
  z-index: -1;
}

.image-shell {
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--secondary) 22%, var(--border));
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.image-shell img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  transform: scale(1.01);
}

.image-shell--about img {
  aspect-ratio: 5 / 4;
}

/* ================================
   Buttons
================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard), background-color var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard);
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.btn--primary {
  background: var(--gradient-main);
  color: #f8fafc;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: linear-gradient(130deg, var(--primary) 0%, var(--state-hover) 55%, var(--brand-accent-500) 100%);
}

.btn--primary:active {
  background: linear-gradient(130deg, var(--primary) 0%, var(--state-active) 55%, var(--brand-accent-500) 100%);
}

.btn--outline {
  border-color: color-mix(in srgb, var(--secondary) 50%, var(--border));
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
}

.btn--outline:hover,
.btn--outline:focus-visible {
  background: var(--state-hover);
  color: #f8fafc;
}

.btn--outline:active {
  background: var(--state-active);
  color: #f8fafc;
}

/* ================================
   Stats
================================ */
.stats {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 1.35rem;
  text-align: center;
}

.stat-value {
  margin: 0;
  color: var(--secondary);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
}

/* ================================
   About
================================ */
.about {
  background: var(--gradient-soft);
}

.about__grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}

.about__visual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 1rem;
}

.about__visual::before {
  inset: -36% -14% auto auto;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.2), transparent 64%);
}


.about-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.meta-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: var(--space-sm);
}

.meta-card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.company-facts {
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.company-facts li {
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  color: var(--muted);
}

/* ================================
   Generic Cards
================================ */
.section-head {
  max-width: 62ch;
  margin-bottom: var(--space-xl);
}

.section-head h2 {
  margin-bottom: var(--space-sm);
}

.section-head p {
  margin-bottom: 0;
}

.cards-grid {
  display: grid;
  gap: var(--space-md);
}

.services-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
  padding: var(--space-lg);
  border-top: 3px solid color-mix(in srgb, var(--secondary) 62%, transparent);
  transition: transform var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard);
}

.service-card i {
  color: var(--secondary);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.why-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card {
  border-radius: var(--radius);
  padding: var(--space-lg);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 94%, transparent), var(--surface));
  transition: transform var(--motion-base) var(--ease-standard), border-color var(--motion-base) var(--ease-standard), box-shadow var(--motion-base) var(--ease-standard);
}

.feature-card:hover {
  transform: translateY(-2px);
  border-color: var(--secondary);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

/* ================================
   Process
================================ */
.process-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: stage;
}

.process-timeline li {
  position: relative;
  border: 1px solid var(--border);
  background: linear-gradient(165deg, color-mix(in srgb, var(--surface) 95%, transparent), var(--surface));
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-md) var(--space-md) 2.8rem;
  min-height: 96px;
  display: flex;
  align-items: center;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.process-timeline li::before {
  counter-increment: stage;
  content: counter(stage);
  position: absolute;
  top: 50%;
  left: 0.85rem;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--secondary);
  color: #f8fafc;
  display: grid;
  place-items: center;
  font-weight: 700;
}

/* ================================
   Contact
================================ */
.contact-grid {
  display: block;
  max-width: 860px;
}

.contact-card {
  padding: clamp(1rem, 2.4vw, 1.6rem);
  box-shadow: var(--shadow);
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: var(--space-lg) 0 0;
  display: grid;
  gap: var(--space-sm);
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: 0;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-radius: 0.7rem;
  padding: var(--space-sm) var(--space-md);
}

.contact-list i {
  color: var(--secondary);
  width: 22px;
}

.contact-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

/* ================================
   Footer
================================ */
.site-footer {
  background: var(--primary);
  color: #dbeafe;
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--space-lg);
}

.site-footer p,
.site-footer a {
  color: rgba(219, 234, 254, 0.92);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: var(--space-xs);
}

.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
}

.quick-links li {
  margin-bottom: 0;
}

.site-footer a {
  transition: opacity var(--motion-base) var(--ease-standard), color var(--motion-base) var(--ease-standard);
}

.site-footer a:hover {
  opacity: 0.8;
}

.footer-bottom {
  margin-top: var(--space-xl);
  text-align: center;
  padding: var(--space-md);
  border-top: 1px solid rgba(219, 234, 254, 0.16);
}

/* ================================
   Back To Top
================================ */
.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--surface) 92%, transparent),
    color-mix(in srgb, var(--surface) 78%, var(--brand-accent-400))
  );
  color: var(--secondary);
  border: 1px solid color-mix(in srgb, var(--secondary) 26%, var(--border));
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: linear-gradient(130deg, var(--secondary) 0%, var(--state-hover) 100%);
  color: #f8fafc;
  border-color: transparent;
}

.back-to-top__glyph {
  color: var(--secondary);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  display: inline-block;
  transform: translateY(-1px);
}

.back-to-top::before {
  content: none;
}

.back-to-top:hover::before,
.back-to-top:focus-visible::before {
  color: #f8fafc;
}

.back-to-top:hover .back-to-top__glyph,
.back-to-top:focus-visible .back-to-top__glyph {
  color: #f8fafc;
}

/* ================================
   Scroll Reveal
================================ */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s var(--ease-standard) var(--reveal-delay, 0ms), transform 0.45s var(--ease-standard) var(--reveal-delay, 0ms);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================
   Animation Keyframes
================================ */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================================
   Responsive
================================ */
@media (max-width: 1024px) {
  .hero,
  .about__grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-meta {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .why-grid,
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .process-timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero {
    min-height: auto;
    padding-top: var(--space-xl);
  }
}

@media (max-width: 760px) {
  body {
    font-size: 0.99rem;
    line-height: 1.76;
  }

  h1 {
    font-size: clamp(1.95rem, 8.2vw, 2.35rem);
    line-height: 1.2;
    letter-spacing: -0.012em;
  }

  h2 {
    font-size: clamp(1.38rem, 5.8vw, 1.7rem);
    line-height: 1.33;
  }

  h3 {
    font-size: clamp(1.03rem, 4.2vw, 1.16rem);
    line-height: 1.4;
  }

  p,
  li,
  a,
  button {
    line-height: 1.76;
  }

  h1:lang(en) {
    font-size: clamp(2rem, 8.4vw, 2.42rem);
    line-height: 1.16;
  }

  h2:lang(en) {
    font-size: clamp(1.42rem, 6vw, 1.76rem);
    line-height: 1.29;
  }

  h3:lang(en) {
    font-size: clamp(1.06rem, 4.35vw, 1.2rem);
    line-height: 1.34;
  }

  p:lang(en),
  li:lang(en),
  a:lang(en),
  button:lang(en) {
    font-size: 0.965rem;
    line-height: 1.66;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-list {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 1rem;
    width: min(280px, calc(100% - 2rem));
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--duration), visibility var(--duration), transform var(--duration);
  }

  .nav-list.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .services-grid,
  .why-grid,
  .stats,
  .process-timeline,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    flex-wrap: wrap;
  }

  .section {
    padding: clamp(3.5rem, 8vw, 4.25rem) 0;
  }

  .hero__visual,
  .about__visual {
    padding: 0.85rem;
  }

}

@media (min-width: 360px) and (max-width: 430px) {
  .navbar {
    padding: 0.62rem 0.72rem;
    gap: 0.55rem;
  }

  .logo {
    font-size: 0.94rem;
  }

  .nav-list {
    top: calc(100% + 0.42rem);
    right: 0.72rem;
    width: min(246px, calc(100% - 1.44rem));
    padding: 0.36rem;
  }

  .nav-link {
    padding: 0.5rem 0.68rem;
    font-size: 0.94rem;
  }

  .services-grid {
    gap: 0.72rem;
  }

  .service-card {
    padding: 1.15rem 1rem;
  }

  .service-card i {
    margin-bottom: 0.58rem;
  }

  .service-card h3 {
    margin-bottom: 0.48rem;
  }
}

@media (max-width: 359px) {
  .container {
    width: min(100% - 1.25rem, var(--container));
  }

  .site-header {
    padding-top: 0.5rem;
  }

  .navbar {
    padding: 0.56rem 0.62rem;
    gap: 0.45rem;
  }

  .logo {
    font-size: 0.88rem;
  }

  .menu-toggle,
  .theme-toggle,
  .back-to-top {
    width: 38px;
    height: 38px;
  }

  .nav-list {
    top: calc(100% + 0.38rem);
    right: 0.62rem;
    width: min(228px, calc(100% - 1.24rem));
    padding: 0.32rem;
  }

  .nav-link {
    padding: 0.48rem 0.62rem;
    font-size: 0.9rem;
  }

  h1 {
    font-size: clamp(1.8rem, 9vw, 2.1rem);
  }

  .hero__actions {
    gap: 0.52rem;
  }

  .btn {
    padding: 0.72rem 1.05rem;
    font-size: 0.92rem;
  }

  .services-grid {
    gap: 0.62rem;
  }

  .service-card {
    padding: 1rem 0.88rem;
  }

  .service-card i {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }

  .service-card h3 {
    margin-bottom: 0.42rem;
  }

  .back-to-top {
    right: 0.8rem;
    bottom: 0.9rem;
  }

}

/* ================================
   Device Presets (Pixel-level)
================================ */
/* iPhone SE / narrow 320-class */
@media (max-width: 320px) and (max-height: 700px) {
  .site-header {
    padding-top: max(0.46rem, env(safe-area-inset-top));
  }

  .container {
    width: min(100% - 1.1rem, var(--container));
  }

  .navbar {
    padding: 0.5rem 0.54rem;
    gap: 0.38rem;
  }

  .logo {
    font-size: 0.84rem;
  }

  .nav-list {
    right: 0.54rem;
    width: min(214px, calc(100% - 1.08rem));
  }

  .nav-link {
    padding: 0.45rem 0.55rem;
    font-size: 0.86rem;
  }

  .hero {
    gap: 1.15rem;
  }

  h1 {
    font-size: clamp(1.68rem, 8.8vw, 1.95rem);
  }

  .hero__actions {
    gap: 0.45rem;
  }

  .btn {
    padding: 0.66rem 0.94rem;
    font-size: 0.88rem;
  }

  .section {
    padding: clamp(3.2rem, 7.2vw, 3.8rem) 0;
  }

  .service-card {
    padding: 0.94rem 0.8rem;
  }

  .service-card h3 {
    font-size: 1rem;
    line-height: 1.35;
  }

  .contact-list li {
    align-items: flex-start;
  }

  .back-to-top {
    right: 0.7rem;
    bottom: max(0.78rem, env(safe-area-inset-bottom));
  }
}

/* iPhone mini class (360x780 / 375x812) */
@media (min-width: 360px) and (max-width: 375px) and (min-height: 760px) {
  .site-header {
    padding-top: max(0.62rem, env(safe-area-inset-top));
  }

  .container {
    width: min(100% - 1.6rem, var(--container));
  }

  .navbar {
    padding: 0.64rem 0.76rem;
  }

  .logo {
    font-size: 0.92rem;
  }

  .nav-list {
    right: 0.76rem;
    width: min(252px, calc(100% - 1.52rem));
  }

  .hero {
    gap: 1.45rem;
    min-height: 82vh;
  }

  .hero__actions {
    gap: 0.6rem;
  }

  .btn {
    padding: 0.74rem 1.08rem;
  }

  .service-card {
    padding: 1.12rem 0.98rem;
  }

  .back-to-top {
    bottom: max(0.98rem, env(safe-area-inset-bottom));
  }
}

/* ================================
   Reduced Motion
================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
