/*
 * Commerge card. Sizes follow the 1080px-wide design: 1cqw is 1% of the card's width
 * (10.8px in the design), with a floor in px so small text stays readable on narrow phones.
 */
@font-face {
  font-family: "LINE Seed Sans TH";
  src: url("fonts/LINESeedSansTH_W_Rg.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "LINE Seed Sans TH";
  src: url("fonts/LINESeedSansTH_W_Bd.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "LINE Seed Sans TH";
  src: url("fonts/LINESeedSansTH_W_XBd.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --purple: #834cff;
  --green: #00ff9d;
  --chip: #9c70ff;
  --white: #ffffff;
  --pattern-ground: #f3f3f3;
  --font: "LINE Seed Sans TH", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--purple);
}

body {
  margin: 0;
  background: var(--purple);
  color: var(--white);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

p,
h1,
h2 {
  margin: 0;
}

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

.card {
  container-type: inline-size;
  max-width: 540px;
  margin: 0 auto;
  transform-origin: top center; /* scaled down to fit short screens, see FIT_SCREEN */
}

.fit {
  overflow: hidden;
}

/* Photo and pattern ------------------------------------------------------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 44.07cqw; /* four pattern tiles beside the photo */
  aspect-ratio: 1080 / 712;
  overflow: hidden;
}

.v2 .hero {
  aspect-ratio: 1080 / 594;
}

.photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.mark {
  position: absolute;
  top: 4.4cqw;
  left: 4.8cqw;
  width: 5.4cqw;
  height: 5.4cqw;
}

.pattern {
  background: var(--pattern-ground)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 241.4 241.4'%3E%3Cpath fill='%23834CFF' d='M0 0V241.4H60.3V181.1L120.6 241.4L180.9 181.1Z'/%3E%3Cpath fill='%2300FF9D' d='M241.4 0L181.1 60.3V241.4H241.4Z'/%3E%3C/svg%3E")
    0 0 / 11.02cqw 11.02cqw repeat;
}

.no-photo .pattern {
  grid-column: 1 / -1;
}

/* Text --------------------------------------------------------------------- */

.content {
  padding: 0 4.26cqw 6cqw;
}

.logo {
  display: block;
  width: 100%;
  height: auto;
}

.w {
  fill: var(--white);
}

.g {
  fill: var(--green);
}

.p {
  fill: var(--purple);
}

.gs,
.ps {
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gs {
  stroke: var(--green);
}

.ps {
  stroke: var(--purple);
}

.ps.dots {
  stroke-width: 1.8;
}

.company-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 37cqw;
  gap: 4cqw;
  align-items: center;
  margin-top: 8cqw;
}

.company {
  font-size: max(14px, 3.3cqw);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.tagline {
  margin-top: 0.8cqw;
  font-size: max(11px, 2.25cqw);
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.name {
  margin-top: 7cqw;
  font-size: max(24px, 6.9cqw);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.name span {
  display: block;
}

.name-th {
  margin-top: 1.4cqw;
  font-size: max(17px, 4.3cqw);
  line-height: 1.25;
}

.title {
  margin-top: 5cqw;
  font-size: max(13px, 3.2cqw);
  line-height: 1.3;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Buttons ------------------------------------------------------------------ */

.save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6cqw;
  height: 12.4cqw;
  min-height: 52px;
  margin-top: 5.5cqw;
  border-radius: 999px;
  background: var(--green);
  color: var(--purple);
  font-size: max(15px, 2.9cqw);
  letter-spacing: 0.06em;
  transition: filter 0.15s ease;
}

.save:hover {
  filter: brightness(1.06);
}

.save .icon {
  width: max(22px, 4.4cqw);
  height: max(22px, 4.4cqw);
}

.actions {
  display: grid;
  grid-template-columns: 422fr 548fr;
  gap: 1.5cqw;
  margin-top: 2cqw;
}

.action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.6cqw;
  min-width: 0;
  height: 12.3cqw;
  min-height: 52px;
  padding: 0 2.2cqw;
  border: max(1.5px, 0.2cqw) solid var(--green);
  border-radius: 999px;
  font-size: max(11.5px, 2.9cqw);
  white-space: nowrap;
  letter-spacing: 0.05em;
  transition: background-color 0.15s ease;
}

.action:hover {
  background: rgba(255, 255, 255, 0.08);
}

.action .icon {
  flex: none;
  width: max(18px, 3.8cqw);
  height: max(18px, 3.8cqw);
}

/* A long address breaks after the @ (see <wbr> in the template), never inside a word. */
.email {
  min-width: 0;
  white-space: normal;
  line-height: 1.2;
}

/* Phones and address ------------------------------------------------------- */

.contacts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 4cqw;
  margin-top: 6cqw;
  font-size: max(12px, 2.8cqw);
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.phones {
  display: grid;
  gap: 0.8cqw;
  align-content: start;
}

.phones a {
  white-space: nowrap;
}

.phones a,
.address {
  display: flex;
  align-items: flex-start;
  gap: 2cqw;
}

.contacts .icon {
  flex: none;
  width: max(16px, 3.2cqw);
  height: max(16px, 3.2cqw);
  margin-top: 0.1em;
}

.address b {
  display: block;
  font-weight: 700;
  letter-spacing: 0.06em;
}

/* Version 2 ---------------------------------------------------------------- */

.v2 .name {
  margin-top: 5.2cqw;
  font-weight: 700;
  line-height: 1;
}

.v2 .title {
  margin-top: 2cqw;
  font-weight: 700;
}

.brand-row {
  display: grid;
  grid-template-columns: 29.6cqw minmax(0, 1fr);
  gap: 4.5cqw;
  align-items: center;
  margin-top: 4.6cqw;
}

.brand-text {
  padding: 0.4cqw 0 0.4cqw 4.6cqw;
  border-left: max(1px, 0.2cqw) solid var(--white);
}

.headline {
  font-size: max(10.5px, 3.2cqw);
  font-weight: 700;
  letter-spacing: 0.26em;
  line-height: 1.2;
}

.v2 .tagline {
  margin-top: 1.4cqw;
  font-size: max(12px, 2.8cqw);
  line-height: 1.3;
}

.explore {
  margin-top: 3.7cqw;
  padding: 2.8cqw 4cqw 2.4cqw;
  border: max(1.5px, 0.2cqw) solid var(--green);
  border-radius: 0.8cqw;
  text-align: center;
}

.explore h2 {
  font-size: max(14px, 3.1cqw);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.explore p {
  margin-top: 0.6cqw;
  font-size: max(12px, 2.8cqw);
  letter-spacing: 0.03em;
}

.chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2cqw;
  margin-top: 2.6cqw;
}

.chip {
  padding: 0.7cqw 0;
  border: max(1.5px, 0.2cqw) solid var(--green);
  border-radius: 999px;
  background: var(--chip);
  font-size: max(12px, 2.9cqw);
  letter-spacing: 0.04em;
  transition: background-color 0.15s ease;
}

.chip:hover {
  background: #ad87ff;
}

.v2 .save {
  margin-top: 2cqw;
  border-radius: 1cqw;
}

.v2 .action {
  border-radius: 0.8cqw;
}

.v2 .contacts {
  grid-template-columns: max-content minmax(0, 1fr);
  margin-top: 3.5cqw;
}

.notice {
  padding: 32px 16px;
  text-align: center;
}

/* Narrow phones: the two buttons and the contacts each take a full row. */
@media (max-width: 359px) {
  .actions,
  .contacts,
  .v2 .contacts {
    grid-template-columns: minmax(0, 1fr);
  }
  .chips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
