/* OSS hero v4: caption row plus the Falcon triptych in the OSS Brand Kit (warm black, charcoal cards, copper, cream).
   Every selector lives under .hero. Internal sizes are Falcon's cqw values written as calc(N * var(--u)):
   on desktop --u is 1cqw of .hero-scene; tablet and mobile redefine --u from the card width so the cards keep Falcon's proportions.
   Contrast on dark (measured): title 16.4, copper-light accent 9.9, tagline 11.6, sub 6.8, card title 14.6, card text 6.1,
   timeline 8.0, axis 9+ even at the glow peak, prompt 6.0, pill and chip text 5.1 or more, tags 12.0, tel number 8.9. */

.hero {
  padding: var(--nav-clear, 5.5rem) 0 clamp(3rem, 5vw, 5rem);
  overflow-x: clip;
}

.hero .hero-scene {
  container-type: inline-size;
  width: min(100%, 1600px);
  margin-inline: auto;
  --u: 1cqw;
  --cards-w: 81.71cqw;
  --label-min: .625rem;
  --icon-ink: var(--copper);
}

/* caption row: H1 and sub on the left, CTAs bottom-right, same width and left edge as the triptych */
.hero .hero-caption {
  position: relative;
  isolation: isolate;
  width: var(--cards-w);
  margin: 0 auto 2.2cqw;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  column-gap: 4cqw;
}

/* the brand signature, once: a thin copper arc sweeping up toward the top right behind the caption (reference 02).
   A wide ellipse with only a top border, cut out by a mask: the stroke tapers to nothing at its left end and the
   --copper-arc gradient brightens it toward the crest just past the caption's right edge. Anchored to the right and
   sized in cqw, so it rises through the empty space beside the H1 and above the CTAs instead of striking through text.
   Decorative (a pseudo-element, never announced) and still. */
.hero .hero-caption::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -1.6cqw;
  right: -64cqw;
  width: 116cqw;
  height: 54cqw;
  border-radius: 50%;
  border-top: max(1px, .11cqw) solid transparent;
  background: var(--copper-arc) border-box;
  -webkit-mask-image: linear-gradient(black 0 0), linear-gradient(black 0 0);
  -webkit-mask-clip: padding-box, border-box;
  -webkit-mask-composite: xor;
  mask-image: linear-gradient(black 0 0), linear-gradient(black 0 0);
  mask-clip: padding-box, border-box;
  mask-composite: exclude;
  /* only the upper half carries the stroke; clipping the rest removes the faint anti-aliased edge of the mask cut-out */
  clip-path: inset(0 0 50% 0);
  pointer-events: none;
}
/* the soft light where the arc crests, like the glint in the references */
.hero .hero-caption::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -5.6cqw;
  right: -20cqw;
  width: 34cqw;
  height: 8cqw;
  background: radial-gradient(closest-side, var(--copper-soft), transparent);
  pointer-events: none;
}

.hero .hero-lede { min-width: 0; }
.hero .hero-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-title);
  font-size: clamp(2.25rem, 3.15cqw, 3.4rem);
  font-weight: var(--weight-semibold);
  line-height: 1.08;
  letter-spacing: -.025em;
  text-wrap: balance;
}
/* second line in copper light, as the references set their key phrase (9.9:1 on the page) */
.hero .hero-title span:last-of-type { color: var(--copper-light); }

/* the brand tagline pattern "A • B • C • D": the only place on the site that uses middle dots */
.hero .hero-tagline {
  margin: .95rem 0 0;
  color: var(--text-2);
  font-family: var(--font-ui);
  font-size: clamp(1rem, 1.2cqw, 1.25rem);
  font-weight: var(--weight-medium);
  line-height: 1.5;
  letter-spacing: .005em;
  text-wrap: balance;
}
/* each phrase stays whole: Thai has no spaces, so a free wrap would split a word like ส่งต่อ */
.hero .hero-tagline span { white-space: nowrap; }
.hero .hero-tagline i {
  margin-inline: .5em;
  color: var(--copper);
  font-style: normal;
}

.hero .hero-sub {
  margin: .75rem 0 0;
  max-width: 44em;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: clamp(1rem, 1.15cqw, 1.2rem);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  text-wrap: pretty;
}
.hero .hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .75rem;
  padding-bottom: .25rem;
}

/* call button: the brand contact line, with the number in tabular figures */
.hero .btn--tel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
}
.hero .btn--tel .tel-num {
  color: var(--copper-light);
  font-variant-numeric: tabular-nums lining-nums;
  font-weight: var(--weight-semibold);
  letter-spacing: .01em;
  white-space: nowrap;
}

