/* =========================================================================
   >nware: shared site styles (nware.in.th + nware.ch)
   Per-domain tokens (accent colour) live in src-th|src-ch/css/style.css,
   which is loaded after this file.
   ========================================================================= */

@font-face {
  font-family: "Gilroy";
  src: url("../fonts/gilroy/gilroy-light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gilroy";
  src: url("../fonts/gilroy/gilroy-extrabold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

:root {
  /* Country colours: fixed on both domains (portrait frames: where a person sits) */
  --thai: #8E44AD;
  --swiss: #D62828;

  /* Domain accent: overridden in style.css */
  --accent: var(--thai);
  --accent-ink: #74358f;
  --accent-on-dark: #B474D3;

  --ink: #141217;
  --ink-deep: #100e13;
  --text: #47454c;
  --muted: #6b6970;
  --line: #e7e5ea;
  --field: #cfccd4;
  --paper: #ffffff;
  --paper-2: #f6f5f7;

  --font: "Gilroy", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(20px, 4vw, 40px);
  --maxw: 1160px;
  --nav-h: 72px;

  /* The >nware chevron, drawn once, used as a mask */
  --chev-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 108 186'%3E%3Cpath d='M0 0H31L100 89L31 178H0L69 89Z' fill='black' stroke='black' stroke-width='6' stroke-linejoin='round'/%3E%3C/svg%3E");

  /* Hero and section title sizes (the prompt indents key off these) */
  --hero-size: clamp(2.75rem, 1.25rem + 6vw, 6rem);
  --h2-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem);
  --prompt-indent: 0.77;
}

/* ---------- Base ------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 8px);
  scrollbar-color: #c9c6cf var(--paper);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: #fff;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--paper);
}
::-webkit-scrollbar-thumb {
  background: #c9c6cf;
  border: 2px solid var(--paper);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s ease;
}
a:hover {
  color: var(--accent-ink);
}

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

p {
  margin: 0 0 1.2em;
  text-wrap: pretty;
}

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

ul {
  margin: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--maxw));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus {
  transform: none;
  color: #fff;
}

/* ---------- The chevron ------------------------------------------------ */

.chev {
  display: inline-block;
  flex: none;
  width: auto;
  height: 1em;
  aspect-ratio: 108 / 186;
  fill: currentColor;
  overflow: visible;
}

/* Line icons (Lucide symbols in each index.html) */
.icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Prompt headings (chevron + typed text) --------------------- */

.prompt {
  display: flex;
  align-items: flex-start;
  gap: 0.32em;
}

.prompt > .chev {
  height: 0.8em;
  margin-top: 0.14em;
  color: var(--accent);
}

.prompt__text {
  min-width: 0;
}

/* Typing scaffold, built by site.js. The ghost reserves the final size so
   nothing shifts while characters appear in the live layer on top of it. */
.type {
  position: relative;
  display: inline-block;
  max-width: 100%;
  vertical-align: top;
}
.type__ghost {
  visibility: hidden;
  white-space: pre-line;
}
.type__live {
  position: absolute;
  inset: 0;
  white-space: pre-line;
}
.type__ghost::before,
.type__out::before {
  content: attr(data-text);
}

.cursor {
  display: inline-block;
  width: 0.44em;
  height: 0.72em;
  margin-left: 0.07em;
  vertical-align: -0.02em;
  background: var(--accent);
  animation: blink 1.06s steps(1, end) infinite;
}
.cursor.is-typing {
  animation: none;
}
.cursor.is-resting {
  animation: blink 1.06s steps(1, end) 4;
}
.cursor.is-leaving {
  animation: blink 1.06s steps(1, end) 2, cursor-out 0.5s var(--ease-out) 2.12s forwards;
}

@keyframes blink {
  0%, 49.9% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes cursor-out {
  to { opacity: 0; transform: scaleX(0.2); }
}

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .cursor.is-resting {
    animation: none;
  }
  .cursor.is-leaving {
    animation: none;
    opacity: 0;
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7em;
  padding: 1em 1.6em 0.95em;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 800 1rem/1 var(--font);
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.25s var(--ease-out), box-shadow 0.25s ease;
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--accent) 80%, black);
}
.btn:hover {
  background: var(--accent-ink);
  color: #fff;
}
.btn:active {
  transform: translateY(1px);
}
.btn .chev {
  height: 0.8em;
  transition: transform 0.35s var(--ease-out);
}
.btn:hover .chev {
  transform: translateX(4px);
}
.btn .cursor {
  display: none;
  width: 0.5em;
  height: 0.85em;
  background: currentColor;
}
.btn.is-sending {
  cursor: progress;
  background: var(--accent-ink);
}
.btn.is-sending .chev {
  display: none;
}
.btn.is-sending .cursor {
  display: inline-block;
}

/* ---------- Navigation ------------------------------------------------- */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  color: #fff;
  transition: background-color 0.35s ease, color 0.35s ease, box-shadow 0.35s ease;
}

