/* HaHiKoom landing — Cloudflare Pages static */
:root {
  --navy: #0a2a56;
  --ink: #0b1f3a;
  --blue: #087cf0;
  --sky: #28b9f5;
  --orange: #f26a21;
  --line: #06c755;
  --muted: #5f6f86;
  --border: rgba(11, 40, 82, 0.1);
  --paper: #f4f9ff;
  --white: #ffffff;
  --shadow: 0 24px 60px rgba(8, 54, 110, 0.14);
  --font-display: "Sora", "Noto Sans Thai", system-ui, sans-serif;
  --font-body: "Noto Sans Thai", "Sora", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 100;
  padding: 0.6rem 0.9rem;
  background: var(--white);
  color: var(--navy);
  border-radius: 0.5rem;
  outline: 2px solid var(--blue);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

/* —— Nav —— */
.navbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
  background: linear-gradient(180deg, rgba(5, 20, 45, 0.55), transparent);
}

.nav {
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  color: var(--white);
}

.brand img {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.7rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.brand-hahi {
  color: #9fd4ff;
}

.brand-koom {
  color: #ffb074;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.navlinks a:not(.navcta):hover {
  color: var(--white);
}

.navcta {
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--navy) !important;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

/* —— Hero —— */
.hero {
  position: relative;
  min-height: min(100svh, 920px);
  display: grid;
  align-items: end;
  color: var(--white);
  isolation: isolate;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 18% 30%;
  transform: scale(1.02);
  animation: hero-ken 18s ease-in-out infinite alternate;
}

.hero-shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 22, 48, 0.58) 0%, rgba(6, 22, 48, 0.22) 40%, rgba(6, 22, 48, 0.7) 100%),
    linear-gradient(180deg, rgba(6, 22, 48, 0.35) 0%, rgba(6, 22, 48, 0.12) 28%, rgba(5, 16, 36, 0.88) 72%, rgba(4, 12, 28, 0.96) 100%),
    radial-gradient(60% 50% at 80% 20%, rgba(40, 185, 245, 0.2), transparent 60%);
}

.hero-copy {
  padding: 0 0 4.5rem;
  max-width: 42rem;
}

.hero-brand {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7.5vw, 4.4rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  animation: rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-brand .koom {
  color: #ffb074;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
  animation: rise 0.85s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-title .accent {
  color: #ffb074;
}

.hero-lead {
  margin: 1rem 0 1.6rem;
  max-width: 34rem;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(255, 255, 255, 0.88);
  animation: rise 0.85s 0.18s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.85s 0.26s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.98rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--sky));
  color: var(--white);
  box-shadow: 0 14px 32px rgba(8, 124, 240, 0.35);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  backdrop-filter: blur(10px);
}

.hero-micro {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  animation: rise 0.85s 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  animation: drift 2.8s ease-in-out infinite;
}

/* —— Sections —— */
section {
  padding: 5.5rem 0;
}

.section-head {
  max-width: 38rem;
  margin: 0 auto 2.75rem;
  text-align: center;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

h2 {
  margin: 0.55rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: var(--navy);
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem 2.5rem;
  padding: 1.75rem 0;
  border-block: 1px solid var(--border);
}

.pillar strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.pillar span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.pillar-index {
  display: inline-block;
  margin-bottom: 0.55rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--blue);
}

.flow {
  display: grid;
  gap: 1.75rem;
}

.flow-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.flow-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.flow-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--orange);
  line-height: 1;
}

.flow-item h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.flow-item p {
  margin: 0;
  color: var(--muted);
}

/* —— Demo —— */
.demo {
  background:
    radial-gradient(50% 60% at 100% 0%, rgba(40, 185, 245, 0.12), transparent 55%),
    var(--paper);
}

.demo-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: center;
}

.demo-copy .eyebrow {
  display: inline-block;
}

.demo-copy h2 {
  text-align: left;
}

.demo-copy > p {
  color: var(--muted);
  margin: 0;
}

.chat {
  padding: 1.35rem;
  border-radius: 1.5rem;
  background: var(--white);
  box-shadow: var(--shadow);
  animation: drift 7s ease-in-out infinite;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-bottom: 0.95rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
  font-weight: 800;
  color: var(--navy);
}

.chat-head img {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.65rem;
}

.bubble {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  max-width: 92%;
  font-size: 0.95rem;
}

.bubble-user {
  margin-left: auto;
  background: var(--navy);
  color: var(--white);
  border-bottom-right-radius: 0.35rem;
}

.bubble-bot {
  background: #eef5ff;
  color: var(--ink);
  border-bottom-left-radius: 0.35rem;
}

/* —— LINE CTA —— */
.line-band {
  background: linear-gradient(135deg, #073a7a, #0b5cc4 55%, #1aa0e0);
  color: var(--white);
}

.line-band .section-head {
  margin: 0;
  text-align: left;
  max-width: none;
}

.line-band h2 {
  color: var(--white);
}

.line-band p {
  color: rgba(255, 255, 255, 0.86);
}

.line-grid {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 2.5rem;
  align-items: center;
}

.line-qr {
  width: 100%;
  border-radius: 1.25rem;
  border: 4px solid rgba(255, 255, 255, 0.9);
  background: var(--white);
}

.line-id {
  margin: 1rem 0 1.25rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.btn-line {
  background: var(--line);
  color: var(--white);
  box-shadow: 0 14px 30px rgba(6, 199, 85, 0.28);
}

/* —— FAQ —— */
.faq {
  max-width: 46rem;
  margin-inline: auto;
}

details {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--border);
}

summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
}

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

summary::after {
  content: "+";
  float: right;
  color: var(--blue);
  font-weight: 800;
}

details[open] summary::after {
  content: "–";
}

details p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  padding-right: 2rem;
}

/* —— Footer —— */
footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--muted);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.footer a:hover {
  color: var(--blue);
}

.footerlinks {
  display: flex;
  gap: 1.15rem;
}

/* —— Motion —— */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes hero-ken {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, -1%, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* —— Responsive —— */
@media (max-width: 900px) {
  .demo-grid,
  .line-grid {
    grid-template-columns: 1fr;
  }

  .pillars {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .line-qr {
    width: min(220px, 70vw);
    margin-inline: auto;
  }

  .line-band .section-head,
  .demo-copy h2 {
    text-align: center;
  }

  .line-grid {
    text-align: center;
  }

  .actions {
    justify-content: center;
  }
}

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

  .navlinks a:not(.navcta) {
    display: none;
  }

  .hero {
    min-height: 92svh;
  }

  .hero-copy {
    padding-bottom: 3.5rem;
  }

  .hero-media img {
    object-position: 28% center;
  }

  .actions .btn {
    width: 100%;
  }

  section {
    padding: 4rem 0;
  }

  .flow-item {
    grid-template-columns: 3rem 1fr;
  }
}