.hero .hero-note {
  width: var(--cards-w);
  margin: 1.6rem auto 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: .8125rem;
  line-height: 1.5;
}

/* triptych */
.hero .hero-cards {
  width: var(--cards-w);
  height: 33.81cqw;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 32.33% 32.33% 31.70%;
  justify-content: space-between;
  align-items: start;
}
.hero .hero-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: 72.2% 27.8%;
  border: max(1px, calc(.075 * var(--u))) solid var(--line);
  border-radius: calc(1.59 * var(--u));
  background: var(--surface);
  box-shadow: var(--shadow-card);
}
.hero .hero-card:last-child { height: 98.5%; margin-top: .76%; }

.hero .hero-panel {
  position: relative;
  min-height: 0;
  margin: 2.55% 2.55% 0;
  overflow: hidden;
  border-radius: calc(1.28 * var(--u)) calc(1.28 * var(--u)) calc(1.08 * var(--u)) calc(1.08 * var(--u));
  background: var(--panel-bg);
  box-shadow: inset 0 1px 0 var(--copper-wash);
}
.hero .hero-card:last-child .hero-panel {
  margin: 2% 2% 0;
  background:
    radial-gradient(circle at 74% 46%, color-mix(in srgb, var(--copper) 22%, transparent), transparent 48%),
    linear-gradient(180deg, var(--panel), color-mix(in srgb, var(--panel) 55%, var(--surface)));
}

/* card copy */
.hero .hero-copy {
  position: relative;
  min-width: 0;
  padding: 7.1% 8.4% 6.5%;
}
.hero .hero-copy h2 {
  margin: 0 0 1.6%;
  color: var(--text);
  font-family: var(--font-title);
  font-size: calc(1.86 * var(--u));
  font-weight: var(--weight-semibold);
  line-height: 1.04;
  letter-spacing: calc(-.125 * var(--u));
  text-wrap: balance;
  transform: translateY(calc(-.24 * var(--u)));
  transform-origin: left top;
}
.hero .hero-card:last-child .hero-copy h2 {
  font-size: calc(2.17 * var(--u));
  letter-spacing: calc(-.09 * var(--u));
}
.hero .hero-copy p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-ui);
  font-size: calc(1.39 * var(--u));
  font-weight: var(--weight-medium);
  line-height: 1.04;
  letter-spacing: calc(-.06 * var(--u));
  transform-origin: left top;
}
/* Falcon's condensed description is Latin only: Thai keeps natural width and room for tone marks */
html:lang(en) .hero .hero-copy p { transform: scaleX(.94); }
html:lang(th) .hero .hero-title { line-height: 1.22; letter-spacing: -.01em; }
html:lang(th) .hero .hero-copy h2,
html:lang(th) .hero .hero-card:last-child .hero-copy h2 { line-height: 1.18; letter-spacing: -.01em; }
html:lang(th) .hero .hero-copy p { line-height: 1.24; letter-spacing: 0; }

.hero .hero-icon {
  position: absolute;
  right: 8.4%;
  bottom: 22.5%;
  width: 8.2%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--copper-soft);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--icon-ink);
}

/* glyphs: plus spark, flow branches, speed bolt */
.hero .hero-glyph-spark { position: relative; width: 52%; aspect-ratio: 1; }
.hero .hero-glyph-spark::before,
.hero .hero-glyph-spark::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: currentColor;
}
.hero .hero-glyph-spark::before { top: 41%; left: 0; width: 100%; height: 18%; }
.hero .hero-glyph-spark::after { top: 0; left: 41%; width: 18%; height: 100%; }

.hero .hero-glyph-flow {
  position: relative;
  width: 54%;
  height: 58%;
  background: linear-gradient(currentColor, currentColor) center / 48% 18% no-repeat;
}
.hero .hero-glyph-flow::before,
.hero .hero-glyph-flow::after {
  content: "";
  position: absolute;
  width: 34%;
  height: 70%;
  border-radius: 999px;
  background: currentColor;
}
.hero .hero-glyph-flow::before { left: 4%; top: 24%; }
.hero .hero-glyph-flow::after { right: 4%; top: 6%; }