.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line), 0 8px 24px -18px rgba(20, 18, 23, 0.35);
}

@supports (backdrop-filter: blur(1px)) {
  .nav.is-scrolled {
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: saturate(1.4) blur(12px);
  }
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
}
.brand:hover {
  color: inherit;
}
.brand .chev {
  height: 28px;
  color: var(--accent-on-dark);
  transition: color 0.35s ease;
}
.nav.is-scrolled .brand .chev {
  color: var(--accent);
}
.brand__word {
  display: block;
  width: 92px;
  aspect-ratio: 603 / 131;
  margin-top: -2px;
  background: currentColor;
  -webkit-mask: url("../img/svg/wordmark.svg") center / contain no-repeat;
  mask: url("../img/svg/wordmark.svg") center / contain no-repeat;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  list-style: none;
  padding: 0;
}

.nav__links a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  color: inherit;
  font-size: 0.8125rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease, color 0.35s ease;
}
.nav__links a:hover,
.nav__links a[aria-current] {
  opacity: 1;
}

/* Active section: the prompt chevron moves to the link you're reading */
.nav__links a[data-nav-link]::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  width: 6px;
  height: 10px;
  margin-top: -5.5px;
  background: var(--accent-on-dark);
  -webkit-mask: var(--chev-mask) center / contain no-repeat;
  mask: var(--chev-mask) center / contain no-repeat;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
}
.nav.is-scrolled .nav__links a[data-nav-link]::before {
  background: var(--accent);
}
.nav__links a[aria-current]::before {
  opacity: 1;
  transform: none;
}

.nav__cta a {
  padding: 8px 18px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  opacity: 1;
}
.nav__cta a:hover {
  background: var(--accent);
  color: #fff;
}
.nav.is-scrolled .nav__cta a {
  background: var(--accent);
  color: #fff;
}
.nav.is-scrolled .nav__cta a:hover {
  background: var(--accent-ink);
}
.nav__links .nav__cta a::before {
  display: none;
}

.nav__flag a {
  display: block;
  padding: 4px;
  opacity: 1;
}
.nav__flag img {
  width: 22px;
  height: 22px;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out);
}
.nav__flag a:hover img {
  transform: scale(1.1);
}

/* Reading progress: a line with the chevron riding its tip */
.nav__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  container-type: inline-size;
}
.nav.is-scrolled .nav__progress {
  opacity: 1;
}
.nav__progress-bar {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(var(--p));
}
.nav__progress-head {
  position: absolute;
  top: -5px;
  left: 0;
  height: 12px;
  color: var(--accent);
  transform: translateX(calc(var(--p) * (100cqw - 7px)));
}

