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

:root {
  --accent: #B0801F;
  --ink: #0B0C10;
}

html { background: transparent; }

body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Full-page mode only. Embedded iframes retain the original transparent 336px layout. */
body.standalone {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 32px 16px;
}
body.standalone .profile {
  width: min(336px, 100%);
  margin-inline: auto;
}

/* ---------- Profile ---------- */
.profile {
  display: block;
  width: 336px;
  padding: 24px 8px 28px;
  text-align: center;
}

/* จองพื้นที่ระหว่างรอ JS render */
.profile:empty::before {
  content: '';
  display: block;
  width: 200px;
  height: 200px;
  margin: 0 auto 56px;
}

/* Profile handoff: quick fade-out, soft upward arrival, no page reload. */
.profile.profile-exit {
  opacity: 0;
  transform: translateY(-7px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}
.profile.profile-enter {
  animation: profile-arrive 340ms cubic-bezier(.2,.75,.25,1) both;
}
@keyframes profile-arrive {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

 /* ---------- Minimal team member navigation ---------- */
.team-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  max-width: 320px;
  margin: 32px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(11, 12, 16, .12);
}
.team-member {
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  opacity: .48;
  transition: opacity .15s;
}
.team-member:hover { opacity: 1; }
.team-member.is-active { color: var(--accent); opacity: 1; font-weight: 600; }
.team-member:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

/* ---------- ISO CEO avatar ---------- */
.avatar-stage {
  width: 200px;
  margin: 0 auto;
}
.avatar-stage img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .08));
}

/* ---------- Seamless infinite logo carousel ---------- */
.logo-carousel {
  width: 100%;
  max-width: 320px;
  margin: 56px auto 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 10%, #000 90%, transparent 100%);
}

.logo-track {
  display: flex;
  width: max-content;
  animation: logo-scroll 30s linear infinite;
}

.logo-set {
  display: flex;
  align-items: center;
  gap: 52px;
  padding-right: 52px;
  list-style: none;
  flex: none;
}

.logo-set li {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  flex: none;
}

.logo-set img {
  display: block;
  height: 100%;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  opacity: .8;
}

.logo-set .wordmark {
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 26px;
  letter-spacing: .04em;
  white-space: nowrap;
  opacity: .65;
  line-height: 1;
}

@keyframes logo-scroll {
  to { transform: translateX(-50%); }
}

.logo-carousel:hover .logo-track {
  animation-play-state: paused;
}

/* project logo links */
.logo-set a.logo-link {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.logo-set a.logo-link:hover img { opacity: 1; }
.logo-set a.logo-link:hover .wordmark { opacity: 1; }
.logo-set a.logo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ---------- Divider / Vision / Values ---------- */
.divider {
  width: 48px;
  height: 1px;
  margin: 30px auto 24px;
  background: currentColor;
  opacity: .25;
}

.vision {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  opacity: .85;
  letter-spacing: .2px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 26px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .5;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .logo-track { animation: none; }
  .profile.profile-exit, .profile.profile-enter { animation: none; transition: none; opacity: 1; transform: none; }
}