.hero .hero-glyph-speed {
  position: relative;
  width: 58%;
  aspect-ratio: 1;
  background:
    linear-gradient(currentColor, currentColor) 0 31% / 27% 8% no-repeat,
    linear-gradient(currentColor, currentColor) 0 49% / 38% 8% no-repeat,
    linear-gradient(currentColor, currentColor) 0 67% / 22% 8% no-repeat;
}
.hero .hero-glyph-speed::before {
  content: "";
  position: absolute;
  inset: 4% 1% 2% 28%;
  background: currentColor;
  clip-path: polygon(58% 0, 100% 0, 69% 40%, 94% 40%, 28% 100%, 44% 58%, 7% 58%);
}

/* card 1: chats per hour */
.hero .hero-timeline {
  position: absolute;
  top: 5.7%;
  left: 20.8%;
  width: 58.4%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--copper-light);
  font-size: max(calc(.62 * var(--u)), var(--label-min));
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: calc(-.015 * var(--u));
  font-variant-numeric: tabular-nums;
}
.hero .hero-timeline i {
  width: 20%;
  border-top: max(1px, calc(.05 * var(--u))) dashed color-mix(in srgb, var(--copper) 70%, transparent);
}
.hero .hero-bars {
  position: absolute;
  left: 5.9%;
  right: 5.9%;
  bottom: 12%;
  height: 62%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.hero .hero-bar {
  width: 2.4%;
  height: var(--h, 40%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--copper) 45%, transparent);
}
.hero .hero-bar--active {
  width: 2.6%;
  background: var(--copper);
  box-shadow: 0 0 calc(.5 * var(--u)) color-mix(in srgb, var(--copper) 55%, transparent);
}
.hero .hero-chip {
  position: absolute;
  top: 15.5%;
  left: 53.2%;
  min-width: 14%;
  height: 7.6%;
  padding-inline: .7em;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border: max(1px, calc(.12 * var(--u))) solid var(--panel);
  border-radius: 999px;
  background: var(--copper-pill);
  box-shadow: 0 0 0 calc(.055 * var(--u)) var(--copper), 0 calc(.18 * var(--u)) calc(.6 * var(--u)) color-mix(in srgb, var(--copper) 40%, transparent);
  color: var(--on-copper);
  font-size: max(calc(.67 * var(--u)), var(--label-min));
  font-weight: var(--weight-semibold);
  line-height: 1;
  white-space: nowrap;
}
.hero .hero-axis {
  position: absolute;
  left: 7.7%;
  right: 7.2%;
  bottom: 5.2%;
  display: flex;
  justify-content: space-between;
  color: var(--text-2); /* muted drops to 4.3:1 where the copper glow peaks behind the labels */
  font-size: max(calc(.57 * var(--u)), var(--label-min));
  line-height: 1.2;
  white-space: nowrap;
}

/* card 2: OSS AI prompt */
.hero .hero-assistant {
  position: absolute;
  top: 8.2%;
  left: 6.2%;
  display: flex;
  align-items: center;
  gap: calc(1.02 * var(--u));
  color: var(--copper-light);
  font-size: calc(1.28 * var(--u));
  font-weight: var(--weight-bold);
  line-height: 1;
  letter-spacing: calc(-.04 * var(--u));
}
.hero .hero-badge {
  width: calc(2.16 * var(--u));
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--copper-soft);
  box-shadow: 0 0 calc(.6 * var(--u)) color-mix(in srgb, var(--copper) 30%, transparent);
}
.hero .hero-badge-star {
  width: 48%;
  aspect-ratio: 1;
  background: currentColor;
  filter: blur(calc(.035 * var(--u)));
  clip-path: polygon(47% 0, 53% 0, 58% 28%, 65% 35%, 72% 42%, 100% 47%, 100% 53%, 72% 58%, 65% 65%, 58% 72%, 53% 100%, 47% 100%, 42% 72%, 35% 65%, 28% 58%, 0 53%, 0 47%, 28% 42%, 35% 35%, 42% 28%);
}
.hero .hero-question {
  position: absolute;
  top: 21.5%;
  left: 6.2%;
  right: 6.2%;
  margin: 0;
  color: var(--text);
  font-size: calc(1.34 * var(--u));
  font-weight: var(--weight-medium);
  line-height: 1;
  letter-spacing: calc(-.07 * var(--u));
}
.hero .hero-prompt {
  position: absolute;
  top: 32%;
  left: 6.2%;
  width: 87.2%;
  height: 35.8%;
  padding: 4.7% 4.2%;
  overflow: hidden;
  border: max(1px, calc(.06 * var(--u))) solid color-mix(in srgb, var(--copper-light) 24%, transparent);
  border-radius: calc(.86 * var(--u));
  background: color-mix(in srgb, var(--page) 35%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--page) 40%, transparent);
  color: var(--muted);
  font-size: max(calc(1.03 * var(--u)), .6875rem);
  font-weight: var(--weight-body);
  line-height: 1.31;
  letter-spacing: calc(-.035 * var(--u));
  text-wrap: pretty;
}
/* the three prompt lines flow as one sentence, so a narrow box never leaves an orphaned word */
.hero .hero-prompt br { display: none; }
html:lang(th) .hero .hero-question { line-height: 1.25; letter-spacing: 0; }
html:lang(th) .hero .hero-prompt { padding-block: 3.6%; font-size: max(calc(.98 * var(--u)), .6875rem); line-height: 1.36; letter-spacing: 0; }