@supports (animation-timeline: scroll()) {
  .nav {
    animation: read-progress linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes read-progress {
    from { --p: 0; }
    to { --p: 1; }
  }
}

.nav__toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), background-color 0.2s ease, top 0.35s var(--ease-out);
}
.nav__toggle span {
  top: 21px;
}
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  left: 0;
}
.nav__toggle span::before {
  top: -7px;
}
.nav__toggle span::after {
  top: 7px;
}
.nav.is-open .nav__toggle span {
  background: transparent;
}
.nav.is-open .nav__toggle span::before {
  top: 0;
  transform: rotate(45deg);
}
.nav.is-open .nav__toggle span::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 860px) {
  .nav__toggle {
    display: block;
  }

  .nav.is-open {
    background: var(--ink-deep);
    color: #fff;
    box-shadow: none;
    backdrop-filter: none;
  }
  .nav.is-open .brand .chev {
    color: var(--accent-on-dark);
  }

  .nav__menu {
    position: fixed;
    inset: var(--nav-h) 0 auto;
    padding: 8px var(--gutter) 32px;
    background: var(--ink-deep);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.4s var(--ease-out), visibility 0s linear 0.4s;
  }
  .nav.is-open .nav__menu {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.3s ease, transform 0.4s var(--ease-out), visibility 0s;
  }

  .nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .nav__links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav__links a {
    display: block;
    padding: 16px 0 16px 22px;
    color: #fff;
    font-size: 1.125rem;
    letter-spacing: 0.06em;
  }
  .nav__links a[data-nav-link]::before,
  .nav.is-scrolled .nav__links a[data-nav-link]::before {
    left: 0;
    width: 8px;
    height: 14px;
    margin-top: -7px;
    background: var(--accent-on-dark);
  }
  .nav__cta a,
  .nav.is-scrolled .nav__cta a {
    padding: 16px 0 16px 22px;
    border-radius: 0;
    background: none;
  }
  .nav__links .nav__cta a::before {
    display: block;
  }
  .nav__flag {
    border-bottom: 0 !important;
    padding-top: 12px;
  }
  .nav__flag a {
    padding: 4px 0 0 22px;
  }
}

/* ---------- Hero ------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--ink-deep);
  color: #fff;
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("../img/jpg/banner.jpg") 64% 32% / cover no-repeat;
  animation: hero-settle 2.8s var(--ease-out) both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(16, 14, 19, 0.6) 0%, rgba(16, 14, 19, 0) 22%),
    linear-gradient(90deg, rgba(16, 14, 19, 0.88) 0%, rgba(16, 14, 19, 0.66) 34%, rgba(16, 14, 19, 0.22) 64%, rgba(16, 14, 19, 0.06) 100%),
    linear-gradient(0deg, rgba(16, 14, 19, 0.7) 0%, rgba(16, 14, 19, 0) 48%);
}

@keyframes hero-settle {
  from { transform: scale(1.07); }
  to { transform: scale(1); }
}

.hero__inner {
  padding-block: calc(var(--nav-h) + 56px) clamp(64px, 12vh, 132px);
}

.hero__title {
  max-width: 9.4em;
  margin: 0 0 0.5em;
  color: #fff;
  font-size: var(--hero-size);
  line-height: 1.02;
  letter-spacing: -0.025em;
}
.hero__title > .chev {
  height: 0.78em;
  margin-top: 0.1em;
  color: var(--accent-on-dark);
}
.hero__title .cursor {
  background: var(--accent-on-dark);
}

/* Until site.js takes over the headline, hide it so it doesn't flash in full
   before typing starts. The delayed animation is a failsafe if JS never runs. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title:not(.is-ready) .prompt__text {
    visibility: hidden;
    animation: failsafe-show 0s linear 2.5s forwards;
  }
}
@keyframes failsafe-show {
  to { visibility: visible; }
}

.hero__facts,
.hero__actions {
  margin-left: calc(var(--hero-size) * var(--prompt-indent));
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin-bottom: 40px;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.0625rem;
}
.hero__facts li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.hero__facts li::before {
  content: "";
  flex: none;
  width: 7px;
  height: 12px;
  background: var(--accent-on-dark);
  -webkit-mask: var(--chev-mask) center / contain no-repeat;
  mask: var(--chev-mask) center / contain no-repeat;
}

.hero .btn {
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.8);
}

@media (max-width: 700px) {
  .hero::before {
    background:
      linear-gradient(180deg, rgba(16, 14, 19, 0.55) 0%, rgba(16, 14, 19, 0) 20%),
      linear-gradient(0deg, rgba(16, 14, 19, 0.92) 0%, rgba(16, 14, 19, 0.7) 38%, rgba(16, 14, 19, 0.15) 72%);
  }
  .hero__media {
    background-position: 58% 30%;
  }
  .hero__facts {
    flex-direction: column;
    gap: 4px;
    margin-bottom: 32px;
  }
}

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

/* ---------- Sections --------------------------------------------------- */

.section {
  padding-block: clamp(88px, 11vw, 150px);
}

.section-head {
  max-width: 780px;
  margin-bottom: clamp(56px, 7vw, 88px);
}

