@font-face {
  font-family: "kanit-medium";
  src: url("asset/fonts/Kanit/Kanit-Medium.woff2") format("woff2");
  font-display: swap;
  font-weight: 500;
  font-style: normal;
}

@keyframes mascot {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(var(--mascot-bob));
  }
}

:root {
  --text-01: #152475;
  --text-02: #5E4FBA;
  --text-03: #1223C6;
  --bg-color: #EEF7FF;
  --button-contact: #EEF7FF;
  --bg-button-contact: #1223C6;
  --section-text: #1a2a5c;
  --section-muted: #2f4070;
  --line: rgba(18, 35, 198, 0.12);
}

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

body {
  margin: 0;
  padding: 0;
  font-family: "kanit-medium", sans-serif;
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--section-text);
  position: relative;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--bg-button-contact);
  color: var(--button-contact);
  text-decoration: none;
  border-radius: 5px;
}

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

.hero {
  --mascot: clamp(10rem, min(68vw, 46vh), 32rem);
  --title: clamp(1.1rem, calc(var(--mascot) * 0.125), 4rem);
  --mascot-bob: calc(var(--mascot) * 0.08);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(0.5rem, calc(var(--mascot) * 0.04), 1.25rem);
  width: 100%;
  max-width: 40rem;
  min-height: 100vh;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  text-align: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15em;
  width: 100%;
  color: var(--text-01);
  font-size: var(--title);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero-copy {
    background-image: linear-gradient(
      45deg,
      var(--text-01),
      var(--text-02),
      var(--text-03));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.button-contact {
  display: block;
  color: var(--button-contact);
  padding: 0.85em 1rem;
  text-align: center;
  text-decoration: none;
  background-color: var(--bg-button-contact);
  font-size: clamp(1rem, calc(var(--title, 2.5rem) * 0.45), 1.5rem);
  cursor: pointer;
  border-radius: 5px;
  width: min(100%, calc(var(--mascot, 22rem) * 0.95));
  margin-inline: auto;
  box-sizing: border-box;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.button-contact:hover {
  filter: brightness(1.08);
}

.button-contact:focus-visible {
  outline: 3px solid var(--text-02);
  outline-offset: 3px;
}

.faq-list summary:focus-visible {
  outline: 2px solid var(--text-03);
  outline-offset: 2px;
}

.text-01,
.text-02 {
  width: 100%;
  text-align: center;
  white-space: nowrap;
  margin: 0;
  font-weight: 500;
}

.text-01 {
  font-size: 1em;
}

.text-02 {
  font-size: 0.55em;
}

.image {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width: 100%;
  animation: mascot 5s linear infinite;
}

.image > img,
.image picture,
.image picture img {
  width: var(--mascot);
  height: auto;
  display: block;
  margin-inline: auto;
}

main {
  position: relative;
  z-index: 1;
  width: min(42rem, calc(100% - 2rem));
  margin: 0 auto 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.section {
  padding: 0.25rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}

.section:last-child {
  border-bottom: none;
}

.section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text-01);
}

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

.benefit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.benefit-list li {
  line-height: 1.6;
  color: var(--section-muted);
  padding-left: 1rem;
  border-left: 3px solid var(--text-03);
}

.benefit-list strong {
  color: var(--text-01);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.45);
}

.faq-list summary {
  cursor: pointer;
  color: var(--text-01);
  font-size: 1.05rem;
}

.faq-list details p {
  margin-top: 0.65rem;
}

.faq-list a {
  color: var(--text-03);
}

.section-cta {
  text-align: center;
}

.section-cta .button-contact {
  --title: 2.5rem;
  --mascot: 22rem;
  margin-top: 1rem;
}

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem 1rem 2.5rem;
  color: var(--section-muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0.35rem 0;
}

.site-footer a {
  color: var(--text-03);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-note {
  opacity: 0.75;
  font-size: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
  .image {
    animation: none;
  }
}

@media (max-width: 640px) {
  .text-01,
  .text-02 {
    white-space: nowrap;
  }
}