.hero .hero-automate {
  position: absolute;
  top: 78.1%;
  left: 6.2%;
  min-width: 34.6%;
  gap: calc(.8 * var(--u));
  height: 11.6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: calc(1 * var(--u));
  border-radius: 999px;
  background: var(--copper-pill);
  box-shadow: var(--copper-glow);
  color: var(--on-copper);
  font-size: max(calc(.98 * var(--u)), .6875rem);
  font-weight: var(--weight-medium);
  line-height: 1;
  text-decoration: none;
  transition: transform 220ms var(--ease-place), box-shadow 220ms var(--ease-place);
}
.hero .hero-automate:hover { transform: translateY(-1px); box-shadow: var(--copper-glow), 0 0 0 1px var(--copper-light); }
.hero .hero-automate:active { transform: translateY(1px); }
.hero .hero-automate-label {
  letter-spacing: calc(-.025 * var(--u));
  transform: scaleX(1.03);
  transform-origin: left center;
  white-space: nowrap;
}
.hero .hero-magic {
  flex: 0 0 auto;
  display: block;
  width: calc(1.5 * var(--u));
  height: calc(1.46 * var(--u));
  transform: translateX(calc(-.15 * var(--u)));
}
.hero .hero-cursor {
  position: absolute;
  top: 85.7%;
  left: 54%;
  z-index: 3;
  width: 4.3%;
  aspect-ratio: .72;
  isolation: isolate;
  pointer-events: none;
  /* cream pointer with a warm-black outline, so it reads on the dark panel and over the copper pill */
  filter:
    drop-shadow(0 0 calc(.075 * var(--u)) var(--page))
    drop-shadow(0 0 calc(.075 * var(--u)) var(--page))
    drop-shadow(calc(.08 * var(--u)) calc(.16 * var(--u)) calc(.12 * var(--u)) color-mix(in srgb, var(--page) 70%, transparent));
}
.hero .hero-cursor::before,
.hero .hero-cursor::after {
  content: "";
  position: absolute;
  clip-path: polygon(0 0, 94% 62%, 57% 67%, 38% 100%);
}
.hero .hero-cursor::before { inset: 0; background: var(--text); }
.hero .hero-cursor::after { inset: -11%; z-index: -1; background: var(--page); }

/* card 3: bookings */
.hero .hero-metric { position: absolute; top: 7.8%; left: 5.2%; right: 5.2%; }
.hero .hero-metric-label {
  margin: 0 0 calc(.25 * var(--u));
  color: var(--muted);
  font-size: max(calc(.88 * var(--u)), .6875rem);
  font-weight: var(--weight-body);
  line-height: 1.25;
}
.hero .hero-metric-row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: calc(1.02 * var(--u));
}
.hero .hero-metric-row strong {
  color: var(--copper-light);
  font-size: calc(2.1 * var(--u));
  font-weight: var(--weight-bold);
  line-height: .95;
  letter-spacing: calc(-.04 * var(--u));
  white-space: nowrap;
}
.hero .hero-metric-row span {
  margin-top: calc(.34 * var(--u));
  color: var(--green);
  font-size: calc(.93 * var(--u));
  font-weight: var(--weight-bold);
  letter-spacing: calc(-.045 * var(--u));
  white-space: nowrap;
}
html:lang(th) .hero .hero-metric-row strong { line-height: 1.1; letter-spacing: 0; }
.hero .hero-flow {
  position: absolute;
  top: 39%;
  left: 0;
  display: block;
  width: 100%;
  height: 53%;
  pointer-events: none;
}
.hero .hero-tag {
  position: absolute;
  z-index: 2;
  height: 8.3%;
  padding-inline: .9em;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--raised) 94%, transparent);
  box-shadow: 0 calc(.3 * var(--u)) calc(.8 * var(--u)) color-mix(in srgb, var(--page) 55%, transparent);
  color: var(--text);
  font-size: max(calc(.62 * var(--u)), var(--label-min));
  font-weight: var(--weight-semibold);
  line-height: 1;
  letter-spacing: calc(-.012 * var(--u));
  white-space: nowrap;
}
.hero .hero-tag--action { top: 34.8%; right: 8%; min-width: 28%; }
.hero .hero-tag--confidence { top: 67%; left: 6%; min-width: 40%; }
.hero .hero-tag--path { top: 82.2%; right: 8%; min-width: 37%; }