.section-title {
  margin-bottom: 0.4em;
  font-size: var(--h2-size);
  letter-spacing: -0.02em;
}

.lead {
  max-width: 58ch;
  margin: 0 0 0 calc(var(--h2-size) * var(--prompt-indent));
  color: var(--text);
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.3125rem);
  line-height: 1.6;
}

.accent-heading {
  color: var(--accent);
  font-size: clamp(1.5rem, 1.3rem + 0.6vw, 1.875rem);
}

/* About: mission statement */
.mission {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}
.mission__statement {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.is-swiss {
  color: var(--swiss);
}
.is-thai {
  color: var(--thai);
}
.mission__copy {
  max-width: 60ch;
  margin: 0;
}

/* The bridge: Switzerland to Chiang Mai, with live local times */
.bridge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "ch line th";
  align-items: center;
  gap: 28px;
  margin-top: clamp(56px, 7vw, 88px);
}
.bridge__end {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
}
.bridge__end--ch {
  grid-area: ch;
}
.bridge__end--th {
  grid-area: th;
  align-items: flex-end;
  text-align: right;
}
.bridge__place {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.3;
}
.bridge__end--ch .bridge__place::before,
.bridge__end--th .bridge__place::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--swiss);
}
.bridge__end--th .bridge__place::after {
  background: var(--thai);
}
.bridge__time {
  color: var(--muted);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}
