@font-face {
  font-family: 'Huninn zh-Hant';
  src: url('/fonts/huninn-zh-Hant.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Huninn en';
  src: url('/fonts/huninn-en.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Huninn de';
  src: url('/fonts/huninn-de.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Huninn vi';
  src: url('/fonts/huninn-vi.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Huninn id';
  src: url('/fonts/huninn-id.woff2') format('woff2');
  font-display: swap;
}

:root {
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang TC', 'Noto Sans TC', 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  --display: 'Huninn zh-Hant';
  --bg: #f6f4ff;
  --bg-2: #e9e4fc;
  --bg-3: #d3cbf4;
  --text: #2a2540;
  --muted: #6b6585;
  --accent: #6f63c8;
  --card: #ffffff;
  --line: rgba(111, 99, 200, 0.16);
  --surface: #fbfaff;
  --outline: rgba(42, 37, 64, 0.12);
  --fab: #9e95db;
  --shadow: 0 24px 60px rgba(70, 50, 150, 0.18);
  --phone-shadow: 0 40px 80px rgba(70, 50, 150, 0.3), 0 12px 24px rgba(70, 50, 150, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #17151f;
    --bg-2: #1e1b2b;
    --bg-3: #2a2540;
    --text: #ece9fb;
    --muted: #aaa4c4;
    --accent: #b1a8f0;
    --card: #232034;
    --line: rgba(177, 168, 240, 0.18);
    --surface: #2a2738;
    --outline: rgba(236, 233, 251, 0.14);
    --fab: #8a80cf;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --phone-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 12px 24px rgba(0, 0, 0, 0.3);
  }
}

:root:lang(en) {
  --display: 'Huninn en';
}

:root:lang(de) {
  --display: 'Huninn de';
}

:root:lang(vi) {
  --display: 'Huninn vi';
}

:root:lang(id) {
  --display: 'Huninn id';
}

:root:lang(zh-Hans) {
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans SC', 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  --display: var(--sans);
}

:root:lang(th) {
  --sans: -apple-system, BlinkMacSystemFont, 'Thonburi', 'Noto Sans Thai', 'Segoe UI', Roboto, 'Helvetica Neue',
    Arial, sans-serif;
  --display: var(--sans);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
}

h1,
h2,
h3,
.kicker,
.lead,
.tag,
.brand {
  font-family: var(--display), var(--sans);
  font-weight: 400;
}

h1 em,
h2 em {
  font-style: normal;
  color: var(--accent);
}

a {
  color: var(--accent);
}

img {
  max-width: 100%;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 22px;
}

.brand::before {
  content: '';
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: url('/img/icon-192.webp') center / cover;
}

.lang {
  font-size: 15px;
  color: var(--muted);
  text-decoration: none;
}

.lang:hover {
  color: var(--accent);
}

.hero {
  background: linear-gradient(165deg, var(--bg) 0%, var(--bg-2) 50%, var(--bg-3) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 40px;
  padding: 32px 0 0;
  text-align: center;
}

.kicker {
  margin: 0 0 12px;
  font-size: 19px;
  letter-spacing: 1px;
  color: var(--accent);
}

h1 {
  margin: 0;
  font-size: clamp(40px, 10vw, 76px);
  line-height: 1.2;
  letter-spacing: 2px;
}

:root:not(:lang(zh)) h1 {
  font-size: clamp(34px, 8.6vw, 56px);
  letter-spacing: 0;
}

.lead {
  margin: 18px 0 0;
  font-size: clamp(16px, 4.1vw, 24px);
  letter-spacing: 0.5px;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.tag {
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--card);
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(70, 50, 150, 0.12);
}

.tag.dark {
  background: var(--text);
  color: var(--bg);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 18px;
  margin: 32px 0 0;
}

.badge {
  display: inline-block;
  line-height: 0;
}

.badge img {
  height: 54px;
  width: auto;
}

.cta-note {
  font-size: 14px;
  color: var(--muted);
}

.phone {
  --w: 240px;
  width: var(--w);
  padding: calc(var(--w) * 0.025);
  border-radius: calc(var(--w) * 0.15);
  background: #18171c;
  box-shadow: 0 0 0 2px #3b3a42 inset, var(--phone-shadow);
  margin: 0;
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--w) * 0.128);
}

.phones {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  height: 430px;
}

.phones .phone {
  position: absolute;
  top: 0;
}

.phones .center {
  --w: 230px;
  z-index: 2;
}

.phones .left,
.phones .right {
  --w: 196px;
  top: 46px;
  z-index: 1;
}

.phones .left {
  transform: translateX(-62%) rotate(-8deg);
}

.phones .right {
  transform: translateX(62%) rotate(8deg);
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    padding: 48px 0 0;
    text-align: left;
  }

  .hero-text {
    padding-bottom: 64px;
  }

  .tags,
  .cta {
    justify-content: flex-start;
  }

  .phones {
    height: 600px;
  }

  .phones .center {
    --w: 290px;
  }

  .phones .left,
  .phones .right {
    --w: 246px;
    top: 60px;
  }
}

section {
  padding: 72px 0;
}

.section-head {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 6.4vw, 44px);
  line-height: 1.3;
  letter-spacing: 1px;
}

.section-head p {
  margin: 14px 0 0;
  color: var(--muted);
}

h3 {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.4;
}

.who {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.who li {
  padding: 22px 22px 20px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.who p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.features {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  align-items: center;
  justify-items: center;
  padding: 32px 0;
}

.feature + .feature {
  border-top: 1px solid var(--line);
}

.feature-text {
  max-width: 520px;
}

.feature h3 {
  font-size: clamp(26px, 5.4vw, 34px);
}

.feature ul {
  margin: 14px 0 0;
  padding-left: 1.2em;
}

.feature li + li {
  margin-top: 6px;
}

.feature .phone {
  --w: 250px;
}

@media (min-width: 900px) {
  .feature {
    grid-template-columns: 1fr 1fr;
    padding: 48px 0;
  }

  .feature:nth-child(even) .feature-text {
    order: 2;
  }
}

.more {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 16px;
}

.more > div {
  padding: 22px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.more h3 {
  font-size: 19px;
}

.more p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.faq {
  max-width: 800px;
  margin: 0 auto;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 18px 4px;
}

.faq summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  color: var(--accent);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.2;
}

.faq details[open] summary::after {
  content: '−';
}

.faq details p {
  margin: 10px 0 0;
  color: var(--muted);
}

.final {
  background: linear-gradient(165deg, var(--bg-2) 0%, var(--bg-3) 100%);
  text-align: center;
}

.final .cta {
  justify-content: center;
}

footer {
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

footer p {
  margin: 4px 0;
}

.round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--outline);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.round svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.lang-picker {
  position: relative;
}

.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  min-width: 180px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--outline);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lang-menu[hidden] {
  display: none;
}

.lang-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  font-size: 16px;
  text-decoration: none;
}

.lang-menu a:hover {
  background: var(--line);
}

.lang-menu svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--outline);
  border-radius: 50%;
  background: var(--fab);
  color: #fff;
  box-shadow: 0 12px 28px rgba(70, 50, 150, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.to-top.show {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}