/* focus */
.hero a:focus-visible { outline: 2px solid var(--copper-light); outline-offset: 3px; }

/* entrance: boot.js adds .entrance-pending before first paint, hero.js swaps it for .entrance-active while WAAPI runs */
.entrance-pending .hero .hero-card { opacity: 0; }
.entrance-active .hero :is(.hero-card, .hero-panel, .hero-copy, .hero-copy h2, .hero-copy p, .hero-icon) { will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  .entrance-pending .hero .hero-card { opacity: 1; }
  .hero .hero-automate { transition: none; }
  .hero .hero-automate:hover,
  .hero .hero-automate:active { transform: none; }
}

/* tablet: two columns, the third card centred below */
@media (max-width: 70rem) {
  .hero .hero-scene {
    --gap: clamp(.75rem, 2cqw, 1.2rem);
    --cards-w: min(88cqw, 45rem);
    --u: calc((var(--cards-w) - var(--gap)) / 2 / 26.42);
    --label-min: .6875rem;
  }
  .hero .hero-caption {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 1.5rem;
    margin-bottom: 2rem;
  }
  .hero .hero-title { font-size: clamp(2rem, 1.2rem + 3vw, 2.75rem); }
  .hero .hero-sub { font-size: 1.0625rem; }
  .hero .hero-actions { justify-content: flex-start; }
  .hero .hero-cards {
    height: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: var(--gap);
  }
  .hero .hero-card {
    height: auto;
    aspect-ratio: .781;
    border-radius: clamp(.9rem, 2cqw, 1.2rem);
  }
  .hero .hero-card:last-child {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - var(--gap)) / 2);
    height: auto;
    margin-top: 0;
  }
  .hero .hero-panel { border-radius: clamp(.7rem, 1.6cqw, .95rem) clamp(.7rem, 1.6cqw, .95rem) clamp(.6rem, 1.35cqw, .8rem) clamp(.6rem, 1.35cqw, .8rem); }
  .hero .hero-automate { min-height: 2.75rem; }
}

/* mobile: one column */
@media (max-width: 32rem), (max-height: 28rem) and (max-width: 64rem) and (pointer: coarse) {
  .hero { padding-top: 5rem; }
  .hero .hero-scene {
    --gap: clamp(1rem, 4cqw, 1.5rem);
    --cards-w: min(90cqw, 26rem);
    --u: calc(var(--cards-w) / 26.42);
    --label-min: .6875rem;
  }
  .hero .hero-caption { grid-template-columns: minmax(0, 1fr); row-gap: 1.5rem; margin-bottom: 2rem; }
  /* the four phrases fit one line on a phone, so no separator dot is left dangling at a line end */
  .hero .hero-tagline { font-size: clamp(.8125rem, 3.5cqw, 1rem); letter-spacing: 0; }
  .hero .hero-tagline i { margin-inline: .3em; }
  html:lang(en) .hero .hero-tagline { font-size: clamp(.8125rem, 3.3cqw, 1rem); letter-spacing: -.01em; }
  .hero .hero-actions { justify-content: flex-start; }
  .hero .hero-actions .btn { flex: 1 1 auto; }
  .hero .hero-cards { height: auto; grid-template-columns: minmax(0, 1fr); gap: var(--gap); }
  .hero .hero-card,
  .hero .hero-card:last-child {
    grid-column: auto;
    width: 100%;
    height: auto;
    margin-top: 0;
    aspect-ratio: .781;
    border-radius: clamp(1.1rem, 5cqw, 1.4rem);
  }
  .hero .hero-panel { border-radius: clamp(.85rem, 4cqw, 1.1rem) clamp(.85rem, 4cqw, 1.1rem) clamp(.75rem, 3.4cqw, .95rem) clamp(.75rem, 3.4cqw, .95rem); }
  .hero .hero-automate { min-height: 2.75rem; }
}