.bridge__end--ch .bridge__time {
  padding-left: 20px;
}
.bridge__end--th .bridge__time {
  padding-right: 20px;
}
.bridge__time:empty {
  display: none;
}
.bridge__line {
  grid-area: line;
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, var(--swiss), var(--thai));
  container-type: inline-size;
}
.bridge__runner {
  position: absolute;
  top: 50%;
  left: 0;
  height: 18px;
  margin-top: -9px;
  color: var(--ink);
  transform: translateX(calc(50cqw - 5px));
}
.bridge__diff {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.bridge__diff:empty {
  display: none;
}
.bridge.is-live .bridge__runner {
  animation: bridge-run 6s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes bridge-run {
  0% { transform: translateX(0); opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { transform: translateX(calc(100cqw - 10px)); opacity: 0; }
}

@media (max-width: 640px) {
  .bridge {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "ch th"
      "line line";
    gap: 18px 16px;
  }
  .bridge__place {
    font-size: 0.975rem;
  }
}

/* About: six service areas, short lead + chevron bullets */
.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 64px clamp(32px, 4vw, 60px);
  margin: clamp(80px, 10vw, 128px) 0 0;
  padding: clamp(64px, 8vw, 96px) 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.feature {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Icon tile: echoes the portrait frames (offset block behind a framed square) */
.feature__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 28px;
  color: var(--accent);
  isolation: isolate;
}
.feature__icon::before,
.feature__icon::after {
  content: "";
  position: absolute;
  inset: 0;
}
.feature__icon::before {
  background: var(--accent);
  transform: translate(6px, 6px);
  transition: transform 0.45s var(--ease-out), background-color 0.3s ease;
}
.feature__icon::after {
  background: var(--paper);
  border: 1.5px solid var(--ink);
}
.feature__icon .icon {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  transition: transform 0.45s var(--ease-out);
}
.feature:hover .feature__icon::before {
  transform: translate(9px, 9px);
}
.feature:hover .feature__icon .icon {
  transform: scale(1.08);
}

.feature h3 {
  margin-bottom: 0.4em;
  font-size: 1.375rem;
}
.feature__lead {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.55;
}
.feature__points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.feature__points li {
  position: relative;
  padding-left: 20px;
  color: var(--text);
  font-size: 0.96875rem;
  line-height: 1.55;
}
.feature__points li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 0.48em;
  width: 6px;
  height: 10px;
  background: var(--accent);
  -webkit-mask: var(--chev-mask) center / contain no-repeat;
  mask: var(--chev-mask) center / contain no-repeat;
}

@media (max-width: 1000px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px 40px;
  }
}

@media (max-width: 860px) {
  .mission {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 640px) {
  .features {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .feature__icon {
    width: 46px;
    height: 46px;
    margin-bottom: 24px;
  }
  .feature__icon .icon {
    width: 23px;
    height: 23px;
  }
}

/* Future-proof: agentic workflows */
.section--future {
  color: rgba(255, 255, 255, 0.78);
}
.section--future .section-title {
  color: #fff;
}
.section--future .prompt > .chev {
  color: var(--accent-on-dark);
}
.section--future .cursor {
  background: var(--accent-on-dark);
}

.future {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.future .section-title {
  margin-bottom: 0.5em;
}
.future__statement,
.future__lead {
  margin-left: calc(var(--h2-size) * var(--prompt-indent));
}
.future__statement {
  margin-bottom: 0.55em;
  color: #fff;
  font-weight: 800;
  font-size: clamp(1.9rem, 1.2rem + 2.3vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.future__statement .is-accent {
  color: var(--accent-on-dark);
}
.future__lead {
  max-width: 54ch;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  line-height: 1.65;
}

/* Compact agent loop: three steps on a ring, a chevron running round it */
.loop {
  width: 100%;
  max-width: 380px;
  margin: 0 0 0 auto;
}
.loop__graphic {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.loop__ring {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1.5;
  stroke-dasharray: 3 6;
}
.loop__runner {
  fill: var(--accent-on-dark);
  color: var(--accent-on-dark);
}
.loop__runner {
  transform-box: view-box;
  transform-origin: 180px 150px;
}
.loop__node circle {
  fill: var(--ink);
  stroke: var(--accent-on-dark);
  stroke-width: 1.5;
}
.loop__node use,
.loop__repeat {
  fill: none;
  stroke: var(--accent-on-dark);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.loop__node text,
.loop__center {
  fill: #fff;
  font-family: var(--font);
  font-weight: 800;
  font-size: 15px;
  text-anchor: middle;
}
.loop__center {
  fill: rgba(255, 255, 255, 0.62);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.loop__repeat {
  stroke: rgba(255, 255, 255, 0.45);
}
.loop figcaption {
  margin-top: 22px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
  line-height: 1.5;
  text-align: center;
  text-wrap: balance;
}
.loop figcaption .icon {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  vertical-align: -4px;
  color: var(--accent-on-dark);
}

@media (max-width: 900px) {
  .future {
    grid-template-columns: 1fr;
  }
  .loop {
    max-width: 340px;
    margin: 8px auto 0;
  }
}

/* Team */
.team {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 56px 40px;
  padding: 0;
  list-style: none;
}

/* Portrait frame: the colour block says where someone sits (Swiss red / Thai purple) */
.member__frame {
  position: relative;
  margin: 0 8px 24px 0;
}
.member__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--thai);
  transform: translate(8px, 8px);
  transition: transform 0.5s var(--ease-out);
}
.member__frame--ch::before {
  background: var(--swiss);
}
.member__frame img {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper-2);
  filter: saturate(0.9);
  transition: transform 0.5s var(--ease-out), filter 0.5s ease;
}
.member:hover .member__frame img {
  transform: translate(-4px, -4px);
  filter: none;
}
.member:hover .member__frame::before {
  transform: translate(10px, 10px);
}

.member__name {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.2;
}
.member__role {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  line-height: 1.55;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .team {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px 22px;
  }
  .member__name {
    font-size: 1.0625rem;
  }
  .member__role {
    font-size: 0.6875rem;
    letter-spacing: 0.06em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .member__frame::before,
  .member__frame img,
  .feature__icon::before,
  .feature__icon .icon {
    transition: none;
  }
}

/* ---------- Light background texture ---------------------------------- */

.section--dots {
  position: relative;
  isolation: isolate;
}
.section--dots::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(color-mix(in srgb, var(--accent) 42%, transparent) 1.3px, transparent 1.8px);
  background-size: 24px 24px;
  -webkit-mask-image:
    radial-gradient(ellipse 60% 55% at 96% 0%, #000 0%, transparent 75%),
    radial-gradient(ellipse 16% 38% at 0% 70%, #000 0%, transparent 80%);
  mask-image:
    radial-gradient(ellipse 60% 55% at 96% 0%, #000 0%, transparent 75%),
    radial-gradient(ellipse 16% 38% at 0% 70%, #000 0%, transparent 80%);
}
.section--team.section--dots::before {
  -webkit-mask-image:
    radial-gradient(ellipse 55% 40% at 0% 0%, #000 0%, transparent 75%),
    radial-gradient(ellipse 55% 40% at 100% 100%, #000 0%, transparent 75%);
  mask-image:
    radial-gradient(ellipse 55% 40% at 0% 0%, #000 0%, transparent 75%),
    radial-gradient(ellipse 55% 40% at 100% 100%, #000 0%, transparent 75%);
}

.section--future {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(55% 70% at 100% 0%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    var(--ink);
}
.section--future::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1.5px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 55%);
  mask-image: linear-gradient(180deg, #000, transparent 55%);
}

/* ---------- Scroll life: frames slide out as a list arrives ------------ */

[data-reveal].is-waiting .feature__icon::before,
[data-reveal].is-waiting .member__frame::before {
  transform: translate(0, 0);
}
[data-reveal].is-revealing .feature__icon::before,
[data-reveal].is-revealing .member__frame::before {
  transition-duration: 0.8s;
  transition-delay: calc(var(--i, 0) * 70ms);
}

/* The agent loop runs while it's on screen: the runner circles the ring
   and each step lights up as it passes (6s lap, 2s per step). */
.loop.is-live .loop__runner {
  animation: loop-spin 6s linear infinite;
}
.loop.is-live .loop__node circle {
  animation: loop-node 6s ease infinite;
  animation-delay: calc(var(--i, 0) * 2s);
}
@keyframes loop-spin {
  to { transform: rotate(360deg); }
}
@keyframes loop-node {
  0%, 14% { fill: var(--accent-on-dark); fill-opacity: 0.28; }
  24%, 100% { fill: var(--ink); fill-opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .bridge.is-live .bridge__runner,
  .loop.is-live .loop__runner,
  .loop.is-live .loop__node circle {
    animation: none;
  }
}

/* Recruitment */
.recruit {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px clamp(32px, 5vw, 64px);
  margin-top: clamp(96px, 12vw, 160px);
  padding-top: clamp(64px, 8vw, 96px);
  border-top: 1px solid var(--line);
}
.recruit__label {
  margin: 0 0 0.6em;
  color: var(--ink);
  font-weight: 800;
}
.recruit ul {
  padding-left: 1.1em;
}
.recruit li {
  margin-bottom: 0.8em;
  padding-left: 0.2em;
}
.recruit li::marker {
  color: var(--accent);
}

@media (max-width: 960px) {
  .recruit {
    grid-template-columns: 1fr 1fr;
  }
  .recruit__intro {
    grid-column: 1 / -1;
  }
}
@media (max-width: 640px) {
  .recruit {
    grid-template-columns: 1fr;
  }
}

/* Contact */
.section--contact {
  background: var(--paper-2);
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
.contact__form {
  grid-column: 2;
  grid-row: 1;
}
.contact__info {
  grid-column: 1;
  grid-row: 1;
}

.field {
  margin-bottom: 20px;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  padding: 18px 20px;
  border: 1px solid var(--field);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: 300 1.0625rem/1.5 var(--font);
  caret-color: var(--accent);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea {
  min-height: 190px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
.field input:hover,
.field textarea:hover {
  border-color: #b2aeb9;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.field--captcha {
  min-height: 78px;
}

.form-status {
  padding: 8px 0;
}
.form-status:focus {
  outline: none;
}
.form-status h3 {
  font-size: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
}
.form-status .prompt > .chev {
  height: 0.78em;
}

.socials {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 14px;
  padding: 0;
  list-style: none;
}
.socials a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--accent);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.socials a:hover {
  background: var(--accent);
  color: #fff;
}
.socials svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.map {
  display: block;
  width: 100%;
  height: 360px;
  border: 0;
  background: #e9e7ec;
}

@media (max-width: 860px) {
  .contact {
    grid-template-columns: 1fr;
  }
  .contact__form,
  .contact__info {
    grid-column: 1;
    grid-row: auto;
  }
  .socials {
    justify-content: flex-start;
    margin-left: -10px;
  }
  .map {
    height: 300px;
  }
}

/* ---------- Footer & back-to-top -------------------------------------- */

.footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out), visibility 0s linear 0.4s, background-color 0.2s ease;
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out), visibility 0s, background-color 0.2s ease;
}
.to-top:hover {
  background: var(--accent);
  color: #fff;
}
.to-top .chev {
  height: 15px;
  transform: rotate(-90deg);
}
