:root {
  --bg: #F6F4EF;
  --ink: #0F1B3D;
  --ink-2: #3C4A63;
  --blue: #1747A6;
  --red: #D6283A;
  --card: #FFFFFF;
  --line: #DDD8CC;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', 'Noto Sans KR', system-ui, sans-serif;
}

h1, h2, h3, p { margin: 0; font: inherit; }

.page {
  min-height: 100vh;
  min-height: 100svh;
  padding: 32px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  text-align: center;
}

.logo {
  display: block;
  width: 300px;
  max-width: 70%;
  height: auto;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* Scales with the viewport so both lines stay on one line each, up to the 100px design size. */
.headline {
  font-size: clamp(26px, 8.4vw, 100px);
  line-height: 1.28;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.line {
  display: block;
  white-space: nowrap;
}

.flag {
  display: inline-block;
  width: 1.36em;
  height: 0.9em;
  object-fit: cover;
  border: 0.022em solid var(--ink);
  border-radius: 0.115em;
  vertical-align: -0.09em;
  margin: 0 0.08em;
}

.globe {
  display: inline-block;
  width: 0.96em;
  height: 0.96em;
  vertical-align: -0.12em;
  margin: 0 0.08em;
}

.bubble {
  display: inline-grid;
  position: relative;
  align-items: center;
  vertical-align: baseline;
  height: 1.2em;
  padding: 0 0.04em;
  line-height: 1.2;
  color: var(--ink);
  margin: 0 0.04em;
}

.words {
  display: grid;
  align-items: center;
  overflow: hidden;
  height: 100%;
}

.word[lang="zh"] {
  font-family: 'Manrope', 'Noto Sans SC', system-ui, sans-serif;
}

.word {
  grid-area: 1 / 1;
  align-self: center;
  text-align: center;
}

/* Without JavaScript the words can't animate, so only the first one shows. */
.words:not(.is-split) .word:not(:first-child) { visibility: hidden; }

/* 8 words, 1.8s each. */
.word:nth-child(1) { --word-delay: 0s; }
.word:nth-child(2) { --word-delay: 1.8s; }
.word:nth-child(3) { --word-delay: 3.6s; }
.word:nth-child(4) { --word-delay: 5.4s; }
.word:nth-child(5) { --word-delay: 7.2s; }
.word:nth-child(6) { --word-delay: 9s; }
.word:nth-child(7) { --word-delay: 10.8s; }
.word:nth-child(8) { --word-delay: 12.6s; }

/* js/main.js wraps each character in a .char and sets --i to its position. */
.char {
  display: inline-block;
  /* Each character shows its own slice of one gradient sized to the whole word; js/main.js sets --x and --w.
     The padding keeps glyph edges inside the clipped area, and the margin cancels it. */
  padding-right: 0.05em;
  margin-right: -0.05em;
  background: linear-gradient(90deg, var(--red), var(--blue)) calc(var(--x, 0em) * -1) 0 / var(--w, 100%) 100% no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: translateY(115%);
  animation: char-rise 14.4s infinite;
  animation-delay: calc(var(--word-delay) + var(--i) * 40ms);
}

.word:first-child .char { transform: translateY(0); }

/* Each character springs up past its resting place and settles, then accelerates away.
   12.5% of the cycle is one word's 1.8s turn; leaving by 11.4% lets the last
   staggered character clear before the next word starts. */
@keyframes char-rise {
  0% { transform: translateY(115%); animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
  2.4% { transform: translateY(-10%); animation-timing-function: ease-in-out; }
  3.4% { transform: translateY(4%); animation-timing-function: ease-in-out; }
  4.2%, 10% { transform: translateY(0); animation-timing-function: cubic-bezier(0.7, 0, 0.84, 0); }
  11.4% { transform: translateY(-115%); }
  11.41%, 100% { transform: translateY(115%); }
}

.lede {
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 860px;
}

.contact {
  width: min(900px, 100%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  min-width: 0;
  padding: 26px 28px 24px;
  border-radius: 22px;
  background: var(--card);
  border: 1.5px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.card-label {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
}

.card-icon {
  flex: none;
  width: 20px;
  height: 20px;
}

.card-value {
  font-size: clamp(25px, 3.2vw, 32px);
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  padding: 9.5px 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

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

.btn-solid {
  padding: 11.5px 20px;
  border: 0;
  background: var(--ink);
  color: var(--bg);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
}

/* Only on devices that really hover, so a tap doesn't leave a button stuck in this state. */
@media (hover: hover) {
  .btn-solid:hover { background: var(--blue); }
  .btn-outline:hover { background: var(--ink); color: var(--bg); }
}

/* Screen-reader announcement for the copy buttons. */
.status,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Below this, two cards side by side can't fit their buttons on one row. */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; gap: 16px; }
}

/* Phones: the headline splits into four lines so it can be much larger,
   and the buttons share the card's width evenly. */
@media (max-width: 600px) {
  .page {
    justify-content: flex-start;
    padding: 28px 16px 32px;
    gap: 28px;
  }

  .logo {
    align-self: flex-start;
    width: 220px;
  }

  .headline {
    width: 100%;
    font-size: min(14vw, 64px);
    line-height: 1.18;
    text-align: left;
  }

  .part { display: block; }

  /* Nothing follows the word on this line, so short words can start right after "One". */
  .word { text-align: left; }

  .lede {
    width: 100%;
    font-size: 17px;
    text-align: left;
  }

  .contact-title {
    font-size: 13px;
    letter-spacing: 0.1em;
    text-align: left;
  }

  .card {
    padding: 22px 20px 20px;
    border-radius: 18px;
  }

  .card-value { font-size: clamp(22px, 7vw, 28px); }

  .actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
    gap: 10px;
  }

  .btn {
    padding-inline: 10px;
    text-align: center;
    font-size: 15px;
  }
}

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